MPQC 2.3.1

- Main Page
- Related Pages
- Classes
- Files

- File List

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:
53 MolecularHessian();
63 MolecularHessian(const Ref<KeyVal>&);
64 MolecularHessian(StateIn&);
65 ~MolecularHessian();
66 void save_data_state(StateOut&);
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
84 static RefSCMatrix cartesian_to_symmetry(const Ref<Molecule> &m,
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
102 class ReadMolecularHessian: public MolecularHessian {
103 protected:
104 char *filename_;
105 public:
119 ReadMolecularHessian(const Ref<KeyVal>&);
120 ReadMolecularHessian(StateIn&);
121 ~ReadMolecularHessian();
122 void save_data_state(StateOut&);
123
125 RefSymmSCMatrix cartesian_hessian();
126 };
127
130 class GuessMolecularHessian: public MolecularHessian {
131 protected:
132 Ref<MolecularCoor> coor_;
133 public:
148 GuessMolecularHessian(const Ref<KeyVal>&);
149 GuessMolecularHessian(StateIn&);
150 ~GuessMolecularHessian();
151 void save_data_state(StateOut&);
152
154 RefSymmSCMatrix cartesian_hessian();
155 };
156
159 class DiagMolecularHessian: public MolecularHessian {
160 protected:
161 double diag_;
162 public:
175 DiagMolecularHessian(const Ref<KeyVal>&);
176 DiagMolecularHessian(StateIn&);
177 ~DiagMolecularHessian();
178 void save_data_state(StateOut&);
179
181 RefSymmSCMatrix cartesian_hessian();
182 };
183
184 }
185
186 #endif
187
188 // Local Variables:
189 // mode: c++
190 // c-file-style: "CLJ"
191 // End: