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 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 
37 #ifndef _psi3_src_lib_libqt_slaterdset_h_
38 #define _psi3_src_lib_libqt_slaterdset_h_
39 
40 #include "psi4/libpsio/psio.h"
41 
42 namespace psi {
43 
47 typedef struct {
48  int index;
49  short int *occ; /* Orbital indices in QT order */
50  /* CDS: I'm gonna use Pitzer order actually */
51 } String;
52 
56 typedef struct {
58  int size;
59  int nelec;
60  int ndrc;
61  short int *drc_occ;
62 } StringSet;
63 
64 void stringset_init(StringSet *stringset, int size, int nelec, int ndrc,
65  short int *frozen_occ);
66 void stringset_delete(StringSet *stringset);
67 void stringset_add(StringSet *stringset, int index, unsigned char *Occ);
68 void stringset_write(size_t unit, const char *prefix, StringSet *sset);
69 void stringset_read(size_t unit, const char *prefix, StringSet **sset);
70 void stringset_reindex(StringSet *stringset, short int* mo_map);
71 
75 typedef struct {
76  int index;
77  int alphastring, betastring;
78 } SlaterDet;
79 
83 typedef struct _SlaterDetSet {
84  int size;
87 } SlaterDetSet;
88 
89 void slaterdetset_init(SlaterDetSet *sdset, int size, StringSet *alphastrings,
90  StringSet *betastrings);
93 void slaterdetset_add(SlaterDetSet *sdset, int index, int alphastring,
94  int betastring);
95 void slaterdetset_write(size_t unit, const char *prefix, SlaterDetSet *sdset);
96 void slaterdetset_read(size_t unit, const char *prefix, SlaterDetSet **sdset);
97 
101 typedef struct {
102  int size;
104  double *coeffs;
106 
107 void slaterdetvector_init(SlaterDetVector *sdvector, SlaterDetSet *sdset);
110 void slaterdetvector_set(SlaterDetVector *sdvector, double *coeffs);
111 
112 void slaterdetvector_write(size_t unit, const char *prefix, SlaterDetVector *vector);
113 void slaterdetset_write_vect(size_t unit, const char *prefix,
114  double *coeffs, int size, int vectnum);
115 void slaterdetvector_read(size_t unit, const char *prefix, SlaterDetVector **vector);
116 void slaterdetset_read_vect(size_t unit, const char *prefix, double *coeffs,
117  int size, int vectnum);
118 
119 
120 #define STRINGSET_KEY_SIZE "StringSet Size"
121 #define STRINGSET_KEY_NELEC "StringSet Num. of Electrons"
122 #define STRINGSET_KEY_NDRC "StringSet Num. of Dropped DOCCs"
123 #define STRINGSET_KEY_DRC_OCC "StringSet Dropped Core Occs"
124 #define STRINGSET_KEY_STRINGS "StringSet Strings"
125 #define SDSET_KEY_SIZE "SlaterDetSet Size"
126 #define SDSET_KEY_DETERMINANTS "SlaterDetSet Determinants"
127 #define SDSET_KEY_ALPHASTRINGS "Alpha Strings"
128 #define SDSET_KEY_BETASTRINGS "Beta Strings"
129 #define SDVECTOR_KEY_VECTOR "Vector"
130 
131 }
132 
133 #endif /* _psi3_src_lib_libqt_slaterdset_h_ */
int betastring
Definition: slaterdset.h:77
void stringset_reindex(StringSet *stringset, short int *mo_map)
Definition: slaterdset.h:101
int index
Definition: slaterdset.h:48
void slaterdetset_init(SlaterDetSet *sdset, int size, StringSet *alphastrings, StringSet *betastrings)
Definition: slaterdset.h:47
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:76
void slaterdetset_delete_full(SlaterDetSet *sdset)
double * coeffs
Definition: slaterdset.h:104
void stringset_delete(StringSet *stringset)
int size
Definition: slaterdset.h:84
void stringset_read(size_t unit, const char *prefix, StringSet **sset)
int size
Definition: slaterdset.h:102
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:86
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:49
int size
Definition: slaterdset.h:58
SlaterDet * dets
Definition: slaterdset.h:85
void slaterdetvector_init(SlaterDetVector *sdvector, SlaterDetSet *sdset)
int ndrc
Definition: slaterdset.h:60
StringSet * betastrings
Definition: slaterdset.h:86
Definition: slaterdset.h:83
_SlaterDetSet SlaterDetSet
Definition: ciwave.h:51
SlaterDetSet * sdset
Definition: slaterdset.h:103
void stringset_write(size_t unit, const char *prefix, StringSet *sset)
short int * drc_occ
Definition: slaterdset.h:61
void slaterdetset_read_vect(size_t unit, const char *prefix, double *coeffs, int size, int vectnum)
int nelec
Definition: slaterdset.h:59
String * strings
Definition: slaterdset.h:57
Definition: slaterdset.h:75
Definition: slaterdset.h:56