Psi4
typedefs.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 libmints_typedefs_h
30 #define libmints_typedefs_h
31 
32 #include <memory> // for shared_ptr
33 
34 // Handy mints timer macros, requires libqt to be included
35 #ifdef MINTS_TIMER
36 # include "psi4/libqt/qt.h"
37 # define mints_timer_on(a) timer_on((a));
38 # define mints_timer_off(a) timer_off((a));
39 #else
40 # define mints_timer_on(a)
41 # define mints_timer_off(a)
42 #endif
43 
44 // Forward declare psi
45 namespace psi {
46 class Matrix;
47 class Vector;
48 class Wavefunction;
49 class Molecule;
50 using SharedMatrix = std::shared_ptr<Matrix>;
51 using SharedVector = std::shared_ptr<Vector>;
52 using SharedWavefunction = std::shared_ptr<Wavefunction>;
53 using SharedMolecule = std::shared_ptr<Molecule>;
54 
55 // Useful when working with SO-TEIs
56 template<typename T>
57 void swap_index(T& a, T& b) {
58  T temp;
59  temp = b;
60  b = a;
61  a = temp;
62 }
63 
64 #define SWAP_INDEX(a, b) swap_index(a ## abs, b ## abs); swap_index(a ## rel, b ## rel); swap_index(a ## irrep, b ## irrep);
65 
66 }
67 
68 
69 #endif // libmints_typedefs_h
void swap_index(T &a, T &b)
Definition: typedefs.h:57
std::shared_ptr< Molecule > SharedMolecule
Definition: typedefs.h:53
Header file for the Quantum Trio LibraryDavid Sherrill 1994.
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:52
Definition: PsiFileImpl.h:40
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51