Psi4
slaterdset.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 program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 
36 #ifndef _psi3_src_lib_libqt_slaterdset_h_
37 #define _psi3_src_lib_libqt_slaterdset_h_
38 
39 #include "psi4/libpsio/psio.h"
40 
41 namespace psi {
42 
46 typedef struct {
47  int index;
48  short int *occ; /* Orbital indices in QT order */
49  /* CDS: I'm gonna use Pitzer order actually */
50 } String;
51 
55 typedef struct {
57  int size;
58  int nelec;
59  int ndrc;
60  short int *drc_occ;
61 } StringSet;
62 
63 void stringset_init(StringSet *stringset, int size, int nelec, int ndrc,
64  short int *frozen_occ);
65 void stringset_delete(StringSet *stringset);
66 void stringset_add(StringSet *stringset, int index, unsigned char *Occ);
67 void stringset_write(ULI unit, const char *prefix, StringSet *sset);
68 void stringset_read(ULI unit, const char *prefix, StringSet **sset);
69 void stringset_reindex(StringSet *stringset, short int* mo_map);
70 
74 typedef struct {
75  int index;
76  int alphastring, betastring;
77 } SlaterDet;
78 
82 typedef struct _SlaterDetSet {
83  int size;
86 } SlaterDetSet;
87 
88 void slaterdetset_init(SlaterDetSet *sdset, int size, StringSet *alphastrings,
89  StringSet *betastrings);
92 void slaterdetset_add(SlaterDetSet *sdset, int index, int alphastring,
93  int betastring);
94 void slaterdetset_write(ULI unit, const char *prefix, SlaterDetSet *sdset);
95 void slaterdetset_read(ULI unit, const char *prefix, SlaterDetSet **sdset);
96 
100 typedef struct {
101  int size;
103  double *coeffs;
105 
106 void slaterdetvector_init(SlaterDetVector *sdvector, SlaterDetSet *sdset);
109 void slaterdetvector_set(SlaterDetVector *sdvector, double *coeffs);
110 
111 void slaterdetvector_write(ULI unit, const char *prefix, SlaterDetVector *vector);
112 void slaterdetset_write_vect(ULI unit, const char *prefix,
113  double *coeffs, int size, int vectnum);
114 void slaterdetvector_read(ULI unit, const char *prefix, SlaterDetVector **vector);
115 void slaterdetset_read_vect(ULI unit, const char *prefix, double *coeffs,
116  int size, int vectnum);
117 
118 
119 #define STRINGSET_KEY_SIZE "StringSet Size"
120 #define STRINGSET_KEY_NELEC "StringSet Num. of Electrons"
121 #define STRINGSET_KEY_NDRC "StringSet Num. of Dropped DOCCs"
122 #define STRINGSET_KEY_DRC_OCC "StringSet Dropped Core Occs"
123 #define STRINGSET_KEY_STRINGS "StringSet Strings"
124 #define SDSET_KEY_SIZE "SlaterDetSet Size"
125 #define SDSET_KEY_DETERMINANTS "SlaterDetSet Determinants"
126 #define SDSET_KEY_ALPHASTRINGS "Alpha Strings"
127 #define SDSET_KEY_BETASTRINGS "Beta Strings"
128 #define SDVECTOR_KEY_VECTOR "Vector"
129 
130 }
131 
132 #endif /* _psi3_src_lib_libqt_slaterdset_h_ */
void slaterdetset_write(ULI unit, const char *prefix, SlaterDetSet *sdset)
Definition: slaterdset.cc:412
void stringset_init(StringSet *sset, int size, int nelec, int ndrc, short int *drc_occ)
Definition: slaterdset.cc:76
int betastring
Definition: slaterdset.h:76
void slaterdetvector_read(ULI unit, const char *prefix, SlaterDetVector **sdvector)
Definition: slaterdset.cc:717
Definition: slaterdset.h:100
void slaterdetset_add(SlaterDetSet *sdset, int index, int alphastring, int betastring)
Definition: slaterdset.cc:385
int index
Definition: slaterdset.h:47
Definition: slaterdset.h:46
void stringset_read(ULI unit, const char *prefix, StringSet **stringset)
Definition: slaterdset.cc:240
int index
Definition: slaterdset.h:75
void stringset_write(ULI unit, const char *prefix, StringSet *sset)
Definition: slaterdset.cc:178
unsigned long int ULI
Definition: libpsio/config.h:62
double * coeffs
Definition: slaterdset.h:103
int size
Definition: slaterdset.h:83
void slaterdetset_delete(SlaterDetSet *sdset)
Definition: slaterdset.cc:333
void slaterdetset_delete_full(SlaterDetSet *sdset)
Definition: slaterdset.cc:356
void stringset_add(StringSet *sset, int index, unsigned char *Occ)
Definition: slaterdset.cc:125
int size
Definition: slaterdset.h:101
void slaterdetset_read_vect(ULI unit, const char *prefix, double *coeffs, int size, int vectnum)
Definition: slaterdset.cc:760
void slaterdetset_write_vect(ULI unit, const char *prefix, double *coeffs, int size, int vectnum)
Definition: slaterdset.cc:674
void slaterdetvector_delete(SlaterDetVector *sdvector)
Definition: slaterdset.cc:541
StringSet * alphastrings
Definition: slaterdset.h:85
void slaterdetvector_init(SlaterDetVector *sdvector, SlaterDetSet *sdset)
Definition: slaterdset.cc:523
void slaterdetset_init(SlaterDetSet *sdset, int size, StringSet *alphastrings, StringSet *betastrings)
Definition: slaterdset.cc:312
short int * occ
Definition: slaterdset.h:48
int size
Definition: slaterdset.h:57
void stringset_delete(StringSet *sset)
Definition: slaterdset.cc:104
SlaterDet * dets
Definition: slaterdset.h:84
int ndrc
Definition: slaterdset.h:59
StringSet * betastrings
Definition: slaterdset.h:85
Definition: slaterdset.h:82
void slaterdetvector_write(ULI unit, const char *prefix, SlaterDetVector *vector)
Definition: slaterdset.cc:634
void slaterdetvector_set(SlaterDetVector *sdvector, double *coeffs)
Definition: slaterdset.cc:605
void slaterdetvector_delete_full(SlaterDetVector *sdvector)
Definition: slaterdset.cc:564
_SlaterDetSet SlaterDetSet
Definition: ciwave.h:51
SlaterDetSet * sdset
Definition: slaterdset.h:102
short int * drc_occ
Definition: slaterdset.h:60
void stringset_reindex(StringSet *sset, short int *mo_map)
Definition: slaterdset.cc:150
int nelec
Definition: slaterdset.h:58
String * strings
Definition: slaterdset.h:56
Definition: slaterdset.h:74
Definition: slaterdset.h:55
void slaterdetset_read(ULI unit, const char *prefix, SlaterDetSet **slaterdetset)
Definition: slaterdset.cc:464