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

colvarcomp.h File Reference

#include <fstream>
#include <cmath>
#include "colvarmodule.h"
#include "colvar.h"
#include "colvaratoms.h"

Go to the source code of this file.

Classes

class  colvar::cvc
 Colvar component (base class); most implementations of utilize one or more or objects to access atoms. More...
class  colvar::distance
 Colvar component: distance between the centers of mass of two groups (colvarvalue::type_scalar type, range [0:*)). More...
class  colvar::distance_vec
class  colvar::distance_dir
 Colvar component: distance unit vector (direction) between centers of mass of two groups (colvarvalue::type_unitvector type, range [-1:1]x[-1:1]x[-1:1]). More...
class  colvar::distance_z
 Colvar component: projection of the distance vector along an axis (colvarvalue::type_scalar type, range (-*:*)). More...
class  colvar::distance_xy
 Colvar component: projection of the distance vector on a plane (colvarvalue::type_scalar type, range [0:*)). More...
class  colvar::min_distance
 Colvar component: projection of the distance vector along a fixed axis (colvarvalue::type_scalar type, range (-*:*)). More...
class  colvar::gyration
 Colvar component: Radius of gyration of an atom group (colvarvalue::type_scalar type, range [0:*)). More...
class  colvar::eigenvector
 Colvar component: projection of 3N coordinates onto an eigenvector (colvarvalue::type_scalar type, range (-*:*)). More...
class  colvar::angle
 Colvar component: angle between the centers of mass of three groups (colvarvalue::type_scalar type, range [0:PI]). More...
class  colvar::dihedral
 Colvar component: dihedral between the centers of mass of four groups (colvarvalue::type_scalar type, range [-PI:PI]). More...
class  colvar::coordnum
 Colvar component: coordination number between two groups (colvarvalue::type_scalar type, range [0:N1*N2]). More...
class  colvar::selfcoordnum
 Colvar component: self-coordination number within a group (colvarvalue::type_scalar type, range [0:N*(N-1)/2]). More...
class  colvar::h_bond
 Colvar component: hydrogen bond, defined as the product of a colvar::coordnum and 1/2*(1-cos((180-ang)/ang_tol)) (colvarvalue::type_scalar type, range [0:1]). More...
class  colvar::alpha_angles
 Colvar component: alpha helix content of a contiguous segment of 5 or more residues, implemented as a sum of phi/psi dihedral angles and hydrogen bonds (colvarvalue::type_scalar type, range [0:1]) Colvar component: alpha helix content of a contiguous segment of 5 or more residues, implemented as a sum of Ca-Ca-Ca angles and hydrogen bonds (colvarvalue::type_scalar type, range [0:1]). More...
class  colvar::dihedPC
 Colvar component: dihedPC Projection of the config onto a dihedral principal component See e.g. Altis et al., J. Chem. Phys 126, 244111 (2007) Based on a set of 'dihedral' cvcs. More...
class  colvar::orientation
 Colvar component: orientation in space of an atom group, with respect to a set of reference coordinates (colvarvalue::type_quaternion type, range [-1:1]x[-1:1]x[-1:1]x[-1:1]). More...
class  colvar::orientation_angle
 Colvar component: angle of rotation with respect to a set of reference coordinates (colvarvalue::type_scalar type, range [0:PI)). More...
class  colvar::tilt
 Colvar component: projection of the orientation vector onto a predefined axis (colvarvalue::type_scalar type, range [-1:1]). More...
class  colvar::spin_angle
 Colvar component: angle of rotation around a predefined axis (colvarvalue::type_scalar type, range [-PI:PI]). More...
class  colvar::rmsd
 Colvar component: root mean square deviation (RMSD) of a group with respect to a set of reference coordinates; uses to calculate the rotation matrix (colvarvalue::type_scalar type, range [0:*)). More...
class  colvar::logmsd
 Colvar component: mean square deviation (RMSD) of a group with respect to a set of reference coordinates; uses to calculate the rotation matrix (colvarvalue::type_scalar type, range [0:*)). More...

Defines

#define simple_scalar_dist_functions(TYPE)

Functions

 simple_scalar_dist_functions (distance) simple_scalar_dist_functions(distance_xy) simple_scalar_dist_functions(min_distance) simple_scalar_dist_functions(angle) simple_scalar_dist_functions(coordnum) simple_scalar_dist_functions(selfcoordnum) simple_scalar_dist_functions(h_bond) simple_scalar_dist_functions(gyration) simple_scalar_dist_functions(rmsd) simple_scalar_dist_functions(logmsd) simple_scalar_dist_functions(orientation_angle) simple_scalar_dist_functions(tilt) simple_scalar_dist_functions(eigenvector) simple_scalar_dist_functions(alpha_angles) simple_scalar_dist_functions(dihedPC) inline cvm


Define Documentation

#define simple_scalar_dist_functions TYPE   ) 
 

Value:

\
  inline cvm::real colvar::TYPE::dist2 (colvarvalue const &x1,          \
                                        colvarvalue const &x2) const    \
  {                                                                     \
    return std::pow (x1.real_value - x2.real_value, int (2));              \
  }                                                                     \
                                                                        \
  inline colvarvalue colvar::TYPE::dist2_lgrad (colvarvalue const &x1,  \
                                                colvarvalue const &x2) const \
  {                                                                     \
    return 2.0 * (x1.real_value - x2.real_value);                       \
  }                                                                     \
                                                                        \
  inline colvarvalue colvar::TYPE::dist2_rgrad (colvarvalue const &x1,  \
                                                colvarvalue const &x2) const \
  {                                                                     \
    return this->dist2_lgrad (x2, x1);                                  \
  }                                                                     \
                                                                        \
  inline cvm::real colvar::TYPE::compare (colvarvalue const &x1,        \
                                          colvarvalue const &x2) const  \
  {                                                                     \
    return this->dist2_lgrad (x1, x2);                                  \
  }                                                                     \
                                                                        \

Definition at line 1221 of file colvarcomp.h.


Function Documentation

simple_scalar_dist_functions distance   ) 
 

Definition at line 1248 of file colvarcomp.h.

References cvm, and colvarvalue::real_value.

01249          : distance_z has explicit functions, see below 
01250   simple_scalar_dist_functions (distance_xy)
01251   simple_scalar_dist_functions (min_distance)
01252   simple_scalar_dist_functions (angle)
01253   simple_scalar_dist_functions (coordnum)
01254   simple_scalar_dist_functions (selfcoordnum)
01255   simple_scalar_dist_functions (h_bond)
01256   simple_scalar_dist_functions (gyration)
01257   simple_scalar_dist_functions (rmsd)
01258   simple_scalar_dist_functions (logmsd)
01259   simple_scalar_dist_functions (orientation_angle)
01260   simple_scalar_dist_functions (tilt)
01261   simple_scalar_dist_functions (eigenvector)
01262   //  simple_scalar_dist_functions (alpha_dihedrals)
01263   simple_scalar_dist_functions (alpha_angles)
01264   simple_scalar_dist_functions (dihedPC)
01265 
01266 
01267 // Projected distance
01268 // Differences should always be wrapped around 0 (ignoring wrap_center)
01269 inline cvm::real colvar::distance_z::dist2 (colvarvalue const &x1,
01270                                             colvarvalue const &x2) const
01271 {
01272   cvm::real diff = x1.real_value - x2.real_value;
01273   if (period != 0.0) {
01274     cvm::real shift = std::floor (diff/period + 0.5);
01275     diff -= shift * period;
01276   }
01277   return diff * diff;
01278 }


Generated on Fri May 25 04:07:17 2012 for NAMD by  doxygen 1.3.9.1