22 #ifndef _intco_simple_h
23 #define _intco_simple_h
32 #include <util/class/class.h>
33 #include <util/state/state.h>
34 #include <util/keyval/keyval.h>
35 #include <chemistry/molecule/molecule.h>
36 #include <chemistry/molecule/coor.h>
38 #include <math/scmat/vector3.h>
142 #define SimpleCo_DECLARE(classname) \
144 virtual classname& operator=(const classname&); \
145 SimpleCo& operator=(const SimpleCo&); \
146 double calc_force_con(Molecule&); \
147 double calc_intco(Molecule&, double* =0, double =1); \
148 classname(StateIn&); \
149 void save_data_state(StateOut&)
151 #define SimpleCo_IMPL_eq(classname) \
152 SimpleCo& classname::operator=(const SimpleCo& c) \
154 classname *cp = dynamic_cast<classname*>((SimpleCo*)&c); \
166 #define SimpleCo_IMPL_StateIn(classname) \
167 classname::classname(StateIn&si): \
172 #define SimpleCo_IMPL_save_data_state(classname) \
173 void classname::save_data_state(StateOut&so) \
175 SimpleCo::save_data_state(so); \
178 #define SimpleCo_IMPL(classname) \
179 SimpleCo_IMPL_eq(classname) \
180 SimpleCo_IMPL_StateIn(classname) \
181 SimpleCo_IMPL_save_data_state(classname)
223 static const double rtd = 180.0/M_PI;
The BendSimpleCo class describes an bend internal coordinate of a molecule.
Definition: simple.h:238
double preferred_value() const
Returns the value of the angle abc in degrees.
const char * ctype() const
Always returns the string "BEND".
BendSimpleCo(const Ref< KeyVal > &)
The KeyVal constructor.
double degrees() const
Returns the value of the angle abc in degrees.
BendSimpleCo(const char *, int, int, int)
This constructor takes a string containing a label, and three integers a, b, and c which give the ind...
double radians() const
Returns the value of the angle abc in radians.
static std::ostream & out0()
Return an ostream that writes from node 0.
The IntCoor abstract class describes an internal coordinate of a molecule.
Definition: coor.h:46
The LinIPSimpleCo class describes an in-plane component of a linear bend internal coordinate of a mol...
Definition: simple.h:459
LinIPSimpleCo(const Ref< KeyVal > &)
The KeyVal constructor.
const char * ctype() const
Always returns the string "LINIP".
double radians() const
Returns the value of the angle abc in radians.
double degrees() const
Returns the value of the angle abc in degrees.
double preferred_value() const
Returns the value of the angle abc in degrees.
LinIPSimpleCo(const char *refr, int, int, int, const SCVector3 &u)
This constructor takes a string containing a label, and three integers a, b, and d which give the ind...
The LinOPSimpleCo class describes an out-of-plane component of a linear bend internal coordinate of a...
Definition: simple.h:517
double degrees() const
Returns the value of the angle abc in degrees.
double preferred_value() const
Returns the value of the angle abc in degrees.
LinOPSimpleCo(const Ref< KeyVal > &)
The KeyVal constructor.
const char * ctype() const
Always returns the string "LINIP".
LinOPSimpleCo(const char *refr, int, int, int, const SCVector3 &u)
This constructor takes a string containing a label, and three integers a, b, and c which give the ind...
double radians() const
Returns the value of the angle abc in radians.
The Molecule class contains information about molecules.
Definition: molecule.h:128
double degrees() const
Returns the value of the angle abc in degrees.
OutSimpleCo(const Ref< KeyVal > &)
The KeyVal constructor.
const char * ctype() const
Always returns the string "OUT".
double radians() const
Returns the value of the angle abc in radians.
OutSimpleCo(const char *refr, int, int, int, int)
This constructor takes a string containing a label, and four integers a, b, c, and d which give the i...
double preferred_value() const
Returns the value of the angle abc in degrees.
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition: matrix.h:55
A template class that maintains references counts.
Definition: ref.h:332
The SimpleCo abstract class describes a simple internal coordinate of a molecule.
Definition: simple.h:83
virtual double calc_intco(Molecule &, double *=0, double=1)=0
Calculate the value of the coordinate based on what's in Molecule.
double force_constant(Ref< Molecule > &)
Returns an approximate force constant (a la Almlof).
void update_value(const Ref< Molecule > &)
Recalculates the value of the coordinate based on the geometry in the Molecule.
SimpleCo(int, const char *=0)
This constructor takes an integer argument which is the number of atoms needed to describe the coordi...
void print_details(const Ref< Molecule > &, std::ostream &=ExEnv::out0()) const
Print the coordinate.
SimpleCo(const Ref< KeyVal > &, int natom)
The KeyVal constructor requires the number of atoms.
void bmat(const Ref< Molecule > &, RefSCVector &bmat, double coef=1.0)
Fill in a row of the B matrix.
virtual double calc_force_con(Molecule &)=0
Calculates an approximate force constant and returns it's value.
int natoms() const
Returns the number of atoms in the coordinate.
int operator[](int i) const
Returns the index of the i'th atom in the coordinate.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
int equivalent(Ref< IntCoor > &)
Tests to see if two coordinates are equivalent to each other.
Restores objects that derive from SavableState.
Definition: statein.h:70
Serializes objects that derive from SavableState.
Definition: stateout.h:61
The StreSimpleCo class describes an stretch internal coordinate of a molecule.
Definition: simple.h:193
const char * ctype() const
Always returns the string "STRE".
double bohr() const
Returns the distance between the two atoms in atomic units.
StreSimpleCo(const char *, int, int)
This constructor takes a string containing a label, and two integers which are the indices of the ato...
StreSimpleCo(const Ref< KeyVal > &)
The KeyVal constructor.
double angstrom() const
Returns the distance between the two atoms in angstrom units.
double preferred_value() const
Returns the distance between the two atoms in angstrom units.