Gromacs  2025.0-dev-20241009-5c23d5f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Friends
gmx::ColvarProxyGromacs Class Reference

#include <gromacs/applied_forces/colvars/colvarproxygromacs.h>

+ Inheritance diagram for gmx::ColvarProxyGromacs:
+ Collaboration diagram for gmx::ColvarProxyGromacs:

Description

Implements a GROMACS version of colvarproxy. This class hold for the communication between colvars and GROMACS. 2 child class will inherit from this one: one during pre processing (ColvarsPreProcessor) and one during the simulation (ColvarsForceProvider). Most of the work needed for the communication will be implemented in this class.

Public Member Functions

 ColvarProxyGromacs (const std::string &colvarsConfigString, t_atoms atoms, PbcType pbcType, const MDLogger *logger, bool doParsing, const std::map< std::string, std::string > &inputStrings, real ensembleTemperature, int seed)
 Construct ColvarProxyGromacs from its parameters. More...
 
void updateAtomProperties (int index)
 Update colvars topology of one atom mass and charge from the GROMACS topology.
 
cvm::real rand_gaussian () override
 From colvarproxy. More...
 
void log (std::string const &message) override
 Print a message to the main log.
 
void error (std::string const &message) override
 Print a message to the main log and let GROMACS handle the error.
 
int backup_file (char const *filename) override
 Rename the given file, before overwriting it.
 
int set_unit_system (std::string const &unitsIn, bool colvarsDefined) override
 Request to set the units used internally by Colvars.
 
int init_atom (int atomNumber) override
 Initialize colvars atom from GROMACS topology.
 
int check_atom_id (int atomNumber) override
 Check if atom belongs to the global index of atoms. More...
 
cvm::rvector position_distance (cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const override
 Compute the minimum distance with respect to the PBC between 2 atoms.
 

Protected Attributes

t_atoms gmxAtoms_
 Atoms topology.
 
PbcType pbcType_
 Box infos.
 
t_pbc gmxPbc_
 
const MDLoggerlogger_ = nullptr
 
bool doParsing_
 Activate or not the parsing of the Colvars config file.
 
DefaultRandomEngine rng_
 
TabulatedNormalDistribution normalDistribution_
 

Friends

class cvm::atom
 

Constructor & Destructor Documentation

gmx::ColvarProxyGromacs::ColvarProxyGromacs ( const std::string &  colvarsConfigString,
t_atoms  atoms,
PbcType  pbcType,
const MDLogger logger,
bool  doParsing,
const std::map< std::string, std::string > &  inputStrings,
real  ensembleTemperature,
int  seed 
)

Construct ColvarProxyGromacs from its parameters.

Parameters
[in]colvarsConfigStringContent of the colvars input file.
[in]atomsAtoms topology
[in]pbcTypePeriodic boundary conditions
[in]loggerGROMACS logger instance
[in]doParsingWether the input file should be parsed.
[in]inputStringsInput files stored as string in the TPR's KVT
[in]ensembleTemperaturethe constant ensemble temperature
[in]seedthe colvars seed for random number generator

From colvarproxy The 5 variables below are defined in the colvarproxy base class

Member Function Documentation

int gmx::ColvarProxyGromacs::check_atom_id ( int  atomNumber)
override

Check if atom belongs to the global index of atoms.

Parameters
[in]atomNumberColvars index of the atom to check
cvm::real gmx::ColvarProxyGromacs::rand_gaussian ( )
override

From colvarproxy.

Return a random number from a Gaussian distribution


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