Psi4
writer.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 WRITER_H
30 #define WRITER_H
31 
32 #include "psi4/pragma.h"
33 PRAGMA_WARNING_PUSH
34 PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS
35 #include <memory>
37 #include "psi4/libmints/vector.h"
38 #include <string>
39 #include "typedefs.h"
40 
41 namespace psi {
42 
43 class Molecule;
44 class Matrix;
45 class Wavefunction;
46 
47 class FCHKWriter {
48  private:
51  std::shared_ptr<Wavefunction> wavefunction_;
52  FILE *chk_;
53  void write_number(const char *label, int value);
54  void write_number(const char *label, double value);
55  void write_sym_matrix(const char *label, const SharedMatrix &mat);
56  void write_matrix(const char *label, const SharedVector &mat);
57  void write_matrix(const char *label, const SharedMatrix &mat);
58  void write_matrix(const char *label, const std::vector<double> &mat);
59  void write_matrix(const char *label, const std::vector<int> &mat);
60 
61  public:
62  FCHKWriter(std::shared_ptr<Wavefunction> wavefunction);
63  void write(const std::string &filename);
64 };
65 
67  std::shared_ptr<Wavefunction> wavefunction_;
68 
69  public:
70  MoldenWriter(std::shared_ptr<Wavefunction> wavefunction);
71 
72  void write(const std::string &filename, std::shared_ptr<Matrix> Ca, std::shared_ptr<Matrix> Cb,
73  std::shared_ptr<Vector> Ea, std::shared_ptr<Vector> Eb, std::shared_ptr<Vector> OccA,
74  std::shared_ptr<Vector> OccB, bool dovirtual);
75 };
76 
77 class MOWriter {
78  std::shared_ptr<Wavefunction> wavefunction_;
80 
81  private:
82  double *Ca_pointer, *eps;
83  int *map, *sym, *occ, nmo, nso;
84  void write_mos(Molecule &mol);
85 
86  public:
87  MOWriter(std::shared_ptr<Wavefunction> wavefunction);
88  void write();
89 };
90 
91 class NBOWriter {
92  std::shared_ptr<Wavefunction> wavefunction_;
93 
94  public:
95  NBOWriter(std::shared_ptr<Wavefunction> wavefunction);
96 
97  void write(const std::string &filename);
98 };
99 } // namespace psi
100 
101 #endif // WRITER_H
MOWriter(std::shared_ptr< Wavefunction > wavefunction)
Definition: writer.cc:927
void write_matrix(const char *label, const SharedVector &mat)
Definition: writer.cc:262
int nmo
Definition: writer.h:83
NBOWriter(std::shared_ptr< Wavefunction > wavefunction)
Definition: writer.cc:588
int * sym
Definition: writer.h:83
double * Ca_pointer
Definition: writer.h:82
int * map
Definition: writer.h:83
void write(const std::string &filename)
Definition: writer.cc:317
FILE * chk_
Definition: writer.h:52
Definition: writer.h:47
void write()
Definition: writer.cc:930
Definition: writer.h:91
Definition: writer.h:77
void write_number(const char *label, int value)
Definition: writer.cc:245
std::shared_ptr< Wavefunction > wavefunction_
Definition: writer.h:92
std::shared_ptr< Wavefunction > wavefunction_
Definition: writer.h:78
void write_sym_matrix(const char *label, const SharedMatrix &mat)
Definition: writer.cc:247
PRAGMA_WARNING_PUSH PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS PRAGMA_WARNING_POP
Definition: integraliter.cc:43
double * eps
Definition: writer.h:82
int nso
Definition: writer.h:83
int * occ
Definition: writer.h:83
std::shared_ptr< Wavefunction > wavefunction_
Extracts information from a wavefunction object, and writes it into a formatted FCHK file...
Definition: writer.h:51
void write_mos(Molecule &mol)
Definition: writer.cc:1077
std::shared_ptr< Wavefunction > wavefunction_
Definition: writer.h:67
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
bool restricted_
Definition: writer.h:79
#define PSI_API
Definition: pragma.h:155
Molecule information class.
Definition: libmints/molecule.h:77
Definition: writer.h:66
FCHKWriter(std::shared_ptr< Wavefunction > wavefunction)
Definition: writer.cc:238
void write(const std::string &filename)
Definition: writer.cc:590
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51