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-2018 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"
42 
43 namespace psi {
44 class Molecule;
45 class Wavefunction;
46 class PointGroup;
47 class Matrix;
48 class Vector;
49 
51  public:
53  std::map<std::string, std::string> environment_;
54  size_t memory_;
55  int nthread_;
56  std::string datadir_;
57 
58  std::shared_ptr<Molecule> molecule_;
60  std::shared_ptr<PointGroup> parent_symmetry_;
61 
62  std::shared_ptr<Molecule> legacy_molecule_;
63  std::shared_ptr<Wavefunction> legacy_wavefunction_;
64 
65  public:
66  void initialize();
67 
69  std::shared_ptr<PointGroup> parent_symmetry() { return parent_symmetry_; }
71  void set_parent_symmetry(std::shared_ptr<PointGroup> pg) { parent_symmetry_ = pg; }
72 
74  void set_molecule(const std::shared_ptr<Molecule>& molecule);
76  std::shared_ptr<Molecule> molecule() const;
77 
80  void set_legacy_molecule(const std::shared_ptr<Molecule>& molecule);
82  std::shared_ptr<Molecule> legacy_molecule() const;
83 
85  void set_legacy_wavefunction(const std::shared_ptr<Wavefunction>& wavefunction);
87  std::shared_ptr<Wavefunction> legacy_wavefunction() const;
88 
90  void set_gradient(const SharedMatrix g) { gradient_ = g; }
92  SharedMatrix gradient() const { return gradient_; }
93 
95  std::map<std::string, double> globals;
96 
98  std::map<std::string, std::shared_ptr<Matrix> > arrays;
99 
101  int get_n_threads() const;
102  void set_n_threads(int nthread);
103 
105  size_t get_memory() const;
106  void set_memory(size_t m);
107 
109  std::string get_datadir() const { return datadir_; }
110  void set_datadir(const std::string pdd) { datadir_ = pdd; }
111 
114  };
115 
117 
118  static Environment get_environment();
119 };
120 }
121 
122 #endif /* PROCESS_H_ */
std::map< std::string, std::shared_ptr< Matrix > > arrays
Map containing current arrays.
Definition: process.h:98
std::shared_ptr< Molecule > molecule_
Definition: process.h:58
SharedMatrix gradient() const
Get gradient manually.
Definition: process.h:92
std::shared_ptr< PointGroup > parent_symmetry_
Definition: process.h:60
void set_datadir(const std::string pdd)
Definition: process.h:110
std::string datadir_
Definition: process.h:56
SharedMatrix gradient_
Definition: process.h:59
std::map< std::string, double > globals
Map containing current energies.
Definition: process.h:95
Definition: process.h:52
Definition: process.h:50
static Environment environment
Definition: process.h:116
std::shared_ptr< PointGroup > parent_symmetry()
The symmetry of the molecule, before any displacements have been made.
Definition: process.h:69
void set_gradient(const SharedMatrix g)
Set gradient manually.
Definition: process.h:90
std::shared_ptr< Wavefunction > legacy_wavefunction_
Definition: process.h:63
PRAGMA_WARNING_PUSH PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS PRAGMA_WARNING_POP
Definition: integraliter.cc:43
std::shared_ptr< Molecule > molecule
Definition: dx_write.cc:58
Definition: liboptions.h:353
Options options
&quot;Global&quot; liboptions object.
Definition: process.h:113
int nthread_
Definition: process.h:55
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
void set_parent_symmetry(std::shared_ptr< PointGroup > pg)
Set the &quot;parent&quot; symmetry.
Definition: process.h:71
#define PSI_API
Definition: pragma.h:155
size_t memory_
Definition: process.h:54
std::shared_ptr< Molecule > legacy_molecule_
Definition: process.h:62
std::string get_datadir() const
PSIDATADIR.
Definition: process.h:109
std::map< std::string, std::string > environment_
Definition: process.h:53