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 IntVector;
49 class Wavefunction;
50 class Molecule;
51 using SharedMatrix = std::shared_ptr<Matrix>;
52 using SharedVector = std::shared_ptr<Vector>;
53 using SharedIntVector = std::shared_ptr<IntVector>;
54 using SharedWavefunction = std::shared_ptr<Wavefunction>;
55 using SharedMolecule = std::shared_ptr<Molecule>;
56 
57 // Useful when working with SO-TEIs
58 template<typename T>
59 void swap_index(T& a, T& b) {
60  T temp;
61  temp = b;
62  b = a;
63  a = temp;
64 }
65 
66 #define SWAP_INDEX(a, b) swap_index(a ## abs, b ## abs); swap_index(a ## rel, b ## rel); swap_index(a ## irrep, b ## irrep);
67 
68 }
69 
70 
71 #endif // libmints_typedefs_h
void swap_index(T &a, T &b)
Definition: typedefs.h:59
int * T
Definition: stringlist.cc:66
std::shared_ptr< Molecule > SharedMolecule
Definition: typedefs.h:55
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:54
std::shared_ptr< IntVector > SharedIntVector
Definition: typedefs.h:53
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51