Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

colvarbias_restraint_harmonic_walls Class Reference

\brief Wall restraint (implementation of colvarbias_restraint). More...

#include <colvarbias_restraint.h>

Inheritance diagram for colvarbias_restraint_harmonic_walls:

colvarbias_restraint_k_moving colvarbias_restraint_k colvarbias_restraint_moving colvarbias_restraint colvarparse colvardeps colvarbias colvarbias_ti colvarparams colvarparse colvardeps colvarbias colvarparams colvarparse colvardeps colvarparams List of all members.

Public Methods

 colvarbias_restraint_harmonic_walls (char const *key)
virtual int init (std::string const &conf)
 \brief Parse config string and (re)initialize. More...

virtual int update ()
virtual std::string const get_state_params () const
virtual int set_state_params (std::string const &conf)
virtual std::ostream & write_state_data (std::ostream &os)
 Write all mutable data not already written by get_state_params(). More...

virtual std::istream & read_state_data (std::istream &os)
 Read all mutable data not already set by set_state_params(). More...

virtual std::ostream & write_traj_label (std::ostream &os)
 Write a label to the trajectory file (comment line). More...

virtual std::ostream & write_traj (std::ostream &os)
 Output quantities such as the bias energy to the trajectory file. More...


Protected Methods

virtual cvm::real colvar_distance (size_t i) const
virtual cvm::real restraint_potential (size_t i) const
 \brief Potential function for the i-th colvar. More...

virtual colvarvalue const restraint_force (size_t i) const
 \brief Force function for the i-th colvar. More...

virtual cvm::real d_restraint_potential_dk (size_t i) const
 \brief Derivative of the potential function with respect to the force constant. More...


Protected Attributes

std::vector< colvarvaluelower_walls
 \brief Location of the lower walls. More...

std::vector< colvarvalueupper_walls
 \brief Location of the upper walls. More...

cvm::real lower_wall_k
 \brief If both walls are defined, use this k for the lower. More...

cvm::real upper_wall_k
 \brief If both walls are defined, use this k for the upper. More...


Detailed Description

\brief Wall restraint (implementation of colvarbias_restraint).

Definition at line 262 of file colvarbias_restraint.h.


Constructor & Destructor Documentation

colvarbias_restraint_harmonic_walls::colvarbias_restraint_harmonic_walls char const *    key
 

Definition at line 897 of file colvarbias_restraint.C.

References colvardeps::f_cvb_bypass_ext_lagrangian, lower_wall_k, colvardeps::provide, colvardeps::set_enabled, and upper_wall_k.


Member Function Documentation

cvm::real colvarbias_restraint_harmonic_walls::colvar_distance size_t    i const [protected, virtual]
 

Definition at line 1059 of file colvarbias_restraint.C.

References colvar::dist2, colvar::dist2_lgrad, colvardeps::f_cv_periodic, colvardeps::f_cvb_bypass_ext_lagrangian, colvardeps::is_enabled, lower_walls, upper_walls, and colvarbias::variables.

Referenced by d_restraint_potential_dk, restraint_force, and restraint_potential.

cvm::real colvarbias_restraint_harmonic_walls::d_restraint_potential_dk size_t    i const [protected, virtual]
 

\brief Derivative of the potential function with respect to the force constant.

Implements colvarbias_restraint.

Definition at line 1112 of file colvarbias_restraint.C.

References colvar_distance, lower_wall_k, upper_wall_k, and colvarbias::variables.

std::string const colvarbias_restraint_harmonic_walls::get_state_params   const [virtual]
 

Reimplemented from colvarbias_restraint_k_moving.

Definition at line 1121 of file colvarbias_restraint.C.

References colvarbias_restraint_k_moving::get_state_params, colvarbias_restraint_moving::get_state_params, and colvarbias_restraint::get_state_params.

int colvarbias_restraint_harmonic_walls::init std::string const &    conf [virtual]
 

\brief Parse config string and (re)initialize.

Reimplemented from colvarbias_restraint_k_moving.

Definition at line 913 of file colvarbias_restraint.C.

References colvarbias_restraint_moving::b_decoupling, colvarmodule::cite_feature, COLVARS_INPUT_ERROR, conf, colvardeps::enable, colvarmodule::error, colvardeps::f_cv_periodic, colvardeps::f_cvb_scalar_variables, colvarbias_restraint_k::force_k, colvarparse::get_keyval, colvarbias_restraint_k_moving::init, colvarbias_restraint_moving::init, colvarbias_restraint::init, colvarmodule::log, lower_wall_k, lower_walls, colvarmodule::main, colvarbias::num_variables, colvarmodule::sqrt, colvarbias_restraint_k_moving::starting_force_k, upper_wall_k, upper_walls, and colvarbias::variables.

std::istream & colvarbias_restraint_harmonic_walls::read_state_data std::istream &    is [virtual]
 

Read all mutable data not already set by set_state_params().

Reimplemented from colvarbias.

Definition at line 1145 of file colvarbias_restraint.C.

References colvarbias_ti::read_state_data.

colvarvalue const colvarbias_restraint_harmonic_walls::restraint_force size_t    i const [protected, virtual]
 

\brief Force function for the i-th colvar.

Implements colvarbias_restraint.

Definition at line 1104 of file colvarbias_restraint.C.

References colvar_distance, colvarbias_restraint_k::force_k, lower_wall_k, upper_wall_k, and colvarbias::variables.

cvm::real colvarbias_restraint_harmonic_walls::restraint_potential size_t    i const [protected, virtual]
 

\brief Potential function for the i-th colvar.

Implements colvarbias_restraint.

Definition at line 1095 of file colvarbias_restraint.C.

References colvar_distance, colvarbias_restraint_k::force_k, lower_wall_k, upper_wall_k, and colvarbias::variables.

int colvarbias_restraint_harmonic_walls::set_state_params std::string const &    conf [virtual]
 

Reimplemented from colvarbias_restraint_k_moving.

Definition at line 1129 of file colvarbias_restraint.C.

References conf, colvarbias_restraint_k_moving::set_state_params, colvarbias_restraint_moving::set_state_params, and colvarbias_restraint::set_state_params.

int colvarbias_restraint_harmonic_walls::update   [virtual]
 

Reimplemented from colvarbias_restraint_k_moving.

Definition at line 1043 of file colvarbias_restraint.C.

References colvarbias_restraint::update, colvarbias_restraint_k_moving::update, colvarbias_ti::update, and colvarbias_restraint_k_moving::update_acc_work.

std::ostream & colvarbias_restraint_harmonic_walls::write_state_data std::ostream &    os [virtual]
 

Write all mutable data not already written by get_state_params().

Reimplemented from colvarbias.

Definition at line 1139 of file colvarbias_restraint.C.

References colvarbias_ti::write_state_data.

std::ostream & colvarbias_restraint_harmonic_walls::write_traj std::ostream &    os [virtual]
 

Output quantities such as the bias energy to the trajectory file.

Reimplemented from colvarbias_restraint_k_moving.

Definition at line 1159 of file colvarbias_restraint.C.

References colvarbias_restraint_k_moving::write_traj, and colvarbias_restraint::write_traj.

std::ostream & colvarbias_restraint_harmonic_walls::write_traj_label std::ostream &    os [virtual]
 

Write a label to the trajectory file (comment line).

Reimplemented from colvarbias_restraint_k_moving.

Definition at line 1151 of file colvarbias_restraint.C.

References colvarbias_restraint_k_moving::write_traj_label, and colvarbias_restraint::write_traj_label.


Member Data Documentation

cvm::real colvarbias_restraint_harmonic_walls::lower_wall_k [protected]
 

\brief If both walls are defined, use this k for the lower.

Definition at line 286 of file colvarbias_restraint.h.

Referenced by colvarbias_restraint_harmonic_walls, d_restraint_potential_dk, init, restraint_force, and restraint_potential.

std::vector<colvarvalue> colvarbias_restraint_harmonic_walls::lower_walls [protected]
 

\brief Location of the lower walls.

Definition at line 280 of file colvarbias_restraint.h.

Referenced by colvar_distance, and init.

cvm::real colvarbias_restraint_harmonic_walls::upper_wall_k [protected]
 

\brief If both walls are defined, use this k for the upper.

Definition at line 289 of file colvarbias_restraint.h.

Referenced by colvarbias_restraint_harmonic_walls, d_restraint_potential_dk, init, restraint_force, and restraint_potential.

std::vector<colvarvalue> colvarbias_restraint_harmonic_walls::upper_walls [protected]
 

\brief Location of the upper walls.

Definition at line 283 of file colvarbias_restraint.h.

Referenced by colvar_distance, and init.


The documentation for this class was generated from the following files:
Generated on Wed Apr 17 02:47:51 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002