Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

colvarmodule Class Reference

\brief Collective variables module (main class) Class to control the collective variables calculation. An object (usually one) of this class is spawned from the MD program, containing all i/o routines and general interface. At initialization, the colvarmodule object creates a proxy object to provide a transparent interface between the MD program and the child objects. More...

#include <colvarmodule.h>

List of all members.

Public Types

typedef long long step_number
 Use a 64-bit integer to store the step number. More...

typedef double real
 Defining an abstract real number allows to switch precision. More...

typedef int residue_id
 Residue identifier. More...

typedef rvector atom_pos
 \brief Atom position (different type name from rvector, to make possible future PBC-transparent implementations). More...

typedef std::vector< atom
>::iterator 
atom_iter
typedef std::vector< atom
>::const_iterator 
atom_const_iter

Public Methods

std::string version () const
 Get the version string (YYYY-MM-DD format). More...

int version_number () const
 Get the version number (higher = more recent). More...

void register_named_atom_group (atom_group *ag)
 Register a named atom group into named_atom_groups. More...

void unregister_named_atom_group (atom_group *ag)
 Remove a named atom group from named_atom_groups. More...

std::vector< colvar * > * variables ()
 Array of collective variables. More...

std::vector< colvar * > * variables_active ()
 Collective variables with the active flag on. More...

std::vector< colvar * > * variables_active_smp ()
 Collective variables to be calculated on different threads; colvars with multple items (e.g. multiple active CVCs) are duplicated. More...

std::vector< int > * variables_active_smp_items ()
 Indexes of the items to calculate for each colvar. More...

std::vector< colvarbias * > * biases_active ()
 Array of active collective variable biases. More...

size_t size () const
 How many objects (variables and biases) are configured yet? More...

 colvarmodule (colvarproxy *proxy)
 Constructor
Parameters:
Pointer  to instance of the proxy class (communicate with engine).
More...


 ~colvarmodule ()
 Destructor. More...

int reset ()
 Actual function called by the destructor. More...

int read_config_file (char const *config_file_name)
 Open a config file, load its contents, and pass it to config_string()
Parameters:
config_file_name  Configuration file name.
More...


int read_config_string (std::string const &conf)
 \brief Parse a config string assuming it is a complete configuration (i.e. calling all parse functions). More...

int parse_config (std::string &conf)
 \brief Parse a "clean" config string (no comments). More...

std::string const & get_config () const
 Get the configuration string read so far (includes comments). More...

int parse_global_params (std::string const &conf)
 Parse the few module's global parameters. More...

int parse_colvars (std::string const &conf)
 Parse and initialize collective variables. More...

int run_tcl_script (std::string const &filename)
 Run provided Tcl script. More...

int parse_biases (std::string const &conf)
 Parse and initialize collective variable biases. More...

int append_new_config (std::string const &conf)
 \brief Add new configuration during parsing (e.g. to implement back-compatibility); cannot be nested, i.e. conf should not contain anything that triggers another call. More...

void config_changed ()
 Signals to the module object that the configuration has changed. More...

size_t num_variables () const
 Return how many variables are defined. More...

size_t num_variables_feature (int feature_id) const
 Return how many variables have this feature enabled. More...

size_t num_biases () const
 Return how many biases are defined. More...

size_t num_biases_feature (int feature_id) const
 Return how many biases have this feature enabled. More...

size_t num_biases_type (std::string const &type) const
 Return how many biases of this type are defined. More...

std::vector< std::string
> const 
time_dependent_biases () const
 Return the names of time-dependent biases with forces enabled (ABF, metadynamics, etc). More...

int update_engine_parameters ()
 (Re)initialize any internal data affected by changes in the engine Also calls setup() member functions of colvars and biases. More...

int setup_input ()
 (Re)initialize and (re)read the input state file calling read_restart(). More...

int setup_output ()
 (Re)initialize the output trajectory and state file (does not write it yet). More...

std::istream & read_restart (std::istream &is)
 Read a restart file. More...

std::istream & read_objects_state (std::istream &is)
 Read the states of individual objects; allows for changes. More...

int print_total_forces_errning (bool warn_total_forces)
 If needed (old restart file), print the warning that cannot be ignored. More...

std::ostream & write_restart (std::ostream &os)
 Write the output restart file. More...

int open_traj_file (std::string const &file_name)
 Open a trajectory file if requested (and leave it open). More...

int close_traj_file ()
 Close it (note: currently unused). More...

std::ostream & write_traj (std::ostream &os)
 Write in the trajectory file. More...

std::ostream & write_traj_label (std::ostream &os)
 Write explanatory labels in the trajectory file. More...

int write_traj_files ()
 Write all trajectory files. More...

int write_restart_file (std::string const &out_name)
 Write a state file useful to resume the simulation. More...

int write_output_files ()
 Write all other output files. More...

int write_restart_string (std::string &output)
 Write the state into a string. More...

int change_configuration (std::string const &bias_name, std::string const &conf)
 Load new configuration for the given bias - currently works for harmonic (force constant and/or centers). More...

std::string read_colvar (std::string const &name)
 Read a colvar value. More...

real energy_difference (std::string const &bias_name, std::string const &conf)
 Calculate change in energy from using alt. config. for the given bias - currently works for harmonic (force constant and/or centers). More...

int calc ()
 Main worker function. More...

int calc_colvars ()
 Calculate collective variables. More...

int calc_biases ()
 Calculate biases. More...

int update_colvar_forces ()
 Integrate bias and restraint forces, send colvar forces to atoms. More...

int analyze ()
 Perform analysis. More...

int end_of_step ()
 Carry out operations needed before next step is run. More...

int read_traj (char const *traj_filename, long traj_read_begin, long traj_read_end)
 \brief Read a collective variable trajectory (post-processing only, not called at runtime). More...

int cite_feature (std::string const &feature)
 Track usage of the given Colvars feature. More...

std::string feature_report (int flag=0)
 Report usage of the Colvars features. More...

int read_index_file (char const *filename)
 \brief Read a Gromacs .ndx file. More...

int reset_index_groups ()
 Clear the index groups loaded so far. More...

int load_coords_xyz (char const *filename, std::vector< rvector > *pos, atom_group *atoms)
 Load coordinates into an atom group from an XYZ file (assumes Angstroms). More...

std::string restart_version () const
 Version of the most recent state file read. More...

int restart_version_number () const
 Integer version of the most recent state file read. More...

int calc_scripted_forces ()
 Calculate the energy and forces of scripted biases. More...


Static Public Methods

real integer_power (real const &x, int const n)
 Override the STL pow() with a product for n integer. More...

real pow (real const &x, real const &y)
 Reimplemented to work around MS compiler issues. More...

real floor (real const &x)
 Reimplemented to work around MS compiler issues. More...

real fabs (real const &x)
 Reimplemented to work around MS compiler issues. More...

real sqrt (real const &x)
 Reimplemented to work around MS compiler issues. More...

real sin (real const &x)
 Reimplemented to work around MS compiler issues. More...

real cos (real const &x)
 Reimplemented to work around MS compiler issues. More...

real asin (real const &x)
 Reimplemented to work around MS compiler issues. More...

real acos (real const &x)
 Reimplemented to work around MS compiler issues. More...

real atan2 (real const &x, real const &y)
 Reimplemented to work around MS compiler issues. More...

real exp (real const &x)
 Reimplemented to work around MS compiler issues. More...

real logn (real const &x)
 Reimplemented to work around MS compiler issues. Note: log() is currently defined as the text logging function, but this can be changed at a later time. More...

void set_error_bits (int code)
bool get_error_bit (int code)
int get_error ()
void clear_error ()
step_number step_relative ()
 Return the current step number from the beginning of this run. More...

step_number step_absolute ()
 Return the current step number from the beginning of the whole calculation. More...

std::stringoutput_prefix ()
 Accessor for the above. More...

bool debug ()
 \brief Whether debug output should be enabled (compile-time option). More...

std::istream & getline (std::istream &is, std::string &line)
 Allow reading from Windows text files using using std::getline (which can still be used when the text is produced by Colvars itself). More...

std::string state_file_prefix (char const *filename)
 Strips .colvars.state from filename and checks that it is not empty. More...

int backup_file (char const *filename)
 Backup a file before writing it. More...

colvarbiasbias_by_name (std::string const &name)
 Look up a bias by name; returns NULL if not found. More...

colvarcolvar_by_name (std::string const &name)
 Look up a colvar by name; returns NULL if not found. More...

atom_groupatom_group_by_name (std::string const &name)
 Look up a named atom group by name; returns NULL if not found. More...

std::string to_str (char const *s)
 Convert to string for output purposes. More...

std::string to_str (std::string const &s)
 Convert to string for output purposes. More...

std::string to_str (bool x)
 Convert to string for output purposes. More...

std::string to_str (int const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (size_t const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (long int const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (step_number const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (real const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (rvector const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (quaternion const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (colvarvalue const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (vector1d< real > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (matrix2d< real > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< int > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< size_t > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< long int > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< real > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< rvector > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< quaternion > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< colvarvalue > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string to_str (std::vector< std::string > const &x, size_t width=0, size_t prec=0)
 Convert to string for output purposes. More...

std::string wrap_string (std::string const &s, size_t nchars)
 Reduce the number of characters in a string. More...

real dt ()
 \brief Time step of MD integrator (fs). More...

void request_total_force ()
 Request calculation of total force from MD engine. More...

void log (std::string const &message, int min_log_level=10)
 Print a message to the main log
Parameters:
message  Message to print
min_log_level  Only print if cvm::log_level() >= min_log_level.
More...


int error (std::string const &message, int code=COLVARS_ERROR)
 Print a message to the main log and set global error code. More...

int log_level ()
 Level of logging requested by the user. More...

int log_init_messages ()
 Level at which initialization messages are logged. More...

int log_user_params ()
 Level at which a keyword's user-provided value is logged. More...

int log_default_params ()
 Level at which a keyword's default value is logged. More...

int log_output_files ()
 Level at which output-file operations are logged. More...

int log_input_files ()
 Level at which input-file operations (configuration, state) are logged. More...

rvector position_distance (atom_pos const &pos1, atom_pos const &pos2)
 \brief Get the distance between two atomic positions with pbcs handled correctly. More...

int load_atoms (char const *filename, atom_group &atoms, std::string const &pdb_field, double pdb_field_value=0.0)
 \brief Select atom IDs from a file (usually PDB)
Parameters:
filename  name of the file
atoms  array into which atoms read from "filename" will be appended
pdb_field  (optional) if the file is a PDB and this string is non-empty, select atoms for which this field is non-zero
pdb_field_value  (optional) if non-zero, select only atoms whose pdb_field equals this.
More...


int load_coords (char const *filename, std::vector< rvector > *pos, atom_group *atoms, std::string const &pdb_field, double pdb_field_value=0.0)
 \brief Load coordinates for a group of atoms from a file (PDB or XYZ); if "pos" is already allocated, the number of its elements must match the number of entries in "filename"
Parameters:
filename  name of the file
pos  array of coordinates
atoms  group containing the atoms (used to obtain internal IDs)
pdb_field  (optional) if the file is a PDB and this string is non-empty, select atoms for which this field is non-zero
pdb_field_value  (optional) if non-zero, select only atoms whose pdb_field equals this.
More...


real rand_gaussian (void)
 Pseudo-random number with Gaussian distribution. More...

size_t & depth ()
 Get the current object depth in the hierarchy. More...

void increase_depth ()
 Increase the depth (number of indentations in the output). More...

void decrease_depth ()
 Decrease the depth (number of indentations in the output). More...

bool scripted_forces ()
colvarmodule * main ()
 \brief Access the one instance of the Colvars module. More...


Public Attributes

std::vector< colvarbias * > biases
 Array of collective variable biases. More...

real total_bias_energy
 Energy of built-in and scripted biases, summed per time-step. More...

std::vector< std::stringindex_file_names
 \brief Names of .ndx files that have been loaded. More...

std::vector< std::stringindex_group_names
 \brief Names of groups from one or more Gromacs .ndx files. More...

std::vector< std::vector<
int > * > 
index_groups
 \brief Groups from one or more Gromacs .ndx files. More...

std::string restart_out_name
 Output restart file name. More...


Static Public Attributes

step_number it = 0
 Current step number. More...

step_number it_restart = 0
 Starting step number for this run. More...

real debug_gradients_step_size = 1.0e-07
 \brief Finite difference step size (if there is no dynamics, or if gradients need to be tested independently from the size of dt). More...

size_t const it_width = 12
 Number of characters to represent a time step. More...

size_t const cv_prec = 14
 Number of digits to represent a collective variables value(s). More...

size_t const cv_width = 21
 Number of characters to represent a collective variables value(s). More...

size_t const en_prec = 14
 Number of digits to represent the collective variables energy. More...

size_t const en_width = 21
 Number of characters to represent the collective variables energy. More...

const char *const line_marker
 Line separator in the log output. More...

size_t cv_traj_freq = 0
 Frequency for collective variables trajectory output. More...

size_t restart_out_freq = 0
 Frequency for saving output restarts. More...

bool use_scripted_forces = false
 Use scripted colvars forces? More...

bool scripting_after_biases = true
 Wait for all biases before calculating scripted forces? More...

colvarproxyproxy = NULL
 \brief Pointer to the proxy object, used to retrieve atomic data from the hosting program; it is static in order to be accessible from static functions in the colvarmodule class. More...


Protected Attributes

colvarparseparse
 Configuration file parser object. More...

std::string cv_traj_name
 Name of the trajectory file. More...

bool cv_traj_write_labels
 Write labels at the next iteration. More...

std::string restart_version_str
 Version of the most recent state file read. More...

int restart_version_int
 Integer version of the most recent state file read. More...

size_t depth_s
 Counter for the current depth in the object hierarchy (useg e.g. in output). More...

std::vector< size_t > depth_v
 Thread-specific depth. More...

int xyz_reader_use_count
 Track how many times the XYZ reader has been used. More...

usageusage_
 Track usage of Colvars features. More...


Friends

class colvarproxy
class colvarscript
class atom
class atom_group


Detailed Description

\brief Collective variables module (main class) Class to control the collective variables calculation. An object (usually one) of this class is spawned from the MD program, containing all i/o routines and general interface. At initialization, the colvarmodule object creates a proxy object to provide a transparent interface between the MD program and the child objects.

Definition at line 68 of file colvarmodule.h.


Member Typedef Documentation

typedef std::vector<atom>::const_iterator colvarmodule::atom_const_iter
 

Definition at line 211 of file colvarmodule.h.

typedef std::vector<atom>::iterator colvarmodule::atom_iter
 

Definition at line 210 of file colvarmodule.h.

typedef rvector colvarmodule::atom_pos
 

\brief Atom position (different type name from rvector, to make possible future PBC-transparent implementations).

Definition at line 200 of file colvarmodule.h.

Referenced by colvarproxy_vmd::load_coords, colvarmodule::atom::reset_data, and colvarproxy_vmd::update_input.

typedef double colvarmodule::real
 

Defining an abstract real number allows to switch precision.

Definition at line 100 of file colvarmodule.h.

Referenced by acos, colvar::alpha_angles::apply_force, asin, atan2, colvar_grid_gradient::average, colvar::rmsd::calc_gradients, colvar::gyration::calc_gradients, colvar::gyration::calc_Jacobian_derivative, colvar::calc_runave, colvar::alpha_angles::calc_value, colvar::rmsd::calc_value, colvar::distance_inv::calc_value, colvar::dihedPC::collect_gradients, colvar::alpha_angles::collect_gradients, colvar::cvc::collect_gradients, compute_norm2_stats, cos, exp, fabs, floor, colvar::orientation::init, colvar::init_extended_Lagrangian, integer_power, logn, pow, colvarbias_meta::project_hills, sin, sqrt, colvarbias_restraint_k_moving::update, colvarbias_restraint_centers_moving::update, colvarbias_abf::update, colvarbias_meta::update_bias, colvar::update_extended_Lagrangian, colvar::update_forces_energy, colvar_grid_gradient::value_output, colvar_grid_scalar::value_output, colvar_grid_gradient::write_1D_integral, and colvar::write_acf.

typedef int colvarmodule::residue_id
 

Residue identifier.

Definition at line 196 of file colvarmodule.h.

typedef long long colvarmodule::step_number
 

Use a 64-bit integer to store the step number.

Definition at line 97 of file colvarmodule.h.

Referenced by step_absolute, and step_relative.


Constructor & Destructor Documentation

colvarmodule::colvarmodule colvarproxy   proxy
 

Constructor

Parameters:
Pointer  to instance of the proxy class (communicate with engine).

Definition at line 72 of file colvarmodule.C.

References colvarmodule::usage::cite_feature, COLVARS_BUG_ERROR, COLVARS_VERSION, colvarscript, colvarmodule::rotation::crossing_threshold, cv_traj_freq, cv_traj_write_labels, debug_gradients_step_size, colvarproxy_io::default_restart_frequency, depth_s, error, colvarproxy::get_version_from_string, it, it_restart, log, colvarmodule::rotation::monitor_crossings, NULL, parse, proxy, restart_out_freq, restart_version_int, restart_version_str, colvarproxy_script::script, scripting_after_biases, colvarproxy_smp::smp_enabled, usage_, use_scripted_forces, version, and xyz_reader_use_count.

colvarmodule::~colvarmodule  
 

Destructor.

Definition at line 1218 of file colvarmodule.C.

References colvar::cvc::delete_features, colvar::delete_features, colvarbias::delete_features, NULL, parse, proxy, reset, colvarproxy_smp::smp_thread_id, and usage_.


Member Function Documentation

real colvarmodule::acos real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 162 of file colvarmodule.h.

References real.

Referenced by colvar::orientation_angle::calc_value, colvar::polar_phi::calc_value, colvar::polar_theta::calc_value, colvar::dipole_angle::calc_value, colvar::angle::calc_value, colvarvalue::dist2, colvarmodule::quaternion::dist2, and colvarmodule::quaternion::dist2_grad.

int colvarmodule::analyze  
 

Perform analysis.

Definition at line 1152 of file colvarmodule.C.

References biases, COLVARS_ERROR, debug, decrease_depth, get_error, increase_depth, it, log, and variables_active.

Referenced by calc.

int colvarmodule::append_new_config std::string const &    conf
 

\brief Add new configuration during parsing (e.g. to implement back-compatibility); cannot be nested, i.e. conf should not contain anything that triggers another call.

Definition at line 315 of file colvarmodule.C.

Referenced by colvar::init_grid_parameters.

real colvarmodule::asin real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 156 of file colvarmodule.h.

References real.

Referenced by colvar::euler_theta::calc_value.

real colvarmodule::atan2 real const &    x,
real const &    y
[inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 168 of file colvarmodule.h.

References real.

Referenced by colvar::euler_psi::calc_value, colvar::euler_phi::calc_value, colvar::polar_phi::calc_value, colvar::polar_theta::calc_value, colvar::dihedral::calc_value, colvarmodule::rotation::cos_theta, and colvarmodule::rotation::spin_angle.

cvm::atom_group * colvarmodule::atom_group_by_name std::string const &    name [static]
 

Look up a named atom group by name; returns NULL if not found.

Definition at line 687 of file colvarmodule.C.

References main, named_atom_groups, and NULL.

int colvarmodule::backup_file char const *    filename [static]
 

Backup a file before writing it.

Definition at line 1549 of file colvarmodule.C.

References colvarproxy_io::backup_file, and proxy.

Referenced by UIestimator::UIestimator::write_1D_pmf, UIestimator::UIestimator::write_files, and colvar::write_output_files.

colvarbias * colvarmodule::bias_by_name std::string const &    name [static]
 

Look up a bias by name; returns NULL if not found.

Definition at line 659 of file colvarmodule.C.

References biases, main, and NULL.

Referenced by change_configuration, energy_difference, and colvarbias::init.

std::vector< colvarbias * > * colvarmodule::biases_active  
 

Array of active collective variable biases.

Definition at line 173 of file colvarmodule.C.

Referenced by calc_biases, colvarproxy_smp::smp_biases_loop, colvarproxy_smp::smp_biases_script_loop, and update_colvar_forces.

int colvarmodule::calc  
 

Main worker function.

Definition at line 770 of file colvarmodule.C.

References analyze, biases, calc_biases, calc_colvars, cv_traj_freq, cv_traj_name, debug, decrease_depth, colvarproxy::end_of_step, end_of_step, increase_depth, log, output_prefix, proxy, restart_out_freq, restart_out_name, step_absolute, step_relative, update_colvar_forces, write_restart_file, and write_traj_files.

int colvarmodule::calc_biases  
 

Calculate biases.

Definition at line 936 of file colvarmodule.C.

References biases, biases_active, calc_scripted_forces, COLVARS_ERROR, debug, decrease_depth, get_error, increase_depth, log, num_biases, proxy, scripting_after_biases, colvarproxy_smp::smp_biases_loop, colvarproxy_smp::smp_biases_script_loop, colvarproxy_smp::smp_enabled, total_bias_energy, and use_scripted_forces.

Referenced by calc.

int colvarmodule::calc_colvars  
 

Calculate collective variables.

Definition at line 840 of file colvarmodule.C.

References biases, COLVARS_ERROR, debug, decrease_depth, colvardeps::f_cv_awake, colvardeps::f_cvb_awake, get_error, increase_depth, log, proxy, size, colvarproxy_smp::smp_colvars_loop, colvarproxy_smp::smp_enabled, step_absolute, variables, variables_active, variables_active_smp, and variables_active_smp_items.

Referenced by calc.

int colvarmodule::calc_scripted_forces  
 

Calculate the energy and forces of scripted biases.

Definition at line 1061 of file colvarmodule.C.

References COLVARS_ERROR, COLVARS_NOT_IMPLEMENTED, error, proxy, and colvarproxy_script::run_force_callback.

Referenced by calc_biases, colvarproxy_smp::smp_biases_script_loop, and update_colvar_forces.

int colvarmodule::change_configuration std::string const &    bias_name,
std::string const &    conf
 

Load new configuration for the given bias - currently works for harmonic (force constant and/or centers).

Definition at line 719 of file colvarmodule.C.

References bias_by_name, colvarbias::change_configuration, COLVARS_ERROR, conf, decrease_depth, error, get_error, increase_depth, and NULL.

int colvarmodule::cite_feature std::string const &    feature
 

Track usage of the given Colvars feature.

Definition at line 2258 of file colvarmodule.C.

References colvarmodule::usage::cite_feature, feature, and usage_.

Referenced by colvarproxy_vmd::colvarproxy_vmd, colvar::coordnum::coordnum, colvarmodule::rotation::init, colvar::map_total::init, colvar::cvc::init, colvarbias_restraint_histogram::init, colvarbias_restraint_linear::init, colvarbias_restraint_harmonic_walls::init, colvarbias_restraint_harmonic::init, colvarbias_meta::init, colvarbias_reweightaMD::init, colvarbias_histogram::init, colvarbias_alb::init, colvarbias_abf::init, colvarbias_ti::init, colvar::init, colvarbias_meta::init_ebmeta_params, integrate_potential::integrate_potential, and colvar::cvc::set_function_type.

void colvarmodule::clear_error   [static]
 

Definition at line 1800 of file colvarmodule.C.

References colvarproxy::clear_error_msgs, proxy, colvarproxy_smp::smp_lock, and colvarproxy_smp::smp_unlock.

int colvarmodule::close_traj_file  
 

Close it (note: currently unused).

colvar * colvarmodule::colvar_by_name std::string const &    name [static]
 

Look up a colvar by name; returns NULL if not found.

Definition at line 673 of file colvarmodule.C.

References colvars, main, and NULL.

Referenced by colvarbias::add_colvar, colvar::calc_acf, colvar::init, colvar::parse_analysis, and read_colvar.

void colvarmodule::config_changed  
 

Signals to the module object that the configuration has changed.

Definition at line 322 of file colvarmodule.C.

References cv_traj_write_labels.

Referenced by colvarbias::clear, parse_colvars, and colvar::~colvar.

real colvarmodule::cos real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 150 of file colvarmodule.h.

References real.

Referenced by colvar::dihedPC::apply_force, colvar::angle::calc_Jacobian_derivative, colvar::dihedPC::calc_value, colvar::dihedPC::collect_gradients, colvarmodule::rotation::cos_theta, colvarmodule::rotation::dcos_theta_dq, and colvarmodule::quaternion::set_from_euler_angles.

bool colvarmodule::debug   [inline, static]
 

\brief Whether debug output should be enabled (compile-time option).

Definition at line 333 of file colvarmodule.h.

References COLVARS_DEBUG.

Referenced by colvarparse::_get_keyval_scalar_, colvar::add_bias_force, colvar::add_bias_force_actual_value, colvardeps::add_child, colvarbias::add_colvar, colvar_grid< size_t >::address, analyze, colvar::build_atom_list, calc, calc_biases, calc_colvars, colvar::calc_cvc_gradients, colvar::calc_cvc_total_force, colvar::calc_cvc_values, colvar::calc_cvcs, colvarbias_meta::calc_energy, colvarbias_meta::calc_forces, colvar::calc_runave, colvar::alpha_angles::calc_value, colvarproxy_vmd::check_atom_id, colvarparse::check_keywords, colvar::collect_cvc_data, colvar::collect_cvc_Jacobians, colvar::collect_cvc_total_forces, colvar::collect_cvc_values, colvarbias::communicate_forces, colvar::communicate_forces, colvardeps::decr_ref_count, colvarbias_meta::delete_hill, colvardeps::disable, colvardeps::enable, end_of_step, colvar::end_of_step, colvardeps::free_children_deps, colvarbias_meta::hill::hill, colvar::cvc::init, colvarbias_restraint_centers_moving::init, colvarbias_restraint_centers::init, colvarbias_restraint::init, colvarbias_meta::init, colvarbias_alb::init, colvarbias_abf::init, colvarbias::init, colvar::init, colvarproxy_vmd::init_atom, colvar_grid< size_t >::init_from_boundaries, colvar_grid< size_t >::init_from_colvars, colvarparse::key_lookup, colvar_grid< size_t >::map_grid, integrate_potential::nr_linbcg_sym, colvarproxy_io::output_stream, parse_biases, parse_colvars, colvar_grid< size_t >::parse_params, colvarbias_meta::project_hills, colvarbias_meta::read_hill, colvarbias_meta::read_replica_files, colvar::read_state, colvarbias_meta::read_state_data, colvarbias_ti::read_state_data, colvarbias::read_state_string, colvardeps::restore_children_deps, colvarbias::set_state_params, colvar_grid< size_t >::setup, simple_scalar_dist_functions, colvarproxy_smp::smp_biases_loop, colvarproxy_smp::smp_biases_script_loop, colvarproxy_smp::smp_colvars_loop, colvarbias_restraint_histogram::update, colvarbias_restraint_centers_moving::update, colvarbias_restraint::update, colvarbias_reweightaMD::update, colvarbias_histogram::update, colvarbias_alb::update, colvarbias_abf::update, colvarbias::update, colvarbias_meta::update_bias, colvarbias_restraint_centers_moving::update_centers, update_colvar_forces, colvar::update_extended_Lagrangian, colvar::update_forces_energy, colvarbias_meta::update_grid_params, colvarbias_meta::update_replicas_registry, colvarbias_ti::update_system_forces, colvarbias_meta::write_replica_state_file, colvarbias::write_state, and write_traj_files.

void colvarmodule::decrease_depth   [static]
 

Decrease the depth (number of indentations in the output).

Definition at line 1754 of file colvarmodule.C.

References depth.

Referenced by colvardeps::add_child, analyze, calc, calc_biases, calc_colvars, colvar::calc_cvc_gradients, colvar::calc_cvc_Jacobians, colvar::calc_cvc_total_force, colvar::calc_cvc_values, change_configuration, colvardeps::disable, colvardeps::enable, end_of_step, energy_difference, colvardeps::free_children_deps, parse_biases, parse_colvars, colvar::cvc::parse_group, colvardeps::print_state, read_colvar, read_objects_state, colvardeps::restore_children_deps, update_colvar_forces, colvar::update_cvc_config, write_output_files, write_restart, write_traj, and write_traj_label.

size_t & colvarmodule::depth   [static]
 

Get the current object depth in the hierarchy.

Definition at line 1762 of file colvarmodule.C.

References depth_s, depth_v, main, proxy, colvarproxy_smp::smp_enabled, colvarproxy_smp::smp_lock, colvarproxy_smp::smp_num_threads, colvarproxy_smp::smp_thread_id, and colvarproxy_smp::smp_unlock.

Referenced by decrease_depth, increase_depth, and log.

real colvarmodule::dt   [static]
 

\brief Time step of MD integrator (fs).

Referenced by colvar::fdiff_velocity, colvar::init_extended_Lagrangian, colvar::update_extended_Lagrangian, and write_restart.

int colvarmodule::end_of_step  
 

Carry out operations needed before next step is run.

Definition at line 1180 of file colvarmodule.C.

References biases, COLVARS_ERROR, debug, decrease_depth, get_error, increase_depth, it, log, and variables_active.

Referenced by calc.

cvm::real colvarmodule::energy_difference std::string const &    bias_name,
std::string const &    conf
 

Calculate change in energy from using alt. config. for the given bias - currently works for harmonic (force constant and/or centers).

Definition at line 753 of file colvarmodule.C.

References bias_by_name, conf, decrease_depth, colvarbias::energy_difference, error, increase_depth, and NULL.

int colvarmodule::error std::string const &    message,
int    code = COLVARS_ERROR
[static]
 

Print a message to the main log and set global error code.

Definition at line 1809 of file colvarmodule.C.

References colvarproxy::error, get_error, proxy, and set_error_bits.

Referenced by colvarparse::_get_keyval_scalar_novalue_, colvarparse::_get_keyval_scalar_value_, colvarparse::_get_keyval_vector_, colvarbias::add_colvar, colvarvalue::add_elem, colvar_grid< size_t >::add_grid, colvar_grid< size_t >::address, colvar::alpha_angles::alpha_angles, colvarproxy_system::apply_force_dE_dlambda, colvarproxy_io::backup_file, colvarbias::bin_count, colvarbias::bin_num, colvar::calc_acf, colvar::cvc::calc_force_invgrads, colvar::cvc::calc_Jacobian_derivative, calc_scripted_forces, change_configuration, colvarbias::change_configuration, colvarproxy_vmd::check_atom_id, colvar_grid< size_t >::check_consistency, colvar::check_cvc_range, colvardeps::check_enabled, colvarparse::check_keywords, colvarmodule::matrix2d::check_sizes, colvarmodule::vector1d::check_sizes, colvarvalue::check_types, colvarvalue::check_types_assign, colvarproxy_volmaps::check_volmap_by_id, colvarproxy_vmd::check_volmap_by_id, colvarproxy_atoms::clear_atom, colvarproxy_atom_groups::clear_atom_group, colvarproxy_volmaps::clear_volmap, colvarproxy_io::close_input_stream, colvarproxy_io::close_output_stream, colvar::collect_cvc_values, colvar_grid_gradient::colvar_grid_gradient, colvarmodule, colvarscript::colvarscript, colvarvalue::colvarvalue, colvar::communicate_forces, colvar::componentDisabled::componentDisabled, colvar::coordnum::coordnum, colvar_grid< size_t >::copy_grid, colvarbias::current_bin, colvar::cvc_param_exists, colvardeps::decr_ref_count, colvar_grid< size_t >::delta_grid, diagonalize_matrix, colvardeps::disable, colvar::distance_inv::distance_inv, colvar::distance_z::distance_z, colvardeps::enable, energy_difference, colvarbias::energy_difference, colvarparse::error_key_required, colvarproxy_system::get_accelMD_factor, colvarproxy_system::get_alch_lambda, colvarproxy_atom_groups::get_atom_group_velocity, colvarproxy_atoms::get_atom_velocity, colvar::get_cvc_param, colvar::get_cvc_param_grad, colvar::get_cvc_param_ptr, colvarproxy_system::get_d2E_dlambda2, colvarproxy_system::get_dE_dlambda, colvarvalue::get_elem, colvardeps::get_keyval_feature, colvarproxy_system::get_molid, colvarparams::get_param_grad_ptr, colvarparams::get_param_ptr, colvar::map_total::init, colvar::orientation::init, colvar::cvc::init, colvarbias_restraint_histogram::init, colvarbias_restraint_linear::init, colvarbias_restraint_harmonic_walls::init, colvarbias_restraint_k_moving::init, colvarbias_restraint_centers_moving::init, colvarbias_restraint_moving::init, colvarbias_restraint_k::init, colvarbias_restraint_centers::init, colvarbias_meta::init, colvarbias_reweightaMD::init, colvarbias_histogram::init, colvarbias_alb::init, colvarbias_abf::init, colvarbias_ti::init, colvarbias::init, colvar::init, colvarproxy_atoms::init_atom, colvarproxy_atom_groups::init_atom_group, colvar::init_components, colvar::init_custom_function, colvar::cvc::init_dependencies, colvarbias::init_dependencies, colvar::init_dependencies, colvarbias_meta::init_ebmeta_params, colvar::init_extended_Lagrangian, colvar_grid< size_t >::init_from_colvars, colvar::init_grid_parameters, colvar::init_output_flags, colvarbias_meta::init_replicas_params, colvarbias_meta::init_well_tempered_params, colvarproxy_io::input_stream, integrate_potential::integrate, colvarvalue::interpolate, colvarparse::key_lookup, colvarproxy_vmd::load_atoms, colvarproxy_atoms::load_atoms, colvarproxy_vmd::load_coords, colvarproxy_atoms::load_coords, colvar_grid< size_t >::map_grid, colvarvalue::operator cvm::quaternion, colvarvalue::operator cvm::real, colvarvalue::operator cvm::rvector, operator>>, colvarvalue::operator[], colvarmodule::quaternion::operator[], colvarproxy_io::output_stream, colvarvalue::p2leg_opt, colvar::parse_analysis, parse_colvars, parse_config, colvar::cvc::parse_group, colvarproxy::parse_module_config, colvar_grid< size_t >::parse_params, pdb_field_str2enum, colvarproxy_system::position_distance, print_total_forces_errning, colvarbias_meta::project_hills, read_colvar, read_config_file, colvarbias_meta::read_hill, colvar_grid::read_multicol, read_objects_state, colvar_grid< size_t >::read_raw, read_restart, colvarbias::read_state, colvar::read_state, colvarbias_meta::read_state_data, colvarbias::read_state_data_key, colvarbias::read_state_string, read_traj, colvardeps::remove_all_children, colvardeps::remove_child, colvarproxy_io::remove_file, colvarbias::replica_share, colvarproxy::request_deletion, colvarproxy_system::request_total_force, colvarproxy_system::send_alch_lambda, colvarmodule::matrix2d::row::set, colvar::set_cvc_flags, colvar::set_cvc_param, colvarvalue::set_elem, colvarparams::set_param, colvarbias_meta::set_state_params, colvarbias_alb::set_state_params, colvarbias::set_state_params, colvarproxy_vmd::set_unit_system, colvar_grid< size_t >::setup, colvarbias_meta::setup_output, simple_scalar_dist_functions, colvarmodule::vector1d::slice, colvarmodule::vector1d::sliceassign, state_file_prefix, colvarproxy_tcl::tcl_run_colvar_callback, colvarproxy_tcl::tcl_run_colvar_gradient_callback, colvarproxy_tcl::tcl_run_file, colvarproxy_tcl::tcl_run_force_callback, colvarproxy_tcl::tcl_run_script, colvarvalue::undef_op, colvarbias_restraint_histogram::update, colvarbias_meta::update_bias, colvar::update_cvc_config, colvar::update_cvc_flags, colvar::update_extended_Lagrangian, colvarproxy_system::update_pbc_lattice, colvarbias_meta::update_replicas_registry, colvar_grid_scalar::value_input, colvar_grid_scalar::value_output, colvar_grid_scalar::vector_gradient_finite_diff, colvar_grid< size_t >::wrap, colvar_grid_gradient::write_1D_integral, colvarbias_meta::write_replica_state_file, write_restart_file, write_restart_string, and colvarbias::write_state_string.

real colvarmodule::exp real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 174 of file colvarmodule.h.

References real.

Referenced by colvarbias_reweightaMD::compute_cumulant_expansion_factor, ArithmeticPathCV::ArithmeticPathBase::computeValue, colvarbias_meta::init_ebmeta_params, colvarbias_restraint_histogram::update, and colvarbias_meta::update_bias.

real colvarmodule::fabs real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 132 of file colvarmodule.h.

References real.

Referenced by colvar::dihedral::calc_gradients, colvar_grid< size_t >::check_consistency, GeometricPathCV::GeometricPathBase::determineClosestFrames, colvarmodule::quaternion::dist2_grad, colvarbias_restraint_histogram::init, colvar::init, colvar_grid< size_t >::init_from_boundaries, colvar_grid< size_t >::parse_params, and colvar_grid::read_multicol.

std::string colvarmodule::feature_report int    flag = 0
 

Report usage of the Colvars features.

Definition at line 2263 of file colvarmodule.C.

References colvarmodule::usage::report, and usage_.

real colvarmodule::floor real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 126 of file colvarmodule.h.

References real.

Referenced by colvarbias_meta::add_hill, colvar::distance_z::dist2, colvar::distance_z::dist2_lgrad, colvar::distance_z::dist2_rgrad, colvarbias_meta::read_hill, colvarbias_meta::recount_hills_off_grid, colvarbias_meta::update_grid_params, colvar_grid< size_t >::value_to_bin_scalar, colvar_grid< size_t >::value_to_bin_scalar_bound, colvar_grid< size_t >::value_to_bin_scalar_fraction, colvar::distance_z::wrap, and colvar::wrap.

std::string const & colvarmodule::get_config   const
 

Get the configuration string read so far (includes comments).

Definition at line 309 of file colvarmodule.C.

References colvarparse::get_config, and parse.

int colvarmodule::get_error   [inline, static]
 

Definition at line 225 of file colvarmodule.h.

Referenced by analyze, calc_biases, calc_colvars, change_configuration, end_of_step, error, colvar::cvc::init, colvarbias_restraint_k_moving::init, colvarbias_restraint_moving::init, colvarbias_abf::init, colvar::init, colvar::cvc::init_total_force_params, colvarproxy_vmd::load_atoms, colvarproxy_vmd::load_coords, colvar::parse_analysis, parse_biases, parse_colvars, parse_config, parse_global_params, colvar::cvc::parse_group, read_traj, reset, setup_input, setup_output, colvarbias_meta::setup_output, colvarproxy_smp::smp_biases_loop, colvarproxy_smp::smp_biases_script_loop, colvarproxy_smp::smp_colvars_loop, tcl_colvars_vmd_init, colvarproxy_tcl::tcl_run_colvar_callback, colvarproxy_tcl::tcl_run_colvar_gradient_callback, colvarproxy_tcl::tcl_run_file, colvarproxy_tcl::tcl_run_force_callback, colvarproxy_tcl::tcl_run_script, colvarbias_restraint_centers_moving::update, colvarbias_reweightaMD::update, colvarbias_histogram::update, colvarbias_restraint_centers_moving::update_centers, update_colvar_forces, update_engine_parameters, colvarbias_reweightaMD::write_output_files, and write_restart_file.

bool colvarmodule::get_error_bit int    code [static]
 

Definition at line 1794 of file colvarmodule.C.

std::istream & colvarmodule::getline std::istream &    is,
std::string   line
[static]
 

Allow reading from Windows text files using using std::getline (which can still be used when the text is produced by Colvars itself).

Definition at line 233 of file colvarmodule.C.

Referenced by colvarparse::check_ascii, colvarparse::check_keywords, colvarparse::getline_nocomments, and colvarparse::read_config_line.

void colvarmodule::increase_depth   [static]
 

Increase the depth (number of indentations in the output).

Definition at line 1748 of file colvarmodule.C.

References depth.

Referenced by colvardeps::add_child, analyze, calc, calc_biases, calc_colvars, colvar::calc_cvc_gradients, colvar::calc_cvc_Jacobians, colvar::calc_cvc_total_force, colvar::calc_cvc_values, change_configuration, colvardeps::disable, colvardeps::enable, end_of_step, energy_difference, colvardeps::free_children_deps, parse_biases, parse_colvars, colvar::cvc::parse_group, colvardeps::print_state, read_colvar, read_objects_state, colvardeps::restore_children_deps, update_colvar_forces, colvar::update_cvc_config, write_output_files, write_restart, write_traj, and write_traj_label.

real colvarmodule::integer_power real const &    x,
int const    n
[inline, static]
 

Override the STL pow() with a product for n integer.

Definition at line 106 of file colvarmodule.h.

References n, and real.

Referenced by colvar::distance_inv::calc_value, colvar::collect_cvc_values, colvar::dihedPC::collect_gradients, colvar::alpha_angles::collect_gradients, colvar::cvc::collect_gradients, and colvar::coordnum::switching_function.

int colvarmodule::load_atoms char const *    filename,
atom_group   atoms,
std::string const &    pdb_field,
double    pdb_field_value = 0.0
[static]
 

\brief Select atom IDs from a file (usually PDB)

Parameters:
filename  name of the file
atoms  array into which atoms read from "filename" will be appended
pdb_field  (optional) if the file is a PDB and this string is non-empty, select atoms for which this field is non-zero
pdb_field_value  (optional) if non-zero, select only atoms whose pdb_field equals this.

int colvarmodule::load_coords char const *    filename,
std::vector< rvector > *    pos,
atom_group   atoms,
std::string const &    pdb_field,
double    pdb_field_value = 0.0
[static]
 

\brief Load coordinates for a group of atoms from a file (PDB or XYZ); if "pos" is already allocated, the number of its elements must match the number of entries in "filename"

Parameters:
filename  name of the file
pos  array of coordinates
atoms  group containing the atoms (used to obtain internal IDs)
pdb_field  (optional) if the file is a PDB and this string is non-empty, select atoms for which this field is non-zero
pdb_field_value  (optional) if non-zero, select only atoms whose pdb_field equals this.

Referenced by colvar::orientation::init, and simple_scalar_dist_functions.

int colvarmodule::load_coords_xyz char const *    filename,
std::vector< rvector > *    pos,
atom_group   atoms
 

Load coordinates into an atom group from an XYZ file (assumes Angstroms).

void colvarmodule::log std::string const &    message,
int    min_log_level = 10
[static]
 

Print a message to the main log

Parameters:
message  Message to print
min_log_level  Only print if cvm::log_level() >= min_log_level.

Definition at line 1735 of file colvarmodule.C.

References depth, colvarproxy::log, log_level, main, NULL, and proxy.

Referenced by colvarparse::_get_keyval_scalar_, colvar::add_bias_force, colvar::add_bias_force_actual_value, colvardeps::add_child, colvarbias::add_colvar, colvar::alpha_angles::alpha_angles, analyze, colvar::build_atom_list, calc, colvar::calc_acf, calc_biases, colvar::calc_colvar_properties, calc_colvars, colvar::calc_cvc_gradients, colvar::calc_cvc_total_force, colvar::calc_cvc_values, colvar::calc_cvcs, colvarbias_meta::calc_energy, colvarbias_meta::calc_forces, colvar::calc_runave, colvar::alpha_angles::calc_value, colvarparse::check_ascii, colvarproxy_vmd::check_atom_id, colvarparse::check_keywords, colvar::collect_cvc_data, colvar::collect_cvc_Jacobians, colvar::collect_cvc_total_forces, colvar::collect_cvc_values, colvarmodule, colvarproxy_vmd::colvarproxy_vmd, colvarscript::colvarscript, colvarbias::communicate_forces, colvar::communicate_forces, colvar::coordnum::coordnum, colvar::cvc::debug_gradients, colvardeps::decr_ref_count, colvarbias_meta::delete_hill, colvardeps::disable, colvar::distance_inv::distance_inv, colvar::distance_z::distance_z, colvardeps::enable, end_of_step, colvar::end_of_step, colvardeps::free_children_deps, colvarbias_meta::hill::hill, colvar::spin_angle::init, colvar::tilt::init, colvar::orientation::init, colvar::cvc::init, colvarbias_restraint_histogram::init, colvarbias_restraint_harmonic_walls::init, colvarbias_restraint_k_moving::init, colvarbias_restraint_centers_moving::init, colvarbias_restraint_centers::init, colvarbias_restraint::init, colvarbias_meta::init, colvarbias_alb::init, colvarbias_abf::init, colvarbias::init, colvar::init, colvarproxy_vmd::init_atom, colvar::init_components, colvarbias_meta::init_ebmeta_params, colvar::init_extended_Lagrangian, colvar_grid< size_t >::init_from_boundaries, colvar_grid< size_t >::init_from_colvars, colvar::init_grid_parameters, colvarbias_meta::init_replicas_params, colvar::cvc::init_total_force_params, colvarbias_meta::init_well_tempered_params, integrate_potential::integrate, colvarparse::key_lookup, colvarproxy_vmd::load_atoms, colvar_grid< size_t >::map_grid, colvarparse::mark_key_set_default, colvarparse::mark_key_set_user, colvarproxy_io::output_stream, colvar::parse_analysis, parse_biases, parse_colvars, parse_config, parse_global_params, colvar_grid< size_t >::parse_params, colvarproxy::print_input_atomic_data, colvarproxy::print_output_atomic_data, colvardeps::print_state, print_total_forces_errning, colvarbias_meta::project_hills, read_config_file, read_config_string, colvarbias_meta::read_hill, colvar_grid::read_multicol, colvarbias_meta::read_replica_files, read_restart, colvar_grid< size_t >::read_restart, colvarbias::read_state, colvar::read_state, colvarbias_meta::read_state_data, colvarbias_ti::read_state_data, colvarbias::read_state_string, read_traj, colvar::read_traj, ArithmeticPathCV::ArithmeticPathBase::reComputeLambda, colvarproxy_io::rename_file, colvarproxy_vmd::request_total_force, reset, colvardeps::restore_children_deps, set_error_bits, colvarbias_meta::set_state_params, colvarbias::set_state_params, colvar_grid< size_t >::setup, setup_input, setup_output, simple_scalar_dist_functions, colvarproxy_smp::smp_biases_loop, colvarproxy_smp::smp_biases_script_loop, colvarproxy_smp::smp_colvars_loop, colvarproxy_tcl::tcl_run_colvar_callback, colvarproxy_tcl::tcl_run_colvar_gradient_callback, colvarproxy_tcl::tcl_run_file, colvarproxy_tcl::tcl_run_force_callback, colvarproxy_tcl::tcl_run_script, colvarbias_restraint_histogram::update, colvarbias_restraint_k_moving::update, colvarbias_restraint_centers_moving::update, colvarbias_restraint::update, colvarbias_reweightaMD::update, colvarbias_histogram::update, colvarbias_alb::update, colvarbias_abf::update, colvarbias::update, colvarbias_meta::update_bias, colvarbias_restraint_centers_moving::update_centers, update_colvar_forces, colvar::update_cvc_config, colvar::update_extended_Lagrangian, colvar::update_forces_energy, colvarbias_meta::update_grid_params, colvarbias_meta::update_replicas_registry, colvarbias_ti::update_system_forces, colvarbias_reweightaMD::write_count, colvarbias_reweightaMD::write_cumulant_expansion_pmf, colvarbias_reweightaMD::write_exponential_reweighted_pmf, colvarbias_histogram::write_output_files, colvarbias_ti::write_output_files, colvar::write_output_files, colvarbias_meta::write_replica_state_file, write_restart_file, write_restart_string, colvarbias::write_state, write_traj_files, colvar::~colvar, and colvardeps::~colvardeps.

int colvarmodule::log_default_params   [inline, static]
 

Level at which a keyword's default value is logged.

Definition at line 681 of file colvarmodule.h.

int colvarmodule::log_init_messages   [inline, static]
 

Level at which initialization messages are logged.

Definition at line 669 of file colvarmodule.h.

int colvarmodule::log_input_files   [inline, static]
 

Level at which input-file operations (configuration, state) are logged.

Definition at line 693 of file colvarmodule.h.

int colvarmodule::log_level   [inline, static]
 

Level of logging requested by the user.

Definition at line 663 of file colvarmodule.h.

Referenced by log.

int colvarmodule::log_output_files   [inline, static]
 

Level at which output-file operations are logged.

Definition at line 687 of file colvarmodule.h.

int colvarmodule::log_user_params   [inline, static]
 

Level at which a keyword's user-provided value is logged.

Definition at line 675 of file colvarmodule.h.

real colvarmodule::logn real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues. Note: log() is currently defined as the text logging function, but this can be changed at a later time.

Definition at line 182 of file colvarmodule.h.

References real.

Referenced by ArithmeticPathCV::ArithmeticPathBase::computeValue, colvar_grid_scalar::entropy, colvarbias_reweightaMD::hist_to_pmf, colvar_grid_count::log_gradient_finite_diff, colvarbias_reweightaMD::update, and colvarbias_meta::write_pmf.

colvarmodule * colvarmodule::main   [static]
 

\brief Access the one instance of the Colvars module.

Definition at line 143 of file colvarmodule.C.

References colvarproxy::colvars, NULL, and proxy.

Referenced by colvar::alpha_angles::alpha_angles, colvar::map_total::apply_force, atom_group_by_name, bias_by_name, colvar::calc_cvcs, UIestimator::UIestimator::calc_pmf, colvar::calc_runave, colvar::map_total::calc_value, colvarbias::can_accumulate_data, colvarbias::clear, colvar::collect_cvc_data, colvar::collect_cvc_Jacobians, colvar_by_name, colvar_grid_gradient::colvar_grid_gradient, colvarbias_abf::colvarbias_abf, colvarbias_ti::colvarbias_ti, colvarbias_reweightaMD::compute_cumulant_expansion_factor, colvar::coordnum::coordnum, depth, colvarbias_reweightaMD::hist_to_pmf, colvarmodule::rotation::init, colvar::map_total::init, colvar::cvc::init, colvarbias_restraint_histogram::init, colvarbias_restraint_linear::init, colvarbias_restraint_harmonic_walls::init, colvarbias_restraint_harmonic::init, colvarbias_meta::init, colvarbias_reweightaMD::init, colvarbias_histogram::init, colvarbias_alb::init, colvarbias_abf::init, colvarbias_ti::init, colvar::init, colvar::init_dependencies, colvarbias_meta::init_ebmeta_params, colvar::init_extended_Lagrangian, colvar::init_grid_parameters, colvarbias_meta::init_replicas_params, integrate_potential::integrate_potential, log, output_prefix, UIestimator::UIestimator::read_inputfiles, colvar_grid::read_multicol, colvarbias::read_state_prefix, colvar::cvc::set_function_type, colvarbias_meta::set_state_params, colvarbias_meta::setup_output, simple_scalar_dist_functions, colvarproxy_smp::smp_biases_loop, colvarproxy_smp::smp_biases_script_loop, colvarproxy_smp::smp_colvars_loop, colvarbias_restraint_k_moving::update, colvarbias_restraint_centers_moving::update, colvarbias_reweightaMD::update, colvarbias_alb::update, colvarbias_abf::update, colvarbias_restraint_k_moving::update_acc_work, colvarbias_restraint_centers_moving::update_acc_work, colvarbias_meta::update_bias, colvarbias_ti::update_system_forces, colvar_grid::write_multicol, colvar_grid::write_opendx, colvarbias_restraint_histogram::write_output_files, colvarbias_meta::write_pmf, colvar::write_state, colvar::~colvar, and colvarbias_meta::~colvarbias_meta.

size_t colvarmodule::num_biases   const
 

Return how many biases are defined.

Definition at line 597 of file colvarmodule.C.

References biases.

Referenced by calc_biases, parse_biases, time_dependent_biases, and update_colvar_forces.

size_t colvarmodule::num_biases_feature int    feature_id const
 

Return how many biases have this feature enabled.

Definition at line 603 of file colvarmodule.C.

References biases, and n.

Referenced by colvarbias_meta::setup_output, and colvarbias_abf::update.

size_t colvarmodule::num_biases_type std::string const &    type const
 

Return how many biases of this type are defined.

Definition at line 617 of file colvarmodule.C.

References biases, and n.

size_t colvarmodule::num_variables   const
 

Return how many variables are defined.

Definition at line 577 of file colvarmodule.C.

size_t colvarmodule::num_variables_feature int    feature_id const
 

Return how many variables have this feature enabled.

Definition at line 583 of file colvarmodule.C.

References n.

int colvarmodule::open_traj_file std::string const &    file_name
 

Open a trajectory file if requested (and leave it open).

std::string& colvarmodule::output_prefix   [inline, static]
 

Accessor for the above.

Definition at line 262 of file colvarmodule.h.

References cvm_output_prefix, and main.

Referenced by calc, colvarbias::init, colvarproxy::post_run, print_total_forces_errning, setup_output, colvarbias_meta::setup_output, colvarbias_histogram::update, colvarbias_abf::update, colvarbias_reweightaMD::write_output_files, and colvarbias_ti::write_output_files.

int colvarmodule::parse_biases std::string const &    conf
 

Parse and initialize collective variable biases.

Definition at line 516 of file colvarmodule.C.

References COLVARS_ERROR, conf, debug, decrease_depth, get_error, increase_depth, log, num_biases, time_dependent_biases, to_str, and use_scripted_forces.

Referenced by parse_config.

int colvarmodule::parse_colvars std::string const &    conf
 

Parse and initialize collective variables.

Definition at line 410 of file colvarmodule.C.

References colvar, COLVARS_ERROR, COLVARS_INPUT_ERROR, conf, config_changed, debug, decrease_depth, error, get_error, increase_depth, colvarparse::key_lookup, log, and parse.

Referenced by parse_config.

int colvarmodule::parse_config std::string   conf
 

\brief Parse a "clean" config string (no comments).

Definition at line 253 of file colvarmodule.C.

References colvarparse::check_ascii, colvarparse::check_braces, colvarparse::check_keywords, COLVARS_INPUT_ERROR, conf, error, get_error, log, parse, parse_biases, parse_colvars, parse_global_params, and run_tcl_script.

Referenced by read_config_file, and read_config_string.

int colvarmodule::parse_global_params std::string const &    conf
 

Parse the few module's global parameters.

Definition at line 328 of file colvarmodule.C.

References colvarproxy_smp::b_smp_active, conf, colvarmodule::rotation::crossing_threshold, cv_traj_freq, debug_gradients_step_size, get_error, colvarparse::get_keyval, colvarparse::key_lookup, log, colvarmodule::rotation::monitor_crossings, parse, colvarparse::parse_silent, proxy, read_index_file, restart_out_freq, scripting_after_biases, colvarproxy_system::set_unit_system, colvarparse::to_lower_cppstr, and use_scripted_forces.

Referenced by parse_config.

rvector colvarmodule::position_distance atom_pos const &    pos1,
atom_pos const &    pos2
[static]
 

\brief Get the distance between two atomic positions with pbcs handled correctly.

Referenced by colvar::distance_pairs::apply_force, colvar::distance_xy::calc_gradients, colvar::distance_pairs::calc_value, colvar::distance_inv::calc_value, colvar::distance_dir::calc_value, colvar::distance_xy::calc_value, colvar::distance_z::calc_value, colvar::distance_vec::calc_value, colvar::distance::calc_value, colvar::dihedral::calc_value, colvar::dipole_angle::calc_value, colvar::angle::calc_value, colvar::distance_vec::dist2, colvar::distance_vec::dist2_lgrad, colvar::distance_vec::dist2_rgrad, and colvar::coordnum::switching_function.

real colvarmodule::pow real const &    x,
real const &    y
[inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 120 of file colvarmodule.h.

References real.

Referenced by colvar::distance_inv::calc_value, and colvarbias_restraint_k_moving::update.

int colvarmodule::print_total_forces_errning bool    warn_total_forces
 

If needed (old restart file), print the warning that cannot be ignored.

Definition at line 1525 of file colvarmodule.C.

References COLVARS_INPUT_ERROR, error, colvarproxy_io::input_prefix, log, output_prefix, proxy, and write_restart_file.

Referenced by read_restart.

real colvarmodule::rand_gaussian void    [static]
 

Pseudo-random number with Gaussian distribution.

Referenced by colvarvalue::set_random.

std::string colvarmodule::read_colvar std::string const &    name
 

Read a colvar value.

Definition at line 737 of file colvarmodule.C.

References colvar_by_name, decrease_depth, error, increase_depth, NULL, string, and colvar::value.

int colvarmodule::read_config_file char const *    config_file_name
 

Open a config file, load its contents, and pass it to config_string()

Parameters:
config_file_name  Configuration file name.

Definition at line 185 of file colvarmodule.C.

References colvarproxy_io::close_input_stream, COLVARS_FILE_ERROR, conf, error, colvarproxy_io::input_stream, log, parse, parse_config, proxy, colvarparse::read_config_line, and colvarparse::white_space.

Referenced by colvarproxy::parse_module_config.

int colvarmodule::read_config_string std::string const &    conf
 

\brief Parse a config string assuming it is a complete configuration (i.e. calling all parse functions).

Definition at line 214 of file colvarmodule.C.

References conf, log, parse, parse_config, colvarparse::read_config_line, and colvarparse::white_space.

Referenced by colvarproxy::parse_module_config.

int colvarmodule::read_index_file char const *    filename
 

\brief Read a Gromacs .ndx file.

Referenced by parse_global_params.

std::istream & colvarmodule::read_objects_state std::istream &    is
 

Read the states of individual objects; allows for changes.

Definition at line 1458 of file colvarmodule.C.

References biases, COLVARS_INPUT_ERROR, decrease_depth, error, increase_depth, and NULL.

Referenced by read_restart.

std::istream & colvarmodule::read_restart std::istream &    is
 

Read a restart file.

Definition at line 1395 of file colvarmodule.C.

References colvarparse::clear_keyword_registry, COLVARS_INPUT_ERROR, error, colvarparse::get_keyval, colvarproxy::get_version_from_string, it, it_restart, log, parse, colvarparse::parse_restart, print_total_forces_errning, proxy, read_objects_state, restart_version, restart_version_int, restart_version_number, restart_version_str, colvarparse::to_lower_cppstr, colvarproxy_system::total_forces_enabled, colvarproxy_system::units, and version.

Referenced by setup_input.

int colvarmodule::read_traj char const *    traj_filename,
long    traj_read_begin,
long    traj_read_end
 

\brief Read a collective variable trajectory (post-processing only, not called at runtime).

Definition at line 1575 of file colvarmodule.C.

References COLVARS_ERROR, COLVARS_FILE_ERROR, error, get_error, colvarparse::getline_nocomments, it, log, and colvarparse::white_space.

void colvarmodule::register_named_atom_group atom_group   ag
 

Register a named atom group into named_atom_groups.

Definition at line 701 of file colvarmodule.C.

void colvarmodule::request_total_force   [static]
 

Request calculation of total force from MD engine.

Referenced by colvar::do_feature_side_effects.

int colvarmodule::reset  
 

Actual function called by the destructor.

Definition at line 1247 of file colvarmodule.C.

References biases, colvarparse::clear, COLVARS_ERROR, colvarproxy_io::flush_output_streams, get_error, log, parse, proxy, colvarproxy::reset, and reset_index_groups.

Referenced by colvarmodule::matrix2d::matrix2d, colvarmodule::quaternion::quaternion, colvarmodule::rmatrix::rmatrix, colvarmodule::rvector::rvector, colvarmodule::vector1d::vector1d, and ~colvarmodule.

int colvarmodule::reset_index_groups  
 

Clear the index groups loaded so far.

Definition at line 1908 of file colvarmodule.C.

References index_file_names, index_group_names, index_groups, and NULL.

Referenced by reset.

std::string colvarmodule::restart_version   const [inline]
 

Version of the most recent state file read.

Definition at line 791 of file colvarmodule.h.

References restart_version_str.

Referenced by read_restart.

int colvarmodule::restart_version_number   const [inline]
 

Integer version of the most recent state file read.

Definition at line 797 of file colvarmodule.h.

References restart_version_int.

Referenced by read_restart, and colvarbias_meta::set_state_params.

int colvarmodule::run_tcl_script std::string const &    filename
 

Run provided Tcl script.

Definition at line 398 of file colvarmodule.C.

References proxy, result, and colvarproxy_tcl::tcl_run_file.

Referenced by parse_config.

bool colvarmodule::scripted_forces   [inline, static]
 

Definition at line 811 of file colvarmodule.h.

References use_scripted_forces.

Referenced by colvar::init.

void colvarmodule::set_error_bits int    code [static]
 

Definition at line 1782 of file colvarmodule.C.

References COLVARS_ERROR, log, proxy, colvarproxy_smp::smp_lock, and colvarproxy_smp::smp_unlock.

Referenced by error, colvarproxy_vmd::load_atoms, colvar::parse_analysis, and setup_output.

int colvarmodule::setup_input  
 

(Re)initialize and (re)read the input state file calling read_restart().

Definition at line 1282 of file colvarmodule.C.

References colvarproxy_io::close_input_stream, COLVARS_FILE_ERROR, get_error, colvarproxy_io::input_buffer, colvarproxy_io::input_prefix, colvarproxy_io::input_stream, log, NULL, proxy, read_restart, and string.

Referenced by colvarproxy_vmd::colvarproxy_vmd.

int colvarmodule::setup_output  
 

(Re)initialize the output trajectory and state file (does not write it yet).

Definition at line 1339 of file colvarmodule.C.

References biases, COLVARS_FILE_ERROR, cv_traj_name, get_error, log, colvarproxy_io::output_prefix, output_prefix, proxy, restart_out_name, colvarproxy_io::restart_output_prefix, set_error_bits, size, and string.

Referenced by colvarproxy_vmd::colvarproxy_vmd.

real colvarmodule::sin real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 144 of file colvarmodule.h.

References real.

Referenced by colvar::dihedPC::apply_force, colvar::angle::calc_Jacobian_derivative, colvar::dihedPC::calc_value, colvar::dihedPC::collect_gradients, colvarmodule::quaternion::dist2_grad, colvarmodule::rotation::rotation, and colvarmodule::quaternion::set_from_euler_angles.

size_t colvarmodule::size   const
 

How many objects (variables and biases) are configured yet?

Definition at line 179 of file colvarmodule.C.

References biases.

Referenced by calc_colvars, colvarmodule::vector1d::from_simple_string, colvarmodule::vector1d::norm2, colvarmodule::vector1d::operator *=, colvarmodule::vector1d::operator+=, colvarmodule::vector1d::operator-=, colvarmodule::vector1d::operator/=, colvarmodule::vector1d::output_width, setup_output, colvarmodule::vector1d::slice, colvarmodule::vector1d::sliceassign, colvarmodule::vector1d::sum, colvarmodule::matrix2d::to_simple_string, colvarmodule::vector1d::to_simple_string, update_engine_parameters, and colvarmodule::vector1d::vector1d.

real colvarmodule::sqrt real const &    x [inline, static]
 

Reimplemented to work around MS compiler issues.

Definition at line 138 of file colvarmodule.h.

References real.

Referenced by colvarvalue::apply_constraints, colvar_grid< size_t >::bin_distance_from_boundaries, colvar::dihedral::calc_force_invgrads, colvar::euler_theta::calc_gradients, colvar::orientation_angle::calc_gradients, colvar::dipole_angle::calc_gradients, colvar::angle::calc_gradients, colvar::eigenvector::calc_Jacobian_derivative, colvar::calc_runave, colvar::rmsd::calc_value, colvar::gyration::calc_value, colvar_grid< size_t >::check_consistency, compute_norm2_stats, GeometricPathCV::GeometricPathBase::computeDerivatives, GeometricPathCV::GeometricPathBase::computeValue, diagonalize_matrix, colvarbias_restraint_harmonic_walls::init, colvar::init_extended_Lagrangian, colvarvalue::interpolate, colvarvalue::norm, colvarmodule::quaternion::norm, colvarmodule::rvector::norm, colvarmodule::vector1d::norm, colvar_grid< size_t >::parse_params, colvar::periodic_boundaries, simple_scalar_dist_functions, and colvarbias_restraint_histogram::update.

std::string colvarmodule::state_file_prefix char const *    filename [static]
 

Strips .colvars.state from filename and checks that it is not empty.

Definition at line 1381 of file colvarmodule.C.

References COLVARS_INPUT_ERROR, and error.

Referenced by colvarbias::write_state_prefix.

step_number colvarmodule::step_absolute   [inline, static]
 

Return the current step number from the beginning of the whole calculation.

Definition at line 245 of file colvarmodule.h.

References it, and step_number.

Referenced by calc, calc_colvars, colvarbias::get_state_params, colvarbias_restraint_moving::init, colvarbias_restraint_k_moving::update, colvarbias_restraint_centers_moving::update, colvarbias_meta::update, colvarbias_abf::update, colvarbias_restraint_centers_moving::update_acc_work, colvarbias_meta::update_bias, colvarbias_meta::update_grid_data, write_output_files, colvarbias_reweightaMD::write_output_files, and write_traj_files.

step_number colvarmodule::step_relative   [inline, static]
 

Return the current step number from the beginning of this run.

Definition at line 238 of file colvarmodule.h.

References it, it_restart, and step_number.

Referenced by calc, colvar::calc_acf, colvar::calc_colvar_properties, colvar::calc_cvcs, colvar::calc_runave, colvarbias::can_accumulate_data, colvar::collect_cvc_data, colvar::collect_cvc_total_forces, colvar::coordnum::compute_coordnum, colvar::selfcoordnum::compute_selfcoordnum, colvar::end_of_step, colvarbias_restraint_centers_moving::update, colvarbias_reweightaMD::update, colvarbias_histogram::update, colvarbias_abf::update, colvarbias_restraint_k_moving::update_acc_work, colvarbias_restraint_centers_moving::update_acc_work, colvar::update_extended_Lagrangian, colvarbias_ti::update_system_forces, write_output_files, and write_traj_files.

std::vector< std::string > const colvarmodule::time_dependent_biases   const
 

Return the names of time-dependent biases with forces enabled (ABF, metadynamics, etc).

Definition at line 631 of file colvarmodule.C.

References biases, colvardeps::f_cvb_active, colvardeps::f_cvb_apply_force, colvardeps::f_cvb_history_dependent, colvardeps::f_cvb_time_dependent, and num_biases.

Referenced by colvarbias_ti::init, and parse_biases.

std::string colvarmodule::to_str std::vector< std::string > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2238 of file colvarmodule.C.

std::string colvarmodule::to_str std::vector< colvarvalue > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2232 of file colvarmodule.C.

std::string colvarmodule::to_str std::vector< quaternion > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str std::vector< rvector > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str std::vector< real > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str std::vector< long int > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2208 of file colvarmodule.C.

std::string colvarmodule::to_str std::vector< size_t > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2202 of file colvarmodule.C.

std::string colvarmodule::to_str std::vector< int > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2196 of file colvarmodule.C.

std::string colvarmodule::to_str matrix2d< real > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str vector1d< real > const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str colvarvalue const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2177 of file colvarmodule.C.

std::string colvarmodule::to_str quaternion const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str rvector const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str real const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

std::string colvarmodule::to_str step_number const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2153 of file colvarmodule.C.

std::string colvarmodule::to_str long int const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2147 of file colvarmodule.C.

std::string colvarmodule::to_str size_t const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2141 of file colvarmodule.C.

std::string colvarmodule::to_str int const &    x,
size_t    width = 0,
size_t    prec = 0
[static]
 

Convert to string for output purposes.

Definition at line 2135 of file colvarmodule.C.

std::string colvarmodule::to_str bool    x [static]
 

Convert to string for output purposes.

Definition at line 2130 of file colvarmodule.C.

std::string colvarmodule::to_str std::string const &    s [static]
 

Convert to string for output purposes.

Definition at line 2120 of file colvarmodule.C.

References string.

std::string colvarmodule::to_str char const *    s [static]
 

Convert to string for output purposes.

Definition at line 2125 of file colvarmodule.C.

References string.

Referenced by colvar::alpha_angles::calc_value, colvarmodule::vector1d::check_sizes, colvarvalue::check_types, colvar::cvc::debug_gradients, colvarbias_meta::hill::hill, colvar::map_total::init, colvarbias::init, colvar::init, colvar_grid< size_t >::init_from_colvars, colvarbias_meta::init_replicas_params, parse_biases, colvardeps::print_state, simple_scalar_dist_functions, colvarproxy_smp::smp_colvars_loop, colvarproxy_tcl::tcl_run_force_callback, and colvarvalue::to_simple_string.

void colvarmodule::unregister_named_atom_group atom_group   ag
 

Remove a named atom group from named_atom_groups.

int colvarmodule::update_colvar_forces  
 

Integrate bias and restraint forces, send colvar forces to atoms.

Definition at line 1000 of file colvarmodule.C.

References colvarproxy_system::add_energy, biases_active, calc_scripted_forces, COLVARS_ERROR, debug, decrease_depth, colvardeps::f_cv_gradient, get_error, increase_depth, log, num_biases, proxy, scripting_after_biases, total_bias_energy, use_scripted_forces, variables, and variables_active.

Referenced by calc.

int colvarmodule::update_engine_parameters  
 

(Re)initialize any internal data affected by changes in the engine Also calls setup() member functions of colvars and biases.

Definition at line 1207 of file colvarmodule.C.

References COLVARS_ERROR, get_error, size, and variables.

Referenced by colvarproxy_vmd::setup.

std::vector< colvar * > * colvarmodule::variables  
 

Array of collective variables.

Definition at line 149 of file colvarmodule.C.

Referenced by calc_colvars, colvar::init, update_colvar_forces, update_engine_parameters, and colvar::~colvar.

std::vector< colvar * > * colvarmodule::variables_active  
 

Collective variables with the active flag on.

Definition at line 155 of file colvarmodule.C.

Referenced by analyze, calc_colvars, end_of_step, and update_colvar_forces.

std::vector< colvar * > * colvarmodule::variables_active_smp  
 

Collective variables to be calculated on different threads; colvars with multple items (e.g. multiple active CVCs) are duplicated.

Definition at line 161 of file colvarmodule.C.

Referenced by calc_colvars, and colvarproxy_smp::smp_colvars_loop.

std::vector< int > * colvarmodule::variables_active_smp_items  
 

Indexes of the items to calculate for each colvar.

Definition at line 167 of file colvarmodule.C.

Referenced by calc_colvars, and colvarproxy_smp::smp_colvars_loop.

std::string colvarmodule::version   const [inline]
 

Get the version string (YYYY-MM-DD format).

Definition at line 81 of file colvarmodule.h.

References COLVARS_VERSION, and string.

Referenced by colvarmodule, and read_restart.

int colvarmodule::version_number   const [inline]
 

Get the version number (higher = more recent).

Definition at line 87 of file colvarmodule.h.

std::string colvarmodule::wrap_string std::string const &    s,
size_t    nchars
[static]
 

Reduce the number of characters in a string.

Referenced by colvar::calc_runave, colvar::write_acf, colvarbias_restraint_histogram::write_output_files, write_traj_label, colvarbias_restraint_histogram::write_traj_label, colvarbias_restraint_k_moving::write_traj_label, colvarbias_restraint_centers_moving::write_traj_label, colvarbias_alb::write_traj_label, colvarbias::write_traj_label, and colvar::write_traj_label.

int colvarmodule::write_output_files  
 

Write all other output files.

Definition at line 1555 of file colvarmodule.C.

References biases, decrease_depth, increase_depth, step_absolute, and step_relative.

Referenced by colvarproxy::post_run.

std::ostream & colvarmodule::write_restart std::ostream &    os
 

Write the output restart file.

Definition at line 1647 of file colvarmodule.C.

References biases, COLVARS_VERSION, decrease_depth, dt, increase_depth, it, it_width, proxy, string, and colvarproxy_system::units.

Referenced by write_restart_file, and write_restart_string.

int colvarmodule::write_restart_file std::string const &    out_name
 

Write a state file useful to resume the simulation.

Definition at line 1079 of file colvarmodule.C.

References colvarproxy_io::close_output_stream, COLVARS_ERROR, COLVARS_FILE_ERROR, error, get_error, log, colvarproxy_io::output_stream, proxy, and write_restart.

Referenced by calc, colvarproxy::post_run, and print_total_forces_errning.

int colvarmodule::write_restart_string std::string   output
 

Write the state into a string.

Definition at line 1095 of file colvarmodule.C.

References COLVARS_FILE_ERROR, error, log, and write_restart.

std::ostream & colvarmodule::write_traj std::ostream &    os
 

Write in the trajectory file.

Definition at line 1710 of file colvarmodule.C.

References biases, decrease_depth, increase_depth, and it.

Referenced by write_traj_files.

int colvarmodule::write_traj_files  
 

Write all trajectory files.

Definition at line 1107 of file colvarmodule.C.

References COLVARS_FILE_ERROR, cv_traj_freq, cv_traj_name, cv_traj_write_labels, debug, colvarproxy_io::flush_output_stream, log, colvarproxy_io::output_stream, proxy, restart_out_freq, step_absolute, step_relative, write_traj, and write_traj_label.

Referenced by calc.

std::ostream & colvarmodule::write_traj_label std::ostream &    os
 

Write explanatory labels in the trajectory file.

Definition at line 1685 of file colvarmodule.C.

References biases, decrease_depth, increase_depth, and wrap_string.

Referenced by write_traj_files.


Friends And Related Function Documentation

friend class atom [friend]
 

Definition at line 208 of file colvarmodule.h.

Referenced by simple_scalar_dist_functions.

friend class atom_group [friend]
 

Definition at line 209 of file colvarmodule.h.

Referenced by colvar::angle::angle, colvar::dihedral::dihedral, colvar::dipole_angle::dipole_angle, colvar::dipole_magnitude::dipole_magnitude, and colvar::cvc::parse_group.

friend class colvarproxy [friend]
 

Definition at line 92 of file colvarmodule.h.

friend class colvarscript [friend]
 

Definition at line 94 of file colvarmodule.h.

Referenced by colvarmodule.


Member Data Documentation

std::vector<colvarbias *> colvarmodule::biases
 

Array of collective variable biases.

Definition at line 314 of file colvarmodule.h.

Referenced by analyze, bias_by_name, calc, calc_biases, calc_colvars, colvarbias::clear, end_of_step, num_biases, num_biases_feature, num_biases_type, read_objects_state, reset, setup_output, size, time_dependent_biases, write_output_files, write_restart, write_traj, and write_traj_label.

size_t const colvarmodule::cv_prec = 14 [static]
 

Number of digits to represent a collective variables value(s).

Definition at line 2929 of file colvarmodule.C.

Referenced by colvarproxy::print_output_atomic_data.

size_t colvarmodule::cv_traj_freq = 0 [static]
 

Frequency for collective variables trajectory output.

Definition at line 2923 of file colvarmodule.C.

Referenced by calc, colvarmodule, colvarproxy_vmd::colvarproxy_vmd, parse_global_params, and write_traj_files.

std::string colvarmodule::cv_traj_name [protected]
 

Name of the trajectory file.

Definition at line 765 of file colvarmodule.h.

Referenced by calc, setup_output, and write_traj_files.

bool colvarmodule::cv_traj_write_labels [protected]
 

Write labels at the next iteration.

Definition at line 768 of file colvarmodule.h.

Referenced by colvarmodule, config_changed, and write_traj_files.

size_t const colvarmodule::cv_width = 21 [static]
 

Number of characters to represent a collective variables value(s).

Definition at line 2930 of file colvarmodule.C.

Referenced by colvarproxy::print_output_atomic_data.

cvm::real colvarmodule::debug_gradients_step_size = 1.0e-07 [static]
 

\brief Finite difference step size (if there is no dynamics, or if gradients need to be tested independently from the size of dt).

Definition at line 2917 of file colvarmodule.C.

Referenced by colvarmodule, and parse_global_params.

size_t colvarmodule::depth_s [protected]
 

Counter for the current depth in the object hierarchy (useg e.g. in output).

Definition at line 777 of file colvarmodule.h.

Referenced by colvarmodule, and depth.

std::vector<size_t> colvarmodule::depth_v [protected]
 

Thread-specific depth.

Definition at line 780 of file colvarmodule.h.

Referenced by depth.

size_t const colvarmodule::en_prec = 14 [static]
 

Number of digits to represent the collective variables energy.

Definition at line 2931 of file colvarmodule.C.

size_t const colvarmodule::en_width = 21 [static]
 

Number of characters to represent the collective variables energy.

Definition at line 2932 of file colvarmodule.C.

std::vector<std::string> colvarmodule::index_file_names
 

\brief Names of .ndx files that have been loaded.

Definition at line 704 of file colvarmodule.h.

Referenced by reset_index_groups.

std::vector<std::string> colvarmodule::index_group_names
 

\brief Names of groups from one or more Gromacs .ndx files.

Definition at line 707 of file colvarmodule.h.

Referenced by reset_index_groups.

std::vector<std::vector<int> *> colvarmodule::index_groups
 

\brief Groups from one or more Gromacs .ndx files.

Definition at line 710 of file colvarmodule.h.

Referenced by reset_index_groups.

cvm::step_number colvarmodule::it = 0 [static]
 

Current step number.

Definition at line 2920 of file colvarmodule.C.

Referenced by analyze, colvarmodule, end_of_step, read_restart, read_traj, colvarproxy_vmd::set_frame, step_absolute, step_relative, write_restart, and write_traj.

cvm::step_number colvarmodule::it_restart = 0 [static]
 

Starting step number for this run.

Definition at line 2921 of file colvarmodule.C.

Referenced by colvarmodule, read_restart, and step_relative.

size_t const colvarmodule::it_width = 12 [static]
 

Number of characters to represent a time step.

Definition at line 2928 of file colvarmodule.C.

Referenced by write_restart.

const char *const colvarmodule::line_marker [static]
 

Initial value:

 (const char *)
  "----------------------------------------------------------------------\n"
Line separator in the log output.

Definition at line 2933 of file colvarmodule.C.

colvarparse* colvarmodule::parse [protected]
 

Configuration file parser object.

Definition at line 762 of file colvarmodule.h.

Referenced by colvarmodule, get_config, parse_colvars, parse_config, parse_global_params, read_config_file, read_config_string, read_restart, reset, and ~colvarmodule.

colvarproxy * colvarmodule::proxy = NULL [static]
 

\brief Pointer to the proxy object, used to retrieve atomic data from the hosting program; it is static in order to be accessible from static functions in the colvarmodule class.

Definition at line 2914 of file colvarmodule.C.

Referenced by colvar::alpha_angles::alpha_angles, colvar::map_total::apply_force, backup_file, calc, calc_biases, calc_colvars, colvar::calc_cvcs, UIestimator::UIestimator::calc_pmf, colvar::calc_runave, calc_scripted_forces, colvar::map_total::calc_value, colvarbias::can_accumulate_data, clear_error, colvar::collect_cvc_data, colvar::collect_cvc_Jacobians, colvar_grid_gradient::colvar_grid_gradient, colvarbias_abf::colvarbias_abf, colvarbias_ti::colvarbias_ti, colvarmodule, colvarbias_reweightaMD::compute_cumulant_expansion_factor, colvar::coordnum::coordnum, depth, error, colvarbias_reweightaMD::hist_to_pmf, colvar::map_total::init, colvarbias_restraint_histogram::init, colvarbias_alb::init, colvarbias_abf::init, colvar::init_dependencies, colvar::init_extended_Lagrangian, colvarbias_meta::init_replicas_params, log, main, parse_global_params, print_total_forces_errning, read_config_file, UIestimator::UIestimator::read_inputfiles, colvar_grid::read_multicol, read_restart, colvarbias::read_state_prefix, reset, run_tcl_script, set_error_bits, setup_input, setup_output, simple_scalar_dist_functions, colvarproxy_smp::smp_colvars_loop, colvarbias_restraint_k_moving::update, colvarbias_restraint_centers_moving::update, colvarbias_reweightaMD::update, colvarbias_alb::update, colvarbias_restraint_k_moving::update_acc_work, colvarbias_restraint_centers_moving::update_acc_work, colvarbias_meta::update_bias, update_colvar_forces, colvarbias_ti::update_system_forces, colvar_grid::write_multicol, colvar_grid::write_opendx, colvarbias_restraint_histogram::write_output_files, colvarbias_meta::write_pmf, write_restart, write_restart_file, colvar::write_state, write_traj_files, colvarbias_meta::~colvarbias_meta, and ~colvarmodule.

size_t colvarmodule::restart_out_freq = 0 [static]
 

Frequency for saving output restarts.

Definition at line 2922 of file colvarmodule.C.

Referenced by calc, colvarmodule, colvarproxy_vmd::colvarproxy_vmd, parse_global_params, and write_traj_files.

std::string colvarmodule::restart_out_name
 

Output restart file name.

Definition at line 754 of file colvarmodule.h.

Referenced by calc, and setup_output.

int colvarmodule::restart_version_int [protected]
 

Integer version of the most recent state file read.

Definition at line 774 of file colvarmodule.h.

Referenced by colvarmodule, read_restart, and restart_version_number.

std::string colvarmodule::restart_version_str [protected]
 

Version of the most recent state file read.

Definition at line 771 of file colvarmodule.h.

Referenced by colvarmodule, read_restart, and restart_version.

bool colvarmodule::scripting_after_biases = true [static]
 

Wait for all biases before calculating scripted forces?

Definition at line 2925 of file colvarmodule.C.

Referenced by calc_biases, colvarmodule, parse_global_params, and update_colvar_forces.

real colvarmodule::total_bias_energy
 

Energy of built-in and scripted biases, summed per time-step.

Definition at line 317 of file colvarmodule.h.

Referenced by calc_biases, and update_colvar_forces.

usage* colvarmodule::usage_ [protected]
 

Track usage of Colvars features.

Definition at line 786 of file colvarmodule.h.

Referenced by cite_feature, colvarmodule, feature_report, and ~colvarmodule.

bool colvarmodule::use_scripted_forces = false [static]
 

Use scripted colvars forces?

Definition at line 2924 of file colvarmodule.C.

Referenced by calc_biases, colvarmodule, parse_biases, parse_global_params, scripted_forces, and update_colvar_forces.

int colvarmodule::xyz_reader_use_count [protected]
 

Track how many times the XYZ reader has been used.

Definition at line 783 of file colvarmodule.h.

Referenced by colvarmodule.


The documentation for this class was generated from the following files:
Generated on Sat Dec 14 02:47:35 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002