Class containing the pointers to the MD data It is templated so that single and double precision versions coexist IT IS STILL UNDOCUMENTED. More...
Public Member Functions | |
MDAtomsTyped () | |
void | setm (void *m) |
Set a pointer to the mass array in the MD code. More... | |
void | setc (void *m) |
Set a pointer to the charge array in the MD code. More... | |
void | setBox (void *) |
Set a pointer to the box array (3x3) in the MD code. More... | |
void | setp (void *p) |
Set a pointer to the positions array in the MD code. More... | |
void | setVirial (void *) |
Set a pointer to the virial array (3x3) in the MD code. More... | |
void | setf (void *f) |
Set a pointer to the forces array in the MD code. More... | |
void | setp (void *p, int i) |
Set a pointer to the position array in the MD code. More... | |
void | setf (void *f, int i) |
Set a pointer to the force array in the MD code. More... | |
void | setUnits (const Units &, const Units &) |
Set internal and MD units. More... | |
void | MD2double (const void *m, double &d) const |
Convert a pointer to an MD-real to a double. More... | |
void | double2MD (const double &d, void *m) const |
Convert a double to a pointer to an MD-real. More... | |
void | getBox (Tensor &) const |
Retrieve box as a plumed Tensor. More... | |
void | getPositions (const vector< int > &index, vector< Vector > &positions) const |
Retrieve selected positions. More... | |
void | getMasses (const vector< int > &index, vector< double > &) const |
Retrieve selected masses. More... | |
void | getCharges (const vector< int > &index, vector< double > &) const |
Retrieve selected charges. More... | |
void | updateVirial (const Tensor &) const |
Increment the virial by an amount v. More... | |
void | updateForces (const vector< int > &index, const vector< Vector > &) |
Increment the force on selected atoms. More... | |
void | rescaleForces (const vector< int > &index, double factor) |
Rescale all the forces, including the virial. More... | |
unsigned | getRealPrecision () const |
Get the size of MD-real. More... | |
Static Public Member Functions | |
static MDAtomsBase * | create (unsigned n) |
Creates an MDAtomsTyped<T> object such that sizeof(T)==n. More... | |
Private Attributes | |
double | scalep |
double | scalef |
double | scaleb |
double | scalev |
int | stride |
T * | m |
T * | c |
T * | px |
T * | py |
T * | pz |
T * | fx |
T * | fy |
T * | fz |
T * | box |
T * | virial |
Class containing the pointers to the MD data It is templated so that single and double precision versions coexist IT IS STILL UNDOCUMENTED.
IT PROBABLY NEEDS A STRONG CLEANUP
Definition at line 36 of file MDAtoms.cpp.
PLMD::MDAtomsTyped< T >::MDAtomsTyped | ( | ) |
Definition at line 206 of file MDAtoms.cpp.
|
staticinherited |
Creates an MDAtomsTyped<T> object such that sizeof(T)==n.
Definition at line 224 of file MDAtoms.cpp.
|
inlinevirtual |
Convert a double to a pointer to an MD-real.
Implements PLMD::MDAtomsBase.
Definition at line 62 of file MDAtoms.cpp.
|
virtual |
Retrieve box as a plumed Tensor.
Implements PLMD::MDAtomsBase.
Definition at line 88 of file MDAtoms.cpp.
|
virtual |
Retrieve selected charges.
The operation is done in such a way that c[index[i]] is equal to the charge of atom i
Implements PLMD::MDAtomsBase.
Definition at line 109 of file MDAtoms.cpp.
|
virtual |
Retrieve selected masses.
The operation is done in such a way that m[index[i]] is equal to the mass of atom i
Implements PLMD::MDAtomsBase.
Definition at line 103 of file MDAtoms.cpp.
|
virtual |
Retrieve selected positions.
The operation is done in such a way that p[index[i]] is equal to the coordinates of atom i
Implements PLMD::MDAtomsBase.
Definition at line 94 of file MDAtoms.cpp.
|
virtual |
|
inlinevirtual |
Convert a pointer to an MD-real to a double.
Implements PLMD::MDAtomsBase.
Definition at line 59 of file MDAtoms.cpp.
|
virtual |
Rescale all the forces, including the virial.
It is applied to all atoms with local index going from 0 to index.size()-1
Implements PLMD::MDAtomsBase.
Definition at line 129 of file MDAtoms.cpp.
|
virtual |
Set a pointer to the box array (3x3) in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 154 of file MDAtoms.cpp.
|
virtual |
Set a pointer to the charge array in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 201 of file MDAtoms.cpp.
|
virtual |
Set a pointer to the forces array in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 160 of file MDAtoms.cpp.
|
virtual |
Set a pointer to the force array in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 186 of file MDAtoms.cpp.
|
virtual |
Set a pointer to the mass array in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 196 of file MDAtoms.cpp.
|
virtual |
Set a pointer to the positions array in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 144 of file MDAtoms.cpp.
|
virtual |
Set a pointer to the position array in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 170 of file MDAtoms.cpp.
|
virtual |
|
virtual |
Set a pointer to the virial array (3x3) in the MD code.
Implements PLMD::MDAtomsBase.
Definition at line 180 of file MDAtoms.cpp.
|
virtual |
Increment the force on selected atoms.
The operation is done in such a way that f[index[i]] is added to the force on atom i
Implements PLMD::MDAtomsBase.
Definition at line 120 of file MDAtoms.cpp.
|
virtual |
Increment the virial by an amount v.
Implements PLMD::MDAtomsBase.
Definition at line 115 of file MDAtoms.cpp.
|
private |
Definition at line 46 of file MDAtoms.cpp.
|
private |
Definition at line 43 of file MDAtoms.cpp.
|
private |
Definition at line 45 of file MDAtoms.cpp.
|
private |
Definition at line 45 of file MDAtoms.cpp.
|
private |
Definition at line 45 of file MDAtoms.cpp.
|
private |
Definition at line 42 of file MDAtoms.cpp.
|
private |
Definition at line 44 of file MDAtoms.cpp.
|
private |
Definition at line 44 of file MDAtoms.cpp.
|
private |
Definition at line 44 of file MDAtoms.cpp.
|
private |
Definition at line 40 of file MDAtoms.cpp.
|
private |
Definition at line 39 of file MDAtoms.cpp.
|
private |
Definition at line 39 of file MDAtoms.cpp.
|
private |
Definition at line 40 of file MDAtoms.cpp.
|
private |
Definition at line 41 of file MDAtoms.cpp.
|
private |
Definition at line 47 of file MDAtoms.cpp.
Hosted by GitHub
![]() |
![]() |