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 getLocalMasses (std::vector< double > &)
 
void getLocalPositions (std::vector< Vector > &)
 
void getLocalForces (std::vector< Vector > &)
 
void getLocalMDForces (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)
 
void setMDChargeUnits (double d)
 
void setMDMassUnits (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

◆ Atoms()

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

◆ ~Atoms()

PLMD::Atoms::~Atoms ( )

Member Function Documentation

◆ add()

void PLMD::Atoms::add ( const ActionAtomistic a)

◆ addVirtualAtom()

AtomNumber PLMD::Atoms::addVirtualAtom ( ActionWithVirtualAtom a)

◆ boxWasSet()

bool PLMD::Atoms::boxWasSet ( ) const
inline

◆ chargesWereSet()

bool PLMD::Atoms::chargesWereSet ( ) const
inline

◆ clearFullList()

void PLMD::Atoms::clearFullList ( )

◆ createFullList()

void PLMD::Atoms::createFullList ( int *  n)

◆ double2MD()

void PLMD::Atoms::double2MD ( const double &  d,
void *  m 
) const

◆ getDdStep()

const long int & PLMD::Atoms::getDdStep ( ) const
inline

◆ getEnergy()

double PLMD::Atoms::getEnergy ( ) const
inline

◆ getFullList()

void PLMD::Atoms::getFullList ( int **  x)

◆ getGatindex()

const std::vector< int > & PLMD::Atoms::getGatindex ( ) const
inline

◆ getKBoltzmann()

double PLMD::Atoms::getKBoltzmann ( ) const

◆ getKbT()

double PLMD::Atoms::getKbT ( ) const

◆ getLocalForces()

void PLMD::Atoms::getLocalForces ( std::vector< Vector > &  localForces)

◆ getLocalMasses()

void PLMD::Atoms::getLocalMasses ( std::vector< double > &  localMasses)

◆ getLocalMDForces()

void PLMD::Atoms::getLocalMDForces ( std::vector< Vector > &  localForces)

◆ getLocalPositions()

void PLMD::Atoms::getLocalPositions ( std::vector< Vector > &  localPositions)

◆ getMDKBoltzmann()

double PLMD::Atoms::getMDKBoltzmann ( ) const

◆ getMDUnits()

const Units& PLMD::Atoms::getMDUnits ( )
inline

◆ getNatoms()

const int & PLMD::Atoms::getNatoms ( ) const
inline

◆ getPbc()

const Pbc & PLMD::Atoms::getPbc ( ) const
inline

◆ getRealPrecision()

int PLMD::Atoms::getRealPrecision ( ) const

◆ getTimeStep()

double PLMD::Atoms::getTimeStep ( ) const

◆ getUnits()

const Units& PLMD::Atoms::getUnits ( )
inline

◆ getVirial()

const Tensor & PLMD::Atoms::getVirial ( ) const
inline

◆ getVirtualAtomsAction()

ActionWithVirtualAtom * PLMD::Atoms::getVirtualAtomsAction ( AtomNumber  i) const
inline

◆ init()

void PLMD::Atoms::init ( )

◆ insertGroup()

void PLMD::Atoms::insertGroup ( const std::string &  name,
const std::vector< AtomNumber > &  a 
)

◆ isEnergyNeeded()

bool PLMD::Atoms::isEnergyNeeded ( ) const
inline

◆ isVirtualAtom()

bool PLMD::Atoms::isVirtualAtom ( AtomNumber  i) const
inline

◆ MD2double()

void PLMD::Atoms::MD2double ( const void *  m,
double &  d 
) const

◆ readBinary()

void PLMD::Atoms::readBinary ( std::istream &  i)

◆ remove()

void PLMD::Atoms::remove ( const ActionAtomistic a)

◆ removeGroup()

void PLMD::Atoms::removeGroup ( const std::string &  name)

◆ removeVirtualAtom()

void PLMD::Atoms::removeVirtualAtom ( ActionWithVirtualAtom a)

◆ resizeVectors()

void PLMD::Atoms::resizeVectors ( unsigned  n)
private

◆ setAtomsContiguous()

void PLMD::Atoms::setAtomsContiguous ( int  start)

◆ setAtomsGatindex()

void PLMD::Atoms::setAtomsGatindex ( int *  g,
bool  fortran 
)

◆ setAtomsNlocal()

void PLMD::Atoms::setAtomsNlocal ( int  n)

◆ setBox()

void PLMD::Atoms::setBox ( void *  p)

◆ setCharges()

void PLMD::Atoms::setCharges ( void *  p)

◆ setCollectEnergy()

void PLMD::Atoms::setCollectEnergy ( bool  b)
inline

◆ setDomainDecomposition()

void PLMD::Atoms::setDomainDecomposition ( Communicator comm)

◆ setEnergy()

void PLMD::Atoms::setEnergy ( void *  p)

◆ setForces() [1/2]

void PLMD::Atoms::setForces ( void *  p)

◆ setForces() [2/2]

void PLMD::Atoms::setForces ( void *  p,
int  i 
)

◆ setKbT()

void PLMD::Atoms::setKbT ( void *  p)

◆ setMasses()

void PLMD::Atoms::setMasses ( void *  p)

◆ setMDChargeUnits()

void PLMD::Atoms::setMDChargeUnits ( double  d)
inline

◆ setMDEnergyUnits()

void PLMD::Atoms::setMDEnergyUnits ( double  d)
inline

◆ setMDLengthUnits()

void PLMD::Atoms::setMDLengthUnits ( double  d)
inline

◆ setMDMassUnits()

void PLMD::Atoms::setMDMassUnits ( double  d)
inline

◆ setMDNaturalUnits()

void PLMD::Atoms::setMDNaturalUnits ( bool  n)
inline

◆ setMDTimeUnits()

void PLMD::Atoms::setMDTimeUnits ( double  d)
inline

◆ setNatoms()

void PLMD::Atoms::setNatoms ( int  n)

◆ setNaturalUnits()

void PLMD::Atoms::setNaturalUnits ( bool  n)
inline

◆ setPositions() [1/2]

void PLMD::Atoms::setPositions ( void *  p)

◆ setPositions() [2/2]

void PLMD::Atoms::setPositions ( void *  p,
int  i 
)

◆ setRealPrecision()

void PLMD::Atoms::setRealPrecision ( int  p)

◆ setTimeStep()

void PLMD::Atoms::setTimeStep ( void *  p)

◆ setUnits()

void PLMD::Atoms::setUnits ( const Units u)
inline

◆ setVirial()

void PLMD::Atoms::setVirial ( void *  p)

◆ share() [1/2]

void PLMD::Atoms::share ( const std::set< AtomNumber > &  unique)
private

◆ share() [2/2]

void PLMD::Atoms::share ( )

◆ shareAll()

void PLMD::Atoms::shareAll ( )

◆ startStep()

void PLMD::Atoms::startStep ( )

◆ updateForces()

void PLMD::Atoms::updateForces ( )

◆ updateUnits()

void PLMD::Atoms::updateUnits ( )

◆ usingNaturalUnits()

bool PLMD::Atoms::usingNaturalUnits ( ) const
inline

◆ wait()

void PLMD::Atoms::wait ( )

◆ writeBinary()

void PLMD::Atoms::writeBinary ( std::ostream &  o) const

Friends And Related Function Documentation

◆ ActionAtomistic

friend class ActionAtomistic
friend

◆ ActionWithVirtualAtom

friend class ActionWithVirtualAtom
friend

Member Data Documentation

◆ actions

std::vector<const ActionAtomistic*> PLMD::Atoms::actions
private

◆ asyncSent

bool PLMD::Atoms::asyncSent
private

◆ atomsNeeded

bool PLMD::Atoms::atomsNeeded
private

◆ box

Tensor PLMD::Atoms::box
private

◆ boxHasBeenSet

bool PLMD::Atoms::boxHasBeenSet
private

◆ charges

std::vector<double> PLMD::Atoms::charges
private

◆ chargesHaveBeenSet

bool PLMD::Atoms::chargesHaveBeenSet
private

◆ collectEnergy

bool PLMD::Atoms::collectEnergy
private

◆ dataCanBeSet

bool PLMD::Atoms::dataCanBeSet
private

◆ dd

DomainDecomposition PLMD::Atoms::dd
private

◆ ddStep

long int PLMD::Atoms::ddStep
private

◆ energy

double PLMD::Atoms::energy
private

◆ energyHasBeenSet

bool PLMD::Atoms::energyHasBeenSet
private

◆ forceOnEnergy

double PLMD::Atoms::forceOnEnergy
private

◆ forces

std::vector<Vector> PLMD::Atoms::forces
private

◆ forcesHaveBeenSet

unsigned PLMD::Atoms::forcesHaveBeenSet
private

◆ fullList

std::vector<int> PLMD::Atoms::fullList
private

◆ gatindex

std::vector<int> PLMD::Atoms::gatindex
private

◆ groups

std::map<std::string,std::vector<AtomNumber> > PLMD::Atoms::groups
private

◆ kbT

double PLMD::Atoms::kbT
private

◆ massAndChargeOK

bool PLMD::Atoms::massAndChargeOK
private

◆ masses

std::vector<double> PLMD::Atoms::masses
private

◆ massesHaveBeenSet

bool PLMD::Atoms::massesHaveBeenSet
private

◆ md_energy

double PLMD::Atoms::md_energy
private

◆ mdatoms

MDAtomsBase* PLMD::Atoms::mdatoms
private

◆ MDnaturalUnits

bool PLMD::Atoms::MDnaturalUnits
private

◆ MDUnits

Units PLMD::Atoms::MDUnits
private

◆ natoms

int PLMD::Atoms::natoms
private

◆ naturalUnits

bool PLMD::Atoms::naturalUnits
private

◆ pbc

Pbc& PLMD::Atoms::pbc
private

◆ plumed

PlumedMain& PLMD::Atoms::plumed
private

◆ positions

std::vector<Vector> PLMD::Atoms::positions
private

◆ positionsHaveBeenSet

unsigned PLMD::Atoms::positionsHaveBeenSet
private

◆ shuffledAtoms

unsigned PLMD::Atoms::shuffledAtoms
private

◆ timestep

double PLMD::Atoms::timestep
private

◆ units

Units PLMD::Atoms::units
private

◆ virial

Tensor PLMD::Atoms::virial
private

◆ virialHasBeenSet

bool PLMD::Atoms::virialHasBeenSet
private

◆ virtualAtomsActions

std::vector<ActionWithVirtualAtom*> PLMD::Atoms::virtualAtomsActions
private

◆ zeroallforces

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: