ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Atom.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/Atom.hpp (file contents):
Revision 409 by gezelter, Wed Mar 26 21:04:38 2003 UTC vs.
Revision 669 by chuckv, Thu Aug 7 00:47:33 2003 UTC

# Line 20 | Line 20 | class Atom{ (public)
20    static double* ul; // the lab frame unit directional vector
21    static int nElements;
22  
23 <  static void createArrays (int nElements);
23 >  static void createArrays (int the_nElements);
24    static void destroyArrays(void);
25    void addAtoms(int nAdded, double* Apos, double* Avel, double* Afrc,
26                  double* Atrq, double* AAmat, double* Amu,
# Line 36 | Line 36 | class Atom{ (public)
36    static double* getMuArray( void ) { return mu; }
37    static double* getUlArray( void ) { return ul; }
38    
39 +  void getPos( double theP[3] );
40 +  void setPos( double theP[3] );
41 +
42    double getX() const {return pos[offsetX];}
43    double getY() const {return pos[offsetY];}
44    double getZ() const {return pos[offsetZ];}
# Line 43 | Line 46 | class Atom{ (public)
46    void setY(double y) {pos[offsetY] = y;}
47    void setZ(double z) {pos[offsetZ] = z;}
48    
49 +  void getVel( double theV[3] );
50 +  void setVel( double theV[3] );
51 +
52    double get_vx() const  {return vel[offsetX];}
53    double get_vy() const  {return vel[offsetY];}
54    double get_vz() const  {return vel[offsetZ];}
# Line 50 | Line 56 | class Atom{ (public)
56    void set_vy(double vy) {vel[offsetY] = vy;}
57    void set_vz(double vz) {vel[offsetZ] = vz;}
58    
59 +
60 +  void getFrc( double theF[3] );
61 +  void addFrc( double theF[3] );
62 +
63    double getFx() const   {return frc[offsetX];}
64    double getFy() const   {return frc[offsetY];}
65    double getFz() const   {return frc[offsetZ];}
# Line 60 | Line 70 | class Atom{ (public)
70  
71    double getMass() const {return c_mass;}
72    void setMass(double mass) {c_mass = mass;}
73 +
74 +  double getEamRcut() const {return myEamRcut;}
75 +  void setEamRcut(double eamRcut) {myEamRcut = eamRcut;}
76    
77    double getSigma() const {return c_sigma;}
78    void setSigma(double sigma) {c_sigma = sigma;}
# Line 95 | Line 108 | class Atom{ (public)
108    void seVDW( void )        { is_VDW = 1; is_LJ = 0; }
109    int isVDW( void )    { return is_VDW; }
110  
111 +  void setEAM( void ) { is_EAM = 1; }
112 +  int  isEAM( void ) { return is_EAM; }
113 +
114    virtual int isDirectional( void ) = 0;
115  
116  
# Line 105 | Line 121 | class Atom{ (public)
121    double c_epslon; /* the esplon parameter for VDW interactions */
122    double c_covalent; // The covalent radius of the atom.
123  
124 +  double myEamRcut; // Atom rcut for eam defined by the forcefield.
125 +
126    int index; /* set the atom's index */
127    int offset; // the atom's offset in the storage array
128    int offsetX, offsetY, offsetZ;
# Line 121 | Line 139 | class Atom{ (public)
139    int has_dipole; // dipole boolean
140    int is_VDW;    // VDW boolean
141    int is_LJ;    // LJ boolean
142 +  int is_EAM; //EAM boolean
143  
144   #ifdef IS_MPI
145    int myGlobalIndex;
# Line 154 | Line 173 | class DirectionalAtom : public Atom { (public)
173    }
174    virtual ~DirectionalAtom() {}
175  
176 +  void printAmatIndex( void );
177 +
178    int isDirectional(void) { return 1; }
179    
180    void setSSD( int value) { ssdIdentity = value; }
181    int isSSD(void) {return ssdIdentity; }
182  
162  void setA( double the_A[3][3] );
163
164  void setI( double the_I[3][3] );
165
166  void setQ( double the_q[4] );
183    
184    void setEuler( double phi, double theta, double psi );
185 +
186 +  double getSUx( void ) { return sux; }
187 +  double getSUy( void ) { return suy; }
188 +  double getSUz( void ) { return suz; }
189    
190    void setSUx( double the_sux ) { sux = the_sux; }
191    void setSUy( double the_suy ) { suy = the_suy; }
192    void setSUz( double the_suz ) { suz = the_suz; }
193  
174  void setJx( double the_jx ) { jx = the_jx; }
175  void setJy( double the_jy ) { jy = the_jy; }
176  void setJz( double the_jz ) { jz = the_jz; }
177    
178  void addTx( double the_tx ) { trq[offsetX] += the_tx;}
179  void addTy( double the_ty ) { trq[offsetY] += the_ty;}
180  void addTz( double the_tz ) { trq[offsetZ] += the_tz;}
181
194    void zeroForces() {
195      frc[offsetX] = 0.0;
196      frc[offsetY] = 0.0;
# Line 188 | Line 200 | class DirectionalAtom : public Atom { (public)
200      trq[offsetY] = 0.0;
201      trq[offsetZ] = 0.0;
202    }
191
192  double getAxx( void ) { return Amat[Axx]; }
193  double getAxy( void ) { return Amat[Axy]; }
194  double getAxz( void ) { return Amat[Axz]; }
195  
196  double getAyx( void ) { return Amat[Ayx]; }
197  double getAyy( void ) { return Amat[Ayy]; }
198  double getAyz( void ) { return Amat[Ayz]; }
199  
200  double getAzx( void ) { return Amat[Azx]; }
201  double getAzy( void ) { return Amat[Azy]; }
202  double getAzz( void ) { return Amat[Azz]; }
203  
204    void getA( double the_A[3][3] ); // get the full rotation matrix
205 +  void setA( double the_A[3][3] );
206  
206  double getSUx( void ) { return sux; }
207  double getSUy( void ) { return suy; }
208  double getSUz( void ) { return suz; }
209
207    void getU( double the_u[3] ); // get the unit vetor
208 +  void updateU( void );
209 +
210    void getQ( double the_q[4] ); // get the quanternions
211 +  void setQ( double the_q[4] );
212  
213 +  void getJ( double theJ[3] );
214 +  void setJ( double theJ[3] );
215 +
216    double getJx( void ) { return jx; }
217    double getJy( void ) { return jy; }
218    double getJz( void ) { return jz; }
219  
220 <  double getTx( void ) { return trq[offsetX];}
221 <  double getTy( void ) { return trq[offsetY]; }
222 <  double getTz( void ) { return trq[offsetZ]; }
220 >  void setJx( double the_jx ) { jx = the_jx; }
221 >  void setJy( double the_jy ) { jy = the_jy; }
222 >  void setJz( double the_jz ) { jz = the_jz; }
223  
224 +  void getTrq( double theT[3] );
225 +  void addTrq( double theT[3] );
226 +
227 +  //  double getTx( void ) { return trq[offsetX];}
228 +  //  double getTy( void ) { return trq[offsetY]; }
229 +  //  double getTz( void ) { return trq[offsetZ]; }
230 +
231 +  void addTx( double the_tx ) { trq[offsetX] += the_tx;}
232 +  void addTy( double the_ty ) { trq[offsetY] += the_ty;}
233 +  void addTz( double the_tz ) { trq[offsetZ] += the_tz;}
234 +
235 +  void setI( double the_I[3][3] );
236 +  void getI( double the_I[3][3] );
237 +  
238    double getIxx( void ) { return Ixx; }
239    double getIxy( void ) { return Ixy; }
240    double getIxz( void ) { return Ixz; }
# Line 229 | Line 246 | class DirectionalAtom : public Atom { (public)
246    double getIzx( void ) { return Izx; }
247    double getIzy( void ) { return Izy; }
248    double getIzz( void ) { return Izz; }
249 +  
250  
251    double getMu( void ) { return mu[index]; }
252    void setMu( double the_mu ) { mu[index] = the_mu; }
253  
254    void lab2Body( double r[3] );
255    void body2Lab( double r[3] );
238  void updateU( void );
256  
257 +
258   private:
259    int dIndex;
260  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines