Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
PLMD::vatom::FixedAtom Class Reference

Provides the keyword FIXEDATOM More...

Inheritance diagram for PLMD::vatom::FixedAtom:
Inheritance graph
[legend]

Public Types

typedef std::vector< Action * > Dependencies
 

Public Member Functions

 FixedAtom (const ActionOptions &ao)
 
virtual void activate ()
 Set action to active. More...
 
void addDependency (Action *)
 Specify that this Action depends on another one. More...
 
void allowToAccessGlobalForces ()
 Allow calls to modifyGlobalForce() More...
 
void applyForces ()
 
virtual void beforeUpdate ()
 Before Update. More...
 
void calculate ()
 Calculate an Action. More...
 
void calculateAtomicNumericalDerivatives (ActionWithValue *a, const unsigned &startnum)
 Numerical derivative routine to use when using Actions that inherit from BOTH ActionWithArguments and ActionAtomistic. More...
 
void calculateFromPDB (const PDB &)
 Calculate the action given a pdb file as input. More...
 
virtual void calculateNumericalDerivatives (ActionWithValue *a=NULL)
 N.B. More...
 
void changeBox (const Tensor &newbox)
 Change the box shape. More...
 
virtual bool checkNeedsGradients () const
 Check if the action needs gradient. More...
 
virtual bool checkNumericalDerivatives () const
 Check if numerical derivatives should be performed. More...
 
void checkRead ()
 Check if Action was properly read. More...
 
bool checkUpdate () const
 Check if action should be updated. More...
 
std::string cite (const std::string &s)
 Cite a paper see PlumedMain::cite. More...
 
void clearDependencies ()
 Clear the dependence list for this Action. More...
 
virtual void clearOptions ()
 
void clearOutputForces ()
 
virtual void deactivate ()
 Set action to inactive. More...
 
void doNotForce ()
 Skip atom forces - use with care. More...
 
void doNotRetrieve ()
 Skip atom retrieval - use with care. More...
 
void error (const std::string &msg) const
 Crash calculation and print documentation. More...
 
void exit (int c=0)
 Exit with error code c. More...
 
int fclose (FILE *fp)
 Closes a file opened with Action::fclose(). More...
 
void fflush ()
 Tell to the Action to flush open files. More...
 
FILE * fopen (const char *path, const char *mode)
 Opens a file. More...
 
AtomNumber getAbsoluteIndex (int i) const
 Get the absolute index of an atom. More...
 
virtual const std::vector< AtomNumber > & getAbsoluteIndexes () const
 Get the vector of absolute indexes. More...
 
const TensorgetBox () const
 Get box shape. More...
 
double getCharge (int i) const
 Get charge of i-th atom. More...
 
bool getCPT () const
 Return true if we are doing at a checkpoint step. More...
 
const DependenciesgetDependencies () const
 Return dependencies. More...
 
virtual std::string getDocumentation () const
 
const double & getEnergy () const
 Get energy. More...
 
bool getExchangeStep () const
 Check if we are on an exchange step. More...
 
const VectorgetGlobalPosition (AtomNumber) const
 Get position of i-th atom (access by absolute AtomNumber). More...
 
const std::map< AtomNumber, Tensor > & getGradients () const
 
AtomNumber getIndex () const
 Return the atom id of the corresponding virtual atom. More...
 
std::string getKeyword (const std::string &key)
 Just read one of the keywords and return the whole thing as a string. More...
 
const std::string & getLabel () const
 Returns the label. More...
 
double getMass (int i) const
 Get mass of i-th atom. More...
 
const std::string & getName () const
 Returns the name. More...
 
unsigned getNumberOfAtoms () const
 Get number of available atoms. More...
 
const PbcgetPbc () const
 Get reference to Pbc. More...
 
const VectorgetPosition (int) const
 Get position of i-th atom (access by relative index) More...
 
const std::vector< Vector > & getPositions () const
 Get the array of all positions. More...
 
bool getRestart () const
 Return true if we are doing a restart. More...
 
long int getStep () const
 Return the present timestep. More...
 
double getTime () const
 Return the present time. More...
 
double getTimeStep () const
 Return the timestep. More...
 
unsigned getTotAtoms () const
 Get total number of atoms, including virtual ones. More...
 
const std::set< AtomNumber > & getUnique () const
 
const std::set< AtomNumber > & getUniqueLocal () const
 
void interpretAtomList (std::vector< std::string > &strings, std::vector< AtomNumber > &t)
 Convert a set of read in strings into an atom list (this is used in parseAtomList) More...
 
bool isActive () const
 Check if action is active. More...
 
bool isOptionOn (const std::string &s) const
 Check if an option is on. More...
 
void lockRequests ()
 
void makeWhole ()
 Make atoms whole, assuming they are in the proper order. More...
 
double & modifyForceOnEnergy ()
 Get a reference to force on energy. More...
 
double & modifyForceOnExtraCV ()
 Get a reference to force on extraCV. More...
 
std::vector< Vector > & modifyForces ()
 Get a reference to forces array. More...
 
VectormodifyGlobalForce (AtomNumber)
 Get modifiable force of i-th atom (access by absolute AtomNumber). More...
 
PbcmodifyGlobalPbc ()
 Get modifiable PBC Should be used by action that need to modify the stored box. More...
 
VectormodifyGlobalPosition (AtomNumber)
 Get modifiable position of i-th atom (access by absolute AtomNumber). More...
 
TensormodifyGlobalVirial ()
 Get modifiable virial Should be used by action that need to modify the stored virial. More...
 
TensormodifyVirial ()
 Get a reference to virial array. More...
 
template<class T >
void parse (const std::string &key, T &t)
 Parse one keyword as generic type. More...
 
void parseAtomList (const std::string &key, std::vector< AtomNumber > &t)
 Parse a list of atoms without a numbered keyword. More...
 
void parseAtomList (const std::string &key, const int num, std::vector< AtomNumber > &t)
 Parse an list of atom with a numbred keyword. More...
 
void parseFlag (const std::string &key, bool &t)
 Parse one keyword as boolean flag. More...
 
template<class T >
bool parseNumbered (const std::string &key, const int no, T &t)
 Parse one numbered keyword as generic type. More...
 
template<class T >
bool parseNumberedVector (const std::string &key, const int no, std::vector< T > &t)
 Parse a vector with a number. More...
 
template<class T >
void parseVector (const std::string &key, std::vector< T > &t)
 Parse one keyword as std::vector. More...
 
void pbcApply (std::vector< Vector > &dlist, unsigned max_index=0) const
 Applies PBCs to a seriens of positions or distances. More...
 
Vector pbcDistance (const Vector &, const Vector &) const
 Compute the pbc distance between two positions. More...
 
virtual void prepare ()
 Prepare an Action for calculation This can be used by Action if they need some special preparation before calculation. More...
 
void readAtomsFromPDB (const PDB &pdb)
 Read in an input file containing atom positions and calculate the action for the atomic configuration therin. More...
 
void requestAtoms (const std::vector< AtomNumber > &a, const bool clearDep=true)
 Request an array of atoms. More...
 
virtual void retrieveAtoms ()
 
virtual void runFinalJobs ()
 RunFinalJobs This method is called once at the very end of the calculation. More...
 
void setForcesOnAtoms (const std::vector< double > &forcesToApply, unsigned ind=0)
 Add the forces to the atoms. More...
 
void setGradients ()
 
void setGradientsIfNeeded ()
 
virtual void setOption (const std::string &s)
 
void unlockRequests ()
 
virtual void update ()
 Update. More...
 
void updateUniqueLocal ()
 updates local unique atoms More...
 
void warning (const std::string &msg)
 Issue a warning. More...
 

Static Public Member Functions

static void registerKeywords (Keywords &keys)
 

Public Attributes

Communicatorcomm
 
std::set< FILE * > files
 
const Keywordskeywords
 
Loglog
 Reference to the log stream. More...
 
Communicatormulti_sim_comm
 
PlumedMainplumed
 Reference to main plumed object. More...
 

Protected Member Functions

void requestAtoms (const std::vector< AtomNumber > &a)
 Request atoms on which the calculation depends. More...
 
void setAtomsDerivatives (const std::vector< Tensor > &d)
 Set the derivatives of virtual atom coordinate wrt atoms on which it dependes. More...
 
void setBoxDerivatives (const std::vector< Tensor > &d)
 Set the box derivatives. More...
 
void setBoxDerivativesNoPbc ()
 Set box derivatives automatically. More...
 
void setCharge (double)
 Set its charge. More...
 
void setExtraCV (const std::string &name)
 
void setMass (double)
 Set its mass. More...
 
void setPosition (const Vector &)
 Set position of the virtual atom. More...
 

Protected Attributes

Atomsatoms
 

Private Attributes

double charge
 
Vector coord
 
double mass
 
bool scaled_components
 

Detailed Description

Provides the keyword FIXEDATOM

Member Typedef Documentation

◆ Dependencies

typedef std::vector<Action*> PLMD::Action::Dependencies
inherited

Constructor & Destructor Documentation

◆ FixedAtom()

PLMD::vatom::FixedAtom::FixedAtom ( const ActionOptions ao)
explicit

Member Function Documentation

◆ activate()

void PLMD::Action::activate ( )
virtualinherited

Set action to active.

◆ addDependency()

void PLMD::Action::addDependency ( Action action)
inherited

Specify that this Action depends on another one.

◆ allowToAccessGlobalForces()

void PLMD::ActionAtomistic::allowToAccessGlobalForces ( )
inlineinherited

Allow calls to modifyGlobalForce()

◆ applyForces()

void PLMD::ActionAtomistic::applyForces ( )
inherited

◆ beforeUpdate()

virtual void PLMD::Action::beforeUpdate ( )
inlinevirtualinherited

Before Update.

This is a special method that is called just before the update() method. It can be used by actions that want to do something irrespectively of the fact that update() is active or not. In other words, this is always called, even when action is not active.

Reimplemented in PLMD::generic::UpdateIf.

◆ calculate()

void PLMD::vatom::FixedAtom::calculate ( )
virtual

Calculate an Action.

This method is called one or more times per step. The set of all Actions is calculated in forward order.

Implements PLMD::Action.

◆ calculateAtomicNumericalDerivatives()

void PLMD::ActionAtomistic::calculateAtomicNumericalDerivatives ( ActionWithValue a,
const unsigned &  startnum 
)
inherited

Numerical derivative routine to use when using Actions that inherit from BOTH ActionWithArguments and ActionAtomistic.

◆ calculateFromPDB()

void PLMD::Action::calculateFromPDB ( const PDB pdb)
inherited

Calculate the action given a pdb file as input.

This is used to initialize things like distance from a point in CV map space given a pdb as an input file

◆ calculateNumericalDerivatives()

void PLMD::ActionAtomistic::calculateNumericalDerivatives ( ActionWithValue a = NULL)
virtualinherited

N.B.

only pass an ActionWithValue to this routine if you know exactly what you are doing. The default will be correct for the vast majority of cases

Reimplemented from PLMD::Action.

Reimplemented in PLMD::isdb::MetainferenceBase, PLMD::mapping::PCAVars, PLMD::multicolvar::MultiColvarBase, PLMD::analysis::AnalysisBase, PLMD::vesselbase::ActionWithAveraging, PLMD::mapping::Mapping, PLMD::multicolvar::DumpMultiColvar, and PLMD::multicolvar::BridgedMultiColvarFunction.

◆ changeBox()

void PLMD::ActionAtomistic::changeBox ( const Tensor newbox)
inherited

Change the box shape.

◆ checkNeedsGradients()

virtual bool PLMD::Action::checkNeedsGradients ( ) const
inlinevirtualinherited

Check if the action needs gradient.

Reimplemented in PLMD::bias::MetaD, PLMD::bias::PBMetaD, and PLMD::generic::DumpProjections.

◆ checkNumericalDerivatives()

virtual bool PLMD::Action::checkNumericalDerivatives ( ) const
inlinevirtualinherited

Check if numerical derivatives should be performed.

Reimplemented in PLMD::ActionWithValue.

◆ checkRead()

void PLMD::Action::checkRead ( )
inherited

Check if Action was properly read.

This checks if Action::line is empty. It must be called after a final Action has been initialized

◆ checkUpdate()

bool PLMD::Action::checkUpdate ( ) const
inherited

Check if action should be updated.

◆ cite()

std::string PLMD::Action::cite ( const std::string &  s)
inherited

Cite a paper see PlumedMain::cite.

◆ clearDependencies()

void PLMD::Action::clearDependencies ( )
inherited

Clear the dependence list for this Action.

◆ clearOptions()

void PLMD::Action::clearOptions ( )
virtualinherited

◆ clearOutputForces()

void PLMD::ActionAtomistic::clearOutputForces ( )
inherited

◆ deactivate()

void PLMD::Action::deactivate ( )
inlinevirtualinherited

Set action to inactive.

◆ doNotForce()

void PLMD::ActionAtomistic::doNotForce ( )
inlineinherited

Skip atom forces - use with care.

If this function is called during initialization, then forces are not going to be propagated. Can be used for optimization.

◆ doNotRetrieve()

void PLMD::ActionAtomistic::doNotRetrieve ( )
inlineinherited

Skip atom retrieval - use with care.

If this function is called during initialization, then atoms are not going to be retrieved. Can be used for optimization. Notice that calling getPosition(int) in an Action where DoNotRetrieve() was called might lead to undefined behavior.

◆ error()

void PLMD::Action::error ( const std::string &  msg) const
inherited

Crash calculation and print documentation.

◆ exit()

void PLMD::Action::exit ( int  c = 0)
inherited

Exit with error code c.

◆ fclose()

int PLMD::Action::fclose ( FILE *  fp)
inherited

Closes a file opened with Action::fclose().

◆ fflush()

void PLMD::Action::fflush ( )
inherited

Tell to the Action to flush open files.

◆ fopen()

FILE * PLMD::Action::fopen ( const char *  path,
const char *  mode 
)
inherited

Opens a file.

This is similar to plain fopen, but with some extra functionality.

  • When opened for writing, processors other than the one with rank 0 just open /dev/null
  • PlumedMain::fopen is used, so that other tricks may appear (see PlumedMain::fopen)

◆ getAbsoluteIndex()

AtomNumber PLMD::ActionAtomistic::getAbsoluteIndex ( int  i) const
inlineinherited

Get the absolute index of an atom.

◆ getAbsoluteIndexes()

const std::vector< AtomNumber > & PLMD::ActionAtomistic::getAbsoluteIndexes ( ) const
inlinevirtualinherited

Get the vector of absolute indexes.

Reimplemented in PLMD::multicolvar::BridgedMultiColvarFunction.

◆ getBox()

const Tensor & PLMD::ActionAtomistic::getBox ( ) const
inlineinherited

Get box shape.

◆ getCharge()

double PLMD::ActionAtomistic::getCharge ( int  i) const
inlineinherited

Get charge of i-th atom.

◆ getCPT()

bool PLMD::Action::getCPT ( ) const
inherited

Return true if we are doing at a checkpoint step.

◆ getDependencies()

const Dependencies& PLMD::Action::getDependencies ( ) const
inlineinherited

Return dependencies.

◆ getDocumentation()

std::string PLMD::Action::getDocumentation ( ) const
virtualinherited

◆ getEnergy()

const double & PLMD::ActionAtomistic::getEnergy ( ) const
inlineinherited

Get energy.

◆ getExchangeStep()

bool PLMD::Action::getExchangeStep ( ) const
inherited

Check if we are on an exchange step.

◆ getGlobalPosition()

const Vector & PLMD::ActionAtomistic::getGlobalPosition ( AtomNumber  i) const
inlineinherited

Get position of i-th atom (access by absolute AtomNumber).

With direct access to the global atom array.

Warning
Should be only used by actions that need to read the shared position array. This array is insensitive to local changes such as makeWhole(), numerical derivatives, etc.

◆ getGradients()

const std::map< AtomNumber, Tensor > & PLMD::ActionWithVirtualAtom::getGradients ( ) const
inlineinherited

◆ getIndex()

AtomNumber PLMD::ActionWithVirtualAtom::getIndex ( ) const
inlineinherited

Return the atom id of the corresponding virtual atom.

◆ getKeyword()

std::string PLMD::Action::getKeyword ( const std::string &  key)
inherited

Just read one of the keywords and return the whole thing as a string.

◆ getLabel()

const std::string & PLMD::Action::getLabel ( ) const
inlineinherited

Returns the label.

◆ getMass()

double PLMD::ActionAtomistic::getMass ( int  i) const
inlineinherited

Get mass of i-th atom.

◆ getName()

const std::string & PLMD::Action::getName ( ) const
inlineinherited

Returns the name.

◆ getNumberOfAtoms()

unsigned PLMD::ActionAtomistic::getNumberOfAtoms ( ) const
inlineinherited

Get number of available atoms.

◆ getPbc()

const Pbc & PLMD::ActionAtomistic::getPbc ( ) const
inlineinherited

Get reference to Pbc.

◆ getPosition()

const Vector & PLMD::ActionAtomistic::getPosition ( int  i) const
inlineinherited

Get position of i-th atom (access by relative index)

◆ getPositions()

const std::vector< Vector > & PLMD::ActionAtomistic::getPositions ( ) const
inlineinherited

Get the array of all positions.

◆ getRestart()

bool PLMD::Action::getRestart ( ) const
inlineinherited

Return true if we are doing a restart.

◆ getStep()

long int PLMD::Action::getStep ( ) const
inherited

Return the present timestep.

◆ getTime()

double PLMD::Action::getTime ( ) const
inherited

Return the present time.

◆ getTimeStep()

double PLMD::Action::getTimeStep ( ) const
inherited

Return the timestep.

◆ getTotAtoms()

unsigned PLMD::ActionAtomistic::getTotAtoms ( ) const
inlineinherited

Get total number of atoms, including virtual ones.

Can be used to make a loop on modifyGlobalPosition or getGlobalPosition.

◆ getUnique()

const std::set< AtomNumber > & PLMD::ActionAtomistic::getUnique ( ) const
inlineinherited

◆ getUniqueLocal()

const std::set< AtomNumber > & PLMD::ActionAtomistic::getUniqueLocal ( ) const
inlineinherited

◆ interpretAtomList()

void PLMD::ActionAtomistic::interpretAtomList ( std::vector< std::string > &  strings,
std::vector< AtomNumber > &  t 
)
inherited

Convert a set of read in strings into an atom list (this is used in parseAtomList)

◆ isActive()

bool PLMD::Action::isActive ( ) const
inlineinherited

Check if action is active.

◆ isOptionOn()

bool PLMD::Action::isOptionOn ( const std::string &  s) const
inlineinherited

Check if an option is on.

◆ lockRequests()

void PLMD::ActionAtomistic::lockRequests ( )
inlinevirtualinherited

◆ makeWhole()

void PLMD::ActionAtomistic::makeWhole ( )
inherited

Make atoms whole, assuming they are in the proper order.

◆ modifyForceOnEnergy()

double & PLMD::ActionAtomistic::modifyForceOnEnergy ( )
inlineinherited

Get a reference to force on energy.

◆ modifyForceOnExtraCV()

double & PLMD::ActionAtomistic::modifyForceOnExtraCV ( )
inlineinherited

Get a reference to force on extraCV.

◆ modifyForces()

std::vector< Vector > & PLMD::ActionAtomistic::modifyForces ( )
inlineinherited

Get a reference to forces array.

◆ modifyGlobalForce()

Vector & PLMD::ActionAtomistic::modifyGlobalForce ( AtomNumber  i)
inlineinherited

Get modifiable force of i-th atom (access by absolute AtomNumber).

Warning
Should be used by action that need to modify the stored atomic forces. This should be used with great care since the plumed core does not usually keep all these forces up to date. In particular, if an action require this, one should during constructor call allowToAccessGlobalForces(). Notice that for efficiency reason plumed does not check if this is done!

◆ modifyGlobalPbc()

Pbc & PLMD::ActionAtomistic::modifyGlobalPbc ( )
inlineinherited

Get modifiable PBC Should be used by action that need to modify the stored box.

◆ modifyGlobalPosition()

Vector & PLMD::ActionAtomistic::modifyGlobalPosition ( AtomNumber  i)
inlineinherited

Get modifiable position of i-th atom (access by absolute AtomNumber).

Warning
Should be only used by actions that need to modify the shared position array. This array is insensitive to local changes such as makeWhole(), numerical derivatives, etc.

◆ modifyGlobalVirial()

Tensor & PLMD::ActionAtomistic::modifyGlobalVirial ( )
inlineinherited

Get modifiable virial Should be used by action that need to modify the stored virial.

◆ modifyVirial()

Tensor & PLMD::ActionAtomistic::modifyVirial ( )
inlineinherited

Get a reference to virial array.

◆ parse()

template<class T >
void PLMD::Action::parse ( const std::string &  key,
T &  t 
)
inherited

Parse one keyword as generic type.

◆ parseAtomList() [1/2]

void PLMD::ActionAtomistic::parseAtomList ( const std::string &  key,
std::vector< AtomNumber > &  t 
)
inherited

Parse a list of atoms without a numbered keyword.

◆ parseAtomList() [2/2]

void PLMD::ActionAtomistic::parseAtomList ( const std::string &  key,
const int  num,
std::vector< AtomNumber > &  t 
)
inherited

Parse an list of atom with a numbred keyword.

◆ parseFlag()

void PLMD::Action::parseFlag ( const std::string &  key,
bool &  t 
)
inherited

Parse one keyword as boolean flag.

◆ parseNumbered()

template<class T >
bool PLMD::Action::parseNumbered ( const std::string &  key,
const int  no,
T &  t 
)
inherited

Parse one numbered keyword as generic type.

◆ parseNumberedVector()

template<class T >
bool PLMD::Action::parseNumberedVector ( const std::string &  key,
const int  no,
std::vector< T > &  t 
)
inherited

Parse a vector with a number.

◆ parseVector()

template<class T >
void PLMD::Action::parseVector ( const std::string &  key,
std::vector< T > &  t 
)
inherited

Parse one keyword as std::vector.

◆ pbcApply()

void PLMD::ActionAtomistic::pbcApply ( std::vector< Vector > &  dlist,
unsigned  max_index = 0 
) const
inherited

Applies PBCs to a seriens of positions or distances.

◆ pbcDistance()

Vector PLMD::ActionAtomistic::pbcDistance ( const Vector v1,
const Vector v2 
) const
inherited

Compute the pbc distance between two positions.

◆ prepare()

void PLMD::Action::prepare ( )
virtualinherited

Prepare an Action for calculation This can be used by Action if they need some special preparation before calculation.

Typical case is for collective variables which would like to change their list of requested atoms. By default (if not overridden) does nothing.

Reimplemented in PLMD::function::FuncPathMSD, PLMD::isdb::EMMI, PLMD::generic::Plumed, PLMD::multicolvar::MultiColvarBase, PLMD::generic::DumpMassCharge, PLMD::generic::Read, PLMD::generic::UpdateIf, PLMD::generic::Print, PLMD::bias::ReweightTemperature, PLMD::colvar::Energy, PLMD::gridtools::ConvertToFES, PLMD::colvar::ExtraCV, and PLMD::colvar::CoordinationBase.

◆ readAtomsFromPDB()

void PLMD::ActionAtomistic::readAtomsFromPDB ( const PDB pdb)
virtualinherited

Read in an input file containing atom positions and calculate the action for the atomic configuration therin.

Reimplemented from PLMD::Action.

◆ registerKeywords()

void PLMD::vatom::FixedAtom::registerKeywords ( Keywords keys)
static

◆ requestAtoms() [1/2]

void PLMD::ActionWithVirtualAtom::requestAtoms ( const std::vector< AtomNumber > &  a)
protectedinherited

Request atoms on which the calculation depends.

◆ requestAtoms() [2/2]

void PLMD::ActionAtomistic::requestAtoms ( const std::vector< AtomNumber > &  a,
const bool  clearDep = true 
)
inherited

Request an array of atoms.

This method is used to ask for a list of atoms. Atoms should be asked for by number. If this routine is called during the simulation, atoms will be available at the next step MAYBE WE HAVE TO FIND SOMETHING MORE CLEAR FOR DYNAMIC LISTS OF ATOMS

◆ retrieveAtoms()

void PLMD::ActionAtomistic::retrieveAtoms ( )
virtualinherited

◆ runFinalJobs()

virtual void PLMD::Action::runFinalJobs ( )
inlinevirtualinherited

RunFinalJobs This method is called once at the very end of the calculation.

The set of all Actions in run for the final time in forward order.

Reimplemented in PLMD::vesselbase::ActionWithAveraging, PLMD::analysis::AnalysisBase, PLMD::gridtools::ConvertToFES, PLMD::analysis::ReadDissimilarityMatrix, and PLMD::gridtools::GridPrintingBase.

◆ setAtomsDerivatives()

void PLMD::ActionWithVirtualAtom::setAtomsDerivatives ( const std::vector< Tensor > &  d)
inlineprotectedinherited

Set the derivatives of virtual atom coordinate wrt atoms on which it dependes.

◆ setBoxDerivatives()

void PLMD::ActionWithVirtualAtom::setBoxDerivatives ( const std::vector< Tensor > &  d)
protectedinherited

Set the box derivatives.

This should be a vector of size 3. First index corresponds to the components of the virtual atom. Notice that this routine subtract the trivial term coming from cell deformation since this term is already implicitly included. Indeed, if the vatom position is a linear function of atomic coordinates it is not necessary to call this function (implicit term is fine) (e.g. vatom::COM and vatom::Center). On the other hand if the vatom position is a non-linear function of atomic coordinates this should be called (see vatom::Ghost).

◆ setBoxDerivativesNoPbc()

void PLMD::ActionWithVirtualAtom::setBoxDerivativesNoPbc ( )
protectedinherited

Set box derivatives automatically.

It should be called after the settomsDerivatives has been used for all single atoms.

Warning
It only works for virtual atoms NOT using PBCs! This implies that all atoms used + the new virtual atom should be in the same periodic image.

◆ setCharge()

void PLMD::ActionWithVirtualAtom::setCharge ( double  c)
inlineprotectedinherited

Set its charge.

◆ setExtraCV()

void PLMD::ActionAtomistic::setExtraCV ( const std::string &  name)
inlineprotectedinherited

◆ setForcesOnAtoms()

void PLMD::ActionAtomistic::setForcesOnAtoms ( const std::vector< double > &  forcesToApply,
unsigned  ind = 0 
)
inherited

Add the forces to the atoms.

◆ setGradients()

void PLMD::ActionWithVirtualAtom::setGradients ( )
inherited

◆ setGradientsIfNeeded()

void PLMD::ActionWithVirtualAtom::setGradientsIfNeeded ( )
inherited

◆ setMass()

void PLMD::ActionWithVirtualAtom::setMass ( double  m)
inlineprotectedinherited

Set its mass.

◆ setOption()

void PLMD::Action::setOption ( const std::string &  s)
virtualinherited

◆ setPosition()

void PLMD::ActionWithVirtualAtom::setPosition ( const Vector pos)
inlineprotectedinherited

Set position of the virtual atom.

◆ unlockRequests()

void PLMD::ActionAtomistic::unlockRequests ( )
inlinevirtualinherited

◆ update()

virtual void PLMD::Action::update ( )
inlinevirtualinherited

◆ updateUniqueLocal()

void PLMD::ActionAtomistic::updateUniqueLocal ( )
inherited

updates local unique atoms

◆ warning()

void PLMD::Action::warning ( const std::string &  msg)
inherited

Issue a warning.

Member Data Documentation

◆ atoms

Atoms& PLMD::ActionAtomistic::atoms
protectedinherited

◆ charge

double PLMD::vatom::FixedAtom::charge
private

◆ comm

Communicator& PLMD::Action::comm
inherited

◆ coord

Vector PLMD::vatom::FixedAtom::coord
private

◆ files

std::set<FILE*> PLMD::Action::files
inherited

◆ keywords

const Keywords& PLMD::Action::keywords
inherited

◆ log

Log& PLMD::Action::log
inherited

Reference to the log stream.

◆ mass

double PLMD::vatom::FixedAtom::mass
private

◆ multi_sim_comm

Communicator& PLMD::Action::multi_sim_comm
inherited

◆ plumed

PlumedMain& PLMD::Action::plumed
inherited

Reference to main plumed object.

◆ scaled_components

bool PLMD::vatom::FixedAtom::scaled_components
private

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