14#include <unordered_map>
18#include "colvars_version.h"
22#define COLVARS_DEBUG false
25#if defined(__FAST_MATH__)
27#define COLVARS_BOUNDED_INV_TRIGONOMETRIC_FUNC
30#define COLVARS_USE_SOA
53#include "colvar_gpu_support.h"
109 if (x == 0.0)
return 0.0;
110 int nn = (n > 0) ? n : -n;
112 for (yy = 1.0; nn != 0; nn >>= 1, ww *=ww) {
113 if (nn & 1) yy *= ww;
115 return (n > 0) ? yy : 1.0/yy;
121 return ::pow(
static_cast<double>(x),
static_cast<double>(y));
127 return ::floor(
static_cast<double>(x));
133 return ::ceil(
static_cast<double>(x));
139 return ::fabs(
static_cast<double>(x));
145 return ::sqrt(
static_cast<double>(x));
151 return ::sin(
static_cast<double>(x));
157 return ::cos(
static_cast<double>(x));
161#define PI 3.14159265358979323846
164#define PI_2 1.57079632679489661923
170#ifdef COLVARS_BOUNDED_INV_TRIGONOMETRIC_FUNC
173 }
else if (x >= 1.0) {
176 return ::asin(
static_cast<double>(x));
179 return ::asin(
static_cast<double>(x));
186#ifdef COLVARS_BOUNDED_INV_TRIGONOMETRIC_FUNC
189 }
else if (x >= 1.0) {
192 return ::acos(
static_cast<double>(x));
195 return ::acos(
static_cast<double>(x));
202 return ::atan2(
static_cast<double>(x),
static_cast<double>(y));
208 return ::tanh(
static_cast<double>(x));
214 return ::exp(
static_cast<double>(x));
222 return ::log(
static_cast<double>(x));
227 template <
class T>
class vector1d;
228 template <
class T>
class matrix2d;
261 void set_error_bits(
int code);
263 bool get_error_bit(
int code);
265 inline int get_error()
328 void register_named_atom_group_soa(atom_group *ag);
329 void unregister_named_atom_group_soa(atom_group *ag);
378 return COLVARS_DEBUG;
422 static std::istream &
getline(std::istream &is, std::string &line);
454 template <
class bias_type>
507 template <
typename IST> IST & read_state_template_(IST &is);
539 template <
typename OST> OST &write_state_template_(OST &os);
617 long traj_read_begin,
623 static std::string
to_str(
char const *s);
626 static std::string
to_str(
const void* ptr);
629 static std::string
to_str(std::string
const &s);
632 static std::string
to_str(
bool x);
635 static std::string
to_str(
int const &x,
636 size_t width = 0,
size_t prec = 0);
639 static std::string
to_str(
size_t const &x,
640 size_t width = 0,
size_t prec = 0);
643 static std::string
to_str(
long int const &x,
644 size_t width = 0,
size_t prec = 0);
648 size_t width = 0,
size_t prec = 0);
652 size_t width = 0,
size_t prec = 0);
656 size_t width = 0,
size_t prec = 0);
660 size_t width = 0,
size_t prec = 0);
664 size_t width = 0,
size_t prec = 0);
668 size_t width = 0,
size_t prec = 0);
672 size_t width = 0,
size_t prec = 0);
676 static std::string
to_str(std::vector<int>
const &x,
677 size_t width = 0,
size_t prec = 0);
680 static std::string
to_str(std::vector<size_t>
const &x,
681 size_t width = 0,
size_t prec = 0);
684 static std::string
to_str(std::vector<long int>
const &x,
685 size_t width = 0,
size_t prec = 0);
688 static std::string
to_str(std::vector<real>
const &x,
689 size_t width = 0,
size_t prec = 0);
692 static std::string
to_str(std::vector<rvector>
const &x,
693 size_t width = 0,
size_t prec = 0);
696 static std::string
to_str(std::vector<quaternion>
const &x,
697 size_t width = 0,
size_t prec = 0);
700 static std::string
to_str(std::vector<colvarvalue>
const &x,
701 size_t width = 0,
size_t prec = 0);
704 static std::string
to_str(std::vector<std::string>
const &x,
705 size_t width = 0,
size_t prec = 0);
707#if ( defined(COLVARS_CUDA) || defined(COLVARS_HIP) )
709 size_t width = 0,
size_t prec = 0);
711 size_t width = 0,
size_t prec = 0);
716 static std::string
wrap_string(std::string
const &s,
733 "----------------------------------------------------------------------\n";
752 void log(std::string
const &message,
int min_log_level = 10);
760 std::printf(
"colvars: %s\n", message.c_str());
765 int error(std::string
const &message,
int code = -1);
774 std::cerr <<
"colvars: " << message << std::endl;
852 std::vector<rvector> *pos,
854 std::string
const &pdb_field,
855 double pdb_field_value = 0.0);
859 std::vector<rvector> *pos,
861 bool keep_open =
false);
930 inline bool scripted_forces()
951 real get_max_gradient_error() {
964#if defined (COLVARS_CUDA) || defined (COLVARS_HIP)
965 template <
typename T>
968 template <
typename T>
971 using ag_vector_real_t = std::vector<real, allocator_type<real>>;
973#if defined (COLVARS_CUDA) || defined (COLVARS_HIP)
974 std::unique_ptr<colvars_gpu::colvarmodule_gpu_calc> gpu_calc;
982std::ostream & operator << (std::ostream &os,
cvm::rvector const &v);
983std::istream & operator >> (std::istream &is,
cvm::rvector &v);
987 constexpr int32_t COLVARS_OK = 0;
988 constexpr int32_t COLVARS_ERROR = 1;
989 constexpr int32_t COLVARS_NOT_IMPLEMENTED = (1<<1);
990 constexpr int32_t COLVARS_INPUT_ERROR = (1<<2);
991 constexpr int32_t COLVARS_BUG_ERROR = (1<<3);
992 constexpr int32_t COLVARS_FILE_ERROR = (1<<4);
993 constexpr int32_t COLVARS_MEMORY_ERROR = (1<<5);
994 constexpr int32_t COLVARS_NO_SUCH_FRAME = (1<<6);
A collective variable (main class); to be defined, it needs at least one object of a derived class of...
Definition: colvar.h:53
Collective variable bias, base class.
Definition: colvarbias.h:23
Parent class for a member object of a bias, cv or cvc etc. containing features and their dependencies...
Definition: colvardeps.h:34
Arbitrary size array (two dimensions) suitable for linear algebra operations (i.e....
Definition: colvartypes.h:376
1-dimensional vector of real numbers with four components and a quaternion algebra
Definition: colvartypes.h:980
2-dimensional array of real numbers with three components along each dimension (works with colvarmodu...
Definition: colvartypes.h:903
vector of real numbers with three components
Definition: colvartypes.h:728
Track usage of Colvars features.
Definition: colvarmodule.cpp:57
Arbitrary size array (one dimensions) suitable for linear algebra operations (i.e....
Definition: colvartypes.h:36
Collective variables module (main class)
Definition: colvarmodule.h:72
int cite_feature(std::string const &feature)
Track usage of the given Colvars feature.
Definition: colvarmodule.cpp:2692
static constexpr const char line_marker[]
Line separator in the log output.
Definition: colvarmodule.h:732
int log_input_files()
Level at which input-file operations (configuration, state) are logged.
Definition: colvarmodule.h:818
rvector atom_pos
Atom position (different type name from rvector, to make possible future PBC-transparent implementati...
Definition: colvarmodule.h:240
int write_traj_files()
Write all trajectory files.
Definition: colvarmodule.cpp:1316
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)
Definition: colvarmodule.cpp:2360
std::ostream & write_state(std::ostream &os)
Write the state of the module to a formatted (text) file.
Definition: colvarmodule.cpp:2027
std::string state_file_prefix(char const *filename)
Strips .colvars.state from filename and checks that it is not empty.
Definition: colvarmodule.cpp:1652
static real pow(real const &x, real const &y)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:119
size_t num_biases_feature(int feature_id) const
Return how many biases have this feature enabled.
Definition: colvarmodule.cpp:785
static real asin(real const &x)
Reimplemented to work around compiler issues; return hard-coded values for boundary conditions.
Definition: colvarmodule.h:168
bool cv_traj_write_labels
Write labels at the next iteration.
Definition: colvarmodule.h:883
static std::string to_str(std::vector< quaternion > const &x, size_t width=0, size_t prec=0)
Convert to string for output purposes.
std::vector< std::string > const time_dependent_biases() const
Definition: colvarmodule.cpp:813
static colvarproxy * proxy_static
Temporary static pointer to unique proxy object.
Definition: colvarmodule.h:959
std::string cv_traj_name
Name of the trajectory file.
Definition: colvarmodule.h:880
static real logn(real const &x)
Definition: colvarmodule.h:220
std::ostream & write_traj(std::ostream &os)
Write in the trajectory file.
Definition: colvarmodule.cpp:2077
double real
Defining an abstract real number allows to switch precision.
Definition: colvarmodule.h:99
step_number it_restart
Starting step number for this run.
Definition: colvarmodule.h:275
int read_config_string(std::string const &conf)
Parse a config string assuming it is a complete configuration (i.e. calling all parse functions)
Definition: colvarmodule.cpp:297
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 real floor(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:125
int log_level()
Level of logging requested by the user.
Definition: colvarmodule.h:788
static void log_static(std::string const &message)
Definition: colvarmodule.h:756
size_t size() const
How many objects (variables and biases) are configured yet?
Definition: colvarmodule.cpp:255
int xyz_reader_use_count
Track how many times the XYZ reader has been used.
Definition: colvarmodule.h:898
std::vector< std::string > index_group_names
Names of groups from one or more Gromacs .ndx files.
Definition: colvarmodule.h:832
usage * usage_
Track usage of Colvars features.
Definition: colvarmodule.h:901
int log_default_params()
Level at which a keyword's default value is logged.
Definition: colvarmodule.h:806
int update_colvar_forces()
Integrate bias and restraint forces, send colvar forces to atoms.
Definition: colvarmodule.cpp:1190
std::string restart_version() const
Version of the most recent state file read.
Definition: colvarmodule.h:910
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.
Definition: colvarmodule.cpp:1756
int parse_config(std::string &conf)
Parse a "clean" config string (no comments)
Definition: colvarmodule.cpp:336
int write_restart_file(std::string const &out_name)
Write a state file useful to resume the simulation.
Definition: colvarmodule.cpp:1275
void set_initial_step(step_number it)
Set the initial step number (it is 0 otherwise); may be overridden when reading a state.
Definition: colvarmodule.cpp:261
static real exp(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:212
memory_stream & read_state(memory_stream &is)
Read all objects' state fron an unformatted (binary) stream.
std::vector< int > * variables_active_smp_items()
Indexes of the items to calculate for each colvar.
Definition: colvarmodule.cpp:229
static real ceil(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:131
int residue_id
Residue identifier.
Definition: colvarmodule.h:236
std::vector< colvarbias * > biases_active_
Array of active collective variable biases.
Definition: colvarmodule.h:368
int end_of_step()
Carry out operations needed before next step is run.
Definition: colvarmodule.cpp:1389
static int error_static(std::string const &message, int code=-1)
Definition: colvarmodule.h:770
size_t num_biases() const
Return how many biases are defined.
Definition: colvarmodule.cpp:779
int setup_output()
(Re)initialize the output trajectory and state file (does not write it yet)
Definition: colvarmodule.cpp:1607
bool check_new_bias(std::string &conf, char const *key)
Definition: colvarmodule.cpp:634
std::string feature_report(int flag=0)
Report usage of the Colvars features.
Definition: colvarmodule.cpp:2697
std::vector< int > colvars_smp_items
Indexes of the items to calculate for each colvar.
Definition: colvarmodule.h:321
int backup_file(char const *filename)
Backup a file before writing it.
Definition: colvarmodule.cpp:1887
int calc()
Main worker function.
Definition: colvarmodule.cpp:943
int log_init_messages()
Level at which initialization messages are logged.
Definition: colvarmodule.h:794
static real cos(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:155
int patch_version_number() const
Get the patch version number (non-zero only in the patch releases of other packages)
Definition: colvarmodule.cpp:50
std::string extra_conf
Definition: colvarmodule.h:451
step_number step_absolute()
Definition: colvarmodule.h:285
static constexpr size_t it_width
Number of characters to represent a time step.
Definition: colvarmodule.h:722
static real integer_power(real const &x, int const n)
Override the STL pow() with a product for n integer.
Definition: colvarmodule.h:105
std::string config_string
Configuration string read so far by the module (includes comments)
Definition: colvarmodule.h:447
std::string default_input_state_file_
Default input state file; if given, it is read unless the MD engine provides it.
Definition: colvarmodule.h:510
int read_config_file(char const *config_file_name)
Definition: colvarmodule.cpp:268
std::vector< std::vector< int > * > index_groups
Groups from one or more Gromacs .ndx files.
Definition: colvarmodule.h:835
static real tanh(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:206
int restart_version_number() const
Integer version of the most recent state file read.
Definition: colvarmodule.h:916
atom_group * atom_group_soa_by_name(std::string const &name)
Look up a named atom group by name; returns NULL if not found.
Definition: colvarmodule.cpp:866
void * num_biases_types_used_
Pointer to a map counting how many biases of each type were used.
Definition: colvarmodule.h:365
int catch_input_errors(int result)
Useful wrapper to interrupt parsing if any error occurs.
Definition: colvarmodule.cpp:829
std::vector< std::string > index_file_names
Names of .ndx files that have been loaded.
Definition: colvarmodule.h:829
int log_level_
Level of logging requested by the user.
Definition: colvarmodule.h:783
std::vector< colvar * > * variables_active()
Collective variables with the active flag on.
Definition: colvarmodule.cpp:217
std::vector< colvarbias * > * biases_active()
Array of active collective variable biases.
Definition: colvarmodule.cpp:249
real dt()
Time step of MD integrator (fs)
Definition: colvarmodule.cpp:2473
int patch_version_int
Patch version number; value will be set in colvarmodule.cpp.
Definition: colvarmodule.h:91
int append_new_config(std::string const &conf)
Add new configuration during parsing (e.g. to implement back-compatibility); cannot be nested,...
Definition: colvarmodule.cpp:398
std::istream & read_objects_state(std::istream &is)
Read the states of individual objects; allows for changes.
Definition: colvarmodule.cpp:1771
real total_bias_energy
Energy of built-in and scripted biases, summed per time-step.
Definition: colvarmodule.h:360
size_t num_biases_type(std::string const &type) const
Return how many biases of this type are defined.
Definition: colvarmodule.cpp:799
std::string & output_prefix()
Accessor for the above.
Definition: colvarmodule.h:304
bool use_scripted_forces
Use scripted colvars forces?
Definition: colvarmodule.h:936
int log_output_files()
Level at which output-file operations are logged.
Definition: colvarmodule.h:812
std::istream & read_state(std::istream &is)
Read all objects' state fron a formatted (text) stream.
Definition: colvarmodule.cpp:1730
void log(std::string const &message, int min_log_level=10)
Definition: colvarmodule.cpp:2102
std::vector< unsigned char > input_state_buffer_
Internal state buffer, to be read as an unformatted stream.
Definition: colvarmodule.h:513
step_number step_relative()
Return the current step number from the beginning of this run.
Definition: colvarmodule.h:278
real rand_gaussian()
Pseudo-random number with Gaussian distribution.
Definition: colvarmodule.cpp:2492
colvarparse * parse
Configuration file parser object.
Definition: colvarmodule.h:877
int calc_component_smp(int i)
Calculate the value of the specified component (to be called in a SMP loop)
Definition: colvarmodule.cpp:235
size_t cv_traj_freq
Frequency for collective variables trajectory output.
Definition: colvarmodule.h:864
size_t & depth()
Get the current object depth in the hierarchy.
Definition: colvarmodule.cpp:2138
real max_gradient_error
Definition: colvarmodule.h:905
static constexpr size_t en_width
Number of characters to represent the collective variables energy.
Definition: colvarmodule.h:730
bool scripting_after_biases
Wait for all biases before calculating scripted forces?
Definition: colvarmodule.h:939
std::string const & get_config() const
Get the configuration string read so far (includes comments)
Definition: colvarmodule.cpp:392
size_t restart_out_freq
Frequency for saving output restarts.
Definition: colvarmodule.h:867
step_number it
Current step number.
Definition: colvarmodule.h:273
int parse_colvars(std::string const &conf)
Parse and initialize collective variables.
Definition: colvarmodule.cpp:585
int error(std::string const &message, int code=-1)
Print a message to the main log and set global error code.
Definition: colvarmodule.cpp:2186
int errorCode
Definition: colvarmodule.h:257
std::vector< colvar * > colvars
Array of collective variables.
Definition: colvarmodule.h:312
static real atan2(real const &x, real const &y)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:200
std::vector< colvar * > * variables_active_smp()
Definition: colvarmodule.cpp:223
static constexpr size_t en_prec
Number of digits to represent the collective variables energy.
Definition: colvarmodule.h:728
std::vector< atom_group * > named_atom_groups_soa
Array of named atom groups.
Definition: colvarmodule.h:324
void increase_depth()
Increase the depth (number of indentations in the output)
Definition: colvarmodule.cpp:2124
colvarmodule()
Cannot initialize the main object without a proxy.
int write_output_files()
Write all other output files.
Definition: colvarmodule.cpp:1893
static constexpr size_t cv_prec
Number of digits to represent a collective variables value(s)
Definition: colvarmodule.h:724
static colvarmodule * main()
Access the main instance of the Colvars module.
Definition: colvarmodule.cpp:205
int parse_biases_type(std::string const &conf, char const *keyword)
Parse and initialize collective variable biases of a specific type.
Definition: colvarmodule.cpp:648
static real sqrt(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:143
std::string version() const
Get the version string (YYYY-MM-DD format)
Definition: colvarmodule.cpp:38
int version_int
Integer representing the version string; value will be set in colvarmodule.cpp.
Definition: colvarmodule.h:88
std::ostream & write_traj_label(std::ostream &os)
Write explanatory labels in the trajectory file.
Definition: colvarmodule.cpp:2052
static real acos(real const &x)
Reimplemented to work around compiler issues; return hard-coded values for boundary conditions.
Definition: colvarmodule.h:184
static std::string wrap_string(std::string const &s, size_t nchars)
Reduce the number of characters in a string.
Definition: colvarmodule.cpp:2679
int reset()
Actual function called by the destructor.
Definition: colvarmodule.cpp:1464
int calc_biases()
Calculate biases.
Definition: colvarmodule.cpp:1116
std::vector< colvar * > colvars_smp
Definition: colvarmodule.h:319
std::vector< colvar * > colvars_active
Array of collective variables.
Definition: colvarmodule.h:315
int analyze()
Perform analysis.
Definition: colvarmodule.cpp:1361
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,...
Definition: colvarmodule.cpp:2320
std::string read_colvar(std::string const &name)
Read a colvar value.
Definition: colvarmodule.cpp:910
size_t num_variables() const
Return how many variables are defined.
Definition: colvarmodule.cpp:759
std::string restart_out_name
Output restart file name.
Definition: colvarmodule.h:869
int version_number() const
Get the version number (higher = more recent)
Definition: colvarmodule.cpp:44
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)
Definition: colvarmodule.cpp:1913
size_t depth_s
Counter for the current depth in the object hierarchy (useg e.g. in output)
Definition: colvarmodule.h:892
static bool debug()
Whether debug output should be enabled (compile-time option)
Definition: colvarmodule.h:376
int log_user_params()
Level at which a keyword's user-provided value is logged.
Definition: colvarmodule.h:800
int change_configuration(std::string const &bias_name, std::string const &conf)
Definition: colvarmodule.cpp:892
std::vector< colvarbias * > biases
Array of collective variable biases.
Definition: colvarmodule.h:357
std::string restart_version_str
Version of the most recent state file read.
Definition: colvarmodule.h:886
int restart_version_int
Integer version of the most recent state file read.
Definition: colvarmodule.h:889
int calc_scripted_forces()
Calculate the energy and forces of scripted biases.
Definition: colvarmodule.cpp:1257
std::string source_Tcl_script
Initialization Tcl script, user-provided.
Definition: colvarmodule.h:462
int write_restart_string(std::string &output)
Write the state into a string.
Definition: colvarmodule.cpp:1304
static std::istream & getline(std::istream &is, std::string &line)
Definition: colvarmodule.cpp:316
int calc_colvars()
Calculate collective variables.
Definition: colvarmodule.cpp:1011
static real fabs(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:137
static constexpr size_t cv_width
Number of characters to represent a collective variables value(s)
Definition: colvarmodule.h:726
std::vector< colvar * > * variables()
Array of collective variables.
Definition: colvarmodule.cpp:211
void decrease_depth()
Decrease the depth (number of indentations in the output)
Definition: colvarmodule.cpp:2130
int update_engine_parameters()
Definition: colvarmodule.cpp:1416
real energy_difference(std::string const &bias_name, std::string const &conf)
Definition: colvarmodule.cpp:926
memory_stream & write_state(memory_stream &os)
Write the state of the module to an unformatted (binary) file.
void record_gradient_error(real error)
Definition: colvarmodule.h:947
int reset_index_groups()
Clear the index groups loaded so far.
Definition: colvarmodule.cpp:2307
int print_total_forces_errning(bool warn_total_forces)
If needed (old restart file), print the warning that cannot be ignored.
Definition: colvarmodule.cpp:1863
memory_stream & read_objects_state(memory_stream &is)
Read the states of individual objects; allows for changes.
int read_index_file(char const *filename)
Read a Gromacs .ndx file.
Definition: colvarmodule.cpp:2216
size_t num_variables_feature(int feature_id) const
Return how many variables have this feature enabled.
Definition: colvarmodule.cpp:765
static real sin(real const &x)
Reimplemented to work around MS compiler issues.
Definition: colvarmodule.h:149
~colvarmodule()
Destructor.
Definition: colvarmodule.cpp:1435
rvector position_distance(atom_pos const &pos1, atom_pos const &pos2)
Get the distance between two atomic positions with pbcs handled correctly.
Definition: colvarmodule.cpp:2485
void config_changed()
Signals to the module object that the configuration has changed.
Definition: colvarmodule.cpp:405
static std::string to_str(char const *s)
Convert to string for output purposes.
Definition: colvarmodule.cpp:2541
colvar * colvar_by_name(std::string const &name)
Look up a colvar by name; returns NULL if not found.
Definition: colvarmodule.cpp:854
colvarbias * bias_by_name(std::string const &name)
Look up a bias by name; returns NULL if not found.
Definition: colvarmodule.cpp:841
int open_traj_file(std::string const &file_name)
Open a trajectory file if requested (and leave it open)
std::string cvm_output_prefix
Prefix for all output files for this run.
Definition: colvarmodule.h:300
int setup_input()
(Re)initialize and (re)read the input state file calling read_restart()
Definition: colvarmodule.cpp:1497
int parse_biases(std::string const &conf)
Parse and initialize collective variable biases.
Definition: colvarmodule.cpp:692
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)
Definition: colvarmodule.cpp:2042
long long step_number
Use a 64-bit integer to store the step number.
Definition: colvarmodule.h:96
int parse_global_params(std::string const &conf)
Parse the few module's global parameters.
Definition: colvarmodule.cpp:411
static real debug_gradients_step_size
Finite difference step size (if there is no dynamics, or if gradients need to be tested independently...
Definition: colvarmodule.h:295
int run_tcl_script(std::string const &filename)
Run provided Tcl script.
Definition: colvarmodule.cpp:573
int close_traj_file()
Close it (note: currently unused)
std::vector< size_t > depth_v
Thread-specific depth.
Definition: colvarmodule.h:895
colvarproxy * proxy
Pointer to the proxy object, used to retrieve atomic data from the hosting program.
Definition: colvarmodule.h:957
static std::string to_str(std::vector< real > const &x, size_t width=0, size_t prec=0)
Convert to string for output purposes.
void request_total_force()
Request calculation of total force from MD engine.
Definition: colvarmodule.cpp:2479
Base class containing parsing functions; all objects which need to parse input inherit from this.
Definition: colvarparse.h:27
Definition: colvarproxy.h:564
Allocator for pinned host memory using cudaHostAlloc.
Definition: colvar_gpu_support.h:202
Value of a collective variable: this is a metatype which can be set at runtime. By default it is set ...
Definition: colvarvalue.h:43
Declaration of the class for GPU calculation of CVCs.
colvarmodule cvm
Shorthand for the frequently used type prefix.
Definition: colvarmodule.h:979