Class containing interface to MDAtomsTyped. More...
#include <MDAtoms.h>
Public Member Functions | |
virtual | ~MDAtomsBase () |
Virtual destructor, just to allow inheritance. More... | |
virtual unsigned | getRealPrecision () const =0 |
Get the size of MD-real. More... | |
virtual void | setm (void *m)=0 |
Set a pointer to the mass array in the MD code. More... | |
virtual void | setc (void *m)=0 |
Set a pointer to the charge array in the MD code. More... | |
virtual void | setBox (void *)=0 |
Set a pointer to the box array (3x3) in the MD code. More... | |
virtual void | setp (void *p)=0 |
Set a pointer to the positions array in the MD code. More... | |
virtual void | setVirial (void *)=0 |
Set a pointer to the virial array (3x3) in the MD code. More... | |
virtual void | setf (void *f)=0 |
Set a pointer to the forces array in the MD code. More... | |
virtual void | setp (void *p, int i)=0 |
Set a pointer to the position array in the MD code. More... | |
virtual void | setf (void *f, int i)=0 |
Set a pointer to the force array in the MD code. More... | |
virtual void | setUnits (const Units &units, const Units &MDUnits)=0 |
Set internal and MD units. More... | |
virtual void | MD2double (const void *, double &) const =0 |
Convert a pointer to an MD-real to a double. More... | |
virtual void | double2MD (const double &, void *) const =0 |
Convert a double to a pointer to an MD-real. More... | |
virtual void | getBox (Tensor &) const =0 |
Retrieve box as a plumed Tensor. More... | |
virtual void | getPositions (const std::vector< int > &index, std::vector< Vector > &p) const =0 |
Retrieve selected positions. More... | |
virtual void | getPositions (unsigned i, unsigned j, std::vector< Vector > &p) const =0 |
Retrieve all atom positions from index i to index j. More... | |
virtual void | getMasses (const std::vector< int > &index, std::vector< double > &m) const =0 |
Retrieve selected masses. More... | |
virtual void | getCharges (const std::vector< int > &index, std::vector< double > &c) const =0 |
Retrieve selected charges. More... | |
virtual void | getLocalPositions (std::vector< Vector > &p) const =0 |
Retrieve local positions. More... | |
virtual void | updateVirial (const Tensor &v) const =0 |
Increment the virial by an amount v. More... | |
virtual void | updateForces (const std::vector< int > &index, const std::vector< Vector > &f)=0 |
Increment the force on selected atoms. More... | |
virtual void | rescaleForces (const std::vector< int > &index, double factor)=0 |
Rescale all the forces, including the virial. More... | |
Static Public Member Functions | |
static MDAtomsBase * | create (unsigned n) |
Creates an MDAtomsTyped<T> object such that sizeof(T)==n. More... | |
Class containing interface to MDAtomsTyped.
This class is used to translate from reals of the type used in MD to plumed (doubles), and also to rearrange atoms list according to specific ordering indexes (to deal with domain decomposition codes) and layout (to allow passing xx[] yy[] zz[] arrays from the MD code).
The class is abstract, but it is possible to allocate a new pointer with create(n), where n is the actual size of MD-reals e.g.
MDAtomsBase mdatoms=MDAtomsBase::create(sizeof(float)); // ... delete mdatoms;
|
inlinevirtual |
Virtual destructor, just to allow inheritance.
|
static |
Creates an MDAtomsTyped<T> object such that sizeof(T)==n.
|
pure virtual |
Convert a double to a pointer to an MD-real.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Retrieve box as a plumed Tensor.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Retrieve selected charges.
The operation is done in such a way that c[index[i]] is equal to the charge of atom i
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Retrieve local positions.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Retrieve selected masses.
The operation is done in such a way that m[index[i]] is equal to the mass of atom i
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Retrieve selected positions.
The operation is done in such a way that p[index[i]] is equal to the coordinates of atom i
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Retrieve all atom positions from index i to index j.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Get the size of MD-real.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Convert a pointer to an MD-real to a double.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Rescale all the forces, including the virial.
It is applied to all atoms with local index going from 0 to index.size()-1
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the box array (3x3) in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the charge array in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the forces array in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the force array in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the mass array in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the positions array in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the position array in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set internal and MD units.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to the virial array (3x3) in the MD code.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure 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
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Increment the virial by an amount v.
Implemented in PLMD::MDAtomsTyped< T >.
Hosted by GitHub | 1.8.10 |