#include <colvarcomp.h>
Inheritance diagram for colvar::distance_xy:
Public Methods | |||
distance_xy (std::string const &conf) | |||
distance_xy () | |||
virtual | ~distance_xy () | ||
virtual void | calc_value () | ||
\brief Calculate the variable. More... | |||
virtual void | calc_gradients () | ||
\brief Calculate the atomic gradients, to be reused later in order to apply forces. More... | |||
virtual void | calc_force_invgrads () | ||
\brief Calculate the total force from the system using the inverse atomic gradients. More... | |||
virtual void | calc_Jacobian_derivative () | ||
\brief Calculate the divergence of the inverse atomic gradients. More... | |||
virtual void | apply_force (colvarvalue const &force) | ||
\brief Apply the collective variable force, by communicating the atomic forces to the simulation program (Note: the ft member is not altered by this function) Note: multiple calls to this function within the same simulation step will add the forces altogether
| |||
virtual cvm::real | dist2 (colvarvalue const &x1, colvarvalue const &x2) const | ||
\brief Square distance between x1 and x2 (can be redefined to transparently implement constraints, symmetries and periodicities) colvar::cvc::dist2() and the related functions are declared as "const" functions, but not "static", because additional parameters defining the metrics (e.g. the periodicity) may be specific to each colvar::cvc object. If symmetries or periodicities are present, the colvar::cvc::dist2() should be redefined to return the "closest distance" value and colvar::cvc::dist2_lgrad(), colvar::cvc::dist2_rgrad() to return its gradients. If constraints are present (and not already implemented by any of the colvarvalue types), the colvar::cvc::dist2_lgrad() and colvar::cvc::dist2_rgrad() functions should be redefined to provide a gradient which is compatible with the constraint, i.e. already deprived of its component normal to the constraint hypersurface. Finally, another useful application, if you are performing very many operations with these functions, could be to override the colvarvalue member functions and access directly its member data. For instance: to define dist2(x1,x2) as (x2.real_value-x1.real_value)*(x2.real_value-x1.real_value) in case of a scalar colvarvalue type. More... | |||
virtual colvarvalue | dist2_lgrad (colvarvalue const &x1, colvarvalue const &x2) const | ||
\brief Gradient(with respect to x1) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities). More... | |||
virtual colvarvalue | dist2_rgrad (colvarvalue const &x1, colvarvalue const &x2) const | ||
\brief Gradient(with respect to x2) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities). More... | |||
Protected Attributes | |||
cvm::rvector | dist_v_ortho | ||
Components of the distance vector orthogonal to the axis. More... | |||
cvm::rvector | v12 | ||
Vector distances. More... | |||
cvm::rvector | v13 | ||
Vector distances. More... |
Definition at line 474 of file colvarcomp.h.
|
Definition at line 369 of file colvarcomp_distances.C. References conf, distance_xy, colvar::distance_z::distance_z, colvardeps::enable, colvardeps::f_cvc_com_based, colvardeps::f_cvc_inv_gradient, colvardeps::f_cvc_Jacobian, colvar::cvc::init_as_distance, colvardeps::provide, and colvar::cvc::set_function_type. Referenced by distance_xy. |
|
Definition at line 381 of file colvarcomp_distances.C. References colvar::distance_z::distance_z, colvardeps::enable, colvardeps::f_cvc_com_based, colvardeps::f_cvc_inv_gradient, colvardeps::f_cvc_Jacobian, colvar::cvc::init_as_distance, colvardeps::provide, and colvar::cvc::set_function_type. |
|
Definition at line 485 of file colvarcomp.h. |
|
\brief Apply the collective variable force, by communicating the atomic forces to the simulation program (Note: the ft member is not altered by this function) Note: multiple calls to this function within the same simulation step will add the forces altogether
Reimplemented from colvar::distance_z. Definition at line 465 of file colvarcomp_distances.C. References force, colvar::distance_z::main, colvarvalue::real_value, colvar::distance_z::ref1, and colvar::distance_z::ref2. |
|
\brief Calculate the total force from the system using the inverse atomic gradients.
Reimplemented from colvar::distance_z. Definition at line 446 of file colvarcomp_distances.C. References dist_v_ortho, colvardeps::f_cvc_one_site_total_force, colvar::distance_z::fixed_axis, colvar::cvc::ft, colvardeps::is_enabled, colvar::distance_z::main, colvarvalue::real_value, colvar::distance_z::ref1, and colvar::cvc::x. |
|
\brief Calculate the atomic gradients, to be reused later in order to apply forces.
Reimplemented from colvar::distance_z. Definition at line 417 of file colvarcomp_distances.C. References colvar::distance_z::axis_norm, colvar::distance_z::dist_v, dist_v_ortho, colvardeps::f_cvc_pbc_minimum_image, colvardeps::is_enabled, colvar::distance_z::main, colvarmodule::position_distance, colvarvalue::real_value, colvar::distance_z::ref1, colvar::distance_z::ref2, v13, and colvar::cvc::x. |
|
\brief Calculate the divergence of the inverse atomic gradients.
Reimplemented from colvar::distance_z. Definition at line 459 of file colvarcomp_distances.C. References colvar::cvc::jd, colvarvalue::real_value, and colvar::cvc::x. |
|
\brief Calculate the variable.
Reimplemented from colvar::distance_z. Definition at line 393 of file colvarcomp_distances.C. References colvar::distance_z::axis_norm, colvar::distance_z::dist_v, dist_v_ortho, colvardeps::f_cvc_pbc_minimum_image, colvar::distance_z::fixed_axis, colvardeps::is_enabled, colvar::distance_z::main, colvarmodule::position_distance, colvarvalue::real_value, colvar::distance_z::ref1, colvar::distance_z::ref2, v12, and colvar::cvc::x. |
|
\brief Square distance between x1 and x2 (can be redefined to transparently implement constraints, symmetries and periodicities) colvar::cvc::dist2() and the related functions are declared as "const" functions, but not "static", because additional parameters defining the metrics (e.g. the periodicity) may be specific to each colvar::cvc object. If symmetries or periodicities are present, the colvar::cvc::dist2() should be redefined to return the "closest distance" value and colvar::cvc::dist2_lgrad(), colvar::cvc::dist2_rgrad() to return its gradients. If constraints are present (and not already implemented by any of the colvarvalue types), the colvar::cvc::dist2_lgrad() and colvar::cvc::dist2_rgrad() functions should be redefined to provide a gradient which is compatible with the constraint, i.e. already deprived of its component normal to the constraint hypersurface. Finally, another useful application, if you are performing very many operations with these functions, could be to override the colvarvalue member functions and access directly its member data. For instance: to define dist2(x1,x2) as (x2.real_value-x1.real_value)*(x2.real_value-x1.real_value) in case of a scalar colvarvalue type.
Reimplemented from colvar::distance_z. |
|
\brief Gradient(with respect to x1) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities).
Reimplemented from colvar::distance_z. |
|
\brief Gradient(with respect to x2) of the square distance (can be redefined to transparently implement constraints, symmetries and periodicities).
Reimplemented from colvar::distance_z. |
|
Components of the distance vector orthogonal to the axis.
Definition at line 479 of file colvarcomp.h. Referenced by calc_force_invgrads, calc_gradients, and calc_value. |
|
Vector distances.
Definition at line 481 of file colvarcomp.h. Referenced by calc_value. |
|
Vector distances.
Definition at line 481 of file colvarcomp.h. Referenced by calc_gradients. |