Collective Variables Module - Developer Documentation
Loading...
Searching...
No Matches
colvarproxy.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3// This file is part of the Collective Variables module (Colvars).
4// The original version of Colvars and its updates are located at:
5// https://github.com/Colvars/colvars
6// Please update all Colvars source files before making any changes.
7// If you wish to distribute your changes, please submit them to the
8// Colvars repository at GitHub.
9
10#ifndef COLVARPROXY_H
11#define COLVARPROXY_H
12
13#include "colvarmodule.h"
14#include "colvartypes.h"
15#include "colvarproxy_io.h"
16#include "colvarproxy_replicas.h"
17#include "colvarproxy_system.h"
18#include "colvarproxy_tcl.h"
19#include "colvarproxy_volmaps.h"
20
34
35
36// forward declarations
37class colvarscript;
38
39
42
43public:
44
47
49 virtual ~colvarproxy_atoms();
50
53 virtual int init_atom(int atom_number);
54
57 virtual int check_atom_id(int atom_number);
58
61
65 virtual int init_atom(cvm::residue_id const &residue,
66 std::string const &atom_name,
67 std::string const &segment_id);
68
70 virtual int check_atom_id(cvm::residue_id const &residue,
71 std::string const &atom_name,
72 std::string const &segment_id);
73
76 virtual void clear_atom(int index);
77
79 int reset();
80
83 inline int get_atom_id(int index) const
84 {
85 return atoms_ids[index];
86 }
87
90 inline cvm::real get_atom_mass(int index) const
91 {
92 return atoms_masses[index];
93 }
94
97 inline void increase_refcount(int index)
98 {
99 atoms_refcount[index] += 1;
100 }
101
104 inline cvm::real get_atom_charge(int index) const
105 {
106 return atoms_charges[index];
107 }
108
111 inline cvm::rvector get_atom_position(int index) const
112 {
113 return atoms_positions[index];
114 }
115
118 inline cvm::rvector get_atom_total_force(int index) const
119 {
120 return atoms_total_forces[index];
121 }
122
126 inline void apply_atom_force(int index, cvm::rvector const &new_force)
127 {
128 atoms_new_colvar_forces[index] += new_force;
129 }
130
132 inline cvm::rvector get_atom_velocity(int /* index */)
133 {
134 cvm::error("Error: reading the current velocity of an atom "
135 "is not yet implemented.\n",
136 COLVARS_NOT_IMPLEMENTED);
137 return cvm::rvector(0.0);
138 }
139
140 inline std::vector<int> const *get_atom_ids() const
141 {
142 return &atoms_ids;
143 }
144
146 size_t get_num_active_atoms() const;
147
148 inline std::vector<cvm::real> const *get_atom_masses() const
149 {
150 return &atoms_masses;
151 }
152
153 inline std::vector<cvm::real> *modify_atom_masses()
154 {
155 // assume that we are requesting masses to change them
156 updated_masses_ = true;
157 return &atoms_masses;
158 }
159
160 inline std::vector<cvm::real> const *get_atom_charges()
161 {
162 return &atoms_charges;
163 }
164
165 inline std::vector<cvm::real> *modify_atom_charges()
166 {
167 // assume that we are requesting charges to change them
168 updated_charges_ = true;
169 return &atoms_charges;
170 }
171
172 inline std::vector<cvm::rvector> const *get_atom_positions() const
173 {
174 return &atoms_positions;
175 }
176
177 inline std::vector<cvm::rvector> *modify_atom_positions()
178 {
179 return &atoms_positions;
180 }
181
182 inline std::vector<cvm::rvector> const *get_atom_total_forces() const
183 {
184 return &atoms_total_forces;
185 }
186
187 inline std::vector<cvm::rvector> *modify_atom_total_forces()
188 {
189 return &atoms_total_forces;
190 }
191
192 inline std::vector<cvm::rvector> const *get_atom_applied_forces() const
193 {
195 }
196
197 inline std::vector<cvm::rvector> *modify_atom_applied_forces()
198 {
200 }
201
204
207
210 {
212 }
213
216 {
218 }
219
221 inline int max_atoms_applied_force_id() const
222 {
224 }
225
227 inline bool modified_atom_list() const
228 {
229 return modified_atom_list_;
230 }
231
234 {
235 modified_atom_list_ = false;
236 }
237
239 inline bool updated_masses() const
240 {
241 return updated_masses_;
242 }
243
245 inline bool updated_charges() const
246 {
247 return updated_charges_;
248 }
249
250protected:
251
254 std::vector<int> atoms_ids;
256 std::vector<size_t> atoms_refcount;
258 std::vector<cvm::real> atoms_masses;
260 std::vector<cvm::real> atoms_charges;
262 std::vector<cvm::rvector> atoms_positions;
264 std::vector<cvm::rvector> atoms_total_forces;
266 std::vector<cvm::rvector> atoms_new_colvar_forces;
267
270
273
276
279
281 bool updated_masses_, updated_charges_;
282
285 int add_atom_slot(int atom_id);
286
287};
288
289
293
294public:
295
298
300 virtual ~colvarproxy_atom_groups();
301
303 int reset();
304
306 virtual int scalable_group_coms();
307
309 virtual int init_atom_group(std::vector<int> const &atoms_ids);
310
312 virtual void clear_atom_group(int index);
313
315 inline int get_atom_group_id(int index) const
316 {
317 return atom_groups_ids[index];
318 }
319
321 inline cvm::real get_atom_group_mass(int index) const
322 {
323 return atom_groups_masses[index];
324 }
325
327 inline cvm::real get_atom_group_charge(int index) const
328 {
329 return atom_groups_charges[index];
330 }
331
333 inline cvm::rvector get_atom_group_com(int index) const
334 {
335 return atom_groups_coms[index];
336 }
337
340 {
341 return atom_groups_total_forces[index];
342 }
343
345 inline void apply_atom_group_force(int index, cvm::rvector const &new_force)
346 {
347 atom_groups_new_colvar_forces[index] += new_force;
348 }
349
351 inline cvm::rvector get_atom_group_velocity(int /* index */)
352 {
353 cvm::error("Error: reading the current velocity of an atom group is not yet implemented.\n",
354 COLVARS_NOT_IMPLEMENTED);
355 return cvm::rvector(0.0);
356 }
357
358 inline std::vector<int> const *get_atom_group_ids() const
359 {
360 return &atom_groups_ids;
361 }
362
364 size_t get_num_active_atom_groups() const;
365
366 inline std::vector<cvm::real> *modify_atom_group_masses()
367 {
368 // TODO updated_masses
369 return &atom_groups_masses;
370 }
371
372 inline std::vector<cvm::real> *modify_atom_group_charges()
373 {
374 // TODO updated masses
375 return &atom_groups_charges;
376 }
377
378 inline std::vector<cvm::rvector> *modify_atom_group_positions()
379 {
380 return &atom_groups_coms;
381 }
382
383 inline std::vector<cvm::rvector> *modify_atom_group_total_forces()
384 {
386 }
387
388 inline std::vector<cvm::rvector> *modify_atom_group_applied_forces()
389 {
391 }
392
395
398
401 {
403 }
404
407 {
409 }
410
411protected:
412
415 std::vector<int> atom_groups_ids;
417 std::vector<size_t> atom_groups_refcount;
419 std::vector<cvm::real> atom_groups_masses;
421 std::vector<cvm::real> atom_groups_charges;
423 std::vector<cvm::rvector> atom_groups_coms;
425 std::vector<cvm::rvector> atom_groups_total_forces;
427 std::vector<cvm::rvector> atom_groups_new_colvar_forces;
428
431
434
436 int add_atom_group_slot(int atom_group_id);
437};
438
439
440#if defined(_OPENMP)
441#include <omp.h>
442#else
443struct omp_lock_t;
444#endif
445
448
449public:
450
453
455 virtual ~colvarproxy_smp();
456
460
462 virtual int check_smp_enabled();
463
465 virtual int smp_colvars_loop();
466
468 virtual int smp_biases_loop();
469
471 virtual int smp_biases_script_loop();
472
474 virtual int smp_thread_id();
475
477 virtual int smp_num_threads();
478
480 virtual int smp_lock();
481
483 virtual int smp_trylock();
484
486 virtual int smp_unlock();
487
488protected:
489
491 omp_lock_t *omp_lock_state;
492};
493
494
497
498public:
499
502
504 virtual ~colvarproxy_script();
505
509
512
514 virtual int run_force_callback();
515
516 virtual int run_colvar_callback(
517 std::string const &name,
518 std::vector<const colvarvalue *> const &cvcs,
519 colvarvalue &value);
520
521 virtual int run_colvar_gradient_callback(
522 std::string const &name,
523 std::vector<const colvarvalue *> const &cvcs,
524 std::vector<cvm::matrix2d<cvm::real> > &gradient);
525};
526
527
528
533 : public colvarproxy_system,
534 public colvarproxy_atoms,
536 public colvarproxy_volmaps,
537 public colvarproxy_smp,
539 public colvarproxy_script,
540 public colvarproxy_tcl,
541 public colvarproxy_io
542{
543
544public:
545
548
550 colvarproxy();
551
553 ~colvarproxy() override;
554
555 inline std::string const &engine_name() const
556 {
557 return engine_name_;
558 }
559
560 bool io_available() override;
561
563 virtual int request_deletion();
564
566 inline bool delete_requested() const
567 {
568 return b_delete_requested;
569 }
570
572 virtual int reset();
573
575 virtual int parse_module_config();
576
583 virtual int load_atoms_pdb(char const *filename, cvm::atom_group &atoms,
584 std::string const &pdb_field, double pdb_field_value);
585
593 virtual int load_coords_pdb(char const *filename, std::vector<cvm::atom_pos> &pos,
594 std::vector<int> const &sorted_ids, std::string const &pdb_field,
595 double pdb_field_value);
596
598 virtual int setup();
599
601 inline bool engine_ready() const
602 {
603 return engine_ready_;
604 }
605
607 void add_config(std::string const &cmd, std::string const &conf);
608
612 virtual int update_input();
613
615 virtual int update_output();
616
618 int end_of_step();
619
621 virtual void log(std::string const &message);
622
624 virtual void error(std::string const &message);
625
627 void add_error_msg(std::string const &message);
628
630 std::string const & get_error_msgs();
631
633 void clear_error_msgs();
634
636 inline bool simulation_running() const
637 {
639 }
640
644 inline bool simulation_continuing() const
645 {
647 }
648
650 int post_run();
651
654
657
659 int get_version_from_string(char const *version_string);
660
662 int version_number() const
663 {
664 return version_int;
665 }
666
667protected:
668
671
673 std::string error_output;
674
677
682
685
688
691
692protected:
693
695 std::string engine_name_ = "standalone";
696
699
700};
701
702
703#endif
Group of atom objects, mostly used by a colvar::cvc object to gather all atomic data.
Definition: colvaratoms.h:159
Arbitrary size array (two dimensions) suitable for linear algebra operations (i.e....
Definition: colvartypes.h:376
vector of real numbers with three components
Definition: colvartypes.h:727
Collective variables module (main class)
Definition: colvarmodule.h:59
double real
Defining an abstract real number allows to switch precision.
Definition: colvarmodule.h:95
int residue_id
Residue identifier.
Definition: colvarmodule.h:193
static int error(std::string const &message, int code=-1)
Print a message to the main log and set global error code.
Definition: colvarmodule.cpp:2047
Container of atom group data (allow collection of aggregated atomic data)
Definition: colvarproxy.h:292
cvm::rvector get_atom_group_total_force(int index) const
Read the current total force of the given atom group.
Definition: colvarproxy.h:339
int get_atom_group_id(int index) const
Get the numeric ID of the given atom group (for the MD program)
Definition: colvarproxy.h:315
virtual void clear_atom_group(int index)
Used by the atom_group class destructor.
Definition: colvarproxy.cpp:206
colvarproxy_atom_groups()
Constructor.
Definition: colvarproxy.cpp:153
cvm::real get_atom_group_charge(int index) const
Get the charge of the given atom group.
Definition: colvarproxy.h:327
std::vector< cvm::real > atom_groups_charges
Total charges of the atom groups (allow redefinition during a run, as done e.g. in LAMMPS)
Definition: colvarproxy.h:421
int add_atom_group_slot(int atom_group_id)
Used by all init_atom_group() functions: create a slot for an atom group not requested yet.
Definition: colvarproxy.cpp:178
virtual int scalable_group_coms()
Whether this proxy implementation has capability for scalable groups.
Definition: colvarproxy.cpp:191
std::vector< cvm::rvector > atom_groups_new_colvar_forces
Forces applied from colvars, to be communicated to the MD integrator.
Definition: colvarproxy.h:427
std::vector< size_t > atom_groups_refcount
Keep track of how many times each group is used by a separate cvc.
Definition: colvarproxy.h:417
void compute_max_atom_groups_applied_force()
Compute the maximum norm among all applied forces.
Definition: colvarproxy.cpp:236
cvm::rvector get_atom_group_velocity(int)
Read the current velocity of the given atom group.
Definition: colvarproxy.h:351
cvm::real atom_groups_max_applied_force_
Maximum norm among all applied group forces.
Definition: colvarproxy.h:433
cvm::real rms_atom_groups_applied_force() const
Get the root-mean-square of the applied forces.
Definition: colvarproxy.h:400
cvm::real get_atom_group_mass(int index) const
Get the mass of the given atom group.
Definition: colvarproxy.h:321
int reset()
Clear atom group data.
Definition: colvarproxy.cpp:165
void compute_rms_atom_groups_applied_force()
Compute the root-mean-square of the applied forces.
Definition: colvarproxy.cpp:229
cvm::real max_atom_groups_applied_force() const
Get the maximum norm among all applied forces.
Definition: colvarproxy.h:406
std::vector< cvm::real > atom_groups_masses
Total masses of the atom groups.
Definition: colvarproxy.h:419
virtual ~colvarproxy_atom_groups()
Destructor.
Definition: colvarproxy.cpp:159
size_t get_num_active_atom_groups() const
Return number of atom groups with positive reference count.
Definition: colvarproxy.cpp:219
cvm::rvector get_atom_group_com(int index) const
Read the current position of the center of mass given atom group.
Definition: colvarproxy.h:333
void apply_atom_group_force(int index, cvm::rvector const &new_force)
Request that this force is applied to the given atom group.
Definition: colvarproxy.h:345
cvm::real atom_groups_rms_applied_force_
Root-mean-square of the applied group forces.
Definition: colvarproxy.h:430
virtual int init_atom_group(std::vector< int > const &atoms_ids)
Prepare this group for collective variables calculation, selecting atoms by internal ids (0-based)
Definition: colvarproxy.cpp:197
std::vector< cvm::rvector > atom_groups_total_forces
Most recently updated total forces on the com of each group.
Definition: colvarproxy.h:425
std::vector< int > atom_groups_ids
Array of 0-based integers used to uniquely associate atom groups within the host program.
Definition: colvarproxy.h:415
std::vector< cvm::rvector > atom_groups_coms
Current centers of mass of the atom groups.
Definition: colvarproxy.h:423
Container of atomic data for processing by Colvars.
Definition: colvarproxy.h:41
cvm::real get_atom_mass(int index) const
Definition: colvarproxy.h:90
int reset()
Clear atomic data.
Definition: colvarproxy.cpp:38
int add_atom_slot(int atom_id)
Definition: colvarproxy.cpp:51
bool updated_masses() const
Record whether masses have been updated.
Definition: colvarproxy.h:239
virtual int init_atom(int atom_number)
Definition: colvarproxy.cpp:65
size_t get_num_active_atoms() const
Return number of atoms with positive reference count.
Definition: colvarproxy.cpp:114
cvm::real atoms_rms_applied_force_
Root-mean-square of the applied forces.
Definition: colvarproxy.h:269
colvarproxy_atoms()
Constructor.
Definition: colvarproxy.cpp:23
void apply_atom_force(int index, cvm::rvector const &new_force)
Definition: colvarproxy.h:126
cvm::rvector get_atom_velocity(int)
Read the current velocity of the given atom.
Definition: colvarproxy.h:132
cvm::real get_atom_charge(int index) const
Definition: colvarproxy.h:104
virtual ~colvarproxy_atoms()
Destructor.
Definition: colvarproxy.cpp:32
void increase_refcount(int index)
Definition: colvarproxy.h:97
cvm::real rms_atoms_applied_force() const
Get the root-mean-square of the applied forces.
Definition: colvarproxy.h:209
virtual int check_atom_name_selections_available()
Check whether it is possible to select atoms by residue number name.
Definition: colvarproxy.cpp:77
bool modified_atom_list_
Whether the atom list has been modified internally.
Definition: colvarproxy.h:278
cvm::rvector get_atom_position(int index) const
Definition: colvarproxy.h:111
bool modified_atom_list() const
Whether the atom list has been modified internally.
Definition: colvarproxy.h:227
void compute_max_atoms_applied_force()
Compute the maximum norm among all applied forces.
Definition: colvarproxy.cpp:131
virtual void clear_atom(int index)
Used by the atom class destructor: rather than deleting the array slot (costly) set the corresponding...
Definition: colvarproxy.cpp:102
int atoms_max_applied_force_id_
ID of the atom with the maximum norm among all applied forces.
Definition: colvarproxy.h:275
void reset_modified_atom_list()
Reset the modified atom list flag.
Definition: colvarproxy.h:233
std::vector< cvm::rvector > atoms_total_forces
Most recent total forces on each atom.
Definition: colvarproxy.h:264
cvm::rvector get_atom_total_force(int index) const
Definition: colvarproxy.h:118
int max_atoms_applied_force_id() const
Get the atom ID with the largest applied force.
Definition: colvarproxy.h:221
bool updated_masses_
Whether the masses and charges have been updated from the host code.
Definition: colvarproxy.h:281
std::vector< cvm::real > atoms_charges
Charges of the atoms (allow redefinition during a run, as done e.g. in LAMMPS)
Definition: colvarproxy.h:260
cvm::real atoms_max_applied_force_
Maximum norm among all applied forces.
Definition: colvarproxy.h:272
std::vector< size_t > atoms_refcount
Keep track of how many times each atom is used by a separate colvar object.
Definition: colvarproxy.h:256
bool updated_charges() const
Record whether masses have been updated.
Definition: colvarproxy.h:245
cvm::real max_atoms_applied_force() const
Get the maximum norm among all applied forces.
Definition: colvarproxy.h:215
void compute_rms_atoms_applied_force()
Compute the root-mean-square of the applied forces.
Definition: colvarproxy.cpp:124
std::vector< cvm::rvector > atoms_positions
Current three-dimensional positions of the atoms.
Definition: colvarproxy.h:262
virtual int check_atom_id(int atom_number)
Definition: colvarproxy.cpp:71
std::vector< cvm::real > atoms_masses
Masses of the atoms (allow redefinition during a run, as done e.g. in LAMMPS)
Definition: colvarproxy.h:258
int get_atom_id(int index) const
Definition: colvarproxy.h:83
std::vector< cvm::rvector > atoms_new_colvar_forces
Forces applied from colvars, to be communicated to the MD integrator.
Definition: colvarproxy.h:266
std::vector< int > atoms_ids
Array of 0-based integers used to uniquely associate atoms within the host program.
Definition: colvarproxy.h:254
Methods for data input/output.
Definition: colvarproxy_io.h:20
Methods for multiple-replica communication.
Definition: colvarproxy_replicas.h:23
Methods for scripting language interface (Tcl or Python)
Definition: colvarproxy.h:496
bool have_scripts
Do we have a scripting interface?
Definition: colvarproxy.h:511
virtual ~colvarproxy_script()
Destructor.
Definition: colvarproxy.cpp:414
colvarproxy_script()
Constructor.
Definition: colvarproxy.cpp:407
virtual int run_force_callback()
Run a user-defined colvar forces script.
Definition: colvarproxy.cpp:423
colvarscript * script
Definition: colvarproxy.h:508
Methods for SMP parallelization.
Definition: colvarproxy.h:447
virtual int smp_colvars_loop()
Distribute calculation of colvars (and their components) across threads.
Definition: colvarproxy.cpp:282
virtual int smp_biases_script_loop()
Distribute calculation of biases across threads 2nd through last, with all scripted biased on 1st thr...
Definition: colvarproxy.cpp:329
virtual int smp_thread_id()
Index of this thread.
Definition: colvarproxy.cpp:358
virtual int smp_trylock()
Attempt to lock the proxy's shared data.
Definition: colvarproxy.cpp:387
virtual int smp_lock()
Lock the proxy's shared data for access by a thread, if threads are implemented; if not implemented,...
Definition: colvarproxy.cpp:378
virtual int smp_num_threads()
Number of threads sharing this address space.
Definition: colvarproxy.cpp:368
omp_lock_t * omp_lock_state
Lock state for OpenMP.
Definition: colvarproxy.h:491
virtual int check_smp_enabled()
Whether threaded parallelization is available (TODO: make this a cvm::deps feature)
Definition: colvarproxy.cpp:269
bool b_smp_active
Definition: colvarproxy.h:459
virtual int smp_unlock()
Release the lock.
Definition: colvarproxy.cpp:397
virtual int smp_biases_loop()
Distribute calculation of biases across threads.
Definition: colvarproxy.cpp:306
virtual ~colvarproxy_smp()
Destructor.
Definition: colvarproxy.cpp:257
colvarproxy_smp()
Constructor.
Definition: colvarproxy.cpp:244
Methods for accessing the simulation system (PBCs, integrator, etc)
Definition: colvarproxy_system.h:15
Methods for using Tcl within Colvars.
Definition: colvarproxy_tcl.h:28
Container of grid-based objects.
Definition: colvarproxy_volmaps.h:8
Definition: colvarproxy.h:542
virtual int update_input()
Definition: colvarproxy.cpp:560
colvarproxy()
Constructor.
Definition: colvarproxy.cpp:446
std::string error_output
Collected error messages.
Definition: colvarproxy.h:673
virtual int update_output()
Update data based on the results of a Colvars call (e.g. send forces)
Definition: colvarproxy.cpp:566
void add_config(std::string const &cmd, std::string const &conf)
Enqueue new configuration text, to be parsed as soon as possible.
Definition: colvarproxy.cpp:500
virtual int request_deletion()
Request deallocation of the module (currently only implemented by VMD)
Definition: colvarproxy.cpp:492
colvarmodule * colvars
Pointer to the main object.
Definition: colvarproxy.h:547
bool simulation_continuing() const
Definition: colvarproxy.h:644
void clear_error_msgs()
As the name says.
Definition: colvarproxy.cpp:735
void add_error_msg(std::string const &message)
Record error message (used by VMD to collect them after a script call)
Definition: colvarproxy.cpp:725
int version_int
Integer representing the version string (allows comparisons)
Definition: colvarproxy.h:687
std::string const & get_error_msgs()
Retrieve accumulated error messages.
Definition: colvarproxy.cpp:741
int end_of_step()
Carry out operations needed before next simulation step is run.
Definition: colvarproxy.cpp:572
virtual void log(std::string const &message)
Print a message to the main log.
Definition: colvarproxy.cpp:712
bool b_delete_requested
Whether the entire module should be deallocated by the host engine.
Definition: colvarproxy.h:684
std::string engine_name_
Name of the simulation engine that the derived proxy object supports.
Definition: colvarproxy.h:695
void print_input_atomic_data()
Print a full list of all input atomic arrays for debug purposes.
Definition: colvarproxy.cpp:605
virtual int parse_module_config()
(Re)initialize the module
Definition: colvarproxy.cpp:512
bool engine_ready() const
Whether the engine allows to fully initialize Colvars immediately.
Definition: colvarproxy.h:601
virtual int load_coords_pdb(char const *filename, std::vector< cvm::atom_pos > &pos, std::vector< int > const &sorted_ids, std::string const &pdb_field, double pdb_field_value)
Load a set of coordinates from a PDB file.
Definition: colvarproxy.cpp:547
int get_version_from_string(char const *version_string)
Convert a version string "YYYY-MM-DD" into an integer.
Definition: colvarproxy.cpp:747
bool simulation_running() const
Whether a simulation is running (warn against irrecovarable errors)
Definition: colvarproxy.h:636
virtual int reset()
Reset proxy state, e.g. requested atoms.
Definition: colvarproxy.cpp:478
void * config_queue_
Queue of config strings or files to be fed to the module.
Definition: colvarproxy.h:698
int post_run()
Called at the end of a simulation segment (i.e. "run" command)
Definition: colvarproxy.cpp:593
bool b_simulation_continuing
Definition: colvarproxy.h:681
bool engine_ready_
Whether the engine allows to fully initialize Colvars immediately.
Definition: colvarproxy.h:670
bool delete_requested() const
Whether deallocation was requested.
Definition: colvarproxy.h:566
size_t features_hash
Track which features have been acknowledged during the last run.
Definition: colvarproxy.h:690
void print_output_atomic_data()
Print a full list of all applied forces for debug purposes.
Definition: colvarproxy.cpp:687
int version_number() const
Get the version number (higher = more recent)
Definition: colvarproxy.h:662
bool io_available() override
Ensure that we're on the main thread (derived class will do actual check)
Definition: colvarproxy.cpp:471
virtual int setup()
(Re)initialize required member data (called after the module)
Definition: colvarproxy.cpp:506
virtual int load_atoms_pdb(char const *filename, cvm::atom_group &atoms, std::string const &pdb_field, double pdb_field_value)
Read a selection of atom IDs from a PDB coordinate file.
Definition: colvarproxy.cpp:535
virtual void error(std::string const &message)
Print a message to the main log and/or let the host code know about it.
Definition: colvarproxy.cpp:718
bool b_simulation_running
Whether a simulation is running (warn against irrecovarable errors)
Definition: colvarproxy.h:676
~colvarproxy() override
Destructor.
Definition: colvarproxy.cpp:460
Definition: colvarscript.h:29
Value of a collective variable: this is a metatype which can be set at runtime. By default it is set ...
Definition: colvarvalue.h:43
Collective variables main module.