10#ifndef COLVARPROXY_SYSTEM_H
11#define COLVARPROXY_SYSTEM_H
13#include "colvars_system.h"
66 inline double dt()
const
144 "is not yet implemented in the MD engine.\n",
145 COLVARS_NOT_IMPLEMENTED);
148 virtual bool accelMD_enabled()
const {
vector of real numbers with three components
Definition: colvartypes.h:728
Class to store the system's boundary conditions.
Definition: colvars_system.h:16
double real
Defining an abstract real number allows to switch precision.
Definition: colvarmodule.h:99
static int error_static(std::string const &message, int code=-1)
Definition: colvarmodule.h:775
Methods for accessing the simulation system (PBCs, integrator, etc)
Definition: colvarproxy_system.h:16
bool use_internal_pbc_
Use the PBC functions from the Colvars library (as opposed to MD engine)
Definition: colvarproxy_system.h:185
virtual ~colvarproxy_system()
Destructor.
Definition: colvarproxy_system.cpp:32
bool total_force_requested
Whether the total forces have been requested.
Definition: colvarproxy_system.h:182
virtual void add_energy(cvm::real energy)
Pass restraint energy value for current timestep to MD engine.
Definition: colvarproxy_system.cpp:68
virtual int set_target_temperature(cvm::real T)
Set the current target temperature of the simulation (K units)
Definition: colvarproxy_system.cpp:42
virtual int set_unit_system(std::string const &units, bool check_only)
Request to set the units used internally by Colvars.
Definition: colvarproxy_system.cpp:35
cvm::real target_temperature_
Most up to date target temperature (K units); default to 0.0 if undefined.
Definition: colvarproxy_system.h:164
cvm::real boltzmann_
Boltzmann constant in internal Colvars units.
Definition: colvarproxy_system.h:161
int time_step_factor() const
Time step of the simulation (fs units)
Definition: colvarproxy_system.h:75
virtual int apply_force_dE_dlambda(cvm::real *force)
Apply a scalar force on dE_dlambda (back-end distributes it onto atoms)
Definition: colvarproxy_system.cpp:134
cvm::real boltzmann() const
Boltzmann constant, with unit the same as energy / K.
Definition: colvarproxy_system.h:51
cvm::real angstrom_to_internal(cvm::real l) const
Convert a length from Angstrom to internal.
Definition: colvarproxy_system.h:39
cvm::system_boundary_conditions boundaries_
Current system boundary conditions.
Definition: colvarproxy_system.h:188
virtual cvm::real get_accelMD_factor() const
Get weight factor from accelMD.
Definition: colvarproxy_system.h:142
bool & use_internal_pbc()
Account for system boundaries within the Colvars library (as opposed to using the MD engine)
Definition: colvarproxy_system.h:90
colvarproxy_system()
Constructor.
Definition: colvarproxy_system.cpp:18
virtual bool total_forces_enabled() const
Are total forces being used?
Definition: colvarproxy_system.cpp:79
double dt() const
Time step of the simulation (fs units)
Definition: colvarproxy_system.h:66
cvm::system_boundary_conditions const & get_system_boundaries() const
Get the current system boundary conditions.
Definition: colvarproxy_system.h:96
cvm::real cached_alch_lambda
Next value of lambda to be sent to back-end.
Definition: colvarproxy_system.h:155
virtual int get_d2E_dlambda2(cvm::real *d2E_dlambda2)
Get energy second derivative with respect to lambda (if available)
Definition: colvarproxy_system.cpp:141
virtual int request_alch_energy_freq(int const)
Request energy computation every freq steps (necessary for NAMD3, not all back-ends)
Definition: colvarproxy_system.h:125
bool cached_alch_lambda_changed
Whether lambda has been set and needs to be updated in backend.
Definition: colvarproxy_system.h:158
virtual int get_alch_lambda(cvm::real *lambda)
Get value of alchemical lambda parameter from back-end (if available)
Definition: colvarproxy_system.cpp:106
std::string units
Name of the unit system used internally by Colvars (by default, that of the back-end)....
Definition: colvarproxy_system.h:33
virtual int send_alch_lambda()
Send cached value of alchemical lambda parameter to back-end (if available)
Definition: colvarproxy_system.cpp:120
void set_alch_lambda(cvm::real lambda)
Set value of alchemical lambda parameter to be sent to back-end at end of timestep.
Definition: colvarproxy_system.cpp:113
cvm::real kcal_mol_value_
Value of 1 kcal/mol in the internal Colvars unit for energy.
Definition: colvarproxy_system.h:179
virtual int set_integration_timestep(cvm::real dt)
Set the current integration timestep of the simulation (fs units)
Definition: colvarproxy_system.cpp:49
cvm::real angstrom_value_
Value of 1 Angstrom in the internal (front-end) Colvars unit for atomic coordinates.
Definition: colvarproxy_system.h:176
virtual int set_time_step_factor(int fact)
Set the current integration timestep of the simulation (fs units)
Definition: colvarproxy_system.cpp:55
cvm::real target_temperature() const
Current target temperature of the simulation (K units)
Definition: colvarproxy_system.h:57
double timestep_
Current integration timestep (engine units); default to 1.0 if undefined.
Definition: colvarproxy_system.h:167
virtual int get_molid(int &molid)
Definition: colvarproxy_system.cpp:98
virtual cvm::rvector position_distance(cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const
Get the PBC-aware distance vector between two positions (using Colvars internal boundary handling)
Definition: colvarproxy_system.cpp:91
cvm::real internal_to_angstrom(cvm::real l) const
Convert a length from internal to Angstrom.
Definition: colvarproxy_system.h:45
virtual bool total_forces_same_step() const
Definition: colvarproxy_system.cpp:85
virtual cvm::real rand_gaussian(void)
Pseudo-random number with Gaussian distribution.
Definition: colvarproxy_system.cpp:61
virtual int get_dE_dlambda(cvm::real *dE_dlambda)
Get energy derivative with respect to lambda (if available)
Definition: colvarproxy_system.cpp:127
cvm::real indirect_lambda_biasing_force
Force to be applied onto alch. lambda, propagated from biasing forces on dE_dlambda.
Definition: colvarproxy_system.h:139
int time_step_factor_
Current timestep multiplier, if Colvars is only called once every n MD timesteps.
Definition: colvarproxy_system.h:170
virtual void request_total_force(bool yesno)
Tell the proxy whether total forces are needed (they may not always be available)
Definition: colvarproxy_system.cpp:71