Class containing interface to MDAtomsTyped. More...
#include <MDAtoms.h>
Public Member Functions | |
virtual | ~MDAtomsBase () |
Virtual destructor, just to allow inheritance. More... | |
virtual void | double2MD (const double &, const TypesafePtr &) 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 | getCharges (const std::vector< int > &index, std::vector< double > &c) const =0 |
Retrieve selected charges. More... | |
virtual double | getExtraCV (const std::string &name)=0 |
Retrieve the value of an extra CV. More... | |
virtual void | getLocalPositions (std::vector< Vector > &p) const =0 |
Retrieve local positions. More... | |
virtual void | getMasses (const std::vector< int > &index, std::vector< double > &m) const =0 |
Retrieve selected masses. More... | |
virtual Vector | getMDforces (const unsigned index) const =0 |
virtual void | getPositions (const std::vector< AtomNumber > &index, const std::vector< unsigned > &i, std::vector< Vector > &p) const =0 |
Retrieve all atom positions from atom indices and local indices. 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 unsigned | getRealPrecision () const =0 |
Get the size of MD-real. More... | |
virtual bool | isExtraCVNeeded (const std::string &name) const =0 |
Check if an extra CV is needed. More... | |
virtual void | MD2double (const TypesafePtr &, double &) const =0 |
Convert a pointer to an MD-real to a double. More... | |
virtual void | rescaleForces (const std::vector< int > &index, double factor)=0 |
Rescale all the forces, including the virial. More... | |
virtual void | resetExtraCVNeeded ()=0 |
Set all extra CV as not needed (at beginning of the step) More... | |
virtual void | setBox (const TypesafePtr &)=0 |
Set a pointer to the box array (3x3) in the MD code. More... | |
virtual void | setc (const TypesafePtr &m)=0 |
Set a pointer to the charge array in the MD code. More... | |
virtual void | setExtraCV (const std::string &name, const TypesafePtr &p)=0 |
Set a pointer to an extra CV. More... | |
virtual void | setExtraCVForce (const std::string &name, const TypesafePtr &p)=0 |
Set a pointer to an extra CV force. More... | |
virtual void | setExtraCVNeeded (const std::string &name, bool needed=true)=0 |
Inform the MD code that an extra CV is needed. More... | |
virtual void | setf (const TypesafePtr &f)=0 |
Set a pointer to the forces array in the MD code. More... | |
virtual void | setf (const TypesafePtr &f, int i)=0 |
Set a pointer to the force array in the MD code. More... | |
virtual void | setm (const TypesafePtr &m)=0 |
Set a pointer to the mass array in the MD code. More... | |
virtual void | setp (const TypesafePtr &p)=0 |
Set a pointer to the positions array in the MD code. More... | |
virtual void | setp (const TypesafePtr &p, int i)=0 |
Set a pointer to the position array in the MD code. More... | |
virtual void | setUnits (const Units &units, const Units &MDUnits)=0 |
Set internal and MD units. More... | |
virtual void | setVirial (const TypesafePtr &)=0 |
Set a pointer to the virial array (3x3) in the MD code. More... | |
virtual void | updateExtraCVForce (const std::string &name, double f)=0 |
Update the value of an extra CV force. More... | |
virtual void | updateForces (const std::vector< AtomNumber > &index, const std::vector< unsigned > &i, const std::vector< Vector > &forces)=0 |
Increment the force on selected atoms. More... | |
virtual void | updateForces (const std::vector< int > &index, const std::vector< Vector > &f)=0 |
Increment the force on selected atoms. More... | |
virtual void | updateVirial (const Tensor &v) const =0 |
Increment the virial by an amount v. More... | |
Static Public Member Functions | |
static std::unique_ptr< 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.
std::unique_ptr<MDAtomsBase> mdatoms=MDAtomsBase::create(sizeof(float));
|
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 the value of an extra CV.
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 |
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Retrieve all atom positions from atom indices and local indices.
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 |
Check if an extra CV is needed.
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 all extra CV as not needed (at beginning of the step)
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 an extra CV.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Set a pointer to an extra CV force.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Inform the MD code that an extra CV is needed.
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 |
Update the value of an extra CV force.
Implemented in PLMD::MDAtomsTyped< T >.
|
pure virtual |
Increment the force on selected atoms.
The operation is done only for local atoms used in an action
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.17 |