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 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="O", double const pdb_field_value=0.0)
 Read atom identifiers from a file.
virtual void load_coords (char const *filename, std::vector< cvm::atom_pos > &pos, std::string const pdb_field="O", double const pdb_field_value=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)
 Rename the given file, under the convention provided by the MD program.
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 107 of file colvarproxy.h.

00107 {}


Member Function Documentation

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

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

Reimplemented in colvarproxy_namd.

Definition at line 141 of file colvarproxy.h.

Referenced by colvarmodule::calc(), colvarmodule::colvarmodule(), and colvarmodule::finalise().

00142 {
00143 //   cvm::fatal_error ("Error: colvarproxy::backup_file() has not been (re)redefined, "
00144 //                     "__FILE__ at line __LINE__.\n"); 
00145 }

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

Boltzmann constant.

Implemented in colvarproxy_namd.

Referenced by colvarmodule::boltzmann().

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

void colvarproxy::load_atoms char const *  filename,
std::vector< cvm::atom > &  atoms,
std::string const   pdb_field = "O",
double const   pdb_field_value = 0.0
[inline, 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

Reimplemented in colvarproxy_namd.

Definition at line 131 of file colvarproxy.h.

References colvarmodule::fatal_error().

Referenced by colvarmodule::load_atoms().

00135 {
00136   cvm::fatal_error ("Error: colvarproxy::load_atoms() has not been (re)redefined, "
00137                     "__FILE__ at line __LINE__.\n");
00138 }

void colvarproxy::load_coords char const *  filename,
std::vector< cvm::atom_pos > &  pos,
std::string const   pdb_field = "O",
double const   pdb_field_value = 0.0
[inline, 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".

Reimplemented in colvarproxy_namd.

Definition at line 121 of file colvarproxy.h.

References colvarmodule::fatal_error().

Referenced by colvarmodule::load_coords().

00125 {
00126   cvm::fatal_error ("Error: colvarproxy::load_coords() has not been (re)redefined, "
00127                     "__FILE__ at line __LINE__.\n");
00128 }

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 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 111 of file colvarproxy.h.

References colvarmodule::atom_pos, and select_closest_image().

Referenced by colvarmodule::select_closest_images().

00113 {
00114   for (std::vector<cvm::atom_pos>::iterator pi = pos.begin();
00115        pi != pos.end(); pi++) {
00116     select_closest_image (*pi, ref_pos);
00117   }
00118 }

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 Mon Nov 23 04:59:34 2009 for NAMD by  doxygen 1.3.9.1