Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

hess.h

00001 //
00002 // hess.h
00003 //
00004 // Copyright (C) 1997 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifndef _chemistry_molecule_hess_h
00029 #define _chemistry_molecule_hess_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <iostream>
00036 
00037 #include <chemistry/molecule/molecule.h>
00038 #include <chemistry/molecule/coor.h>
00039 
00040 class MolecularEnergy;
00041 
00042 class MolecularHessian: virtual public SavableState {
00043   protected:
00044     Ref<Molecule> mol_;
00045     RefSCDimension d3natom_;
00046     Ref<SCMatrixKit> matrixkit_;
00047   public:
00048     MolecularHessian();
00049     MolecularHessian(const Ref<KeyVal>&);
00050     MolecularHessian(StateIn&);
00051     ~MolecularHessian();
00052     void save_data_state(StateOut&);
00053 
00054     RefSCDimension d3natom();
00055     Ref<SCMatrixKit> matrixkit() const { return matrixkit_; }
00056 
00057     // Return the cartesian hessian.
00058     virtual RefSymmSCMatrix cartesian_hessian() = 0;
00059 
00060     // Some MolecularHessian specializations require a molecular
00061     //energy object.  The default implementations of these ignore
00062     //the argument or return null.
00063     virtual void set_energy(const Ref<MolecularEnergy> &energy);
00064     virtual MolecularEnergy* energy() const;
00065 
00066     // Find transformation matrix from cartesian to symmetry
00067     // coordinates.
00068     static RefSCMatrix cartesian_to_symmetry(const Ref<Molecule> &m,
00069                                              Ref<PointGroup> pg = 0,
00070                                              Ref<SCMatrixKit> kit = 0);
00071 
00073     static void write_cartesian_hessian(const char *filename,
00074                                         const Ref<Molecule> &m,
00075                                         const RefSymmSCMatrix &hess);
00076 
00078     static void read_cartesian_hessian(const char *filename,
00079                                        const Ref<Molecule> &m,
00080                                        const RefSymmSCMatrix &hess);
00081 };
00082 
00083 
00084 class ReadMolecularHessian: public MolecularHessian {
00085   protected:
00086     char *filename_;
00087   public:
00088     ReadMolecularHessian(const Ref<KeyVal>&);
00089     ReadMolecularHessian(StateIn&);
00090     ~ReadMolecularHessian();
00091     void save_data_state(StateOut&);
00092 
00093     RefSymmSCMatrix cartesian_hessian();
00094 };
00095 
00096 class GuessMolecularHessian: public MolecularHessian {
00097   protected:
00098     Ref<MolecularCoor> coor_;
00099   public:
00100     GuessMolecularHessian(const Ref<KeyVal>&);
00101     GuessMolecularHessian(StateIn&);
00102     ~GuessMolecularHessian();
00103     void save_data_state(StateOut&);
00104 
00105     RefSymmSCMatrix cartesian_hessian();
00106 };
00107 
00108 class DiagMolecularHessian: public MolecularHessian {
00109   protected:
00110     double diag_;
00111   public:
00112     DiagMolecularHessian(const Ref<KeyVal>&);
00113     DiagMolecularHessian(StateIn&);
00114     ~DiagMolecularHessian();
00115     void save_data_state(StateOut&);
00116 
00117     RefSymmSCMatrix cartesian_hessian();
00118 };
00119 
00120 #endif
00121 
00122 // Local Variables:
00123 // mode: c++
00124 // c-file-style: "CLJ"
00125 // End:

Generated at Thu Oct 4 18:08:44 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.