#include <colvargrid.h>
Inheritance diagram for integrate_potential:
Public Methods | |
integrate_potential () | |
virtual | ~integrate_potential () |
integrate_potential (std::vector< colvar * > &colvars, colvar_grid_gradient *gradients) | |
Constructor from a vector of colvars + gradient grid. More... | |
integrate_potential (colvar_grid_gradient *gradients) | |
Constructor from a gradient grid (for processing grid files without a Colvars config). More... | |
int | integrate (const int itmax, const cvm::real &tol, cvm::real &err) |
\brief Calculate potential from divergence (in 2D); return number of steps. More... | |
void | update_div_neighbors (const std::vector< int > &ix) |
\brief Update matrix containing divergence and boundary conditions based on new gradient point value, in neighboring bins. More... | |
void | set_div () |
\brief Set matrix containing divergence and boundary conditions based on complete gradient grid. More... | |
void | set_zero_minimum () |
\brief Add constant to potential so that its minimum value is zero Useful e.g. for output. More... | |
Protected Methods | |
void | update_div_local (const std::vector< int > &ix) |
\brief Update matrix containing divergence and boundary conditions called by update_div_neighbors. More... | |
void | get_grad (cvm::real *g, std::vector< int > &ix) |
Obtain the gradient vector at given location ix, if available or zero if it is on the edge of the gradient grid ix gets wrapped in PBC. More... | |
void | nr_linbcg_sym (const std::vector< cvm::real > &b, std::vector< cvm::real > &x, const cvm::real &tol, const int itmax, int &iter, cvm::real &err) |
\brief Solve linear system based on CG, valid for symmetric matrices only. More... | |
cvm::real | l2norm (const std::vector< cvm::real > &x) |
l2 norm of a vector. More... | |
void | atimes (const std::vector< cvm::real > &x, std::vector< cvm::real > &r) |
Multiplication by sparse matrix representing Lagrangian (or its transpose). More... | |
Protected Attributes | |
colvar_grid_gradient * | gradients |
std::vector< cvm::real > | divergence |
Array holding divergence + boundary terms (modified Neumann) if not periodic. More... |
Definition at line 1619 of file colvargrid.h.
|
|
|
Definition at line 1625 of file colvargrid.h. |
|
Constructor from a vector of colvars + gradient grid.
Definition at line 375 of file colvargrid.C. References colvarmodule::cite_feature, divergence, colvarmodule::main, colvar_grid< cvm::real >::nd, and colvar_grid< cvm::real >::nt. |
|
Constructor from a gradient grid (for processing grid files without a Colvars config).
Definition at line 405 of file colvargrid.C. References divergence, gradients, colvar_grid< cvm::real >::lower_boundaries, colvar_grid< cvm::real >::nd, colvar_grid< cvm::real >::nt, colvar_grid< cvm::real >::num_variables, colvar_grid< cvm::real >::number_of_points_vec, colvar_grid< cvm::real >::nx, colvar_grid< cvm::real >::periodic, colvar_grid< cvm::real >::setup, and colvar_grid< cvm::real >::widths. |
|
Multiplication by sparse matrix representing Lagrangian (or its transpose).
Definition at line 588 of file colvargrid.C. References colvar_grid< cvm::real >::nd, colvar_grid< cvm::real >::nx, colvar_grid< cvm::real >::periodic, and colvar_grid< cvm::real >::widths. Referenced by nr_linbcg_sym. |
|
Obtain the gradient vector at given location ix, if available or zero if it is on the edge of the gradient grid ix gets wrapped in PBC.
Definition at line 512 of file colvargrid.C. References gradients, colvar_grid< cvm::real >::nd, colvar_grid_gradient::samples, colvar_grid< cvm::real >::value, colvar_grid< size_t >::value, and colvar_grid< cvm::real >::wrap_edge. Referenced by update_div_local. |
|
\brief Calculate potential from divergence (in 2D); return number of steps.
Definition at line 428 of file colvargrid.C. References colvar_grid_gradient::average, colvar_grid< cvm::real >::data, divergence, colvarmodule::error, gradients, colvar_grid< cvm::real >::incr, colvar_grid< cvm::real >::index_ok, colvarmodule::log, colvar_grid< cvm::real >::nd, colvar_grid< cvm::real >::new_index, nr_linbcg_sym, colvar_grid< cvm::real >::periodic, colvar_grid< cvm::real >::set_value, colvar_grid_gradient::value_output, and colvar_grid< cvm::real >::widths. Referenced by colvarbias_abf::update. |
|
l2 norm of a vector.
Definition at line 1057 of file colvargrid.C. Referenced by nr_linbcg_sym. |
|
\brief Solve linear system based on CG, valid for symmetric matrices only.
Definition at line 1004 of file colvargrid.C. References atimes, colvarmodule::debug, l2norm, colvar_grid< cvm::real >::nt, and z. Referenced by integrate. |
|
\brief Set matrix containing divergence and boundary conditions based on complete gradient grid.
Definition at line 466 of file colvargrid.C. References colvar_grid< cvm::real >::incr, colvar_grid< cvm::real >::index_ok, colvar_grid< cvm::real >::nd, colvar_grid< cvm::real >::new_index, and update_div_local. Referenced by colvarbias_abf::init. |
|
\brief Add constant to potential so that its minimum value is zero Useful e.g. for output.
Definition at line 1647 of file colvargrid.h. References colvar_grid< cvm::real >::add_constant, and colvar_grid_scalar::minimum_value. Referenced by colvarbias_abf::update. |
|
\brief Update matrix containing divergence and boundary conditions called by update_div_neighbors.
Definition at line 536 of file colvargrid.C. References colvar_grid< cvm::real >::address, divergence, get_grad, colvar_grid< cvm::real >::nd, and colvar_grid< cvm::real >::widths. Referenced by set_div, and update_div_neighbors. |
|
\brief Update matrix containing divergence and boundary conditions based on new gradient point value, in neighboring bins.
Definition at line 475 of file colvargrid.C. References colvar_grid< cvm::real >::nd, update_div_local, and colvar_grid< cvm::real >::wrap. Referenced by colvarbias_abf::update. |
|
Array holding divergence + boundary terms (modified Neumann) if not periodic.
Definition at line 1657 of file colvargrid.h. Referenced by integrate, integrate_potential, and update_div_local. |
|
Definition at line 1654 of file colvargrid.h. Referenced by get_grad, integrate, and integrate_potential. |