ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/UseTheForce/ForceField.hpp
Revision: 1711
Committed: Thu Nov 4 20:51:23 2004 UTC (19 years, 7 months ago) by gezelter
Original Path: trunk/OOPSE-2.0/src/UseTheForce/ForceField.hpp
File size: 1447 byte(s)
Log Message:
added new classes in progress

File Contents

# Content
1 #ifndef USETHEFORCE_FORCEFIELD_HPP
2 #define USETHEFORCE_FORCEFIELD_HPP
3
4 #define MK_STR(s) # s
5 #define STR_DEFINE(t, s) t = MK_STR(s)
6
7 #include <utilities>
8
9 #include "utils/Tuple.hpp"
10 #include "types/ShapeAtomType.hpp"
11 #include "io/basic_ifstrstream.hpp"
12
13 using namespace std;
14 using namespace oopse;
15
16 class ForceField{
17
18 public:
19
20 ForceField(){
21 hasVariant=false;
22 ffPath = getenv("FORCE_PARAM_PATH");
23 if( ffPath.empty() ) {
24 STR_DEFINE(ffPath, FRC_PATH );
25 }
26 }
27
28 virtual ~ForceFields(){}
29
30 void setVariant(const string &variant) { hasVariant = true; theVariant = variant; }
31 virtual void readParams( void ) = 0;
32
33 AtomType* getMatchingAtomType(const string &at);
34 BondType* getMatchingBondType(const string &at1, const string &at2);
35 BendType* getMatchingBendType(const string &at1, const string &at2,
36 const string &at3);
37 TorsionType* getMatchingTorsionType(const string &at1, const string &at2,
38 const string &at3, const string &at4);
39
40 double getRcutForAtomType(AtomType* at);
41
42 protected:
43
44 string ffPath;
45 ifstrstream forceFile;
46 bool hasVariant;
47 string variant;
48 map<string, AtomType*> atomTypeMap;
49 map<pair<string,string>, BondType*> bondTypeMap;
50 map<tuple3<string,string,string>, BendType*> bendTypeMap;
51 map<tuple4<string,string,string,string>, TorsionType*> torsionTypeMap;
52 string wildCardAtomTypeName;
53
54 };
55
56
57 #endif
58