MPQC  2.3.1
hess.h
1 //
2 // hess.h
3 //
4 // Copyright (C) 1997 Limit Point Systems, Inc.
5 //
6 // Author: Curtis Janssen <cljanss@limitpt.com>
7 // Maintainer: LPS
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 // The U.S. Government is granted a limited license as per AL 91-7.
26 //
27 
28 #ifndef _chemistry_molecule_hess_h
29 #define _chemistry_molecule_hess_h
30 
31 #ifdef __GNUC__
32 #pragma interface
33 #endif
34 
35 #include <iostream>
36 
37 #include <chemistry/molecule/molecule.h>
38 #include <chemistry/molecule/coor.h>
39 
40 namespace sc {
41 
42 class MolecularEnergy;
43 
47 class MolecularHessian: virtual public SavableState {
48  protected:
49  Ref<Molecule> mol_;
50  RefSCDimension d3natom_;
51  Ref<SCMatrixKit> matrixkit_;
52  public:
67 
68  RefSCDimension d3natom();
69  Ref<SCMatrixKit> matrixkit() const { return matrixkit_; }
70 
72  virtual RefSymmSCMatrix cartesian_hessian() = 0;
73 
77  virtual void set_energy(const Ref<MolecularEnergy> &energy);
80  virtual MolecularEnergy* energy() const;
81 
85  Ref<PointGroup> pg = 0,
86  Ref<SCMatrixKit> kit = 0);
87 
89  static void write_cartesian_hessian(const char *filename,
90  const Ref<Molecule> &m,
91  const RefSymmSCMatrix &hess);
92 
94  static void read_cartesian_hessian(const char *filename,
95  const Ref<Molecule> &m,
96  const RefSymmSCMatrix &hess);
97 };
98 
99 
103  protected:
104  char *filename_;
105  public:
122  void save_data_state(StateOut&);
123 
126 };
127 
131  protected:
132  Ref<MolecularCoor> coor_;
133  public:
151  void save_data_state(StateOut&);
152 
155 };
156 
160  protected:
161  double diag_;
162  public:
178  void save_data_state(StateOut&);
179 
182 };
183 
184 }
185 
186 #endif
187 
188 // Local Variables:
189 // mode: c++
190 // c-file-style: "CLJ"
191 // End:
sc::GuessMolecularHessian::GuessMolecularHessian
GuessMolecularHessian(const Ref< KeyVal > &)
The GuessMolecularHessian KeyVal constructor is used to generate a GuessMolecularHessian object from ...
sc::DiagMolecularHessian::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::DiagMolecularHessian::cartesian_hessian
RefSymmSCMatrix cartesian_hessian()
Return the hessian in cartesian coordinates.
sc::RefSymmSCMatrix
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:261
sc::MolecularHessian::write_cartesian_hessian
static void write_cartesian_hessian(const char *filename, const Ref< Molecule > &m, const RefSymmSCMatrix &hess)
Write the hessian in a simple text format.
sc::ReadMolecularHessian::cartesian_hessian
RefSymmSCMatrix cartesian_hessian()
Return the hessian in cartesian coordinates.
sc::RefSCMatrix
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
sc::Ref
A template class that maintains references counts.
Definition: ref.h:332
sc::MolecularHessian::read_cartesian_hessian
static void read_cartesian_hessian(const char *filename, const Ref< Molecule > &m, const RefSymmSCMatrix &hess)
Read the hessian from a simple text format.
sc::MolecularHessian::cartesian_to_symmetry
static RefSCMatrix cartesian_to_symmetry(const Ref< Molecule > &m, Ref< PointGroup > pg=0, Ref< SCMatrixKit > kit=0)
Find transformation matrix from cartesian to symmetry coordinates.
sc::MolecularHessian::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::MolecularHessian
MolecularHessian is an abstract class that computes a molecule's second derivatives of the energy wit...
Definition: hess.h:47
sc::DiagMolecularHessian::DiagMolecularHessian
DiagMolecularHessian(const Ref< KeyVal > &)
The DiagMolecularHessian KeyVal constructor is used to generate a DiagMolecularHessian object from th...
sc::StateIn
Restores objects that derive from SavableState.
Definition: statein.h:70
sc::RefSCDimension
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:156
sc::MolecularHessian::energy
virtual MolecularEnergy * energy() const
This returns a MolecularEnergy object, if used by this specialization.
sc::MolecularEnergy
The MolecularEnergy abstract class inherits from the Function class.
Definition: energy.h:48
sc::ReadMolecularHessian::ReadMolecularHessian
ReadMolecularHessian(const Ref< KeyVal > &)
The ReadMolecularHessian KeyVal constructor is used to generate a ReadMolecularHessian object from th...
sc::MolecularHessian::set_energy
virtual void set_energy(const Ref< MolecularEnergy > &energy)
Some MolecularHessian specializations require a molecular energy object.
sc::GuessMolecularHessian::cartesian_hessian
RefSymmSCMatrix cartesian_hessian()
Return the hessian in cartesian coordinates.
sc::StateOut
Serializes objects that derive from SavableState.
Definition: stateout.h:61
sc::DiagMolecularHessian
DiagMolecularHessian is an implementation of MolecularHessian that returns a hessian that is a diagon...
Definition: hess.h:159
sc::ReadMolecularHessian::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::MolecularHessian::cartesian_hessian
virtual RefSymmSCMatrix cartesian_hessian()=0
Return the cartesian hessian.
sc::SavableState
Base class for objects that can save/restore state.
Definition: state.h:46
sc::GuessMolecularHessian
GuessMolecularHessian is an implementation of MolecularHessian that estimates the hessian based on th...
Definition: hess.h:130
sc::GuessMolecularHessian::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::ReadMolecularHessian
ReadMolecularHessian is an implementation of MolecularHessian that reads the hessian from a file.
Definition: hess.h:102

Generated at Sun Jan 26 2020 23:33:03 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.