Psi4
process.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 
29 #ifndef PROCESS_H_
30 #define PROCESS_H_
31 
32 #include <string>
33 #include <map>
34  #include "psi4/pragma.h"
35  PRAGMA_WARNING_PUSH
36  PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS
37  #include <memory>
40 #include "psi4/libmints/typedefs.h"
41 
42 namespace psi{
43 class Molecule;
44 class Wavefunction;
45 class PointGroup;
46 class Matrix;
47 class Vector;
48 
49 namespace efp {
50  class EFP;
51 }
52 
53 class Process
54 {
55 public:
57  {
58  std::map<std::string, std::string> environment_;
59  unsigned long int memory_;
60  int nthread_;
61 
62  std::shared_ptr<Molecule> molecule_;
64  std::shared_ptr<efp::EFP> efp_;
66  std::shared_ptr<Vector> frequencies_;
67  std::shared_ptr<PointGroup> parent_symmetry_;
68 
69  std::shared_ptr<Molecule> legacy_molecule_;
70  std::shared_ptr<Wavefunction> legacy_wavefunction_;
71  public:
72  void initialize();
73 
75  std::shared_ptr<PointGroup> parent_symmetry() { return parent_symmetry_; }
77  void set_parent_symmetry(std::shared_ptr<PointGroup> pg) { parent_symmetry_ = pg; }
78  const std::string& operator()(const std::string& key) const;
79  std::string operator()(const std::string& key);
80  const std::string set(const std::string& key, const std::string& value);
81 
83  void set_molecule(const std::shared_ptr<Molecule>& molecule);
85  std::shared_ptr<Molecule> molecule() const;
86 
87 
90  void set_legacy_molecule(const std::shared_ptr<Molecule>& molecule);
92  std::shared_ptr<Molecule> legacy_molecule() const;
93 
95  void set_legacy_wavefunction(const std::shared_ptr<Wavefunction>& wavefunction);
97  std::shared_ptr<Wavefunction> legacy_wavefunction() const;
98 
99 
101  void set_gradient(const SharedMatrix g) { gradient_ = g; }
103  SharedMatrix gradient() const { return gradient_; }
104 
106  void set_frequencies(const std::shared_ptr<Vector> f) { frequencies_ = f; }
108  std::shared_ptr<Vector> frequencies() const { return frequencies_; }
109 
111  void set_efp(const std::shared_ptr<psi::efp::EFP>& efp) { efp_ = efp; }
113  std::shared_ptr<psi::efp::EFP> get_efp() const { return efp_; }
114 
116  void set_efp_torque(const SharedMatrix g) { efp_torque_ = g; }
118  SharedMatrix efp_torque() const { return efp_torque_; }
119 
121  std::map<std::string, double> globals;
122 
124  std::map<std::string, std::shared_ptr<Matrix> > arrays;
125 
127  int get_n_threads() const;
128  void set_n_threads(int nthread);
129 
131  unsigned long int get_memory() const;
132  void set_memory(unsigned long int m);
133 
136  };
137 
139 
140  static Environment get_environment();
141 };
142 }
143 
144 
145 
146 #endif /* PROCESS_H_ */
std::map< std::string, std::shared_ptr< Matrix > > arrays
Map containing current arrays.
Definition: process.h:124
void set_n_threads(int nthread)
Definition: process.cc:86
std::shared_ptr< efp::EFP > efp_
Definition: process.h:64
std::shared_ptr< Molecule > molecule_
Definition: process.h:62
void set_efp_torque(const SharedMatrix g)
Set EFP gradient manually.
Definition: process.h:116
std::shared_ptr< Wavefunction > legacy_wavefunction() const
Get wavefunction.
Definition: process.cc:170
SharedMatrix gradient() const
Get gradient manually.
Definition: process.h:103
std::shared_ptr< PointGroup > parent_symmetry_
Definition: process.h:67
void set_memory(unsigned long int m)
Definition: process.cc:183
SharedMatrix gradient_
Definition: process.h:63
std::map< std::string, double > globals
Map containing current energies.
Definition: process.h:121
const std::string set(const std::string &key, const std::string &value)
Definition: process.cc:124
Definition: process.h:56
std::shared_ptr< Molecule > molecule() const
Return active molecule.
Definition: process.cc:150
Definition: process.h:53
static Environment get_environment()
Definition: process.cc:175
static Environment environment
Definition: process.h:138
void initialize()
Definition: process.cc:60
const std::string & operator()(const std::string &key) const
Definition: process.cc:102
std::shared_ptr< PointGroup > parent_symmetry()
The symmetry of the molecule, before any displacements have been made.
Definition: process.h:75
std::shared_ptr< Vector > frequencies_
Definition: process.h:66
void set_gradient(const SharedMatrix g)
Set gradient manually.
Definition: process.h:101
std::shared_ptr< Wavefunction > legacy_wavefunction_
Definition: process.h:70
PRAGMA_WARNING_PUSH PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS PRAGMA_WARNING_POP
Definition: integraliter.cc:43
std::shared_ptr< Vector > frequencies() const
Get frequencies manually.
Definition: process.h:108
void set_legacy_wavefunction(const std::shared_ptr< Wavefunction > &wavefunction)
Set wavefunction.
Definition: process.cc:165
void set_frequencies(const std::shared_ptr< Vector > f)
Set frequencies manually.
Definition: process.h:106
Definition: liboptions.h:360
Options options
&quot;Global&quot; liboptions object.
Definition: process.h:135
int nthread_
Definition: process.h:60
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
void set_efp(const std::shared_ptr< psi::efp::EFP > &efp)
Set EFP.
Definition: process.h:111
void set_parent_symmetry(std::shared_ptr< PointGroup > pg)
Set the &quot;parent&quot; symmetry.
Definition: process.h:77
std::shared_ptr< psi::efp::EFP > get_efp() const
Get EFP.
Definition: process.h:113
int get_n_threads() const
Number of threads per process.
Definition: process.cc:186
unsigned long int get_memory() const
Memory in bytes.
Definition: process.cc:180
void set_molecule(const std::shared_ptr< Molecule > &molecule)
Set active molecule.
Definition: process.cc:145
std::shared_ptr< Molecule > legacy_molecule_
Definition: process.h:69
std::shared_ptr< Molecule > legacy_molecule() const
Return active molecule.
Definition: process.cc:160
SharedMatrix efp_torque_
Definition: process.h:65
SharedMatrix efp_torque() const
Get EFP gradient manually.
Definition: process.h:118
std::map< std::string, std::string > environment_
Definition: process.h:58
void set_legacy_molecule(const std::shared_ptr< Molecule > &molecule)
Definition: process.cc:155
unsigned long int memory_
Definition: process.h:59