1 |
|
#ifndef _ATOM_H_ |
2 |
|
#define _ATOM_H_ |
3 |
|
|
4 |
< |
#include <cstring> |
5 |
< |
#include <cstdlib> |
4 |
> |
#include <string.h> |
5 |
> |
#include <stdlib.h> |
6 |
|
#include <iostream> |
7 |
|
|
8 |
|
#include "SimState.hpp" |
13 |
|
Atom(int theIndex, SimState* theConfig ); |
14 |
|
virtual ~Atom() {} |
15 |
|
|
16 |
< |
void setCoords(void); |
16 |
> |
virtual void setCoords(void); |
17 |
|
|
18 |
– |
// void addAtoms(int nAdded, double* Apos, double* Avel, double* Afrc, |
19 |
– |
// double* Atrq, double* AAmat, double* Amu, |
20 |
– |
// double* Aul); |
21 |
– |
// void deleteAtom(int theIndex); |
22 |
– |
// void deleteRange(int startIndex, int stopIndex); |
23 |
– |
|
18 |
|
void getPos( double theP[3] ); |
19 |
|
void setPos( double theP[3] ); |
20 |
|
|
63 |
|
void setLJ( void ) { is_LJ = 1; is_VDW = 0; } |
64 |
|
int isLJ( void ) { return is_LJ; } |
65 |
|
|
66 |
< |
void seVDW( void ) { is_VDW = 1; is_LJ = 0; } |
66 |
> |
void setVDW( void ) { is_VDW = 1; is_LJ = 0; } |
67 |
|
int isVDW( void ) { return is_VDW; } |
68 |
|
|
69 |
|
void setEAM( void ) { is_EAM = 1; } |
70 |
|
int isEAM( void ) { return is_EAM; } |
71 |
|
|
72 |
+ |
void setCharged( void ) { is_charged = 1; } |
73 |
+ |
int isCharged( void ) { return is_charged; } |
74 |
+ |
|
75 |
|
virtual int isDirectional( void ) = 0; |
76 |
|
|
77 |
|
|
108 |
|
int c_n_hyd; // the number of hydrogens bonded to the atom |
109 |
|
|
110 |
|
int has_dipole; // dipole boolean |
111 |
< |
int is_VDW; // VDW boolean |
112 |
< |
int is_LJ; // LJ boolean |
113 |
< |
int is_EAM; //EAM boolean |
111 |
> |
int is_VDW; // VDW boolean |
112 |
> |
int is_LJ; // LJ boolean |
113 |
> |
int is_EAM; // EAM boolean |
114 |
> |
int is_charged; // isCharge boolean |
115 |
|
|
116 |
|
bool hasCoords; |
117 |
|
|
141 |
|
sux = 0.0; |
142 |
|
suy = 0.0; |
143 |
|
suz = 0.0; |
144 |
+ |
myMu = 0.0; |
145 |
|
} |
146 |
|
virtual ~DirectionalAtom() {} |
147 |
|
|
148 |
+ |
virtual void setCoords(void); |
149 |
+ |
|
150 |
|
void printAmatIndex( void ); |
151 |
|
|
152 |
|
int isDirectional(void) { return 1; } |
216 |
|
void body2Lab( double r[3] ); |
217 |
|
|
218 |
|
|
219 |
+ |
// Four functions added for derivatives with respect to Euler Angles: |
220 |
+ |
// (Needed for minimization routines): |
221 |
+ |
|
222 |
+ |
void getGrad(double gradient[6] ); |
223 |
+ |
void getEulerAngles( double myEuler[3] ); |
224 |
+ |
|
225 |
+ |
double max(double x, double y); |
226 |
+ |
double min(double x, double y); |
227 |
+ |
|
228 |
+ |
|
229 |
|
private: |
230 |
|
int dIndex; |
231 |
|
|
232 |
+ |
double myMu; |
233 |
+ |
|
234 |
|
double sux, suy, suz; // the standard unit vector ( body fixed ) |
235 |
|
double jx, jy, jz; // the angular momentum vector ( body fixed ) |
236 |
|
|