Psi4
oofp.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
34 #ifndef _opt_oofp_h_
35 #define _opt_oofp_h_
36 
37 #include "simple_base.h"
38 
39 namespace opt {
40 
41 class OOFP : public SIMPLE_COORDINATE {
42 
43  private:
44  int near_180;
45  // +1 if positive and approaching 180
46  // -1 if negative and approaching -180
47  // 0 otherwise
48 
49  public:
50 
51  OOFP(int A_in, int B_in, int C_in, int D_in, bool freeze_in=false);
52 
53  ~OOFP() { } // also calls ~SIMPLE_COORDINATE
54 
55  double value(GeomType geom) const;
56 
57  // compute and return array of first derivative (B marix elements)
58  double ** DqDx(GeomType geom) const;
59 
60  // compute and return array of second derivative (B' matrix elements)
61  double ** Dq2Dx2(GeomType geom) const;
62 
63  void print(std::string psi_fp, FILE *qc_fp, GeomType geom, int atom_offset=0) const;
64  void print_intco_dat(std::string psi_fp, FILE *qc_fp, int atom_offset=0) const;
65  void print_s(std::string psi_fp, FILE *qc_fp, GeomType geom) const;
66  void print_disp(std::string psi_fp, FILE *qc_fp, const double old_q, const double f_q,
67  const double dq, const double new_q, int atom_offset=0) const;
68  bool operator==(const SIMPLE_COORDINATE & s2) const;
69  std::string get_definition_string(int atom_offset=0) const;
70 
71  void fix_oofp_near_180(GeomType geom);
72 };
73 
74 }
75 
76 #endif
const double *const *const GeomType
Definition: simple_base.h:45
void fix_oofp_near_180(GeomType geom)
Definition: oofp.cc:78
OOFP(int A_in, int B_in, int C_in, int D_in, bool freeze_in=false)
Definition: oofp.cc:59
double ** DqDx(GeomType geom) const
Definition: oofp.cc:169
simple internal coordinate base class
void print_intco_dat(std::string psi_fp, FILE *qc_fp, int atom_offset=0) const
Definition: oofp.cc:432
void print_s(std::string psi_fp, FILE *qc_fp, GeomType geom) const
Definition: oofp.cc:445
Definition: simple_base.h:47
void print_disp(std::string psi_fp, FILE *qc_fp, const double old_q, const double f_q, const double dq, const double new_q, int atom_offset=0) const
Definition: oofp.cc:421
double value(GeomType geom) const
Definition: oofp.cc:90
void print(std::string psi_fp, FILE *qc_fp, GeomType geom, int atom_offset=0) const
Definition: oofp.cc:402
int near_180
Definition: oofp.h:44
std::string get_definition_string(int atom_offset=0) const
Definition: oofp.cc:414
bool operator==(const SIMPLE_COORDINATE &s2) const
Definition: oofp.cc:456
Definition: oofp.h:41
~OOFP()
Definition: oofp.h:53
double ** Dq2Dx2(GeomType geom) const
Definition: oofp.cc:305