ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/types/AtomType.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/types/AtomType.hpp (file contents):
Revision 1740 by tim, Mon Nov 15 23:00:32 2004 UTC vs.
Revision 1813 by tim, Wed Dec 1 17:38:32 2004 UTC

# Line 10 | Line 10 | using name_space std;
10   #include "types/AtomTypeProperties.h"
11   #include "UseTheForce/DarkSide/atype_interface.h"
12  
13 < using name_space std;
13 > using namespace std;
14  
15 < name_space oopse {
15 > namespace oopse {
16      /**
17       * @class AtomType
18       * AtomType is what OOPSE looks to for unchanging data about an atom.
# Line 26 | Line 26 | name_space oopse {
26              AtomType();
27  
28              virtual ~AtomType() { } ;
29 +
30 +            virtual void complete();
31 +
32              /**
33               * Finishes off the AtomType by communicating the logical portions of the
34               * structure to the Fortran atype module
35               */
36 <            void complete();
37 <
36 >            void makeFortranAtomType();
37 >            
38              void setMass(double m) {
39                  mass_ = m;
40              }
# Line 41 | Line 44 | name_space oopse {
44              }
45  
46              void setIdent(int id) {
47 <                atp_.ident = id;
47 >                atp.ident = id;
48              }
49  
50              int getIdent() {
51 <                return atp_.ident;
51 >                return atp.ident;
52              }
53  
54              void setName(const std::string&name) {
# Line 57 | Line 60 | name_space oopse {
60              }
61  
62              void setLennardJones() {
63 <                atp_.is_LennardJones = 1;
63 >                atp.is_LennardJones = 1;
64              }
65  
66              bool isLennardJones() {
67 <                return atp_.is_LennardJones;
67 >                return atp.is_LennardJones;
68              }
69  
67            void setElectrostatic() {
68                atp_.is_Electrostatic = 1;
69            }
70  
71              bool isElectrostatic() {
72 <                return atp_.is_Electrostatic;
72 >                return isCharge() || isMultipole();
73              }
74  
75              void setEAM() {
76 <                atp_.is_EAM = 1;
76 >                atp.is_EAM = 1;
77              }
78  
79              bool isEAM() {
80 <                return atp_.is_EAM;
80 >                return atp.is_EAM;
81              }
82  
83              void setCharge() {
84 <                atp_.is_Charge = 1;
85 <                atp_.is_Electrostatic = 1;
84 >                atp.is_Charge = 1;
85              }
86  
87              bool isCharge() {
88 <                return atp_.is_Charge;
88 >                return atp.is_Charge;
89              }
90  
91              bool isDirectional() {
92 <                return atp_.is_Directional;
92 >                return atp.is_Directional;
93              }
94  
95              bool isDipole() {
96 <                return atp_.is_Dipole;
96 >                return atp.is_Dipole;
97              }
98  
99 +            bool isQuadrupole() {
100 +                return atp.is_Quadrupole;
101 +            }
102 +            
103 +            bool isMultipole() {
104 +                return isDipole() || isQuadrupole();
105 +            }
106 +
107              bool isGayBerne() {
108 <                return atp_.is_GayBerne;
108 >                return atp.is_GayBerne;
109              }
110  
111              bool isSticky() {
112 <                return atp_.is_Sticky;
112 >                return atp.is_Sticky;
113              }
114  
115              bool isShape() {
116 <                return atp_.is_Shape;
116 >                return atp.is_Shape;
117              }
118  
119              //below functions are just forward functions
# Line 149 | Line 156 | name_space oopse {
156  
157          protected:
158  
159 <            AtomTypeProperties atp_;
159 >            AtomTypeProperties atp;
160              double mass_;
161              std::string name_;
162  
# Line 165 | Line 172 | name_space oopse {
172              
173      };
174  
175 +    struct LJParam {
176 +        double epsilon;
177 +        double sigma;
178 +    };
179 +    typedef SimpleTypeData<LJParam> LJParamGenericData;
180 +
181 +    struct EAMParam {
182 +        double latticeConstant;        
183 +        int nrho;
184 +        double drho;
185 +        int nr;
186 +        double dr;
187 +        double rcut;
188 +        std::vector<double> rvals;
189 +        std::vector<double> rhovals;
190 +        std::vector<double> Frhovals;    
191 +    };
192 +
193 +    typedef SimpleTypeData<EAMParam> EAMParamGenericData;
194   }
195  
196   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines