Psi4
Files | Functions
libiwl: I/O Library for Integrals with Labels

Files

file  buf_close.cc
 
file  buf_fetch.cc
 
file  buf_flush.cc
 
file  buf_init.cc
 
file  buf_put.cc
 
file  buf_wrt.cc
 
file  buf_wrt_mat.cc
 
file  buf_wrt_val.cc
 
file  rdone.cc
 
file  wrtone.cc
 

Functions

void psi::iwl_buf_close (struct iwlbuf *Buf, int keep)
 
void psi::iwl_buf_fetch (struct iwlbuf *Buf)
 
void psi::iwl_buf_flush (struct iwlbuf *Buf, int lastbuf)
 
void psi::iwl_buf_init (struct iwlbuf *Buf, int itape, double cutoff, int oldfile, int readflag)
 
void psi::iwl_buf_put (struct iwlbuf *Buf)
 
void psi::iwl_buf_wrt_val (struct iwlbuf *Buf, int p, int q, int r, int s, double value, int printflag, std::string out, int dirac)
 
int psi::iwl_rdone (int itap, const char *label, double *ints, int ntri, int erase, int printflg, std::string out)
 
void psi::IWL::write (int p, int q, int pq, int pqsym, double *arr, int rmax, int *ioff, int *orbsym, int *firsti, int *lasti, int printflag, std::string OutFileRMR)
 
void psi::IWL::write_matrix (int ptr, int qtr, double **mat, int rfirst, int rlast, int sfirst, int slast, int *reorder, int reorder_offset, int printflag, int *ioff, std::string OutFileRMR)
 
static void psi::IWL::write_one (PSIO *psio, int itap, const char *label, int ntri, double *onel_ints)
 

Detailed Description

Function Documentation

void psi::iwl_buf_close ( struct iwlbuf *  Buf,
int  keep 
)

IWL_BUF_CLOSE()

 \param Buf      Buffer to be closed
 \param keep    Do not delete if keep==1

Close a Integrals With Labels Buffer

void psi::iwl_buf_fetch ( struct iwlbuf *  Buf)

iwl_buf_fetch()

Fetch an IWL buffer from disk David Sherrill, 26 June 1996

void psi::iwl_buf_flush ( struct iwlbuf *  Buf,
int  lastbuf 
)

iwl_buf_flush()

 \param Buf     To be flushed buffer
 \param lastbuf Flag for the last buffer

Flush an Integrals With Labels Buffer All flushing should be done through this routine! David Sherrill, March 1995

void psi::iwl_buf_init ( struct iwlbuf *  Buf,
int  itape,
double  cutoff,
int  oldfile,
int  readflag 
)

iwl_buf_init()

 \param Buf               Buffer to be initialised
 \param itape               Filenumber
 \param cutoff           Cutoff for keeping integral
 \param oldfile             If ==0 create file
 \param readflag            If ==1 fetch buffer

Prepare a PSI Buffer according to the Integrals With Labels format for reading or writing. Important to set readflag=1 if opening for reading, since other IWL buffer read routines anticipate that there is already data in the buffer.

David Sherrill, March 1995 Revised 6/26/96 by CDS for new format

set up buffer info

make room in the buffer

open the output file

Note that we assume that if oldfile isn't set, we O_CREAT the file

go ahead and read a buffer

void psi::iwl_buf_put ( struct iwlbuf *  Buf)

iwl_buf_put(struct iwlbuf *Buf)

Put an IWL buffer to disk David Sherrill, 26 June 1996

void psi::iwl_buf_wrt_val ( struct iwlbuf *  Buf,
int  p,
int  q,
int  r,
int  s,
double  value,
int  printflag,
std::string  out,
int  dirac 
)

iwl_buf_wrt_val()

Write to an Integrals With Labels formatted buffer. The buffer must have been initialized with iwl_buf_init(). Don't forget to call iwl_buf_flush() when finished with all writes to the buffer to ensure that all contents are written to disk.

This function writes only a particular value and its indices to the given iwl buffer. This is useful when index rearragements are necessary (e.g. conversion from Mulliken to Dirac notation). This is not as nice as being able to write entire arrays of values to the buffer, but may be necessary at times. Daniel Crawford, Novemeber 1995

int psi::iwl_rdone ( int  itap,
const char *  label,
double *  ints,
int  ntri,
int  erase,
int  printflg,
std::string  out 
)

IWL_RDONE()

This function reads the one-electron integrals in the MO basis from disk and stores them in core. Substantially revised on 29 April 1998 to filter out frozen orbitals if requested. This change requires a very different argument list from the previous version of this code.

David Sherrill, January 1994 Revised by David Sherrill, April 1998 Revised by TDC, June 2001

Parameters
itap= tape to read ints from
label= the PSIO label
ints= buffer (already allocated) to store the integrals
ntri= number of packed integrals
erase= erase itap (1=yes, 0=no)
printflg= printing flag. Set to 1 to print ints; otherwise, set to 0
out= file pointer for output of ints or error messages
void psi::IWL::write ( int  p,
int  q,
int  pq,
int  pqsym,
double *  arr,
int  rmax,
int *  ioff,
int *  orbsym,
int *  firsti,
int *  lasti,
int  printflag,
std::string  out 
)

iwl_buf_wrt()

Write to an Integrals With Labels formatted buffer. The buffer must have been initialized with iwl_buf_init(). Don't forget to call iwl_buf_flush() when finished with all writes to the buffer to ensure that all contents are written to disk. David Sherrill, March 1995

Revised 6/27/96 by CDS for new format

void psi::IWL::write_matrix ( int  ptr,
int  qtr,
double **  mat,
int  rfirst,
int  rlast,
int  sfirst,
int  slast,
int *  reorder,
int  reorder_offset,
int  printflag,
int *  ioff,
std::string  out 
)

iwl_buf_wrt_mat()

Write to an Integrals With Labels formatted buffer. The buffer must have been initialized with iwl_buf_init(). Don't forget to call iwl_buf_flush() when finished with all writes to the buffer to ensure that all contents are written to disk.

This version takes as input a matrix, as might be handy for a matrix formulation of an integral transformation. It assumes that all rs are available for a given pq. r and s are allowed to range from rfirst/sfirst to rlast/slast (with s<=r), and this maps to a matrix addressing of 0 to (rlast-rfirst) and 0 to (slast-sfirst).

This routine is also compatible with a reordering of the orbitals before output. We assume that p and q are already reordered, but r and s are not (yet). The reordered address of an orbital is computed according to rtr = reorder[r] - reorder_offset.

I have further modified the routine to spit out integrals whose reordered indices are canonical ij >= kl. The routine does not care whether ptr >= qtr, but it insists that the transformed pq and kl indices (called ij and kl in the routine) satisfy ij >= kl. David Sherrill, October 1995

Revised 6/27/96 by CDS for new format

void psi::IWL::write_one ( PSIO psio,
int  itap,
const char *  label,
int  ntri,
double *  onel_ints 
)
static

IWL_WRTONE()

This function writes one-electron integrals.

itap = tape to read ints from label = the PSIO label ntri = the size of the array (lower triangle) onel_ints = array to hold the one-electron integrals.

David Sherrill, March 1995 Revised by TDC, June 2001