Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

colvarproxy Class Reference

Interface class between the collective variables module and the simulation program. More...

#include <colvarproxy.h>

Inheritance diagram for colvarproxy:

colvarproxy_namd List of all members.

Public Member Functions

virtual cvm::real unit_angstrom ()=0
 Value of the unit for atomic coordinates with respect to angstroms (used by some variables for hard-coded default values).
virtual cvm::real boltzmann ()=0
 Boltzmann constant.
virtual cvm::real temperature ()=0
 Temperature of the simulation (K).
virtual cvm::real dt ()=0
 Time step of the simulation (fs).
virtual void add_energy (cvm::real energy)=0
 Pass restraint energy value for current timestep to MD engine.
virtual void request_system_force (bool yesno)=0
 Tell the proxy whether system forces are needed.
virtual void log (std::string const &message)=0
 Print a message to the main log.
virtual void fatal_error (std::string const &message)=0
 Print a message to the main log and exit with error code.
virtual void exit (std::string const &message)=0
 Print a message to the main log and exit normally.
virtual std::string input_prefix ()=0
 Prefix to be used for input files (restarts, not configuration).
virtual std::string restart_output_prefix ()=0
 Prefix to be used for output restart files.
virtual std::string output_prefix ()=0
 Prefix to be used for output files (final system configuration).
virtual size_t restart_frequency ()=0
 Restarts will be fritten each time this number of steps has passed.
virtual cvm::rvector position_distance (cvm::atom_pos const &pos1, cvm::atom_pos const &pos2)=0
 Get the simple distance vector between two positions (with periodic boundary conditions handled transparently).
virtual cvm::real position_dist2 (cvm::atom_pos const &pos1, cvm::atom_pos const &pos2)=0
 Get the square distance between two positions (with periodic boundary conditions handled transparently).
virtual void select_closest_image (cvm::atom_pos &pos, cvm::atom_pos const &ref_pos)=0
 Get the closest periodic image to a reference position.
void select_closest_images (std::vector< cvm::atom_pos > &pos, cvm::atom_pos const &ref_pos)
 Perform select_closest_image() on a set of atomic positions.
virtual void load_atoms (char const *filename, std::vector< cvm::atom > &atoms, std::string const pdb_field, double const pdb_field_value=0.0)=0
 Read atom identifiers from a file.
virtual void load_coords (char const *filename, std::vector< cvm::atom_pos > &pos, const std::vector< int > &indices, std::string const pdb_field, double const pdb_field_value=0.0)=0
 Load the coordinates for a group of atoms from a file (usually a PDB); if "pos" is already allocated, the number of its elements must match the number of atoms in "filename".
virtual void backup_file (char const *filename)=0
 Rename the given file, under the convention provided by the MD program.
virtual cvm::real rand_gaussian (void)=0
 Pseudo-random number with Gaussian distribution.
virtual ~colvarproxy ()

Public Attributes

colvarmodulecolvars
 Pointer to the instance of colvarmodule.

Detailed Description

Interface class between the collective variables module and the simulation program.

Definition at line 12 of file colvarproxy.h.


Constructor & Destructor Documentation

virtual colvarproxy::~colvarproxy  )  [inline, virtual]
 

Definition at line 118 of file colvarproxy.h.

00118 {}


Member Function Documentation

virtual void colvarproxy::add_energy cvm::real  energy  )  [pure virtual]
 

Pass restraint energy value for current timestep to MD engine.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::calc().

virtual void colvarproxy::backup_file char const *  filename  )  [pure virtual]
 

Rename the given file, under the convention provided by the MD program.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::backup_file(), colvarmodule::calc(), colvarmodule::colvarmodule(), and colvarmodule::write_output_files().

virtual cvm::real colvarproxy::boltzmann  )  [pure virtual]
 

Boltzmann constant.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::boltzmann().

virtual cvm::real colvarproxy::dt  )  [pure virtual]
 

Time step of the simulation (fs).

Implemented in colvarproxy_namd.

Referenced by colvarmodule::dt().

virtual void colvarproxy::exit std::string const &  message  )  [pure virtual]
 

Print a message to the main log and exit normally.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::exit().

virtual void colvarproxy::fatal_error std::string const &  message  )  [pure virtual]
 

Print a message to the main log and exit with error code.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::fatal_error().

virtual std::string colvarproxy::input_prefix  )  [pure virtual]
 

Prefix to be used for input files (restarts, not configuration).

Implemented in colvarproxy_namd.

Referenced by colvarmodule::colvarmodule().

virtual void colvarproxy::load_atoms char const *  filename,
std::vector< cvm::atom > &  atoms,
std::string const   pdb_field,
double const   pdb_field_value = 0.0
[pure virtual]
 

Read atom identifiers from a file.

Parameters:
filename name of the file (usually a PDB)
atoms array to which atoms read from "filename" will be appended
pdb_field (optiona) if "filename" is a PDB file, use this field to determine which are the atoms to be set

Implemented in colvarproxy_namd.

Referenced by colvarmodule::load_atoms().

virtual void colvarproxy::load_coords char const *  filename,
std::vector< cvm::atom_pos > &  pos,
const std::vector< int > &  indices,
std::string const   pdb_field,
double const   pdb_field_value = 0.0
[pure virtual]
 

Load the coordinates for a group of atoms from a file (usually a PDB); if "pos" is already allocated, the number of its elements must match the number of atoms in "filename".

Implemented in colvarproxy_namd.

Referenced by colvarmodule::load_coords().

virtual void colvarproxy::log std::string const &  message  )  [pure virtual]
 

Print a message to the main log.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::log().

virtual std::string colvarproxy::output_prefix  )  [pure virtual]
 

Prefix to be used for output files (final system configuration).

Implemented in colvarproxy_namd.

Referenced by colvarmodule::colvarmodule().

virtual cvm::real colvarproxy::position_dist2 cvm::atom_pos const &  pos1,
cvm::atom_pos const &  pos2
[pure virtual]
 

Get the square distance between two positions (with periodic boundary conditions handled transparently).

Note: in the case of periodic boundary conditions, this provides an analytical square distance (while taking the square of position_distance() would produce leads to a cusp)

Implemented in colvarproxy_namd.

Referenced by colvarmodule::position_dist2().

virtual cvm::rvector colvarproxy::position_distance cvm::atom_pos const &  pos1,
cvm::atom_pos const &  pos2
[pure virtual]
 

Get the simple distance vector between two positions (with periodic boundary conditions handled transparently).

Implemented in colvarproxy_namd.

Referenced by colvarmodule::position_distance().

virtual cvm::real colvarproxy::rand_gaussian void   )  [pure virtual]
 

Pseudo-random number with Gaussian distribution.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::rand_gaussian().

virtual void colvarproxy::request_system_force bool  yesno  )  [pure virtual]
 

Tell the proxy whether system forces are needed.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::request_system_force().

virtual size_t colvarproxy::restart_frequency  )  [pure virtual]
 

Restarts will be fritten each time this number of steps has passed.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::colvarmodule().

virtual std::string colvarproxy::restart_output_prefix  )  [pure virtual]
 

Prefix to be used for output restart files.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::colvarmodule().

virtual void colvarproxy::select_closest_image cvm::atom_pos pos,
cvm::atom_pos const &  ref_pos
[pure virtual]
 

Get the closest periodic image to a reference position.

Parameters:
pos The position to look for the closest periodic image
ref_pos The reference position

Implemented in colvarproxy_namd.

Referenced by colvarmodule::select_closest_image(), and select_closest_images().

void colvarproxy::select_closest_images std::vector< cvm::atom_pos > &  pos,
cvm::atom_pos const &  ref_pos
[inline]
 

Perform select_closest_image() on a set of atomic positions.

After that, distance vectors can then be calculated directly, without using position_distance()

Definition at line 122 of file colvarproxy.h.

References colvarmodule::atom_pos, and select_closest_image().

Referenced by colvarmodule::select_closest_images().

00124 {
00125   for (std::vector<cvm::atom_pos>::iterator pi = pos.begin();
00126        pi != pos.end(); pi++) {
00127     select_closest_image (*pi, ref_pos);
00128   }
00129 }

virtual cvm::real colvarproxy::temperature  )  [pure virtual]
 

Temperature of the simulation (K).

Implemented in colvarproxy_namd.

Referenced by colvarmodule::temperature().

virtual cvm::real colvarproxy::unit_angstrom  )  [pure virtual]
 

Value of the unit for atomic coordinates with respect to angstroms (used by some variables for hard-coded default values).

Implemented in colvarproxy_namd.

Referenced by colvarmodule::unit_angstrom().


Member Data Documentation

colvarmodule* colvarproxy::colvars
 

Pointer to the instance of colvarmodule.

Definition at line 17 of file colvarproxy.h.


The documentation for this class was generated from the following file:
Generated on Fri May 25 04:07:21 2012 for NAMD by  doxygen 1.3.9.1