25#include "colvaratoms.h"
27#include "colvar_geometricpath.h"
104 virtual int init(std::string
const &conf);
113 virtual const std::vector<feature *> &
features()
const
118 virtual std::vector<feature *> &modify_features()
123 static void delete_features() {
229 virtual int set_param(std::string
const ¶m_name,
void const *new_value);
250 bool optional =
false);
335 virtual int init(std::string
const &conf);
414 virtual int init(std::string
const &conf);
455 virtual int init(std::string
const &conf);
469 virtual int init(std::string
const &conf);
494 virtual int init(std::string
const &conf);
514 virtual int init(std::string
const &conf);
540 virtual int init(std::string
const &conf);
558 virtual int init(std::string
const &conf);
592 virtual int init(std::string
const &conf);
622 virtual int init(std::string
const &conf);
662 virtual int init(std::string
const &conf);
700 virtual int init(std::string
const &conf);
735 virtual int init(std::string
const &conf);
781 virtual int init(std::string
const &conf);
788 ef_anisotropic = (1<<8),
789 ef_use_pairlist = (1<<9),
790 ef_rebuild_pairlist = (1<<10)
807 bool **pairlist_elem,
814 template<
int flags>
void main_loop(
bool **pairlist_elem);
836 int pairlist_freq = 100;
838 bool *pairlist =
nullptr;
844 virtual int init(std::string
const &conf);
874 virtual int init(std::string
const &conf);
901 virtual int init(std::string
const &conf);
926 std::vector<h_bond *>
hb;
944 virtual int init(std::string
const &conf);
963 std::vector<dihedral *> theta;
964 std::vector<cvm::real> coeffs;
970 virtual int init(std::string
const &conf);
1009 std::unique_ptr<rotation_derivative_impl_> rot_deriv_impl;
1015 virtual int init(std::string
const &conf);
1084 virtual int init(std::string
const &conf);
1166 virtual int init(std::string
const &conf);
1188 virtual int init(std::string
const &conf);
1242 virtual void computeDistanceBetweenReferenceFrames(std::vector<cvm::real>& result);
1243 virtual void computeDistanceToReferenceFrames(std::vector<cvm::real>& result);
1250 std::vector<std::vector<cvm::atom_pos>> reference_fitting_frames;
1258 virtual int init(std::string
const &conf);
1274 virtual void prepareVectors();
1275 virtual void updateDistanceToReferenceFrames();
1279 virtual int init(std::string
const &conf);
1297 virtual void prepareVectors();
1298 virtual void updateDistanceToReferenceFrames();
1302 virtual int init(std::string
const &conf);
1314 std::vector<colvar::cvc*>
cv;
1318 cvm::real getPolynomialFactorOfCVGradient(
size_t i_cv)
const;
1322 virtual int init(std::string
const &conf);
1345 bool use_custom_function =
false;
1348 std::vector<Lepton::CompiledExpression *> value_evaluators;
1350 std::vector<Lepton::CompiledExpression *> gradient_evaluators;
1352 std::vector<double *> value_eval_var_refs;
1353 std::vector<double *> grad_eval_var_refs;
1355 double dev_null = 0.0;
1360 virtual int init(std::string
const &conf);
1372 std::vector<colvar::cvc*>
cv;
1374 std::vector<std::vector<colvarvalue>>
ref_cv;
1380 virtual void computeDistanceToReferenceFrames(std::vector<cvm::real>& result);
1383 cvm::real getPolynomialFactorOfCVGradient(
size_t i_cv)
const;
1387 virtual int init(std::string
const &conf);
1410 virtual void updateDistanceToReferenceFrames();
1411 virtual void prepareVectors();
1415 virtual int init(std::string
const &conf);
1427 virtual void updateDistanceToReferenceFrames();
1428 virtual void prepareVectors();
1432 virtual int init(std::string
const &conf);
1444 std::unique_ptr<ArithmeticPathImpl> impl_;
1449 virtual int init(std::string
const &conf);
1459 std::unique_ptr<ArithmeticPathImpl> impl_;
1464 virtual int init(std::string
const &conf);
1474 std::unique_ptr<ArithmeticPathImpl> impl_;
1479 virtual int init(std::string
const &conf);
1490 std::unique_ptr<ArithmeticPathImpl> impl_;
1495 virtual int init(std::string
const &conf);
1502namespace neuralnetworkCV {
1503 class neuralNetworkCompute;
1512 std::unique_ptr<neuralnetworkCV::neuralNetworkCompute>
nn;
1518 virtual int init(std::string
const &conf);
1545 virtual int init(std::string
const &conf);
Definition: colvar_geometricpath.h:24
Definition: colvarcomp.h:1369
std::vector< colvar::cvc * > cv
Sub-colvar components.
Definition: colvarcomp.h:1372
size_t total_reference_frames
Total number of reference frames.
Definition: colvarcomp.h:1378
bool use_explicit_gradients
If all sub-cvs use explicit gradients then we also use it.
Definition: colvarcomp.h:1376
std::vector< std::vector< colvarvalue > > ref_cv
Reference colvar values from path.
Definition: colvarcomp.h:1374
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_gpath.cpp:644
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use the metric of the returned colvarvalue (defined at runtime)
Definition: colvarcomp_gpath.cpp:651
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use the metric of the returned colvarvalue (defined at runtime)
Definition: colvarcomp_gpath.cpp:657
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to use the metric of the returned colvarvalue (defined at runtime)
Definition: colvarcomp_gpath.cpp:669
virtual int init(std::string const &conf)
Definition: colvarcomp_gpath.cpp:484
virtual void calc_value()=0
Calculate the variable.
virtual void computeDistanceBetweenReferenceFrames(std::vector< cvm::real > &result) const
Helper function to determine the distance between reference frames.
Definition: colvarcomp_gpath.cpp:599
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use the metric of the returned colvarvalue (defined at runtime)
Definition: colvarcomp_gpath.cpp:663
Definition: colvarcomp.h:1240
cvm::atom_group * atoms
Selected atoms.
Definition: colvarcomp.h:1245
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_gpath.cpp:169
std::vector< std::vector< cvm::atom_pos > > reference_frames
Reference frames.
Definition: colvarcomp.h:1249
size_t total_reference_frames
Total number of reference frames.
Definition: colvarcomp.h:1254
bool has_user_defined_fitting
Fitting options.
Definition: colvarcomp.h:1247
virtual void calc_value()=0
Calculate the variable.
virtual int init(std::string const &conf)
Definition: colvarcomp_gpath.cpp:31
std::vector< cvm::atom_group * > comp_atoms
Atom groups for RMSD calculation together with reference frames.
Definition: colvarcomp.h:1252
Definition: colvarcomp.h:1226
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_alchlambda.cpp:81
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_alchlambda.cpp:86
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_alchlambda.cpp:70
Definition: colvarcomp.h:1210
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_alchlambda.cpp:32
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_alchlambda.cpp:46
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_alchlambda.cpp:51
Colvar component: alpha helix content of a contiguous segment of 5 or more residues,...
Definition: colvarcomp.h:913
void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_protein.cpp:223
cvm::real theta_tol
Tolerance on the Calpha-Calpha angle.
Definition: colvarcomp.h:920
int en
Integer exponent of the HB numerator.
Definition: colvarcomp.h:935
cvm::real theta_ref
Reference Calpha-Calpha angle (default: 88 degrees)
Definition: colvarcomp.h:917
void collect_gradients(std::vector< int > const &atom_ids, std::vector< cvm::rvector > &atomic_gradients)
Re-implementation of cvc::collect_gradients() to carry over atomic gradients of sub-cvcs.
Definition: colvarcomp_protein.cpp:234
void calc_value()
Calculate the variable.
Definition: colvarcomp_protein.cpp:179
cvm::real hb_coeff
Contribution of the HB terms.
Definition: colvarcomp.h:929
int ed
Integer exponent of the HB denominator.
Definition: colvarcomp.h:938
void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_protein.cpp:286
cvm::real r0
Cutoff for HB.
Definition: colvarcomp.h:932
std::vector< h_bond * > hb
List of hydrogen bonds.
Definition: colvarcomp.h:926
virtual int init(std::string const &conf)
Definition: colvarcomp_protein.cpp:28
std::vector< angle * > theta
List of Calpha-Calpha angles.
Definition: colvarcomp.h:923
Colvar component: angle between the centers of mass of three groups (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:635
bool b_1site_force
Definition: colvarcomp.h:655
cvm::atom_group * group3
Atom group.
Definition: colvarcomp.h:643
cvm::rvector r21
Inter site vectors.
Definition: colvarcomp.h:646
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_angles.cpp:72
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_angles.cpp:112
cvm::atom_group * group2
Atom group.
Definition: colvarcomp.h:641
virtual int init(std::string const &conf)
Definition: colvarcomp_angles.cpp:26
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_angles.cpp:51
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_angles.cpp:89
cvm::rvector dxdr1
Derivatives wrt group centers of mass.
Definition: colvarcomp.h:650
cvm::real r21l
Inter site vector norms.
Definition: colvarcomp.h:648
cvm::atom_group * group1
Atom group.
Definition: colvarcomp.h:639
Definition: colvarcomp.h:1472
virtual int init(std::string const &conf)
Definition: colvarcomp_apath.cpp:254
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_apath.cpp:278
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_apath.cpp:293
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_apath.cpp:317
Definition: colvarcomp.h:1442
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_apath.cpp:186
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_apath.cpp:177
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_apath.cpp:162
virtual int init(std::string const &conf)
Definition: colvarcomp_apath.cpp:144
Definition: colvarcomp.h:1488
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_apath.cpp:396
virtual int init(std::string const &conf)
Definition: colvarcomp_apath.cpp:359
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_apath.cpp:381
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_apath.cpp:420
Definition: colvarcomp.h:1457
virtual int init(std::string const &conf)
Definition: colvarcomp_apath.cpp:199
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_apath.cpp:232
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_apath.cpp:241
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_apath.cpp:217
Definition: colvarcomp.h:1179
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:1427
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:1390
cvm::atom_group * atoms
Atom group.
Definition: colvarcomp.h:1182
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:1433
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:1349
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:1378
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:1415
std::vector< size_t > axes
Which Cartesian coordinates to include.
Definition: colvarcomp.h:1184
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:1421
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_distances.cpp:1398
Colvar component: coordination number between two groups (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:748
int en
Integer exponent of the function numerator.
Definition: colvarcomp.h:761
static cvm::real switching_function(cvm::real const &r0, cvm::rvector const &r0_vec, int en, int ed, cvm::atom &A1, cvm::atom &A2, bool **pairlist_elem, cvm::real tolerance)
Calculate a coordination number through the function (1-x**n)/(1-x**m), where x = |A1-A2|/r0.
Definition: colvarcomp_coordnums.cpp:19
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_coordnums.cpp:271
int compute_coordnum()
Workhorse function.
Definition: colvarcomp_coordnums.cpp:222
cvm::atom_group * group2
Second atom group.
Definition: colvarcomp.h:753
cvm::real tolerance
Tolerance for the pair list.
Definition: colvarcomp.h:769
bool b_group2_center_only
If true, group2 will be treated as a single atom.
Definition: colvarcomp.h:766
int ed
Integer exponent of the function denominator.
Definition: colvarcomp.h:763
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_coordnums.cpp:282
int pairlist_freq
Frequency of update of the pair list.
Definition: colvarcomp.h:772
cvm::real r0
"Cutoff" for isotropic calculation (default)
Definition: colvarcomp.h:755
bool b_anisotropic
Whether r/r0 or \vec{r}*\vec{1/r0_vec} should be used.
Definition: colvarcomp.h:759
virtual int init(std::string const &conf)
Definition: colvarcomp_coordnums.cpp:104
bool * pairlist
Pair list.
Definition: colvarcomp.h:775
void main_loop(bool **pairlist_elem)
Workhorse function.
Definition: colvarcomp_coordnums.cpp:195
cvm::atom_group * group1
First atom group.
Definition: colvarcomp.h:751
cvm::rvector r0_vec
"Cutoff vector" for anisotropic calculation
Definition: colvarcomp.h:757
custom expression of colvars
Definition: colvarcomp.h:1343
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_combination.cpp:301
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_combination.cpp:339
virtual int init(std::string const &conf)
Definition: colvarcomp_combination.cpp:170
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_combination.cpp:270
Colvar component (base class for collective variables)
Definition: colvarcomp.h:70
virtual void collect_gradients(std::vector< int > const &atom_ids, std::vector< cvm::rvector > &atomic_gradients)
Calculate atomic gradients and add them to the corresponding item in gradient vector May be overridde...
Definition: colvarcomp.cpp:476
virtual int init_total_force_params(std::string const &conf)
Parse options pertaining to total force calculation.
Definition: colvarcomp.cpp:137
virtual void wrap(colvarvalue &x_unwrapped) const
Wrap value (for periodic/symmetric cvcs)
Definition: colvarcomp.cpp:703
void set_value(colvarvalue const &new_value)
Definition: colvarcomp.h:236
int sup_np
Exponent in the polynomial combination (default: 1)
Definition: colvarcomp.h:87
int set_function_type(std::string const &type)
Set the value of function_type and its dependencies.
Definition: colvarcomp.cpp:47
cvm::real sup_coeff
Coefficient in the polynomial combination (default: 1.0)
Definition: colvarcomp.h:84
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp.cpp:518
colvarvalue jd
Calculated Jacobian derivative (divergence of the inverse gradients): serves to calculate the phase s...
Definition: colvarcomp.h:275
std::vector< std::string > function_types
Record the type of this class as well as those it is derived from.
Definition: colvarcomp.h:259
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Gradient(with respect to x2) of the square distance (can be redefined to transparently implement cons...
Definition: colvarcomp.cpp:697
std::string function_type() const
String identifier for the type of collective variable.
Definition: colvarcomp.cpp:38
virtual int init(std::string const &conf)
Definition: colvarcomp.cpp:60
virtual void debug_gradients()
Calculate finite-difference gradients alongside the analytical ones, for each Cartesian component.
Definition: colvarcomp.cpp:556
virtual ~cvc()
Destructor.
Definition: colvarcomp.cpp:352
colvarvalue const & Jacobian_derivative() const
Return the previously calculated divergence of the inverse atomic gradients.
Definition: colvarcomp.h:312
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp.h:141
cvm::real width
CVC-specific default colvar width (default: not provided)
Definition: colvarcomp.h:296
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Gradient(with respect to x1) of the square distance (can be redefined to transparently implement cons...
Definition: colvarcomp.cpp:686
virtual colvarvalue const * get_param_grad(std::string const ¶m_name)
Pointer to the gradient of parameter param_name.
Definition: colvarcomp.cpp:410
int setup()
After construction, set data related to dependency handling.
Definition: colvarcomp.cpp:345
virtual int set_param(std::string const ¶m_name, void const *new_value)
Set the named parameter to the given value.
Definition: colvarcomp.cpp:418
colvarvalue const & value() const
Return the previously calculated value.
Definition: colvarcomp.h:300
static std::vector< feature * > cvc_features
Implementation of the feature list for colvar.
Definition: colvarcomp.h:256
virtual int init_dependencies()
Initialize dependency tree.
Definition: colvarcomp.cpp:234
colvarvalue ft
Calculated total force (Note: this is calculated from the total atomic forces read from the program,...
Definition: colvarcomp.h:271
int update_description()
Update the description string based on name and type.
Definition: colvarcomp.cpp:26
std::string name
The name of the object (helps to identify this cvc instance when debugging)
Definition: colvarcomp.h:75
bool b_try_scalable
Whether or not this CVC will be computed in parallel whenever possible.
Definition: colvarcomp.h:232
cvm::real wrap_center
If the component is periodic, wrap around this value (default: 0.0)
Definition: colvarcomp.h:93
virtual void calc_value()=0
Calculate the variable.
virtual void read_data()
Obtain data needed for the calculation for the backend.
Definition: colvarcomp.cpp:444
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Definition: colvarcomp.cpp:675
colvarvalue x
Cached value.
Definition: colvarcomp.h:262
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp.cpp:526
void calc_fit_gradients()
Calculate the atomic fit gradients.
Definition: colvarcomp.cpp:534
void init_as_periodic_angle()
Set data types for a periodic angle (-180° to 180°)
Definition: colvarcomp.cpp:379
virtual std::vector< std::vector< int > > get_atom_lists()
Get vector of vectors of atom IDs for all atom groups.
Definition: colvarcomp.cpp:458
cvc()
Constructor.
Definition: colvarcomp.cpp:19
void register_atom_group(cvm::atom_group *ag)
Store a pointer to new atom group, and list as child for dependencies.
Definition: colvarcomp.cpp:402
void init_as_angle()
Set data types for a bounded angle (0° to 180°)
Definition: colvarcomp.cpp:372
void init_as_distance()
Set data types for a scalar distance (convenience function)
Definition: colvarcomp.cpp:362
colvarvalue const & total_force() const
Return the previously calculated total force.
Definition: colvarcomp.h:306
colvarvalue x_old
Value at the previous step.
Definition: colvarcomp.h:265
colvarvalue upper_boundary
Location of the upper boundary (not defined by user choice)
Definition: colvarcomp.h:293
colvarvalue lower_boundary
Location of the lower boundary (not defined by user choice)
Definition: colvarcomp.h:290
void init_scalar_boundaries(cvm::real lb, cvm::real ub)
Set two scalar boundaries (convenience function)
Definition: colvarcomp.cpp:389
std::vector< cvm::atom_group * > atom_groups
Pointers to all atom groups, to let colvars collect info e.g. atomic gradients.
Definition: colvarcomp.h:220
std::string config_key
Keyword used in the input to denote this CVC.
Definition: colvarcomp.h:81
virtual const std::vector< feature * > & features() const
Implementation of the feature list accessor for colvar.
Definition: colvarcomp.h:113
cvm::atom_group * parse_group(std::string const &conf, char const *group_key, bool optional=false)
Parse a group definition.
Definition: colvarcomp.cpp:167
virtual void apply_force(colvarvalue const &cvforce)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp.cpp:544
cvm::real period
Period of the values of this CVC (default: 0.0, non periodic)
Definition: colvarcomp.h:90
Colvar component: dihedPC Projection of the config onto a dihedral principal component See e....
Definition: colvarcomp.h:960
virtual void collect_gradients(std::vector< int > const &atom_ids, std::vector< cvm::rvector > &atomic_gradients)
Re-implementation of cvc::collect_gradients() to carry over atomic gradients of sub-cvcs.
Definition: colvarcomp_protein.cpp:532
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_protein.cpp:512
virtual int init(std::string const &conf)
Definition: colvarcomp_protein.cpp:337
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_protein.cpp:524
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_protein.cpp:555
Colvar component: dihedral between the centers of mass of four groups (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:711
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_angles.cpp:268
cvm::atom_group * group4
Atom group.
Definition: colvarcomp.h:721
virtual int init(std::string const &conf)
Definition: colvarcomp_angles.cpp:208
cvm::rvector r12
Inter site vectors.
Definition: colvarcomp.h:723
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_angles.cpp:290
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_angles.cpp:321
cvm::atom_group * group1
Atom group.
Definition: colvarcomp.h:715
cvm::atom_group * group3
Atom group.
Definition: colvarcomp.h:719
bool b_1site_force
Compute total force on first site only to avoid unwanted coupling to other colvars (see e....
Definition: colvarcomp.h:727
cvm::atom_group * group2
Atom group.
Definition: colvarcomp.h:717
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_angles.cpp:239
Colvar component: angle between the dipole of a molecule and an axis formed by two groups of atoms(co...
Definition: colvarcomp.h:675
bool b_1site_force
Definition: colvarcomp.h:695
cvm::rvector r21
Inter site vectors.
Definition: colvarcomp.h:686
cvm::real r21l
Inter site vector norms.
Definition: colvarcomp.h:688
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_angles.cpp:142
cvm::rvector dxdr1
Derivatives wrt group centers of mass.
Definition: colvarcomp.h:690
cvm::atom_group * group1
Dipole atom group.
Definition: colvarcomp.h:679
virtual int init(std::string const &conf)
Definition: colvarcomp_angles.cpp:129
cvm::atom_group * group3
Atom group.
Definition: colvarcomp.h:683
cvm::atom_group * group2
Atom group.
Definition: colvarcomp.h:681
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_angles.cpp:166
Colvar component: dipole magnitude of a molecule.
Definition: colvarcomp.h:532
cvm::atom_group * atoms
Dipole atom group.
Definition: colvarcomp.h:535
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:631
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:640
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:622
Colvar component: distance unit vector (direction) between centers of mass of two groups (colvarvalue...
Definition: colvarcomp.h:372
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:402
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_distances.cpp:381
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:371
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:414
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:396
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:359
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:408
Colvar component: average distance between two groups of atoms, weighted as the sixth power,...
Definition: colvarcomp.h:483
cvm::atom_group * group2
Second atom group.
Definition: colvarcomp.h:488
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:425
int exponent
Components of the distance vector orthogonal to the axis.
Definition: colvarcomp.h:490
cvm::atom_group * group1
First atom group.
Definition: colvarcomp.h:486
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:461
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:505
Colvar component: N1xN2 vector of pairwise distances (colvarvalue::type_vector type,...
Definition: colvarcomp.h:505
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:599
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:611
cvm::atom_group * group2
Second atom group.
Definition: colvarcomp.h:510
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:605
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:519
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:531
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_distances.cpp:568
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:593
cvm::atom_group * group1
First atom group.
Definition: colvarcomp.h:508
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:562
Definition: colvarcomp.h:349
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:140
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:131
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:94
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:122
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:105
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_distances.cpp:112
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to deal with multiple dimensions.
Definition: colvarcomp_distances.cpp:146
Colvar component: projection of the distance vector on a plane (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:427
cvm::rvector dist_v_ortho
Components of the distance vector orthogonal to the axis.
Definition: colvarcomp.h:430
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:301
cvm::rvector v12
Vector distances.
Definition: colvarcomp.h:432
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:277
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:330
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:343
Colvar component: projection of the distance vector along an axis(colvarvalue::type_scalar type,...
Definition: colvarcomp.h:395
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:223
cvm::rvector dist_v
Vector distance, cached to be recycled.
Definition: colvarcomp.h:408
cvm::atom_group * main
Main atom group.
Definition: colvarcomp.h:398
bool fixed_axis
Flag: using a fixed axis vector?
Definition: colvarcomp.h:410
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:249
cvm::real axis_norm
Norm of the axis.
Definition: colvarcomp.h:406
cvm::atom_group * ref1
Reference atom group.
Definition: colvarcomp.h:400
cvm::atom_group * ref2
Optional, second ref atom group.
Definition: colvarcomp.h:402
cvm::rvector axis
Vector on which the distance vector is projected.
Definition: colvarcomp.h:404
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:193
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:160
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:262
Colvar component: distance between the centers of mass of two groups (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:324
cvm::atom_group * group2
Second atom group.
Definition: colvarcomp.h:329
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:79
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:47
cvm::rvector dist_v
Vector distance, cached to be recycled.
Definition: colvarcomp.h:331
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:67
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:30
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:59
cvm::atom_group * group1
First atom group.
Definition: colvarcomp.h:327
Colvar component: projection of 3N coordinates onto an eigenvector(colvarvalue::type_scalar type,...
Definition: colvarcomp.h:603
std::vector< cvm::atom_pos > ref_pos
Reference coordinates.
Definition: colvarcomp.h:610
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:1061
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:1287
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:1258
std::vector< cvm::rvector > eigenvec
Eigenvector (of a normal or essential mode): will always have zero center.
Definition: colvarcomp.h:613
cvm::atom_group * atoms
Atom group.
Definition: colvarcomp.h:607
cvm::real eigenvec_invnorm2
Inverse square norm of the eigenvector.
Definition: colvarcomp.h:616
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:1267
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:1275
Definition: colvarcomp.h:1107
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:391
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:374
Definition: colvarcomp.h:1118
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:440
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:423
Definition: colvarcomp.h:1129
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:487
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:472
Colvar component: coordination number between two groups (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:858
cvm::rvector r0_vec
"Cutoff vector" for anisotropic calculation
Definition: colvarcomp.h:863
bool b_anisotropic
Wheter dist/r0 or \vec{dist}*\vec{1/r0_vec} should ne be used.
Definition: colvarcomp.h:866
int en
Integer exponent of the function numerator.
Definition: colvarcomp.h:868
int ed
Integer exponent of the function denominator.
Definition: colvarcomp.h:870
virtual int init(std::string const &conf)
Definition: colvarcomp_coordnums.cpp:538
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_coordnums.cpp:582
cvm::real r0
"Cutoff" for isotropic calculation (default)
Definition: colvarcomp.h:861
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_coordnums.cpp:605
Colvar component: alternative path collective variable using geometry, variable s Allow any combinati...
Definition: colvarcomp.h:1408
virtual int init(std::string const &conf)
Definition: colvarcomp_gpath.cpp:679
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_gpath.cpp:748
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_gpath.cpp:779
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_gpath.cpp:743
Colvar component: alternative path collective variable using geometry, variable s For more informatio...
Definition: colvarcomp.h:1269
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_gpath.cpp:304
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_gpath.cpp:299
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_gpath.cpp:325
virtual int init(std::string const &conf)
Definition: colvarcomp_gpath.cpp:183
Colvar component: Radius of gyration of an atom group (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:551
cvm::atom_group * atoms
Atoms involved.
Definition: colvarcomp.h:554
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:679
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:698
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:689
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:711
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:661
Definition: colvarcomp.h:1425
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_gpath.cpp:918
virtual int init(std::string const &conf)
Definition: colvarcomp_gpath.cpp:809
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_gpath.cpp:886
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_gpath.cpp:891
Colvar component: alternative path collective variable using geometry, variable z This should be merg...
Definition: colvarcomp.h:1291
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_gpath.cpp:453
virtual int init(std::string const &conf)
Definition: colvarcomp_gpath.cpp:338
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_gpath.cpp:458
virtual void apply_force(colvarvalue const &force)
Redefined to raise error because this is an abstract type.
Definition: colvarcomp_gpath.cpp:469
Colvar component: hydrogen bond, defined as the product of a colvar::coordnum and 1/2*(1-cos((180-ang...
Definition: colvarcomp.h:886
int ed
Integer exponent of the function denominator.
Definition: colvarcomp.h:893
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_coordnums.cpp:360
cvm::real r0
"Cutoff" distance between acceptor and donor
Definition: colvarcomp.h:889
int en
Integer exponent of the function numerator.
Definition: colvarcomp.h:891
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_coordnums.cpp:372
virtual int init(std::string const &conf)
Definition: colvarcomp_coordnums.cpp:301
Colvar component: moment of inertia of an atom group around a user-defined axis (colvarvalue::type_sc...
Definition: colvarcomp.h:585
cvm::rvector axis
Vector on which the inertia tensor is projected.
Definition: colvarcomp.h:588
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:764
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:774
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:748
Colvar component: moment of inertia of an atom group (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:571
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:724
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:733
Current only linear combination of sub-CVCs is available.
Definition: colvarcomp.h:1311
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_combination.cpp:146
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_combination.cpp:122
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_combination.cpp:92
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_combination.cpp:160
std::vector< colvar::cvc * > cv
Sub-colvar components.
Definition: colvarcomp.h:1314
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_combination.cpp:106
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_combination.cpp:140
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_combination.cpp:153
virtual int init(std::string const &conf)
Definition: colvarcomp_combination.cpp:19
bool use_explicit_gradients
If all sub-cvs use explicit gradients then we also use it.
Definition: colvarcomp.h:1316
Definition: colvarcomp.h:1540
std::string volmap_name
String identifier of the map object (as used by the simulation engine)
Definition: colvarcomp.h:1553
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_volmaps.cpp:87
int volmap_index
Index of the map objet in the proxy arrays.
Definition: colvarcomp.h:1559
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_volmaps.cpp:117
cvm::atom_group * atoms
Group of atoms selected internally (optional)
Definition: colvarcomp.h:1562
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_volmaps.cpp:111
virtual int init(std::string const &conf)
Definition: colvarcomp_volmaps.cpp:24
std::vector< cvm::real > atom_weights
Weights assigned to each atom (default: uniform weights)
Definition: colvarcomp.h:1565
int volmap_id
Numeric identifier of the map object (as used by the simulation engine)
Definition: colvarcomp.h:1556
Definition: colvarcomp.h:1509
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_neuralnetwork.cpp:208
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_neuralnetwork.cpp:220
size_t m_output_index
the index of nn output components
Definition: colvarcomp.h:1514
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_neuralnetwork.cpp:227
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_neuralnetwork.cpp:155
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to allow arbitrary dimensions.
Definition: colvarcomp_neuralnetwork.cpp:214
std::unique_ptr< neuralnetworkCV::neuralNetworkCompute > nn
actual computation happens in neuralnetworkCV::neuralNetworkCompute
Definition: colvarcomp.h:1512
virtual int init(std::string const &conf)
Definition: colvarcomp_neuralnetwork.cpp:25
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_neuralnetwork.cpp:172
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_neuralnetwork.cpp:189
Definition: colvarcomp.h:1035
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:186
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:201
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_rotations.cpp:217
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to use scalar metrics.
Definition: colvarcomp_rotations.cpp:243
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use scalar metrics.
Definition: colvarcomp_rotations.cpp:236
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use scalar metrics.
Definition: colvarcomp_rotations.cpp:223
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use scalar metrics.
Definition: colvarcomp_rotations.cpp:229
Colvar component: cosine of the angle of rotation with respect to a set of reference coordinates (col...
Definition: colvarcomp.h:1060
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:256
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:265
Colvar component: orientation in space of an atom group, with respect to a set of reference coordinat...
Definition: colvarcomp.h:986
virtual void apply_force(colvarvalue const &force)
Apply the collective variable force, by communicating the atomic forces to the simulation program (No...
Definition: colvarcomp_rotations.cpp:133
virtual cvm::real dist2(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use quaternion metrics.
Definition: colvarcomp_rotations.cpp:153
cvm::rotation rot
Rotation object.
Definition: colvarcomp.h:1001
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:109
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:124
std::vector< cvm::atom_pos > shifted_pos
Shifted atomic positions.
Definition: colvarcomp.h:998
cvm::atom_pos atoms_cog
Center of geometry of the group.
Definition: colvarcomp.h:992
virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use quaternion metrics.
Definition: colvarcomp_rotations.cpp:167
virtual colvarvalue dist2_lgrad(colvarvalue const &x1, colvarvalue const &x2) const
Redefined to use quaternion metrics.
Definition: colvarcomp_rotations.cpp:160
virtual void wrap(colvarvalue &x_unwrapped) const
Redefined to use quaternion metrics.
Definition: colvarcomp_rotations.cpp:174
std::vector< cvm::atom_pos > ref_pos
Reference coordinates.
Definition: colvarcomp.h:995
cvm::quaternion ref_quat
This is used to remove jumps in the sign of the quaternion, which may be annoying in the colvars traj...
Definition: colvarcomp.h:1005
virtual int init(std::string const &conf)
Definition: colvarcomp_rotations.cpp:37
cvm::atom_group * atoms
Atom group.
Definition: colvarcomp.h:990
Colvar component: polar coordinate phi of a group (colvarvalue::type_scalar type, range [-180:180])
Definition: colvarcomp.h:447
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_angles.cpp:389
virtual int init(std::string const &conf)
Definition: colvarcomp_angles.cpp:380
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_angles.cpp:400
Colvar component: polar coordinate theta of a group (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:465
virtual int init(std::string const &conf)
Definition: colvarcomp_angles.cpp:338
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_angles.cpp:347
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_angles.cpp:358
Colvar component: root mean square deviation (RMSD) of a group with respect to a set of reference coo...
Definition: colvarcomp.h:1144
int init_permutation(std::string const &conf)
Permutation RMSD input parsing.
Definition: colvarcomp_distances.cpp:887
size_t best_perm_index
Index of the permutation yielding the smallest RMSD (0 for identity)
Definition: colvarcomp.h:1158
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_distances.cpp:961
virtual void calc_Jacobian_derivative()
Calculate the divergence of the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:989
std::vector< cvm::atom_pos > ref_pos
Definition: colvarcomp.h:1152
cvm::atom_group * atoms
Atom group.
Definition: colvarcomp.h:1148
size_t n_permutations
Number of permutations of symmetry-related atoms.
Definition: colvarcomp.h:1155
virtual void calc_force_invgrads()
Calculate the total force from the system using the inverse atomic gradients.
Definition: colvarcomp_distances.cpp:975
virtual int init(std::string const &conf)
Definition: colvarcomp_distances.cpp:791
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_distances.cpp:934
Colvar component: self-coordination number within a group (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:824
cvm::atom_group * group1
Selected atoms.
Definition: colvarcomp.h:828
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_coordnums.cpp:518
virtual int init(std::string const &conf)
Definition: colvarcomp_coordnums.cpp:392
int compute_selfcoordnum()
Main workhorse function.
Definition: colvarcomp_coordnums.cpp:445
int ed
Integer exponent of the function denominator.
Definition: colvarcomp.h:834
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_coordnums.cpp:507
cvm::real r0
"Cutoff" for isotropic calculation (default)
Definition: colvarcomp.h:830
int en
Integer exponent of the function numerator.
Definition: colvarcomp.h:832
Colvar component: angle of rotation around a predefined axis (colvarvalue::type_scalar type,...
Definition: colvarcomp.h:1095
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:337
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:349
Colvar component: projection of the orientation vector onto a predefined axis (colvarvalue::type_scal...
Definition: colvarcomp.h:1075
virtual void calc_gradients()
Calculate the atomic gradients, to be reused later in order to apply forces.
Definition: colvarcomp_rotations.cpp:312
virtual int init(std::string const &conf)
Definition: colvarcomp_rotations.cpp:287
virtual void calc_value()
Calculate the variable.
Definition: colvarcomp_rotations.cpp:301
std::vector< cvm::rvector > atomic_gradients
Array of atomic gradients collected from all cvcs with appropriate components, rotations etc....
Definition: colvar.h:714
colvarvalue ft
Total force, as derived from the atomic trajectory; should equal the system force plus f.
Definition: colvar.h:223
std::vector< int > atom_ids
Sorted array of (zero-based) IDs for all atoms involved.
Definition: colvar.h:709
Parent class for a member object of a bias, cv or cvc etc. containing features and their dependencies...
Definition: colvardeps.h:34
Group of atom objects, mostly used by a colvar::cvc object to gather all atomic data.
Definition: colvaratoms.h:159
Stores numeric id, mass and all mutable data for an atom, mostly used by a colvar::cvc.
Definition: colvaratoms.h:31
1-dimensional vector of real numbers with four components and a quaternion algebra
Definition: colvartypes.h:958
A rotation between two sets of coordinates (for the moment a wrapper for colvarmodule::quaternion)
Definition: colvartypes.h:1363
vector of real numbers with three components
Definition: colvartypes.h:727
double real
Defining an abstract real number allows to switch precision.
Definition: colvarmodule.h:95
Base class containing parsing functions; all objects which need to parse input inherit from this.
Definition: colvarparse.h:27
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.
Definition: colvarcomp_apath.cpp:22
Definition: colvarcomp_rotations.cpp:17