Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
PLMD::Atoms Class Reference

Class containing atom related quantities from the MD code. More...

#include <Atoms.h>

Classes

class  DomainDecomposition
 

Public Member Functions

 Atoms (PlumedMain &plumed)
 
 ~Atoms ()
 
void init ()
 
void share ()
 
void shareAll ()
 
void wait ()
 
void updateForces ()
 
void setRealPrecision (int)
 
int getRealPrecision () const
 
void setTimeStep (void *)
 
double getTimeStep () const
 
void setKbT (void *)
 
double getKbT () const
 
void setNatoms (int)
 
const int & getNatoms () const
 
const long int & getDdStep () const
 
const std::vector< int > & getGatindex () const
 
const PbcgetPbc () const
 
void getLocalPositions (std::vector< Vector > &)
 
void getLocalForces (std::vector< Vector > &)
 
const TensorgetVirial () const
 
void setCollectEnergy (bool b)
 
void setDomainDecomposition (Communicator &)
 
void setAtomsGatindex (int *, bool)
 
void setAtomsContiguous (int)
 
void setAtomsNlocal (int)
 
void startStep ()
 
void setEnergy (void *)
 
void setBox (void *)
 
void setVirial (void *)
 
void setPositions (void *)
 
void setPositions (void *, int)
 
void setForces (void *)
 
void setForces (void *, int)
 
void setMasses (void *)
 
void setCharges (void *)
 
bool chargesWereSet () const
 
bool boxWasSet () const
 
void MD2double (const void *m, double &d) const
 
void double2MD (const double &d, void *m) const
 
void createFullList (int *)
 
void getFullList (int **)
 
void clearFullList ()
 
void add (const ActionAtomistic *)
 
void remove (const ActionAtomistic *)
 
double getEnergy () const
 
bool isEnergyNeeded () const
 
void setMDEnergyUnits (double d)
 
void setMDLengthUnits (double d)
 
void setMDTimeUnits (double d)
 
const UnitsgetMDUnits ()
 
void setUnits (const Units &u)
 
const UnitsgetUnits ()
 
void updateUnits ()
 
AtomNumber addVirtualAtom (ActionWithVirtualAtom *)
 
void removeVirtualAtom (ActionWithVirtualAtom *)
 
ActionWithVirtualAtomgetVirtualAtomsAction (AtomNumber) const
 
bool isVirtualAtom (AtomNumber) const
 
void insertGroup (const std::string &name, const std::vector< AtomNumber > &a)
 
void removeGroup (const std::string &name)
 
void writeBinary (std::ostream &) const
 
void readBinary (std::istream &)
 
double getKBoltzmann () const
 
double getMDKBoltzmann () const
 
bool usingNaturalUnits () const
 
void setNaturalUnits (bool n)
 
void setMDNaturalUnits (bool n)
 

Private Member Functions

void resizeVectors (unsigned)
 
void share (const std::set< AtomNumber > &)
 

Private Attributes

int natoms
 
std::vector< Vectorpositions
 
std::vector< Vectorforces
 
std::vector< double > masses
 
std::vector< double > charges
 
std::vector< ActionWithVirtualAtom * > virtualAtomsActions
 
Tensor box
 
Pbcpbc
 
Tensor virial
 
double md_energy
 
double energy
 
bool dataCanBeSet
 
bool collectEnergy
 
bool energyHasBeenSet
 
unsigned positionsHaveBeenSet
 
bool massesHaveBeenSet
 
bool chargesHaveBeenSet
 
bool boxHasBeenSet
 
unsigned forcesHaveBeenSet
 
bool virialHasBeenSet
 
bool massAndChargeOK
 
unsigned shuffledAtoms
 
std::map< std::string, std::vector< AtomNumber > > groups
 
std::vector< int > fullList
 
MDAtomsBasemdatoms
 
PlumedMainplumed
 
Units MDUnits
 
Units units
 
bool naturalUnits
 
bool MDnaturalUnits
 
double timestep
 
double forceOnEnergy
 
bool zeroallforces
 if set to true, all the forces in the global array are zeroes at every step. More...
 
double kbT
 
std::vector< const ActionAtomistic * > actions
 
std::vector< int > gatindex
 
bool asyncSent
 
bool atomsNeeded
 
DomainDecomposition dd
 
long int ddStep
 

Friends

class ActionAtomistic
 
class ActionWithVirtualAtom
 

Detailed Description

Class containing atom related quantities from the MD code.

IT IS STILL UNDOCUMENTED. IT PROBABLY NEEDS A STRONG CLEANUP

Constructor & Destructor Documentation

PLMD::Atoms::Atoms ( PlumedMain plumed)
explicit
PLMD::Atoms::~Atoms ( )

Member Function Documentation

void PLMD::Atoms::add ( const ActionAtomistic a)
AtomNumber PLMD::Atoms::addVirtualAtom ( ActionWithVirtualAtom a)
bool PLMD::Atoms::boxWasSet ( ) const
inline
bool PLMD::Atoms::chargesWereSet ( ) const
inline
void PLMD::Atoms::clearFullList ( )
void PLMD::Atoms::createFullList ( int *  n)
void PLMD::Atoms::double2MD ( const double &  d,
void *  m 
) const
const long int & PLMD::Atoms::getDdStep ( ) const
inline
double PLMD::Atoms::getEnergy ( ) const
inline
void PLMD::Atoms::getFullList ( int **  x)
const std::vector< int > & PLMD::Atoms::getGatindex ( ) const
inline
double PLMD::Atoms::getKBoltzmann ( ) const
double PLMD::Atoms::getKbT ( ) const
void PLMD::Atoms::getLocalForces ( std::vector< Vector > &  localForces)
void PLMD::Atoms::getLocalPositions ( std::vector< Vector > &  localPositions)
double PLMD::Atoms::getMDKBoltzmann ( ) const
const Units& PLMD::Atoms::getMDUnits ( )
inline
const int & PLMD::Atoms::getNatoms ( ) const
inline
const Pbc & PLMD::Atoms::getPbc ( ) const
inline
int PLMD::Atoms::getRealPrecision ( ) const
double PLMD::Atoms::getTimeStep ( ) const
const Units& PLMD::Atoms::getUnits ( )
inline
const Tensor & PLMD::Atoms::getVirial ( ) const
inline
ActionWithVirtualAtom * PLMD::Atoms::getVirtualAtomsAction ( AtomNumber  i) const
inline
void PLMD::Atoms::init ( )
void PLMD::Atoms::insertGroup ( const std::string &  name,
const std::vector< AtomNumber > &  a 
)
bool PLMD::Atoms::isEnergyNeeded ( ) const
inline
bool PLMD::Atoms::isVirtualAtom ( AtomNumber  i) const
inline
void PLMD::Atoms::MD2double ( const void *  m,
double &  d 
) const
void PLMD::Atoms::readBinary ( std::istream &  i)
void PLMD::Atoms::remove ( const ActionAtomistic a)
void PLMD::Atoms::removeGroup ( const std::string &  name)
void PLMD::Atoms::removeVirtualAtom ( ActionWithVirtualAtom a)
void PLMD::Atoms::resizeVectors ( unsigned  n)
private
void PLMD::Atoms::setAtomsContiguous ( int  start)
void PLMD::Atoms::setAtomsGatindex ( int *  g,
bool  fortran 
)
void PLMD::Atoms::setAtomsNlocal ( int  n)
void PLMD::Atoms::setBox ( void *  p)
void PLMD::Atoms::setCharges ( void *  p)
void PLMD::Atoms::setCollectEnergy ( bool  b)
inline
void PLMD::Atoms::setDomainDecomposition ( Communicator comm)
void PLMD::Atoms::setEnergy ( void *  p)
void PLMD::Atoms::setForces ( void *  p)
void PLMD::Atoms::setForces ( void *  p,
int  i 
)
void PLMD::Atoms::setKbT ( void *  p)
void PLMD::Atoms::setMasses ( void *  p)
void PLMD::Atoms::setMDEnergyUnits ( double  d)
inline
void PLMD::Atoms::setMDLengthUnits ( double  d)
inline
void PLMD::Atoms::setMDNaturalUnits ( bool  n)
inline
void PLMD::Atoms::setMDTimeUnits ( double  d)
inline
void PLMD::Atoms::setNatoms ( int  n)
void PLMD::Atoms::setNaturalUnits ( bool  n)
inline
void PLMD::Atoms::setPositions ( void *  p)
void PLMD::Atoms::setPositions ( void *  p,
int  i 
)
void PLMD::Atoms::setRealPrecision ( int  p)
void PLMD::Atoms::setTimeStep ( void *  p)
void PLMD::Atoms::setUnits ( const Units u)
inline
void PLMD::Atoms::setVirial ( void *  p)
void PLMD::Atoms::share ( const std::set< AtomNumber > &  unique)
private
void PLMD::Atoms::share ( )
void PLMD::Atoms::shareAll ( )
void PLMD::Atoms::startStep ( )
void PLMD::Atoms::updateForces ( )
void PLMD::Atoms::updateUnits ( )
bool PLMD::Atoms::usingNaturalUnits ( ) const
inline
void PLMD::Atoms::wait ( )
void PLMD::Atoms::writeBinary ( std::ostream &  o) const

Friends And Related Function Documentation

friend class ActionAtomistic
friend
friend class ActionWithVirtualAtom
friend

Member Data Documentation

std::vector<const ActionAtomistic*> PLMD::Atoms::actions
private
bool PLMD::Atoms::asyncSent
private
bool PLMD::Atoms::atomsNeeded
private
Tensor PLMD::Atoms::box
private
bool PLMD::Atoms::boxHasBeenSet
private
std::vector<double> PLMD::Atoms::charges
private
bool PLMD::Atoms::chargesHaveBeenSet
private
bool PLMD::Atoms::collectEnergy
private
bool PLMD::Atoms::dataCanBeSet
private
DomainDecomposition PLMD::Atoms::dd
private
long int PLMD::Atoms::ddStep
private
double PLMD::Atoms::energy
private
bool PLMD::Atoms::energyHasBeenSet
private
double PLMD::Atoms::forceOnEnergy
private
std::vector<Vector> PLMD::Atoms::forces
private
unsigned PLMD::Atoms::forcesHaveBeenSet
private
std::vector<int> PLMD::Atoms::fullList
private
std::vector<int> PLMD::Atoms::gatindex
private
std::map<std::string,std::vector<AtomNumber> > PLMD::Atoms::groups
private
double PLMD::Atoms::kbT
private
bool PLMD::Atoms::massAndChargeOK
private
std::vector<double> PLMD::Atoms::masses
private
bool PLMD::Atoms::massesHaveBeenSet
private
double PLMD::Atoms::md_energy
private
MDAtomsBase* PLMD::Atoms::mdatoms
private
bool PLMD::Atoms::MDnaturalUnits
private
Units PLMD::Atoms::MDUnits
private
int PLMD::Atoms::natoms
private
bool PLMD::Atoms::naturalUnits
private
Pbc& PLMD::Atoms::pbc
private
PlumedMain& PLMD::Atoms::plumed
private
std::vector<Vector> PLMD::Atoms::positions
private
unsigned PLMD::Atoms::positionsHaveBeenSet
private
unsigned PLMD::Atoms::shuffledAtoms
private
double PLMD::Atoms::timestep
private
Units PLMD::Atoms::units
private
Tensor PLMD::Atoms::virial
private
bool PLMD::Atoms::virialHasBeenSet
private
std::vector<ActionWithVirtualAtom*> PLMD::Atoms::virtualAtomsActions
private
bool PLMD::Atoms::zeroallforces
private

if set to true, all the forces in the global array are zeroes at every step.

It should not be necessary in general, but it is for actions accessing to modifyGlobalForce() (e.g. FIT_TO_TEMPLATE).


The documentation for this class was generated from the following files: