MPQC  3.0.0-alpha
molfreq.h
1 //
2 // molfreq.h
3 //
4 // Copyright (C) 1996 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_molfreq_h
29 #define _chemistry_molecule_molfreq_h
30 
31 #include <iostream>
32 #include <math/scmat/matrix.h>
33 #include <util/render/animate.h>
34 #include <chemistry/molecule/energy.h>
35 #include <chemistry/molecule/molrender.h>
36 #include <chemistry/molecule/coor.h>
37 
38 namespace sc {
39 
40 class MolFreqAnimate;
41 
44 
48  private:
49  Ref<Molecule> mol_;
50  Ref<PointGroup> pg_;
51  int debug_;
52  int nirrep_;
53  // the number of frequencies per irrep
54  int *nfreq_;
55  // the frequencies for each irrep
56  double **freq_;
57 
58  Ref<SCMatrixKit> kit_;
59  Ref<SCMatrixKit> symkit_;
60 
61  // the symmetry blocked dimension for internal motions
62  RefSCDimension disym_;
63  // the cartesian dimension
64  RefSCDimension d3natom_;
65  // the blocked cartesian dimension
66  RefSCDimension bd3natom_;
67  // the normal coordinates
68  RefSCMatrix normco_;
69 
70  void do_freq_for_irrep(int irrep,
71  const RefDiagSCMatrix &m,
72  const RefSymmSCMatrix &dhessian,
73  const RefSCMatrix &dtranst);
74  public:
99 
101  Ref<Molecule> molecule() const { return mol_; }
102 
104  void compute_frequencies(const RefSymmSCMatrix &xhessian);
105 
107  int nirrep() const { return nirrep_; }
108 
111  int nfreq(int irrep) const { return nfreq_[irrep]; }
112 
115  double freq(int irrep, int i) const { return freq_[irrep][i]; }
116 
119  RefSCMatrix normal_coordinates() { return normco_; }
120 
123  void thermochemistry(int degeneracy, double temp=298.15, double pres=1.0);
124 
125  void animate(const Ref<Render>&, const Ref<MolFreqAnimate>&);
126 
127  Ref<SCMatrixKit> matrixkit() { return kit_; }
128  Ref<SCMatrixKit> symmatrixkit() { return symkit_; }
129 };
130 
131 
132 
134  private:
135  Ref<RenderedMolecule> renmol_;
136  Ref<MolecularFrequencies> molfreq_;
137  Ref<MolecularEnergy> dependent_mole_;
138  int irrep_;
139  int mode_;
140  int nframe_;
141  double disp_;
142  public:
143  MolFreqAnimate(const Ref<KeyVal> &);
144  virtual ~MolFreqAnimate();
145 
146  void set_mode(int i, int j) { irrep_ = i; mode_ = j; }
147  int nobject();
148  Ref<RenderedObject> object(int iobject);
149 };
150 
152 // end of addtogroup ChemistryMolecule
153 
154 }
155 
156 #endif
157 
158 // Local Variables:
159 // mode: c++
160 // c-file-style: "CLJ"
161 // End:
sc::RefSymmSCMatrix
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:265
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:361
sc::MolecularFrequencies
The MolecularFrequencies class is used to compute the molecular frequencies and thermodynamic informa...
Definition: molfreq.h:47
sc::MolFreqAnimate
Definition: molfreq.h:133
sc::RefDiagSCMatrix
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition: matrix.h:389
sc::MolecularFrequencies::nirrep
int nirrep() const
Returns the number if irreps.
Definition: molfreq.h:107
sc::MolecularFrequencies::normal_coordinates
RefSCMatrix normal_coordinates()
This returns the normal coordinates generated by compute_frequencies.
Definition: molfreq.h:119
sc::StateIn
Definition: statein.h:79
sc::RefSCDimension
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:152
sc::AnimatedObject
Definition: animate.h:35
sc::MolecularFrequencies::compute_frequencies
void compute_frequencies(const RefSymmSCMatrix &xhessian)
Given a cartesian coordinate hessian, compute the frequencies.
sc::MolecularFrequencies::thermochemistry
void thermochemistry(int degeneracy, double temp=298.15, double pres=1.0)
Computes thermochemical information using information generated by calling compute_frequencies first.
sc::MolecularFrequencies::nfreq
int nfreq(int irrep) const
Returns the number of modes in an irrep.
Definition: molfreq.h:111
sc::MolecularFrequencies::freq
double freq(int irrep, int i) const
Returns the frequency, given the irrep and the index.
Definition: molfreq.h:115
sc::MolecularFrequencies::MolecularFrequencies
MolecularFrequencies(const Ref< KeyVal > &)
The KeyVal constructor.
sc::StateOut
Definition: stateout.h:71
sc::SavableState
Base class for objects that can save/restore state.
Definition: state.h:45
sc::MolecularFrequencies::molecule
Ref< Molecule > molecule() const
Return the molecule.
Definition: molfreq.h:101
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
sc::MolecularFrequencies::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 ...

Generated at Sun Jan 26 2020 23:23:57 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.