#include <colvarproxy_system.h>
Inheritance diagram for colvarproxy_system:
Public Methods | |||
colvarproxy_system () | |||
Constructor. More... | |||
virtual | ~colvarproxy_system () | ||
Destructor. More... | |||
virtual int | set_unit_system (std::string const &units, bool check_only) | ||
\brief Request to set the units used internally by Colvars. More... | |||
cvm::real | angstrom_to_internal (cvm::real l) const | ||
\brief Convert a length from Angstrom to internal. More... | |||
cvm::real | internal_to_angstrom (cvm::real l) const | ||
\brief Convert a length from internal to Angstrom. More... | |||
cvm::real | boltzmann () const | ||
Boltzmann constant, with unit the same as energy / K. More... | |||
cvm::real | target_temperature () const | ||
Current target temperature of the simulation (K units). More... | |||
virtual int | set_target_temperature (cvm::real T) | ||
Set the current target temperature of the simulation (K units). More... | |||
virtual cvm::real | dt () | ||
\brief Time step of the simulation (fs). More... | |||
virtual cvm::real | rand_gaussian (void) | ||
\brief Pseudo-random number with Gaussian distribution. More... | |||
virtual void | add_energy (cvm::real energy) | ||
Pass restraint energy value for current timestep to MD engine. More... | |||
virtual cvm::rvector | position_distance (cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const | ||
\brief Get the PBC-aware distance vector between two positions. More... | |||
void | update_pbc_lattice () | ||
Recompute PBC reciprocal lattice (assumes XYZ periodicity). More... | |||
void | reset_pbc_lattice () | ||
Set the lattice vectors to zero. More... | |||
virtual void | request_total_force (bool yesno) | ||
\brief Tell the proxy whether total forces are needed (they may not always be available). More... | |||
virtual bool | total_forces_enabled () const | ||
Are total forces being used? More... | |||
virtual bool | total_forces_same_step () const | ||
Are total forces from the current step available? More... | |||
virtual int | get_molid (int &molid) | ||
Get the molecule ID when called in VMD; raise error otherwise
| |||
virtual int | get_alch_lambda (cvm::real *lambda) | ||
Get value of alchemical lambda parameter from back-end (if available). More... | |||
void | set_alch_lambda (cvm::real lambda) | ||
Set value of alchemical lambda parameter to be sent to back-end at end of timestep. More... | |||
virtual int | send_alch_lambda () | ||
Send cached value of alchemical lambda parameter to back-end (if available). More... | |||
virtual int | get_dE_dlambda (cvm::real *dE_dlambda) | ||
Get energy derivative with respect to lambda (if available). More... | |||
virtual int | apply_force_dE_dlambda (cvm::real *force) | ||
Apply a scalar force on dE_dlambda (back-end distributes it onto atoms). More... | |||
virtual int | get_d2E_dlambda2 (cvm::real *d2E_dlambda2) | ||
Get energy second derivative with respect to lambda (if available). More... | |||
virtual cvm::real | get_accelMD_factor () const | ||
Get weight factor from accelMD. More... | |||
virtual bool | accelMD_enabled () const | ||
Public Attributes | |||
std::string | units | ||
\brief Name of the unit system used internally by Colvars (by default, that of the back-end). Supported depending on the back-end: real (A, kcal/mol), metal (A, eV), electron (Bohr, Hartree), gromacs (nm, kJ/mol) Note: calls to back-end PBC functions assume back-end length unit We use different unit from back-end in VMD bc using PBC functions from colvarproxy base class Colvars internal units are user specified, because the module exchanges info in unknown composite dimensions with user input, while it only exchanges quantities of known dimension with the back-end (length and forces). More... | |||
cvm::real | indirect_lambda_biasing_force | ||
Force to be applied onto alch. lambda, propagated from biasing forces on dE_dlambda. More... | |||
Protected Types | |||
enum | Boundaries_type { boundaries_non_periodic, boundaries_pbc_ortho, boundaries_pbc_triclinic, boundaries_unsupported } | ||
\brief Type of boundary conditions Orthogonal and triclinic cells are made available to objects. For any other conditions (mixed periodicity, triclinic cells in LAMMPS) minimum-image distances are computed by the host engine regardless. More... | |||
Protected Attributes | |||
cvm::real | cached_alch_lambda | ||
Next value of lambda to be sent to back-end. More... | |||
bool | cached_alch_lambda_changed | ||
Whether lambda has been set and needs to be updated in backend. More... | |||
cvm::real | boltzmann_ | ||
Boltzmann constant in internal Colvars units. More... | |||
cvm::real | target_temperature_ | ||
Most up to date target temperature for the system (in K). More... | |||
cvm::real | angstrom_value_ | ||
\brief Value of 1 Angstrom in the internal (front-end) Colvars unit for atomic coordinates * defaults to 0 in the base class; derived proxy classes must set it * in VMD proxy, can only be changed when no variables are defined as user-defined values in composite units must be compatible with that system. More... | |||
cvm::real | kcal_mol_value_ | ||
\brief Value of 1 kcal/mol in the internal Colvars unit for energy. More... | |||
bool | total_force_requested | ||
Whether the total forces have been requested. More... | |||
Boundaries_type | boundaries_type | ||
Type of boundary conditions. More... | |||
cvm::rvector | unit_cell_x | ||
Bravais lattice vectors. More... | |||
cvm::rvector | unit_cell_y | ||
Bravais lattice vectors. More... | |||
cvm::rvector | unit_cell_z | ||
Bravais lattice vectors. More... | |||
cvm::rvector | reciprocal_cell_x | ||
Reciprocal lattice vectors. More... | |||
cvm::rvector | reciprocal_cell_y | ||
Reciprocal lattice vectors. More... | |||
cvm::rvector | reciprocal_cell_z | ||
Reciprocal lattice vectors. More... |
Definition at line 15 of file colvarproxy_system.h.
|
\brief Type of boundary conditions Orthogonal and triclinic cells are made available to objects. For any other conditions (mixed periodicity, triclinic cells in LAMMPS) minimum-image distances are computed by the host engine regardless.
Definition at line 160 of file colvarproxy_system.h. |
|
Constructor.
Definition at line 17 of file colvarproxy_system.C. References angstrom_value_, boltzmann_, boundaries_type, boundaries_unsupported, cached_alch_lambda, cached_alch_lambda_changed, indirect_lambda_biasing_force, kcal_mol_value_, reset_pbc_lattice, target_temperature_, and total_force_requested. |
|
Destructor.
Definition at line 32 of file colvarproxy_system.C. |
|
Definition at line 125 of file colvarproxy_system.h. |
|
Pass restraint energy value for current timestep to MD engine.
Reimplemented in colvarproxy_vmd. Definition at line 63 of file colvarproxy_system.C. Referenced by colvarmodule::update_colvar_forces. |
|
\brief Convert a length from Angstrom to internal.
Definition at line 38 of file colvarproxy_system.h. References angstrom_value_. Referenced by colvar::alpha_angles::alpha_angles, colvar::coordnum::coordnum, colvarproxy_vmd::load_coords, simple_scalar_dist_functions, and colvarproxy_vmd::update_input. |
|
Apply a scalar force on dE_dlambda (back-end distributes it onto atoms).
Definition at line 192 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Boltzmann constant, with unit the same as energy / K.
Definition at line 50 of file colvarproxy_system.h. References boltzmann_. Referenced by UIestimator::UIestimator::calc_pmf, colvar::collect_cvc_Jacobians, colvarbias_reweightaMD::compute_cumulant_expansion_factor, colvarbias_reweightaMD::hist_to_pmf, colvarbias_alb::init, colvar::init_extended_Lagrangian, colvarbias_reweightaMD::update, colvarbias_alb::update, colvarbias_meta::update_bias, and colvarbias_meta::write_pmf. |
|
\brief Time step of the simulation (fs).
Definition at line 49 of file colvarproxy_system.C. |
|
Get weight factor from accelMD.
Definition at line 119 of file colvarproxy_system.h. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Get value of alchemical lambda parameter from back-end (if available).
Reimplemented in colvarproxy_vmd. Definition at line 164 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Get energy second derivative with respect to lambda (if available).
Definition at line 199 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Get energy derivative with respect to lambda (if available).
Reimplemented in colvarproxy_vmd. Definition at line 185 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Get the molecule ID when called in VMD; raise error otherwise
Reimplemented in colvarproxy_vmd. Definition at line 156 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
\brief Convert a length from internal to Angstrom.
Definition at line 44 of file colvarproxy_system.h. References angstrom_value_. Referenced by colvarproxy_vmd::compute_voldata. |
|
\brief Get the PBC-aware distance vector between two positions.
Definition at line 129 of file colvarproxy_system.C. References COLVARS_INPUT_ERROR, colvarmodule::error, and round_to_integer. Referenced by colvarproxy_vmd::compute_voldata. |
|
\brief Pseudo-random number with Gaussian distribution.
Reimplemented in colvarproxy_vmd. Definition at line 56 of file colvarproxy_system.C. |
|
\brief Tell the proxy whether total forces are needed (they may not always be available).
Reimplemented in colvarproxy_vmd. Definition at line 66 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. |
|
Set the lattice vectors to zero.
Definition at line 118 of file colvarproxy_system.C. References reciprocal_cell_x, reciprocal_cell_y, reciprocal_cell_z, unit_cell_x, unit_cell_y, and unit_cell_z. Referenced by colvarproxy_system, and colvarproxy_vmd::update_input. |
|
Send cached value of alchemical lambda parameter to back-end (if available).
Reimplemented in colvarproxy_vmd. Definition at line 178 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED, and colvarmodule::error. Referenced by colvarproxy::end_of_step. |
|
Set value of alchemical lambda parameter to be sent to back-end at end of timestep.
Definition at line 171 of file colvarproxy_system.C. References cached_alch_lambda, and cached_alch_lambda_changed. |
|
Set the current target temperature of the simulation (K units).
Definition at line 42 of file colvarproxy_system.C. References target_temperature_. |
|
\brief Request to set the units used internally by Colvars.
Reimplemented in colvarproxy_vmd. Definition at line 35 of file colvarproxy_system.C. References COLVARS_NOT_IMPLEMENTED. Referenced by colvarmodule::parse_global_params. |
|
Current target temperature of the simulation (K units).
Definition at line 56 of file colvarproxy_system.h. References target_temperature_. Referenced by colvar::collect_cvc_Jacobians, colvarbias_reweightaMD::compute_cumulant_expansion_factor, colvarbias_reweightaMD::hist_to_pmf, colvarbias_alb::init, colvarbias_abf::init, colvar::init_extended_Lagrangian, colvarbias_reweightaMD::update, colvarbias_alb::update, and colvarbias_meta::write_pmf. |
|
Are total forces being used?
Definition at line 74 of file colvarproxy_system.C. Referenced by colvarmodule::read_restart. |
|
Are total forces from the current step available?
Definition at line 80 of file colvarproxy_system.C. Referenced by colvar::calc_cvcs, colvar::collect_cvc_data, colvarbias_abf::colvarbias_abf, colvarbias_ti::colvarbias_ti, and colvarbias_ti::update_system_forces. |
|
Recompute PBC reciprocal lattice (assumes XYZ periodicity).
Definition at line 92 of file colvarproxy_system.C. References boundaries_non_periodic, boundaries_type, boundaries_unsupported, COLVARS_BUG_ERROR, colvarmodule::error, reciprocal_cell_x, reciprocal_cell_y, reciprocal_cell_z, unit_cell_x, unit_cell_y, and unit_cell_z. Referenced by colvarproxy_vmd::update_input. |
|
\brief Value of 1 Angstrom in the internal (front-end) Colvars unit for atomic coordinates * defaults to 0 in the base class; derived proxy classes must set it * in VMD proxy, can only be changed when no variables are defined as user-defined values in composite units must be compatible with that system.
Definition at line 147 of file colvarproxy_system.h. Referenced by angstrom_to_internal, colvarproxy_system, colvarproxy_vmd::colvarproxy_vmd, internal_to_angstrom, and colvarproxy_vmd::set_unit_system. |
|
Boltzmann constant in internal Colvars units.
Definition at line 138 of file colvarproxy_system.h. Referenced by boltzmann, and colvarproxy_system. |
|
Type of boundary conditions.
Definition at line 168 of file colvarproxy_system.h. Referenced by colvarproxy_system, colvarproxy_vmd::update_input, and update_pbc_lattice. |
|
Next value of lambda to be sent to back-end.
Definition at line 132 of file colvarproxy_system.h. Referenced by colvarproxy_system, and set_alch_lambda. |
|
Whether lambda has been set and needs to be updated in backend.
Definition at line 135 of file colvarproxy_system.h. Referenced by colvarproxy_system, colvarproxy::end_of_step, and set_alch_lambda. |
|
Force to be applied onto alch. lambda, propagated from biasing forces on dE_dlambda.
Definition at line 116 of file colvarproxy_system.h. Referenced by colvarproxy_system. |
|
\brief Value of 1 kcal/mol in the internal Colvars unit for energy.
Definition at line 150 of file colvarproxy_system.h. Referenced by colvarproxy_system, colvarproxy_vmd::colvarproxy_vmd, and colvarproxy_vmd::set_unit_system. |
|
Reciprocal lattice vectors.
Definition at line 174 of file colvarproxy_system.h. Referenced by reset_pbc_lattice, and update_pbc_lattice. |
|
Reciprocal lattice vectors.
Definition at line 174 of file colvarproxy_system.h. Referenced by reset_pbc_lattice, and update_pbc_lattice. |
|
Reciprocal lattice vectors.
Definition at line 174 of file colvarproxy_system.h. Referenced by reset_pbc_lattice, and update_pbc_lattice. |
|
Most up to date target temperature for the system (in K).
Definition at line 141 of file colvarproxy_system.h. Referenced by colvarproxy_system, set_target_temperature, and target_temperature. |
|
Whether the total forces have been requested.
Definition at line 153 of file colvarproxy_system.h. Referenced by colvarproxy_system, and colvarproxy_vmd::request_total_force. |
|
Bravais lattice vectors.
Definition at line 171 of file colvarproxy_system.h. Referenced by reset_pbc_lattice, colvarproxy_vmd::update_input, and update_pbc_lattice. |
|
Bravais lattice vectors.
Definition at line 171 of file colvarproxy_system.h. Referenced by reset_pbc_lattice, colvarproxy_vmd::update_input, and update_pbc_lattice. |
|
Bravais lattice vectors.
Definition at line 171 of file colvarproxy_system.h. Referenced by reset_pbc_lattice, colvarproxy_vmd::update_input, and update_pbc_lattice. |
|
\brief Name of the unit system used internally by Colvars (by default, that of the back-end). Supported depending on the back-end: real (A, kcal/mol), metal (A, eV), electron (Bohr, Hartree), gromacs (nm, kJ/mol) Note: calls to back-end PBC functions assume back-end length unit We use different unit from back-end in VMD bc using PBC functions from colvarproxy base class Colvars internal units are user specified, because the module exchanges info in unknown composite dimensions with user input, while it only exchanges quantities of known dimension with the back-end (length and forces).
Definition at line 32 of file colvarproxy_system.h. Referenced by colvarmodule::read_restart, colvarproxy_vmd::set_unit_system, and colvarmodule::write_restart. |