3#ifndef COLVARPROXY_VOLMAPS_H
4#define COLVARPROXY_VOLMAPS_H
91 volmap_flag_gradients = 1,
92 volmap_flag_use_atom_field = (1<<8)
double real
Defining an abstract real number allows to switch precision.
Definition: colvarmodule.h:98
Container of grid-based objects.
Definition: colvarproxy_volmaps.h:10
int get_volmap_id(int index) const
Get the numeric ID of the given volumetric map (for the MD program)
Definition: colvarproxy_volmaps.h:58
int reset()
Clear volumetric map data.
Definition: colvarproxy_volmaps.cpp:30
cvm::real volmaps_rms_applied_force_
Root-mean-square of the the applied forces.
Definition: colvarproxy_volmaps.h:119
cvm::real get_engine_volmap_value(int index) const
Read the current value of the volumetric map.
Definition: colvarproxy_volmaps.h:64
virtual int init_internal_volmap_by_id(int volmap_id)
Definition: colvarproxy_volmaps.cpp:68
void compute_max_volmaps_applied_force()
Compute the maximum norm among all applied forces.
Definition: colvarproxy_volmaps.cpp:118
std::vector< int > volmaps_ids
Array of numeric IDs of volumetric maps (-1 if loaded internally)
Definition: colvarproxy_volmaps.h:104
virtual int request_engine_volmap_by_id(int volmap_id)
Definition: colvarproxy_volmaps.cpp:56
std::vector< std::string > volmaps_filenames
Names of files containing maps (empty when maps are loaded by MD engine)
Definition: colvarproxy_volmaps.h:116
virtual int clear_volmap(int index)
Used by the CVC destructors.
Definition: colvarproxy_volmaps.cpp:86
virtual int check_volmaps_available()
Test whether this implementation can use volumetric maps as CVs.
Definition: colvarproxy_volmaps.cpp:24
std::vector< size_t > volmaps_refcount
Keep track of how many times each vol map is used by a separate colvar object.
Definition: colvarproxy_volmaps.h:107
void apply_engine_volmap_force(int index, cvm::real const &new_force)
Request that this force is applied to the given volumetric map by the engine.
Definition: colvarproxy_volmaps.h:70
virtual int init_internal_volmap_by_name(std::string const &filename)
Definition: colvarproxy_volmaps.cpp:74
void compute_rms_volmaps_applied_force()
Compute the root-mean-square of the applied forces.
Definition: colvarproxy_volmaps.cpp:111
cvm::real volmaps_max_applied_force_
Maximum norm among all applied forces.
Definition: colvarproxy_volmaps.h:122
std::vector< cvm::real > volmaps_values
Current total values of the volmaps (when computed by the MD engine)
Definition: colvarproxy_volmaps.h:110
int add_volmap_slot(int volmap_id)
Create a slot for a volumetric map not requested yet.
Definition: colvarproxy_volmaps.cpp:45
virtual int load_internal_volmap_from_file(std::string const &filename)
Definition: colvarproxy_volmaps.cpp:80
virtual ~colvarproxy_volmaps()
Destructor.
Definition: colvarproxy_volmaps.cpp:21
virtual int request_engine_volmap_by_name(std::string const &volmap_name)
Definition: colvarproxy_volmaps.cpp:62
std::vector< cvm::real > volmaps_new_colvar_forces
Forces applied from colvars, to be communicated to the MD engine.
Definition: colvarproxy_volmaps.h:113
colvarproxy_volmaps()
Contructor.
Definition: colvarproxy_volmaps.cpp:15
virtual int compute_volmap(int flags, int volmap_index, cvm::atom_group *ag, cvm::real *value, cvm::real *atom_field)
Re-weigh an atomic field (e.g. a colvar) by the value of a volumetric map.
Definition: colvarproxy_volmaps.cpp:101
Store the information of a group of atoms in a structure-of-arrays (SoA) style.
Definition: colvaratoms.h:52
Collective variables main module.