Collective Variables Module - Developer Documentation
|
Communication between colvars and LAMMPS (implementation of colvarproxy) More...
#include <colvarproxy_lammps.h>
Public Member Functions | |
colvarproxy_lammps (LAMMPS_NS::LAMMPS *lmp) | |
colvarproxy_lammps (const colvarproxy_lammps &)=delete | |
void | init () |
void | set_random_seed (int seed) |
Set the internal seed used by rand_gaussian(). | |
int | setup () override |
(Re)initialize required member data (called after the module) More... | |
bool | total_forces_enabled () const override |
Are total forces being used? More... | |
bool | total_forces_same_step () const override |
bool | want_exit () const |
double | compute () |
int | set_unit_system (std::string const &units_in, bool check_only) override |
Request to set the units used internally by Colvars. More... | |
char const * | script_obj_to_str (unsigned char *obj) |
Convert a command-line argument to string. | |
std::vector< std::string > | script_obj_to_str_vector (unsigned char *obj) |
Convert a command-line argument to a vector of strings. | |
void | add_energy (cvm::real energy) override |
Pass restraint energy value for current timestep to MD engine. More... | |
void | request_total_force (bool yesno) override |
Tell the proxy whether total forces are needed (they may not always be available) More... | |
void | log (std::string const &message) override |
Print a message to the main log. More... | |
void | error (std::string const &message) override |
Print a message to the main log and/or let the host code know about it. More... | |
cvm::rvector | position_distance (cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const override |
Get the PBC-aware distance vector between two positions. More... | |
cvm::real | rand_gaussian () override |
Pseudo-random number with Gaussian distribution. More... | |
int | init_atom (int atom_number) override |
int | check_atom_id (int atom_number) override |
std::vector< int > * | modify_atom_types () |
![]() | |
colvarproxy () | |
Constructor. | |
~colvarproxy () override | |
Destructor. | |
std::string const & | engine_name () const |
bool | io_available () override |
Ensure that we're on the main thread (derived class will do actual check) More... | |
virtual int | request_deletion () |
Request deallocation of the module (currently only implemented by VMD) More... | |
bool | delete_requested () const |
Whether deallocation was requested. | |
virtual int | reset () |
Reset proxy state, e.g. requested atoms. More... | |
virtual int | parse_module_config () |
(Re)initialize the module | |
virtual int | load_atoms_pdb (char const *filename, cvm::atom_group &atoms, std::string const &pdb_field, double pdb_field_value) |
Read a selection of atom IDs from a PDB coordinate file. More... | |
virtual int | load_coords_pdb (char const *filename, std::vector< cvm::atom_pos > &pos, std::vector< int > const &sorted_ids, std::string const &pdb_field, double pdb_field_value) |
Load a set of coordinates from a PDB file. More... | |
virtual int | setup () |
(Re)initialize required member data (called after the module) More... | |
bool | engine_ready () const |
Whether the engine allows to fully initialize Colvars immediately. | |
void | add_config (std::string const &cmd, std::string const &conf) |
Enqueue new configuration text, to be parsed as soon as possible. | |
virtual int | update_input () |
virtual int | update_output () |
Update data based on the results of a Colvars call (e.g. send forces) | |
int | end_of_step () |
Carry out operations needed before next simulation step is run. | |
virtual void | log (std::string const &message) |
Print a message to the main log. More... | |
virtual void | error (std::string const &message) |
Print a message to the main log and/or let the host code know about it. More... | |
void | add_error_msg (std::string const &message) |
Record error message (used by VMD to collect them after a script call) | |
std::string const & | get_error_msgs () |
Retrieve accumulated error messages. | |
void | clear_error_msgs () |
As the name says. | |
bool | simulation_running () const |
Whether a simulation is running (warn against irrecovarable errors) | |
bool | simulation_continuing () const |
int | post_run () |
Called at the end of a simulation segment (i.e. "run" command) | |
void | print_input_atomic_data () |
Print a full list of all input atomic arrays for debug purposes. | |
void | print_output_atomic_data () |
Print a full list of all applied forces for debug purposes. | |
int | get_version_from_string (char const *version_string) |
Convert a version string "YYYY-MM-DD" into an integer. | |
int | version_number () const |
Get the version number (higher = more recent) | |
![]() | |
colvarproxy_system () | |
Constructor. | |
virtual | ~colvarproxy_system () |
Destructor. | |
virtual int | set_unit_system (std::string const &units, bool check_only) |
Request to set the units used internally by Colvars. More... | |
cvm::real | angstrom_to_internal (cvm::real l) const |
Convert a length from Angstrom to internal. | |
cvm::real | internal_to_angstrom (cvm::real l) const |
Convert a length from internal to Angstrom. | |
cvm::real | boltzmann () const |
Boltzmann constant, with unit the same as energy / K. | |
cvm::real | target_temperature () const |
Current target temperature of the simulation (K units) | |
virtual int | set_target_temperature (cvm::real T) |
Set the current target temperature of the simulation (K units) | |
double | dt () const |
Time step of the simulation (fs units) | |
virtual int | set_integration_timestep (cvm::real dt) |
Set the current integration timestep of the simulation (fs units) | |
int | time_step_factor () const |
Time step of the simulation (fs units) | |
virtual int | set_time_step_factor (int fact) |
Set the current integration timestep of the simulation (fs units) | |
virtual cvm::real | rand_gaussian (void) |
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 |
Get the PBC-aware distance vector between two positions. More... | |
void | update_pbc_lattice () |
Recompute PBC reciprocal lattice (assumes XYZ periodicity) | |
void | reset_pbc_lattice () |
Set the lattice vectors to zero. | |
virtual void | request_total_force (bool yesno) |
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 |
virtual int | get_molid (int &molid) |
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. | |
virtual int | send_alch_lambda () |
Send cached value of alchemical lambda parameter to back-end (if available) More... | |
virtual int | request_alch_energy_freq (int const) |
Request energy computation every freq steps (necessary for NAMD3, not all back-ends) 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) | |
virtual int | get_d2E_dlambda2 (cvm::real *d2E_dlambda2) |
Get energy second derivative with respect to lambda (if available) | |
virtual cvm::real | get_accelMD_factor () const |
Get weight factor from accelMD. More... | |
virtual bool | accelMD_enabled () const |
![]() | |
colvarproxy_atoms () | |
Constructor. | |
virtual | ~colvarproxy_atoms () |
Destructor. | |
virtual int | init_atom (int atom_number) |
virtual int | check_atom_id (int atom_number) |
virtual int | check_atom_name_selections_available () |
Check whether it is possible to select atoms by residue number name. More... | |
virtual int | init_atom (cvm::residue_id const &residue, std::string const &atom_name, std::string const &segment_id) |
virtual int | check_atom_id (cvm::residue_id const &residue, std::string const &atom_name, std::string const &segment_id) |
Check that this atom is valid, but do not initialize it yet. More... | |
virtual void | clear_atom (int index) |
Used by the atom class destructor: rather than deleting the array slot (costly) set the corresponding atoms_refcount to zero. More... | |
int | reset () |
Clear atomic data. | |
int | get_atom_id (int index) const |
cvm::real | get_atom_mass (int index) const |
void | increase_refcount (int index) |
cvm::real | get_atom_charge (int index) const |
cvm::rvector | get_atom_position (int index) const |
cvm::rvector | get_atom_total_force (int index) const |
void | apply_atom_force (int index, cvm::rvector const &new_force) |
cvm::rvector | get_atom_velocity (int) |
Read the current velocity of the given atom. | |
std::vector< int > const * | get_atom_ids () const |
size_t | get_num_active_atoms () const |
Return number of atoms with positive reference count. | |
atom_buffer_real_t const * | get_atom_masses () const |
atom_buffer_real_t * | modify_atom_masses () |
atom_buffer_real_t const * | get_atom_charges () |
atom_buffer_real_t * | modify_atom_charges () |
atom_buffer_rvector_t const * | get_atom_positions () const |
atom_buffer_rvector_t * | modify_atom_positions () |
atom_buffer_rvector_t const * | get_atom_total_forces () const |
atom_buffer_rvector_t * | modify_atom_total_forces () |
atom_buffer_rvector_t const * | get_atom_applied_forces () const |
atom_buffer_rvector_t * | modify_atom_applied_forces () |
void | compute_rms_atoms_applied_force () |
Compute the root-mean-square of the applied forces. | |
void | compute_max_atoms_applied_force () |
Compute the maximum norm among all applied forces. | |
cvm::real | rms_atoms_applied_force () const |
Get the root-mean-square of the applied forces. | |
cvm::real | max_atoms_applied_force () const |
Get the maximum norm among all applied forces. | |
int | max_atoms_applied_force_id () const |
Get the atom ID with the largest applied force. | |
bool | modified_atom_list () const |
Whether the atom list has been modified internally. | |
void | reset_modified_atom_list () |
Reset the modified atom list flag. | |
bool | updated_masses () const |
Record whether masses have been updated. | |
bool | updated_charges () const |
Record whether masses have been updated. | |
![]() | |
colvarproxy_atom_groups () | |
Constructor. | |
virtual | ~colvarproxy_atom_groups () |
Destructor. | |
int | reset () |
Clear atom group data. | |
virtual int | scalable_group_coms () |
Whether this proxy implementation has capability for scalable groups. More... | |
virtual int | init_atom_group (std::vector< int > const &atoms_ids) |
Prepare this group for collective variables calculation, selecting atoms by internal ids (0-based) More... | |
virtual void | clear_atom_group (int index) |
Used by the atom_group class destructor. More... | |
int | get_atom_group_id (int index) const |
Get the numeric ID of the given atom group (for the MD program) | |
cvm::real | get_atom_group_mass (int index) const |
Get the mass of the given atom group. | |
cvm::real | get_atom_group_charge (int index) const |
Get the charge of the given atom group. | |
cvm::rvector | get_atom_group_com (int index) const |
Read the current position of the center of mass given atom group. | |
cvm::rvector | get_atom_group_total_force (int index) const |
Read the current total force of the given atom group. | |
void | apply_atom_group_force (int index, cvm::rvector const &new_force) |
Request that this force is applied to the given atom group. | |
cvm::rvector | get_atom_group_velocity (int) |
Read the current velocity of the given atom group. | |
std::vector< int > const * | get_atom_group_ids () const |
size_t | get_num_active_atom_groups () const |
Return number of atom groups with positive reference count. | |
std::vector< cvm::real > * | modify_atom_group_masses () |
std::vector< cvm::real > * | modify_atom_group_charges () |
std::vector< cvm::rvector > * | modify_atom_group_positions () |
std::vector< cvm::rvector > * | modify_atom_group_total_forces () |
std::vector< cvm::rvector > * | modify_atom_group_applied_forces () |
void | compute_rms_atom_groups_applied_force () |
Compute the root-mean-square of the applied forces. | |
void | compute_max_atom_groups_applied_force () |
Compute the maximum norm among all applied forces. | |
cvm::real | rms_atom_groups_applied_force () const |
Get the root-mean-square of the applied forces. | |
cvm::real | max_atom_groups_applied_force () const |
Get the maximum norm among all applied forces. | |
![]() | |
colvarproxy_volmaps () | |
Contructor. | |
virtual | ~colvarproxy_volmaps () |
Destructor. | |
int | reset () |
Clear volumetric map data. | |
virtual int | check_volmaps_available () |
Test whether this implementation can use volumetric maps as CVs. More... | |
int | add_volmap_slot (int volmap_id) |
Create a slot for a volumetric map not requested yet. | |
virtual int | init_volmap_by_id (int volmap_id) |
virtual int | init_volmap_by_name (char const *volmap_name) |
virtual int | check_volmap_by_id (int volmap_id) |
virtual int | check_volmap_by_name (char const *volmap_name) |
int | init_volmap_by_name (std::string const &volmap_name) |
Request and prepare this volumetric map for use by Colvars. | |
int | check_volmap_by_name (std::string const &volmap_name) |
Check that the given volmap name is valid (return COLVARS_OK if it is) | |
virtual void | clear_volmap (int index) |
Used by the CVC destructors. More... | |
virtual int | get_volmap_id_from_name (char const *volmap_name) |
Get the numeric ID of the given volumetric map (for the MD program) More... | |
int | get_volmap_id (int index) const |
Get the numeric ID of the given volumetric map (for the MD program) | |
cvm::real | get_volmap_value (int index) const |
Read the current value of the volumetric map. | |
void | apply_volmap_force (int index, cvm::real const &new_force) |
Request that this force is applied to the given volumetric map. | |
virtual int | compute_volmap (int flags, int volmap_id, cvm::atom_group *ag, cvm::real *value, cvm::real *atom_field) |
Re-weigh an atomic field (e.g. a colvar) by the value of a volumetric map. More... | |
void | compute_rms_volmaps_applied_force () |
Compute the root-mean-square of the applied forces. | |
void | compute_max_volmaps_applied_force () |
Compute the maximum norm among all applied forces. | |
![]() | |
colvarproxy_smp () | |
Constructor. | |
virtual | ~colvarproxy_smp () |
Destructor. | |
virtual smp_mode_t | get_smp_mode () const |
Get the current SMP mode. | |
virtual int | set_smp_mode (smp_mode_t mode) |
Set the current SMP mode. | |
virtual int | smp_loop (int n_items, std::function< int(int)> const &worker) |
Distribute computation over threads using OpenMP, unless overridden in the backend (e.g. NAMD) | |
virtual int | smp_biases_loop () |
Distribute calculation of biases across threads. | |
virtual int | smp_biases_script_loop () |
Distribute calculation of biases across threads 2nd through last, with all scripted biased on 1st thread. | |
virtual int | smp_thread_id () |
Index of this thread. | |
virtual int | smp_num_threads () |
Number of threads sharing this address space. | |
virtual int | smp_lock () |
Lock the proxy's shared data for access by a thread, if threads are implemented; if not implemented, does nothing. | |
virtual int | smp_trylock () |
Attempt to lock the proxy's shared data. | |
virtual int | smp_unlock () |
Release the lock. | |
![]() | |
colvarproxy_replicas () | |
Constructor. | |
virtual | ~colvarproxy_replicas () |
Destructor. | |
virtual void | set_replicas_mpi_communicator (replicas_mpi_comm_t comm) |
Set the multiple replicas communicator. | |
virtual int | check_replicas_enabled () |
Indicate if multi-replica support is available and active. More... | |
virtual int | replica_index () |
Index of this replica. More... | |
virtual int | num_replicas () |
Total number of replicas. More... | |
virtual void | replica_comm_barrier () |
Synchronize replica with others. More... | |
virtual int | replica_comm_recv (char *msg_data, int buf_len, int src_rep) |
Receive data from other replica. More... | |
virtual int | replica_comm_send (char *msg_data, int msg_len, int dest_rep) |
Send data to other replica. More... | |
![]() | |
colvarproxy_script () | |
Constructor. | |
virtual | ~colvarproxy_script () |
Destructor. | |
virtual int | run_force_callback () |
Run a user-defined colvar forces script. More... | |
virtual int | run_colvar_callback (std::string const &name, std::vector< const colvarvalue * > const &cvcs, colvarvalue &value) |
virtual int | run_colvar_gradient_callback (std::string const &name, std::vector< const colvarvalue * > const &cvcs, std::vector< cvm::matrix2d< cvm::real > > &gradient) |
![]() | |
colvarproxy_tcl () | |
Constructor. | |
virtual | ~colvarproxy_tcl () |
Destructor. | |
bool | tcl_available () |
Is Tcl available? (trigger initialization if needed) | |
char const * | tcl_get_str (void *obj) |
Get a string representation of the Tcl object pointed to by obj. | |
int | tcl_run_script (std::string const &script) |
int | tcl_run_file (std::string const &fileName) |
int | tcl_run_force_callback () |
Tcl implementation of run_force_callback() | |
int | tcl_run_colvar_callback (std::string const &name, std::vector< const colvarvalue * > const &cvcs, colvarvalue &value) |
Tcl implementation of run_colvar_callback() | |
int | tcl_run_colvar_gradient_callback (std::string const &name, std::vector< const colvarvalue * > const &cvcs, std::vector< cvm::matrix2d< cvm::real > > &gradient) |
Tcl implementation of run_colvar_gradient_callback() | |
Tcl_Interp * | get_tcl_interp () |
Get a pointer to the Tcl interpreter. | |
void | set_tcl_interp (Tcl_Interp *interp) |
Set the pointer to the Tcl interpreter. | |
virtual void | init_tcl_pointers () |
Set Tcl pointers. More... | |
![]() | |
colvarproxy_io () | |
Constructor. | |
virtual | ~colvarproxy_io () |
Destructor. | |
virtual bool | io_available () |
Ensure that we're on the main thread (derived class will do actual check) More... | |
virtual int | get_frame (long int &) |
Save the current frame number in the argument given. More... | |
virtual int | set_frame (long int) |
Set the current frame number (as well as colvarmodule::it) More... | |
std::string | get_current_work_dir () const |
Get the current working directory of this process. | |
std::string | join_paths (std::string const &path1, std::string const &path2) const |
Join two paths using the operating system's path separation. | |
virtual int | backup_file (char const *filename) |
Rename the given file, before overwriting it. More... | |
int | backup_file (std::string const &filename) |
Rename the given file, before overwriting it. | |
virtual int | remove_file (char const *filename) |
Remove the given file (on Windows only, rename to filename.old) | |
int | remove_file (std::string const &filename) |
Remove the given file (on Windows only, rename to filename.old) | |
virtual int | rename_file (char const *filename, char const *newfilename) |
Rename the given file. | |
int | rename_file (std::string const &filename, std::string const &newfilename) |
Rename the given file. | |
std::string const & | input_prefix () const |
Prefix of the input state file to be read next. | |
virtual int | set_input_prefix (std::string const &prefix) |
Initialize input_prefix (NOTE: it will be erased after state file is read) | |
std::string const & | output_prefix () const |
Default prefix to be used for all output files (final configuration) | |
virtual int | set_output_prefix (std::string const &prefix) |
Set default output prefix. | |
std::string const & | restart_output_prefix () const |
Prefix of the restart (checkpoint) file to be written next. | |
virtual int | set_restart_output_prefix (std::string const &prefix) |
Set default restart state file prefix. | |
int | default_restart_frequency () const |
Default restart frequency (as set by the simulation engine) | |
virtual int | set_default_restart_frequency (int freq) |
Communicate/set the restart frequency of the simulation engine. | |
std::istream & | input_stream (std::string const &input_name, std::string const description="file/channel", bool error_on_fail=true) |
std::istream & | input_stream_from_string (std::string const &input_name, std::string const &content, std::string const description="string") |
bool | input_stream_exists (std::string const &input_name) |
Check if the file/channel is open (without opening it if not) | |
int | close_input_stream (std::string const &input_name) |
Closes the given input stream. | |
int | close_input_streams () |
Closes all input streams. | |
int | delete_input_stream (std::string const &input_name) |
Same as close_input_stream(), but also removes the corresponding entry from memory. | |
std::list< std::string > | list_input_stream_names () const |
List all input streams that were opened at some point. | |
virtual std::ostream & | output_stream (std::string const &output_name, std::string const description) |
virtual bool | output_stream_exists (std::string const &output_name) |
Check if the file/channel is open (without opening it if not) | |
virtual int | flush_output_stream (std::string const &output_name) |
Flushes the given output file/channel. More... | |
virtual int | flush_output_streams () |
Flushes all output files/channels. More... | |
virtual int | close_output_stream (std::string const &output_name) |
Closes the given output file/channel. More... | |
virtual int | close_output_streams () |
Close all open files/channels to prevent data loss. More... | |
Protected Attributes | |
LAMMPS_NS::LAMMPS * | _lmp |
LAMMPS_NS::RanPark * | _random |
double | bias_energy |
cvm::step_number | previous_step |
bool | first_timestep |
bool | do_exit |
std::vector< int > | atoms_types |
![]() | |
bool | engine_ready_ |
Whether the engine allows to fully initialize Colvars immediately. | |
std::string | error_output |
Collected error messages. | |
bool | b_simulation_running |
Whether a simulation is running (warn against irrecovarable errors) | |
bool | b_simulation_continuing |
bool | b_delete_requested |
Whether the entire module should be deallocated by the host engine. | |
int | version_int |
Integer representing the version string (allows comparisons) | |
size_t | features_hash |
Track which features have been acknowledged during the last run. | |
std::string | engine_name_ = "standalone" |
Name of the simulation engine that the derived proxy object supports. | |
void * | config_queue_ |
Queue of config strings or files to be fed to the module. | |
![]() | |
cvm::real | cached_alch_lambda |
Next value of lambda to be sent to back-end. | |
bool | cached_alch_lambda_changed |
Whether lambda has been set and needs to be updated in backend. | |
cvm::real | boltzmann_ |
Boltzmann constant in internal Colvars units. | |
cvm::real | target_temperature_ |
Most up to date target temperature (K units); default to 0.0 if undefined. | |
double | timestep_ |
Current integration timestep (engine units); default to 1.0 if undefined. | |
int | time_step_factor_ = 1 |
Current timestep multiplier, if Colvars is only called once every n MD timesteps. | |
cvm::real | angstrom_value_ |
Value of 1 Angstrom in the internal (front-end) Colvars unit for atomic coordinates. More... | |
cvm::real | kcal_mol_value_ |
Value of 1 kcal/mol in the internal Colvars unit for energy. | |
bool | total_force_requested |
Whether the total forces have been requested. | |
Boundaries_type | boundaries_type |
Type of boundary conditions. | |
cvm::rvector | unit_cell_x |
Bravais lattice vectors. | |
cvm::rvector | unit_cell_y |
cvm::rvector | unit_cell_z |
cvm::rvector | reciprocal_cell_x |
Reciprocal lattice vectors. | |
cvm::rvector | reciprocal_cell_y |
cvm::rvector | reciprocal_cell_z |
![]() | |
std::vector< int > | atoms_ids |
Array of 0-based integers used to uniquely associate atoms within the host program. | |
std::vector< size_t > | atoms_refcount |
Keep track of how many times each atom is used by a separate colvar object. | |
std::vector< cvm::real, allocator_type< cvm::real > > | atoms_masses |
Masses of the atoms (allow redefinition during a run, as done e.g. in LAMMPS) | |
std::vector< cvm::real, allocator_type< cvm::real > > | atoms_charges |
Charges of the atoms (allow redefinition during a run, as done e.g. in LAMMPS) | |
std::vector< cvm::rvector, allocator_type< cvm::rvector > > | atoms_positions |
Current three-dimensional positions of the atoms. | |
std::vector< cvm::rvector, allocator_type< cvm::rvector > > | atoms_total_forces |
Most recent total forces on each atom. | |
std::vector< cvm::rvector, allocator_type< cvm::rvector > > | atoms_new_colvar_forces |
Forces applied from colvars, to be communicated to the MD integrator. | |
cvm::real | atoms_rms_applied_force_ |
Root-mean-square of the applied forces. | |
cvm::real | atoms_max_applied_force_ |
Maximum norm among all applied forces. | |
int | atoms_max_applied_force_id_ |
ID of the atom with the maximum norm among all applied forces. | |
bool | modified_atom_list_ |
Whether the atom list has been modified internally. | |
bool | updated_masses_ |
Whether the masses and charges have been updated from the host code. | |
bool | updated_charges_ |
![]() | |
std::vector< int > | atom_groups_ids |
Array of 0-based integers used to uniquely associate atom groups within the host program. | |
std::vector< size_t > | atom_groups_refcount |
Keep track of how many times each group is used by a separate cvc. | |
std::vector< cvm::real > | atom_groups_masses |
Total masses of the atom groups. | |
std::vector< cvm::real > | atom_groups_charges |
Total charges of the atom groups (allow redefinition during a run, as done e.g. in LAMMPS) | |
std::vector< cvm::rvector > | atom_groups_coms |
Current centers of mass of the atom groups. | |
std::vector< cvm::rvector > | atom_groups_total_forces |
Most recently updated total forces on the com of each group. | |
std::vector< cvm::rvector > | atom_groups_new_colvar_forces |
Forces applied from colvars, to be communicated to the MD integrator. | |
cvm::real | atom_groups_rms_applied_force_ |
Root-mean-square of the applied group forces. | |
cvm::real | atom_groups_max_applied_force_ |
Maximum norm among all applied group forces. | |
![]() | |
std::vector< int > | volmaps_ids |
Array of numeric IDs of volumetric maps. | |
std::vector< size_t > | volmaps_refcount |
Keep track of how many times each vol map is used by a separate colvar object. | |
std::vector< cvm::real > | volmaps_values |
Current values of the vol maps. | |
std::vector< cvm::real > | volmaps_new_colvar_forces |
Forces applied from colvars, to be communicated to the MD integrator. | |
cvm::real | volmaps_rms_applied_force_ |
Root-mean-square of the the applied forces. | |
cvm::real | volmaps_max_applied_force_ |
Maximum norm among all applied forces. | |
![]() | |
omp_lock_t * | omp_lock_state |
Lock state for OpenMP. | |
smp_mode_t | smp_mode |
![]() | |
replicas_mpi_comm_t | replicas_mpi_comm |
MPI communicator containint 1 root proc from each world. | |
int | replicas_mpi_rank = 0 |
Index (rank) of this replica in the MPI implementation. | |
int | replicas_mpi_num = 1 |
Number of replicas in the MPI implementation. | |
![]() | |
Tcl_Interp * | tcl_interp_ |
Pointer to Tcl interpreter object. | |
![]() | |
std::string | input_prefix_str |
Prefix of the input state file to be read next. | |
std::string | output_prefix_str |
Default prefix to be used for all output files (final configuration) | |
std::string | restart_output_prefix_str |
Prefix of the restart (checkpoint) file to be written next. | |
int | restart_frequency_engine |
How often the simulation engine will write its own restart. | |
std::map< std::string, std::istream * > | input_streams_ |
Container of input files/channels indexed by path name. | |
std::istream * | input_stream_error_ |
Object whose reference is returned when read errors occur. | |
std::map< std::string, std::ostream * > | output_streams_ |
Currently open output files/channels. | |
std::ostream * | output_stream_error_ |
Object whose reference is returned when write errors occur. | |
Additional Inherited Members | |
![]() | |
template<typename T > | |
using | allocator_type = std::allocator< T > |
using | atom_buffer_real_t = std::vector< cvm::real, allocator_type< cvm::real > > |
using | atom_buffer_rvector_t = std::vector< cvm::rvector, allocator_type< cvm::rvector > > |
![]() | |
enum | { volmap_flag_null = 0 , volmap_flag_gradients = 1 , volmap_flag_use_atom_field = (1<<8) } |
Flags controlling what computation is done on the map. | |
![]() | |
enum class | smp_mode_t { cvcs , inner_loop , none } |
![]() | |
colvarmodule * | colvars |
Pointer to the main object. | |
![]() | |
std::string | units |
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) | |
cvm::real | indirect_lambda_biasing_force |
Force to be applied onto alch. lambda, propagated from biasing forces on dE_dlambda. | |
![]() | |
colvarscript * | script |
bool | have_scripts |
Do we have a scripting interface? | |
![]() | |
enum | Boundaries_type { boundaries_non_periodic , boundaries_pbc_ortho , boundaries_pbc_triclinic , boundaries_unsupported } |
Type of boundary conditions. More... | |
![]() | |
int | add_atom_slot (int atom_id) |
![]() | |
int | add_atom_group_slot (int atom_group_id) |
Used by all init_atom_group() functions: create a slot for an atom group not requested yet. | |
Communication between colvars and LAMMPS (implementation of colvarproxy)
|
inlineoverridevirtual |
Pass restraint energy value for current timestep to MD engine.
Reimplemented from colvarproxy_system.
|
overridevirtual |
Check that this atom number is valid, but do not initialize the corresponding atom yet
Reimplemented from colvarproxy_atoms.
|
overridevirtual |
Print a message to the main log and/or let the host code know about it.
Reimplemented from colvarproxy.
|
overridevirtual |
Prepare this atom for collective variables calculation, selecting it by numeric index (1-based)
Reimplemented from colvarproxy_atoms.
|
overridevirtual |
Print a message to the main log.
Reimplemented from colvarproxy.
|
overridevirtual |
Get the PBC-aware distance vector between two positions.
Reimplemented from colvarproxy_system.
|
overridevirtual |
Pseudo-random number with Gaussian distribution.
Reimplemented from colvarproxy_system.
|
inlineoverridevirtual |
Tell the proxy whether total forces are needed (they may not always be available)
Reimplemented from colvarproxy_system.
|
overridevirtual |
Request to set the units used internally by Colvars.
Reimplemented from colvarproxy_system.
|
overridevirtual |
(Re)initialize required member data (called after the module)
Reimplemented from colvarproxy.
|
inlineoverridevirtual |
Are total forces being used?
Reimplemented from colvarproxy_system.
|
inlineoverridevirtual |
Are total forces from the current step available? in which case they are really system forces
Reimplemented from colvarproxy_system.