Psi4
iwl.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 /*
30 ** IWL.H
31 ** Header file for Integrals With Labels Library
32 **
33 ** David Sherrill
34 ** Center for Computational Quantum Chemistry, UGA
35 **
36 */
37 
38 #ifndef _psi_src_lib_libiwl_iwl_h_
39 #define _psi_src_lib_libiwl_iwl_h_
40 
41 #include <cstdio>
42 #include "psi4/libpsio/psio.h"
43 #include "config.h"
44 #include "psi4/psi4-dec.h"
45 namespace psi {
46 
47 struct iwlbuf {
48  int itap; /* tape number for input file */
49  psio_address bufpos; /* current page/offset */
50  int ints_per_buf; /* integrals per buffer */
51  int bufszc; /* buffer size in characters (bytes) */
52  double cutoff; /* cutoff value for writing */
53  int lastbuf; /* is this the last IWL buffer? 1=yes,0=no */
54  int inbuf; /* how many ints in current buffer? */
55  int idx; /* index of integral in current buffer */
56  Label *labels; /* pointer to where integral values begin */
57  Value *values; /* integral values */
58 };
59 
60 
61 void iwl_buf_fetch(struct iwlbuf *Buf);
62 void iwl_buf_put(struct iwlbuf *Buf);
63 
64 int iwl_rdone(int itap, const char *label, double *ints, int ntri, int erase,
65  int printflg, std::string out);
66 
67 void iwl_buf_init(struct iwlbuf *Buf, int intape, double cutoff,
68  int oldfile, int readflag);
69 void iwl_buf_flush(struct iwlbuf *Buf, int lastbuf);
70 void iwl_buf_close(struct iwlbuf *Buf, int keep);
71 void iwl_buf_wrt_val(struct iwlbuf *Buf, int p, int q, int r, int s,
72  double value, int printflag, std::string out, int dirac);
73 
74 }
75 
76 #endif /* end _psi_src_lib_libiwl_iwl_h */
void iwl_buf_put(struct iwlbuf *Buf)
Definition: buf_put.cc:59
Label * labels
Definition: iwl.h:56
void iwl_buf_flush(struct iwlbuf *Buf, int lastbuf)
Definition: buf_flush.cc:79
Definition: iwl.h:47
short int Label
Definition: libiwl/config.h:34
double cutoff
Definition: iwl.h:52
void iwl_buf_wrt_val(struct iwlbuf *Buf, int p, int q, int r, int s, double value, int printflag, std::string out, int dirac)
Definition: buf_wrt_val.cc:108
int ints_per_buf
Definition: iwl.h:50
void iwl_buf_close(struct iwlbuf *Buf, int keep)
Definition: buf_close.cc:69
Definition: libpsio/config.h:63
void iwl_buf_init(struct iwlbuf *Buf, int itape, double cutoff, int oldfile, int readflag)
Definition: buf_init.cc:116
int iwl_rdone(int itap, const char *label, double *ints, int ntri, int erase, int printflg, std::string out)
Definition: rdone.cc:82
int bufszc
Definition: iwl.h:51
psio_address bufpos
Definition: iwl.h:49
int idx
Definition: iwl.h:55
Value * values
Definition: iwl.h:57
int itap
Definition: iwl.h:48
int inbuf
Definition: iwl.h:54
void iwl_buf_fetch(struct iwlbuf *Buf)
Definition: buf_fetch.cc:60
double Value
Definition: libiwl/config.h:35
int lastbuf
Definition: iwl.h:53