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

colvarbias_restraint_linear Class Reference

\brief Linear bias restraint (implementation of colvarbias_restraint). More...

#include <colvarbias_restraint.h>

Inheritance diagram for colvarbias_restraint_linear:

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

Public Methods

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

virtual int update ()
virtual int change_configuration (std::string const &conf)
 Load new configuration - force constant and/or centers only. More...

virtual cvm::real energy_difference (std::string const &conf)
 Calculate change in energy from using alternate configuration. More...

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 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...


Detailed Description

\brief Linear bias restraint (implementation of colvarbias_restraint).

Definition at line 300 of file colvarbias_restraint.h.


Constructor & Destructor Documentation

colvarbias_restraint_linear::colvarbias_restraint_linear char const *    key
 

Definition at line 1168 of file colvarbias_restraint.C.

References colvarbias_restraint_k::check_positive_k.


Member Function Documentation

int colvarbias_restraint_linear::change_configuration std::string const &    conf [virtual]
 

Load new configuration - force constant and/or centers only.

Reimplemented from colvarbias_restraint_centers_moving.

Definition at line 1230 of file colvarbias_restraint.C.

References colvarbias_restraint_k::change_configuration, and conf.

Referenced by energy_difference.

cvm::real colvarbias_restraint_linear::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 1269 of file colvarbias_restraint.C.

References colvarbias_restraint_centers::colvar_centers, d_restraint_potential_dk, and colvarbias::variables.

Referenced by d_restraint_potential_dk.

cvm::real colvarbias_restraint_linear::energy_difference std::string const &    conf [virtual]
 

Calculate change in energy from using alternate configuration.

Reimplemented from colvarbias_restraint.

Definition at line 1237 of file colvarbias_restraint.C.

References colvarbias::bias_energy, change_configuration, conf, colvarbias_restraint_k::force_k, result, and update.

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

Reimplemented from colvarbias_restraint_centers_moving.

Definition at line 1276 of file colvarbias_restraint.C.

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

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

\brief Parse config string and (re)initialize.

Reimplemented from colvarbias_restraint_centers_moving.

Definition at line 1182 of file colvarbias_restraint.C.

References colvarmodule::cite_feature, COLVARS_INPUT_ERROR, conf, colvarmodule::error, colvardeps::f_cv_periodic, colvarbias_restraint_k::force_k, colvarbias_restraint_k_moving::init, colvarbias_restraint_centers_moving::init, colvarbias_restraint_moving::init, colvarbias_restraint::init, colvarmodule::main, colvarbias::num_variables, and colvarbias::variables.

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

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

Reimplemented from colvarbias.

Definition at line 1302 of file colvarbias_restraint.C.

References colvarbias_ti::read_state_data.

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

\brief Force function for the i-th colvar.

Implements colvarbias_restraint.

Definition at line 1261 of file colvarbias_restraint.C.

References colvarbias_restraint_k::force_k, colvarvalue::set_ones, and colvarbias::variables.

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

\brief Potential function for the i-th colvar.

Implements colvarbias_restraint.

Definition at line 1254 of file colvarbias_restraint.C.

References colvarbias_restraint_centers::colvar_centers, colvarbias_restraint_k::force_k, and colvarbias::variables.

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

Reimplemented from colvarbias_restraint_centers_moving.

Definition at line 1285 of file colvarbias_restraint.C.

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

int colvarbias_restraint_linear::update   [virtual]
 

Reimplemented from colvarbias_restraint_centers_moving.

Definition at line 1208 of file colvarbias_restraint.C.

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

Referenced by energy_difference.

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

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

Reimplemented from colvarbias.

Definition at line 1296 of file colvarbias_restraint.C.

References colvarbias_ti::write_state_data.

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

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

Reimplemented from colvarbias_restraint_centers_moving.

Definition at line 1317 of file colvarbias_restraint.C.

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

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

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

Reimplemented from colvarbias_restraint_centers_moving.

Definition at line 1308 of file colvarbias_restraint.C.

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


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 02:46:49 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002