|
std::string | version () const |
| Get the version string (YYYY-MM-DD format)
|
|
int | version_number () const |
| Get the version number (higher = more recent)
|
|
int | patch_version_number () const |
| Get the patch version number (non-zero in patch releases of other packages)
|
|
void | register_named_atom_group (atom_group *ag) |
| Register a named atom group into named_atom_groups.
|
|
void | unregister_named_atom_group (atom_group *ag) |
| Remove a named atom group from named_atom_groups.
|
|
std::vector< colvar * > * | variables () |
| Array of collective variables.
|
|
std::vector< colvar * > * | variables_active () |
| Collective variables with the active flag on.
|
|
std::vector< colvar * > * | variables_active_smp () |
|
std::vector< int > * | variables_active_smp_items () |
| Indexes of the items to calculate for each colvar.
|
|
std::vector< colvarbias * > * | biases_active () |
| Array of active collective variable biases.
|
|
size_t | size () const |
| How many objects (variables and biases) are configured yet?
|
|
| colvarmodule (colvarproxy *proxy) |
|
| ~colvarmodule () |
| Destructor.
|
|
void | set_initial_step (step_number it) |
| Set the initial step number (it is 0 otherwise); may be overridden when reading a state.
|
|
int | reset () |
| Actual function called by the destructor.
|
|
int | read_config_file (char const *config_file_name) |
|
int | read_config_string (std::string const &conf) |
| Parse a config string assuming it is a complete configuration (i.e. calling all parse functions)
|
|
int | parse_config (std::string &conf) |
| Parse a "clean" config string (no comments)
|
|
std::string const & | get_config () const |
| Get the configuration string read so far (includes comments)
|
|
int | parse_global_params (std::string const &conf) |
| Parse the few module's global parameters.
|
|
int | parse_colvars (std::string const &conf) |
| Parse and initialize collective variables.
|
|
int | run_tcl_script (std::string const &filename) |
| Run provided Tcl script.
|
|
int | parse_biases (std::string const &conf) |
| Parse and initialize collective variable biases. More...
|
|
int | append_new_config (std::string const &conf) |
| 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.
|
|
void | config_changed () |
| Signals to the module object that the configuration has changed.
|
|
size_t | num_variables () const |
| Return how many variables are defined.
|
|
size_t | num_variables_feature (int feature_id) const |
| Return how many variables have this feature enabled.
|
|
size_t | num_biases () const |
| Return how many biases are defined.
|
|
size_t | num_biases_feature (int feature_id) const |
| Return how many biases have this feature enabled.
|
|
size_t | num_biases_type (std::string const &type) const |
| Return how many biases of this type are defined.
|
|
std::vector< std::string > const | time_dependent_biases () const |
|
int | update_engine_parameters () |
|
int | setup_input () |
| (Re)initialize and (re)read the input state file calling read_restart()
|
|
int | setup_output () |
| (Re)initialize the output trajectory and state file (does not write it yet)
|
|
std::istream & | read_state (std::istream &is) |
| Read all objects' state fron a formatted (text) stream.
|
|
memory_stream & | read_state (memory_stream &is) |
| Read all objects' state fron an unformatted (binary) stream.
|
|
int | set_input_state_buffer (size_t n, unsigned char *buf) |
| Set an internal state buffer, to be read later as an unformatted stream when ready.
|
|
int | set_input_state_buffer (std::vector< unsigned char > &buf) |
| Same as set_input_state_buffer() for C array, but uses std::move.
|
|
std::istream & | read_objects_state (std::istream &is) |
| Read the states of individual objects; allows for changes.
|
|
memory_stream & | read_objects_state (memory_stream &is) |
| Read the states of individual objects; allows for changes.
|
|
int | print_total_forces_errning (bool warn_total_forces) |
| If needed (old restart file), print the warning that cannot be ignored.
|
|
std::ostream & | write_state (std::ostream &os) |
| Write the state of the module to a formatted (text) file.
|
|
memory_stream & | write_state (memory_stream &os) |
| Write the state of the module to an unformatted (binary) file.
|
|
int | write_state_buffer (std::vector< unsigned char > &buffer) |
| Write the state of the module to an array of bytes (wrapped as a memory_stream object)
|
|
int | open_traj_file (std::string const &file_name) |
| Open a trajectory file if requested (and leave it open)
|
|
int | close_traj_file () |
| Close it (note: currently unused)
|
|
std::ostream & | write_traj (std::ostream &os) |
| Write in the trajectory file.
|
|
std::ostream & | write_traj_label (std::ostream &os) |
| Write explanatory labels in the trajectory file.
|
|
int | write_traj_files () |
| Write all trajectory files.
|
|
int | write_restart_file (std::string const &out_name) |
| Write a state file useful to resume the simulation.
|
|
int | write_output_files () |
| Write all other output files.
|
|
int | write_restart_string (std::string &output) |
| Write the state into a string.
|
|
int | change_configuration (std::string const &bias_name, std::string const &conf) |
|
std::string | read_colvar (std::string const &name) |
| Read a colvar value.
|
|
real | energy_difference (std::string const &bias_name, std::string const &conf) |
|
int | calc () |
| Main worker function.
|
|
int | calc_colvars () |
| Calculate collective variables.
|
|
int | calc_biases () |
| Calculate biases.
|
|
int | update_colvar_forces () |
| Integrate bias and restraint forces, send colvar forces to atoms.
|
|
int | analyze () |
| Perform analysis.
|
|
int | end_of_step () |
| Carry out operations needed before next step is run.
|
|
int | read_traj (char const *traj_filename, long traj_read_begin, long traj_read_end) |
| Read a collective variable trajectory (post-processing only, not called at runtime)
|
|
int | cite_feature (std::string const &feature) |
| Track usage of the given Colvars feature.
|
|
std::string | feature_report (int flag=0) |
| Report usage of the Colvars features.
|
|
int | read_index_file (char const *filename) |
| Read a Gromacs .ndx file.
|
|
int | reset_index_groups () |
| Clear the index groups loaded so far.
|
|
int | load_coords_xyz (char const *filename, std::vector< rvector > *pos, atom_group *atoms, bool keep_open=false) |
| Load coordinates into an atom group from an XYZ file (assumes Angstroms)
|
|
std::string | restart_version () const |
| Version of the most recent state file read.
|
|
int | restart_version_number () const |
| Integer version of the most recent state file read.
|
|
int | calc_scripted_forces () |
| Calculate the energy and forces of scripted biases.
|
|
|
static real | integer_power (real const &x, int const n) |
| Override the STL pow() with a product for n integer.
|
|
static real | pow (real const &x, real const &y) |
| Reimplemented to work around MS compiler issues.
|
|
static real | floor (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | fabs (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | sqrt (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | sin (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | cos (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | asin (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | acos (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | atan2 (real const &x, real const &y) |
| Reimplemented to work around MS compiler issues.
|
|
static real | exp (real const &x) |
| Reimplemented to work around MS compiler issues.
|
|
static real | logn (real const &x) |
|
static void | set_error_bits (int code) |
|
static bool | get_error_bit (int code) |
|
static int | get_error () |
|
static void | clear_error () |
|
static step_number | step_relative () |
| Return the current step number from the beginning of this run.
|
|
static step_number | step_absolute () |
|
static std::string & | output_prefix () |
| Accessor for the above.
|
|
static bool | debug () |
| Whether debug output should be enabled (compile-time option)
|
|
static std::istream & | getline (std::istream &is, std::string &line) |
|
static std::string | state_file_prefix (char const *filename) |
| Strips .colvars.state from filename and checks that it is not empty.
|
|
static int | backup_file (char const *filename) |
| Backup a file before writing it.
|
|
static colvarbias * | bias_by_name (std::string const &name) |
| Look up a bias by name; returns NULL if not found.
|
|
static colvar * | colvar_by_name (std::string const &name) |
| Look up a colvar by name; returns NULL if not found.
|
|
static atom_group * | atom_group_by_name (std::string const &name) |
| Look up a named atom group by name; returns NULL if not found.
|
|
static std::string | to_str (char const *s) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::string const &s) |
| Convert to string for output purposes.
|
|
static std::string | to_str (bool x) |
| Convert to string for output purposes.
|
|
static std::string | to_str (int const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (size_t const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (long int const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (step_number const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (real const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (rvector const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (quaternion const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (colvarvalue const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (vector1d< real > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (matrix2d< real > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< int > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< size_t > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< long int > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< real > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< rvector > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< quaternion > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< colvarvalue > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | to_str (std::vector< std::string > const &x, size_t width=0, size_t prec=0) |
| Convert to string for output purposes.
|
|
static std::string | wrap_string (std::string const &s, size_t nchars) |
| Reduce the number of characters in a string.
|
|
static real | dt () |
| Time step of MD integrator (fs)
|
|
static void | request_total_force () |
| Request calculation of total force from MD engine.
|
|
static void | log (std::string const &message, int min_log_level=10) |
|
static int | error (std::string const &message, int code=-1) |
| Print a message to the main log and set global error code.
|
|
static int | log_level () |
| Level of logging requested by the user.
|
|
static int | log_init_messages () |
| Level at which initialization messages are logged.
|
|
static int | log_user_params () |
| Level at which a keyword's user-provided value is logged.
|
|
static int | log_default_params () |
| Level at which a keyword's default value is logged.
|
|
static int | log_output_files () |
| Level at which output-file operations are logged.
|
|
static int | log_input_files () |
| Level at which input-file operations (configuration, state) are logged.
|
|
static rvector | position_distance (atom_pos const &pos1, atom_pos const &pos2) |
| Get the distance between two atomic positions with pbcs handled correctly.
|
|
static int | load_coords (char const *filename, std::vector< rvector > *pos, atom_group *atoms, std::string const &pdb_field, double pdb_field_value=0.0) |
| 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". More...
|
|
static real | rand_gaussian () |
| Pseudo-random number with Gaussian distribution.
|
|
static size_t & | depth () |
| Get the current object depth in the hierarchy.
|
|
static void | increase_depth () |
| Increase the depth (number of indentations in the output)
|
|
static void | decrease_depth () |
| Decrease the depth (number of indentations in the output)
|
|
static bool | scripted_forces () |
|
static colvarmodule * | main () |
| Access the one instance of the Colvars module.
|
|
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