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-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 
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, short int *frozen_occ);
64 void stringset_delete(StringSet *stringset);
65 void stringset_add(StringSet *stringset, int index, unsigned char *Occ);
66 void stringset_write(size_t unit, const char *prefix, StringSet *sset);
67 void stringset_read(size_t unit, const char *prefix, StringSet **sset);
68 void stringset_reindex(StringSet *stringset, short int *mo_map);
69 
73 typedef struct {
74  int index;
75  int alphastring, betastring;
76 } SlaterDet;
77 
81 typedef struct _SlaterDetSet {
82  int size;
85 } SlaterDetSet;
86 
87 void slaterdetset_init(SlaterDetSet *sdset, int size, StringSet *alphastrings, StringSet *betastrings);
90 void slaterdetset_add(SlaterDetSet *sdset, int index, int alphastring, int betastring);
91 void slaterdetset_write(size_t unit, const char *prefix, SlaterDetSet *sdset);
92 void slaterdetset_read(size_t unit, const char *prefix, SlaterDetSet **sdset);
93 
97 typedef struct {
98  int size;
100  double *coeffs;
102 
103 void slaterdetvector_init(SlaterDetVector *sdvector, SlaterDetSet *sdset);
106 void slaterdetvector_set(SlaterDetVector *sdvector, double *coeffs);
107 
108 void slaterdetvector_write(size_t unit, const char *prefix, SlaterDetVector *vector);
109 void slaterdetset_write_vect(size_t unit, const char *prefix, double *coeffs, int size, int vectnum);
110 void slaterdetvector_read(size_t unit, const char *prefix, SlaterDetVector **vector);
111 void slaterdetset_read_vect(size_t unit, const char *prefix, double *coeffs, int size, int vectnum);
112 
113 #define STRINGSET_KEY_SIZE "StringSet Size"
114 #define STRINGSET_KEY_NELEC "StringSet Num. of Electrons"
115 #define STRINGSET_KEY_NDRC "StringSet Num. of Dropped DOCCs"
116 #define STRINGSET_KEY_DRC_OCC "StringSet Dropped Core Occs"
117 #define STRINGSET_KEY_STRINGS "StringSet Strings"
118 #define SDSET_KEY_SIZE "SlaterDetSet Size"
119 #define SDSET_KEY_DETERMINANTS "SlaterDetSet Determinants"
120 #define SDSET_KEY_ALPHASTRINGS "Alpha Strings"
121 #define SDSET_KEY_BETASTRINGS "Beta Strings"
122 #define SDVECTOR_KEY_VECTOR "Vector"
123 
124 } // namespace psi
125 
126 #endif /* _psi3_src_lib_libqt_slaterdset_h_ */
int betastring
Definition: slaterdset.h:75
void stringset_reindex(StringSet *stringset, short int *mo_map)
Definition: slaterdset.h:97
int index
Definition: slaterdset.h:47
void slaterdetset_init(SlaterDetSet *sdset, int size, StringSet *alphastrings, StringSet *betastrings)
Definition: slaterdset.h:46
void slaterdetset_write(size_t unit, const char *prefix, SlaterDetSet *sdset)
void slaterdetvector_delete(SlaterDetVector *sdvector)
void stringset_init(StringSet *stringset, int size, int nelec, int ndrc, short int *frozen_occ)
int index
Definition: slaterdset.h:74
void slaterdetset_delete_full(SlaterDetSet *sdset)
double * coeffs
Definition: slaterdset.h:100
void stringset_delete(StringSet *stringset)
int size
Definition: slaterdset.h:82
void stringset_read(size_t unit, const char *prefix, StringSet **sset)
int size
Definition: slaterdset.h:98
void slaterdetvector_write(size_t unit, const char *prefix, SlaterDetVector *vector)
void stringset_add(StringSet *stringset, int index, unsigned char *Occ)
void slaterdetvector_set(SlaterDetVector *sdvector, double *coeffs)
void slaterdetset_delete(SlaterDetSet *sdset)
void slaterdetvector_delete_full(SlaterDetVector *sdvector)
void slaterdetset_add(SlaterDetSet *sdset, int index, int alphastring, int betastring)
StringSet * alphastrings
Definition: slaterdset.h:84
void slaterdetset_read(size_t unit, const char *prefix, SlaterDetSet **sdset)
void slaterdetset_write_vect(size_t unit, const char *prefix, double *coeffs, int size, int vectnum)
void slaterdetvector_read(size_t unit, const char *prefix, SlaterDetVector **vector)
short int * occ
Definition: slaterdset.h:48
int size
Definition: slaterdset.h:57
SlaterDet * dets
Definition: slaterdset.h:83
void slaterdetvector_init(SlaterDetVector *sdvector, SlaterDetSet *sdset)
int ndrc
Definition: slaterdset.h:59
StringSet * betastrings
Definition: slaterdset.h:84
Definition: slaterdset.h:81
_SlaterDetSet SlaterDetSet
Definition: ciwave.h:51
SlaterDetSet * sdset
Definition: slaterdset.h:99
void stringset_write(size_t unit, const char *prefix, StringSet *sset)
short int * drc_occ
Definition: slaterdset.h:60
void slaterdetset_read_vect(size_t unit, const char *prefix, double *coeffs, int size, int vectnum)
int nelec
Definition: slaterdset.h:58
String * strings
Definition: slaterdset.h:56
Definition: slaterdset.h:73
Definition: slaterdset.h:55