28 #ifndef _chemistry_molecule_coor_h
29 #define _chemistry_molecule_coor_h
38 #include <math/scmat/matrix.h>
39 #include <math/optimize/transform.h>
40 #include <chemistry/molecule/molecule.h>
49 static double bohr_conv;
50 static double radian_conv;
81 virtual const char*
label()
const;
83 virtual double value()
const;
89 virtual const char*
ctype()
const = 0;
122 std::vector<double> coef_;
123 std::vector<Ref<IntCoor> > coor_;
156 const char*
ctype()
const;
191 std::vector<Ref<IntCoor> > coor_;
256 double linear_bend_thres_;
257 double linear_tors_thres_;
258 double radius_scale_factor_;
260 void init_constants();
262 double cos_ijk(
Molecule& m,
int i,
int j,
int k);
264 int nearest_contact(
int i,
Molecule& m);
380 virtual void print_simples(std::ostream& =
ExEnv::out0())
const = 0;
453 int*& is_totally_symmetric);
481 int only_totally_symmetric_;
482 double symmetry_tolerance_;
483 double simple_tolerance_;
484 double coordinate_tolerance_;
485 double cartesian_tolerance_;
494 int given_fixed_values_;
499 int max_update_steps_;
500 double max_update_disp_;
513 int form_print_simples_;
514 int form_print_variable_;
515 int form_print_constant_;
516 int form_print_molecule_;
650 virtual void print_simples(std::ostream& =
ExEnv::out0())
const;
651 virtual void print_variable(std::ostream& =
ExEnv::out0())
const;
652 virtual void print_constant(std::ostream& =
ExEnv::out0())
const;
671 int change_coordinates_;
673 int transform_hessian_;
778 virtual void print_simples(std::ostream& =
ExEnv::out0())
const;
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
virtual int all_to_internal(const Ref< Molecule > &, RefSCVector &internal)
Like to_internal(), except all internal coordinates are considered, not just the variable ones.
virtual void init()
Initializes the dimensions.
RefSymmSCMatrix inverse_hessian(RefSymmSCMatrix &)
Given an Hessian, return the inverse of that hessian.
The SetIntCoor class describes a set of internal coordinates.
Definition: coor.h:189
virtual void update_value(const Ref< Molecule > &)=0
Recalculate the value of the coordinate.
RefSymmSCMatrix inverse_hessian(RefSymmSCMatrix &)
Invert the hessian.
void clear()
Removes all coordinates from the set.
virtual void bmat(const Ref< Molecule > &, RefSCMatrix &)
Compute the B matrix the old-fashioned way.
The RedundMolecularCoor class provides a redundant set of simple internal coordinates.
Definition: coor.h:724
double force_constant(Ref< Molecule > &)
Returns the weighted sum of the individual force constants.
Definition: bitarray.h:68
virtual const char * ctype() const =0
Returns a string representation of the type of coordinate this is.
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:261
The Molecule class contains information about molecules.
Definition: molecule.h:127
virtual int to_internal(RefSCVector &internal)
Fill in the vector `‘internal’' with the current internal coordinates.
void guess_hessian(RefSymmSCMatrix &hessian)
Calculate an approximate hessian and place the result in `‘hessian’'.
void add(Ref< IntCoor > &, double coef)
Add a coordinate to the linear combination.
RefSymmSCMatrix inverse_hessian(RefSymmSCMatrix &)
Invert the hessian.
int n() const
Returns the number of coordinates in the set.
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
int to_cartesian(const RefSCVector &internal)
Given a set of displaced internal coordinates, update the cartesian coordinates of the Molecule conta...
virtual void update_values(const Ref< Molecule > &)
Recalculate the values of the internal coordinates in the set.
void pop()
Removes the last coordinate from this set.
A template class that maintains references counts.
Definition: ref.h:332
SumIntCoor is used to construct linear combinations of internal coordinates.
Definition: coor.h:120
const char * ctype() const
Always returns `‘SUM’'.
virtual RefSCDimension dim()=0
Returns a smart reference to an SCDimension equal to the number of coordinates (be they Cartesian,...
virtual void guess_hessian(RefSymmSCMatrix &hessian)=0
Calculate an approximate hessian and place the result in `‘hessian’'.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void print(std::ostream &=ExEnv::out0()) const
Print the coordinate.
void guess_hessian(RefSymmSCMatrix &hessian)
Form the approximate hessian.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void init()
This is called by the constructors of classes derived from IntMolecularCoor.
int nconstrained()
Returns the number of constrained coordinates.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
virtual void new_coords()
Allocates memory for the SetIntCoor's used to store the simple and internal coordinates.
virtual double preferred_value() const
Returns the value of the coordinate in more familiar units.
Restores objects that derive from SavableState.
Definition: statein.h:70
void save_data_state(StateOut &)
Standard member.
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:156
virtual RefSymmSCMatrix inverse_hessian(RefSymmSCMatrix &)=0
Given an Hessian, return the inverse of that hessian.
void print_details(const Ref< Molecule > &, std::ostream &=ExEnv::out0()) const
Print the individual coordinates in the sum with their coefficients.
virtual void print_details(const Ref< Molecule > &, std::ostream &=ExEnv::out0()) const
Print the coordinates in the set.
virtual const char * label() const
Returns the string containing the label for the internal coordinate.
double preferred_value() const
Returns the value of the coordinate in a.u. and radians.
virtual void print(std::ostream &o=ExEnv::out0()) const
Print information about the coordinate.
void form_coordinates(int keep_variable=0)
Actually form the variable and constant internal coordinates from the simple internal coordinates.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
IntCoorGen generates a set of simple internal coordinates for a molecule.
Definition: coor.h:245
virtual RefSCDimension dim()
These implement the virtual functions inherited from MolecularCoor.
void guess_hessian(RefSymmSCMatrix &hessian)
Form the approximate hessian.
int n()
Returns the number of coordinates in this linear combination.
virtual int to_internal(RefSCVector &internal)=0
Fill in the vector `‘internal’' with the current internal coordinates.
The IntMolecularCoor abstract class describes a molecule's coordinates in terms of internal coordinat...
Definition: coor.h:445
virtual RefSCDimension dim()
These implement the virtual functions inherited from MolecularCoor.
virtual void read_keyval(const Ref< KeyVal > &)
Reads the KeyVal input.
virtual double force_constant(Ref< Molecule > &)=0
Returns the value of the force constant associated with this coordinate.
Ref< IntCoor > coor(int i) const
Returns a reference to the i'th coordinate in the set.
virtual int all_to_cartesian(const Ref< Molecule > &, RefSCVector &internal)
Like to_cartesians(), except all internal coordinates are considered, not just the variable ones.
virtual void bmat(const Ref< Molecule > &, RefSCVector &bmat, double coef=1.0)=0
Fill in a row the the B matrix.
virtual int nconstrained()
Returns the number of constrained coordinates.
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition: matrix.h:55
void form_coordinates(int keep_variable=0)
Actually form the variable and constant internal coordinates from simple internal coordinates.
Serializes objects that derive from SavableState.
Definition: stateout.h:61
virtual void guess_hessian(Ref< Molecule > &, RefSymmSCMatrix &)
Create an approximate Hessian for this set of coordinates.
Ref< Molecule > molecule() const
Returns the molecule.
Definition: coor.h:376
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
virtual void print(std::ostream &out=ExEnv::out0()) const
Print out information about this.
The MolecularCoor abstract class describes the coordinate system used to describe a molecule.
Definition: coor.h:338
virtual int to_internal(RefSCVector &internal)
Fill in the vector `‘internal’' with the current internal coordinates.
void normalize()
This function normalizes all the coefficients.
IntCoorGen(const Ref< Molecule > &, int nextra=0, int *extra=0)
Create an IntCoorGen given a Molecule and, optionally, extra bonds.
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
RefSCDimension dim_natom3()
Returns a smart reference to an SCDimension equal to the number of atoms in the molecule times 3.
Definition: coor.h:373
virtual void print(std::ostream &=ExEnv::out0()) const =0
Print the coordinate.
virtual Ref< NonlinearTransform > change_coordinates()
When this is called, MoleculeCoor may select a new internal coordinate system and return a transform ...
Base class for objects that can save/restore state.
Definition: state.h:46
virtual void print(std::ostream &=ExEnv::out0()) const
Print the coordinate.
void add(const Ref< IntCoor > &)
Adds an internal coordinate to the set.
virtual void values_to_vector(const RefSCVector &)
Copy the values of the internal coordinates to a vector.
virtual int equivalent(Ref< IntCoor > &)=0
Test to see if this internal coordinate is equivalent to that one.
virtual void generate(const Ref< SetIntCoor > &)
This generates a set of internal coordinates.
The SymmMolecularCoor class derives from IntMolecularCoor.
Definition: coor.h:667
The CartMolecularCoor class implements Cartesian coordinates in a way suitable for use in geometry op...
Definition: coor.h:751
virtual void init()
This is called by the constructors of classes derived from IntMolecularCoor.
int equivalent(Ref< IntCoor > &)
Always returns 0.
void update_value(const Ref< Molecule > &)
Recalculate the value of the coordinate.
Ref< NonlinearTransform > change_coordinates()
This overrides MoleculeCoor's change_coordinates and might transform to a new set of coordinates.
virtual void print(std::ostream &=ExEnv::out0()) const
Print the coordinate.
virtual double value() const
Returns the value of the coordinate in atomic units or radians.
virtual void set_value(double)
Sets the value of the coordinate in atomic units or radians.
void bmat(const Ref< Molecule > &, RefSCVector &bmat, double coef=1.0)
Fill in a row the the B matrix.
virtual void form_coordinates(int keep_variable=0)=0
Actually form the variable and constant internal coordinates from the simple internal coordinates.
virtual void fd_bmat(const Ref< Molecule > &, RefSCMatrix &)
Compute the B matrix by finite displacements.
Generated at Sun Jan 26 2020 23:33:03 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.