MPQC 2.3.1
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#ifdef __GNUC__
29#pragma interface
30#endif
31
32#ifndef _chemistry_molecule_molfreq_h
33#define _chemistry_molecule_molfreq_h
34
35#include <iostream>
36#include <math/scmat/matrix.h>
37#include <util/render/animate.h>
38#include <chemistry/molecule/energy.h>
39#include <chemistry/molecule/molrender.h>
40#include <chemistry/molecule/coor.h>
41
42namespace sc {
43
44class MolFreqAnimate;
45
49 private:
50 Ref<Molecule> mol_;
52 int debug_;
53 int nirrep_;
54 // the number of frequencies per irrep
55 int *nfreq_;
56 // the frequencies for each irrep
57 double **freq_;
58
60 Ref<SCMatrixKit> symkit_;
61
62 // the symmetry blocked dimension for internal motions
63 RefSCDimension disym_;
64 // the cartesian dimension
65 RefSCDimension d3natom_;
66 // the blocked cartesian dimension
67 RefSCDimension bd3natom_;
68 // the normal coordinates
69 RefSCMatrix normco_;
70
71 void do_freq_for_irrep(int irrep,
72 const RefDiagSCMatrix &m,
73 const RefSymmSCMatrix &dhessian,
74 const RefSCMatrix &dtranst);
75 public:
106
108 Ref<Molecule> molecule() const { return mol_; }
109
112
114 int nirrep() const { return nirrep_; }
115
118 int nfreq(int irrep) const { return nfreq_[irrep]; }
119
122 double freq(int irrep, int i) const { return freq_[irrep][i]; }
123
126 RefSCMatrix normal_coordinates() { return normco_; }
127
130 void thermochemistry(int degeneracy, double temp=298.15, double pres=1.0);
131
132 void animate(const Ref<Render>&, const Ref<MolFreqAnimate>&);
133
134 Ref<SCMatrixKit> matrixkit() { return kit_; }
135 Ref<SCMatrixKit> symmatrixkit() { return symkit_; }
136};
137
138
139
141 private:
142 Ref<RenderedMolecule> renmol_;
144 Ref<MolecularEnergy> dependent_mole_;
145 int irrep_;
146 int mode_;
147 int nframe_;
148 double disp_;
149 public:
151 virtual ~MolFreqAnimate();
152
153 void set_mode(int i, int j) { irrep_ = i; mode_ = j; }
154 int nobject();
155 Ref<RenderedObject> object(int iobject);
156};
157
158}
159
160#endif
161
162// Local Variables:
163// mode: c++
164// c-file-style: "CLJ"
165// End:
Definition animate.h:39
Definition molfreq.h:140
The MolecularFrequencies class is used to compute the molecular frequencies and thermodynamic informa...
Definition molfreq.h:48
Ref< Molecule > molecule() const
Return the molecule.
Definition molfreq.h:108
RefSCMatrix normal_coordinates()
This returns the normal coordinates generated by compute_frequencies.
Definition molfreq.h:126
double freq(int irrep, int i) const
Returns the frequency, given the irrep and the index.
Definition molfreq.h:122
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 thermochemistry(int degeneracy, double temp=298.15, double pres=1.0)
Computes thermochemical information using information generated by calling compute_frequencies first.
MolecularFrequencies(const Ref< KeyVal > &)
The KeyVal constructor.
int nfreq(int irrep) const
Returns the number of modes in an irrep.
Definition molfreq.h:118
int nirrep() const
Returns the number if irreps.
Definition molfreq.h:114
void compute_frequencies(const RefSymmSCMatrix &xhessian)
Given a cartesian coordinate hessian, compute the frequencies.
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition matrix.h:380
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition dim.h:156
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition matrix.h:135
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition matrix.h:261
A template class that maintains references counts.
Definition ref.h:332
Base class for objects that can save/restore state.
Definition state.h:46
Restores objects that derive from SavableState.
Definition statein.h:70
Serializes objects that derive from SavableState.
Definition stateout.h:61

Generated at Thu Jan 25 2024 00:00:00 for MPQC 2.3.1 using the documentation package Doxygen 1.10.0.