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_rd.cc
file  buf_rd_all.cc
file  buf_rd_all_act.cc
file  buf_rd_all_mp2r12a.cc
file  buf_rd_arr.cc
file  buf_toend.cc
file  buf_wrt.cc
file  buf_wrt_all.cc
file  buf_wrt_arr.cc
file  buf_wrt_arr2.cc
file  buf_wrt_arr_SI.cc
file  buf_wrt_arr_SI_nocut.cc
file  buf_wrt_mat.cc
file  buf_wrt_mp2.cc
file  buf_wrt_mp2r12a.cc
file  buf_wrt_val.cc
file  buf_wrt_val_SI.cc
file  lib/libiwl/rdone.cc
file  lib/libiwl/rdtwo.cc
file  sortbuf.cc
file  wrtone.cc
file  wrttwo.cc

Functions

void psi::iwl_buf_close (struct iwlbuf *Buf, int k)
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)
int psi::iwl_buf_rd (struct iwlbuf *Buf, int target_pq, double *ints, int *ioff_lt, int *ioff_rt, int mp2, int printflg, FILE *out)
int psi::iwl_buf_rd_all (struct iwlbuf *Buf, double *ints, int *ioff_lt, int *ioff_rt, int no_pq_perm, int *ioff, int printflg, FILE *out)
int psi::iwl_buf_rd_all2 (struct iwlbuf *Buf, double **ints, int *ioff_lt, int *ioff_rt, int no_pq_perm, int *, int printflg, FILE *out)
int psi::iwl_buf_rd_all_act (struct iwlbuf *Buf, double *ints, int *ioff_lt, int *ioff_rt, int no_pq_perm, int *ioff, int fstact, int lstact, int printflg, FILE *out)
int psi::iwl_buf_rd_all_mp2r12a (struct iwlbuf *Buf, double *ints, int *ioff_lt, int *ioff_rt, int bra_ket_symm, int *, int printflg, FILE *out)
int psi::iwl_buf_rd_arr (struct iwlbuf *Buf, int target_pq, double *ints, int *rlist, int *slist, int *size, int *ioff, int printflg, FILE *out)
void psi::iwl_buf_toend (struct iwlbuf *Buf)
void psi::iwl_buf_wrt (struct iwlbuf *Buf, int p, int q, int pq, int pqsym, double *arr, int rmax, int *ioff, int *orbsym, int *firsti, int *lasti, int printflag, FILE *out)
void psi::iwl_buf_wrt_all (struct iwlbuf *Buf, int nbfso, double *ints, int *ioff, int printflg, FILE *out)
void psi::iwl_buf_wrt_arr (struct iwlbuf *Buf, double *arr, int *p, int *q, int *r, int *s, long int size)
void psi::iwl_buf_wrt_arr2 (struct iwlbuf *Buf, double *arr, int p, int q, int *rlist, int *slist, int size, int printflag, FILE *out)
void psi::iwl_buf_wrt_arr_SI (struct iwlbuf *Buf, double *arr, short int *p, short int *q, short int *r, short int *s, int size)
void psi::iwl_buf_wrt_arr_SI_nocut (struct iwlbuf *Buf, double *arr, short int *p, short int *q, short int *r, short int *s, int size)
void psi::iwl_buf_wrt_mat (struct iwlbuf *Buf, int ptr, int qtr, double **mat, int rfirst, int rlast, int sfirst, int slast, int *reorder, int reorder_offset, int printflag, int *ioff, FILE *out)
void psi::iwl_buf_wrt_mat2 (struct iwlbuf *Buf, int ptr, int qtr, double **mat, int rfirst, int rlast, int sfirst, int slast, int *reorder, int reorder_offset, int printflag, int *ioff, FILE *out)
void psi::iwl_buf_wrt_mp2 (struct iwlbuf *Buf, int p, int q, int pq, int pqsym, double **arr, int rsym, int *firstr, int *lastr, int *firsts, int *lasts, int *occ, int *vir, int *ioff, int printflag, FILE *out)
void psi::iwl_buf_wrt_mp2r12a (struct iwlbuf *Buf, int p, int q, int pq, int pqsym, double **arr, int rsym, int *firstr, int *lastr, int *firsts, int *lasts, int *occ, int bra_ket_symm, int *ioff, int printflag, FILE *out)
void psi::iwl_buf_wrt_val (struct iwlbuf *Buf, int p, int q, int r, int s, double value, int printflag, FILE *out, int dirac)
void psi::iwl_buf_wrt_val_SI (struct iwlbuf *Buf, short int p, short int q, short int r, short int s, double value, int printflag, FILE *out, int dirac)
int psi::iwl_rdone (int itap, const char *label, double *ints, int ntri, int erase, int printflg, FILE *outfile)
void psi::iwl_rdtwo (int itap, double *ints, int *ioff, int norbs, int nfzc, int nfzv, int printflg, FILE *outfile)
void psi::sortbuf (struct iwlbuf *inbuf, struct iwlbuf *outbuf, double *ints, int fpq, int lpq, int *ioff, int *ioff2, int nbfso, int elbert, int intermediate, int no_pq_perm, int qdim, int add, int printflg, FILE *outfile)
void psi::iwl_wrtone (int itap, const char *label, int ntri, double *onel_ints)
void psi::iwl_wrttwo (int itap, int nbfso, double *ints, int *ioff, double toler, int printflg, FILE *outfile)

Detailed Description


Function Documentation

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

IWL_BUF_CLOSE()

Parameters:
Buf Buffer to be closed
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()

Parameters:
Buf To be flushed buffer
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()

Parameters:
Buf Buffer to be initialised
itape Filenumber
cutoff Cutoff for keeping integral
oldfile If ==0 create file
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

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

int psi::iwl_buf_rd ( struct iwlbuf *  Buf,
int  target_pq,
double *  ints,
int *  ioff_lt,
int *  ioff_rt,
int  mp2,
int  printflg,
FILE *  out 
)

iwl_buf_rd(struct iwlbuf *Buf, int target_pq, double *ints, int *ioff_lt, int *ioff_rt, int mp2, int printflg, FILE *out)

Read from an Integrals With Labels formatted PSI buffer. The buffer must have been initialized with iwl_buf_init(). David Sherrill, March 1995

Returns: 0 if end of file, otherwise 1

Altered such that if the current pq value does not equal the target_pq then routine returns. This may be dangerous in that if you don't know the order of pq's in the iwl_buf, you may skip integrals! -Daniel, November 9, 1995

Revised 6/26/96 by CDS for new format

int psi::iwl_buf_rd_all ( struct iwlbuf *  Buf,
double *  ints,
int *  ioff_lt,
int *  ioff_rt,
int  no_pq_perm,
int *  ioff,
int  printflg,
FILE *  out 
)

iwl_buf_rd_all()

Read from an Integrals With Labels formatted buffer. The buffer must have been initialized with iwl_buf_init().

Arguments:

Parameters:
Buf = IWL Buffer to read from (already initialized)
ints = memory buffer to put integrals into
ioff_lt = ioff array for the left pair of indices (p and q)
ioff_rt = ioff array for the right pair of indices (r and s)
no_pq_perm = if 1, do not use p/q or r/s permutational symmetry
ioff = the ioff array to figure the total index pqrs from the pair indices pq and rs
printflg = if 1, print integrals as they are read
out = pointer to output file for printing
Returns: 0 if end of file, otherwise 1

int psi::iwl_buf_rd_all2 ( struct iwlbuf *  Buf,
double **  ints,
int *  ioff_lt,
int *  ioff_rt,
int  no_pq_perm,
int *  ,
int  printflg,
FILE *  out 
)

IWL_BUF_RD_ALL2(): This routine works exactly like iwl_buf_rd_all(), except that the integral list is not assumed to have bra-ket permutational symmetry. The list is still required to have permutational symmetry WITHIN bra and ket, however, unless no_pq_perm is set. This function requires that the input array be (double **) rather than (double *). This routine is necessary, for example, for reading the alpha-beta two-electron integrals from the UHF transqt code.

TDC, 6/01

int psi::iwl_buf_rd_all_act ( struct iwlbuf *  Buf,
double *  ints,
int *  ioff_lt,
int *  ioff_rt,
int  no_pq_perm,
int *  ioff,
int  fstact,
int  lstact,
int  printflg,
FILE *  out 
)

iwl_buf_rd_all_act()

Read from an Integrals With Labels formatted buffer. The buffer must have been initialized with iwl_buf_init(). Same as function iwl_buf_rd_all() except that we only keep the integrals with all-active labels.

Parameters:
Buf = IWL Buffer to read from (already initialized)
ints = memory buffer to put integrals into
ioff_lt = ioff array for the left pair of indices (p and q)
ioff_rt = ioff array for the right pair of indices (r and s)
no_pq_perm = if 1, do not use p/q or r/s permutational symmetry
ioff = the ioff array to figure the total index pqrs from the pair indices pq and rs
fstact = index of first active orbital
lstact = index of last active orbital
printflg = if 1, print integrals as they are read
out = pointer to output file for printing
Returns: 0 if end of file, otherwise 1

int psi::iwl_buf_rd_all_mp2r12a ( struct iwlbuf *  Buf,
double *  ints,
int *  ioff_lt,
int *  ioff_rt,
int  bra_ket_symm,
int *  ,
int  printflg,
FILE *  out 
)

iwl_buf_rd_all_mp2r12a()

Read from an Integrals With Labels formatted buffer. The buffer must have been initialized with iwl_buf_init().

Parameters:
Buf = IWL Buffer to read from (already initialized)
ints = memory buffer to put integrals into
ioff_lt = ioff array for the left pair of indices (p and q)
ioff_rt = ioff array for the right pair of indices (r and s)
bra_ket_symm = if 1, then these are ERI or R12 integrals, read them in as usual, else these are [r12,T2] integrals - form [T1+T2,r12] out of these.
WARNING - if bra_ket_symm = 0 - ints must be zeroed out!

Parameters:
ioff = the ioff array to figure the total index pqrs from the pair indices pq and rs
printflg = if 1, print integrals as they are read
out = pointer to output file for printing
Returns: 0 if end of file, otherwise 1

int psi::iwl_buf_rd_arr ( struct iwlbuf *  Buf,
int  target_pq,
double *  ints,
int *  rlist,
int *  slist,
int *  size,
int *  ioff,
int  printflg,
FILE *  out 
)

iwl_buf_rd_arr()

Read from an Integrals With Labels formatted PSI buffer. The buffer must have been initialized with iwl_buf_init(). The integrals and their labels are returned in the arrays ints, rlist, and slist, and the size of these arrays is returned in 'size.' David Sherrill, March 1995

Returns: 0 if end of file, otherwise 1

Revised 6/27/96 by CDS for new format

void psi::iwl_buf_toend ( struct iwlbuf *  Buf  ) 

iwl_buf_toend()

Set IWL Buffer's pointer to the end. Useful when want to append to an already existing file

Edward Valeev, January 2001

void psi::iwl_buf_wrt ( struct iwlbuf *  Buf,
int  p,
int  q,
int  pq,
int  pqsym,
double *  arr,
int  rmax,
int *  ioff,
int *  orbsym,
int *  firsti,
int *  lasti,
int  printflag,
FILE *  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_buf_wrt_all ( struct iwlbuf *  Buf,
int  nbfso,
double *  ints,
int *  ioff,
int  printflg,
FILE *  out 
)

iwl_buf_wrt_all()

Write out two electron ints to IWL file. Assume that the integrals are in ijkl canonical order (no spatial symmetry).

Parameters:
itap = unit to write to
nbfso = number of basis functions in symmetry orbitals
ints = two electron integrals
ioff = the old ioff array for lexical ordering
printflg = print flag (1 or 0)
out = output file
David Sherrill, 6/27/96

NB: This routine will only write "standard" (pq|rs) indices to disk. The cints integral program marks certain integrals with negative index values to indicate the end of PK-matrix blocks. This marking is used by the cscf code (only?). Therefore, is this routine is used to write integrals to disk, the SCF code will most likely give incorrect data if it uses the resulting integrals. TDC 12/24/01

void psi::iwl_buf_wrt_arr ( struct iwlbuf *  Buf,
double *  arr,
int *  p,
int *  q,
int *  r,
int *  s,
long int  size 
)

IWL_BUF_WRT_ARR()

This function writes out an array of two-electron integrals using the Integrals With Labels file format. David Sherrill, March 1995

Revised 6/27/96 by CDS for new format

void psi::iwl_buf_wrt_arr2 ( struct iwlbuf *  Buf,
double *  arr,
int  p,
int  q,
int *  rlist,
int *  slist,
int  size,
int  printflag,
FILE *  out 
)

IWL_BUF_WRT_ARR2()

This function writes out an array of two-electron integrals using the Integrals With Labels file format. All integrals in the input arr have common indices p and q. r and s indices are given in the lists plist and qlist. David Sherrill, March 1995

Revised 6/27/96 by CDS for new format

void psi::iwl_buf_wrt_arr_SI ( struct iwlbuf *  Buf,
double *  arr,
short int *  p,
short int *  q,
short int *  r,
short int *  s,
int  size 
)

IWL_BUF_WRT_ARR_SI()

This function writes out an array of two-electron integrals using the Integrals With Labels file format with indices stored in arrays of short int's Ed Valeev, February 1999

void psi::iwl_buf_wrt_arr_SI_nocut ( struct iwlbuf *  Buf,
double *  arr,
short int *  p,
short int *  q,
short int *  r,
short int *  s,
int  size 
)

IWL_BUF_WRT_ARR_SI_nocut()

This function writes out an array of two-electron integrals using the Integrals With Labels file format with indices stored in arrays of short int's. It DOES NOT use Buf->Cutoff when writing. Ed Valeev, February 1999

void psi::iwl_buf_wrt_mat ( struct iwlbuf *  Buf,
int  ptr,
int  qtr,
double **  mat,
int  rfirst,
int  rlast,
int  sfirst,
int  slast,
int *  reorder,
int  reorder_offset,
int  printflag,
int *  ioff,
FILE *  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_buf_wrt_mat2 ( struct iwlbuf *  Buf,
int  ptr,
int  qtr,
double **  mat,
int  rfirst,
int  rlast,
int  sfirst,
int  slast,
int *  reorder,
int  reorder_offset,
int  printflag,
int *  ioff,
FILE *  out 
)

IWL_BUF_WRT_MAT2(): This routine is exactly like iwl_buf_wrt_mat() except that the requirement that ij >= kl has been lifted. This is necessary for the UHF alpha-beta transformation of the two-electron integrals.

TDC, 6/01

void psi::iwl_buf_wrt_mp2 ( struct iwlbuf *  Buf,
int  p,
int  q,
int  pq,
int  pqsym,
double **  arr,
int  rsym,
int *  firstr,
int *  lastr,
int *  firsts,
int *  lasts,
int *  occ,
int *  vir,
int *  ioff,
int  printflag,
FILE *  out 
)

iwl_buf_wrt_mp2()

Write to an Integrals With Labels formatted PSI 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

This routine is a modified form of iwl_buf_wrt() specific to mp2-type restricted transforms. It's not general, but it should work. Daniel, 9/25/95

void psi::iwl_buf_wrt_mp2r12a ( struct iwlbuf *  Buf,
int  p,
int  q,
int  pq,
int  pqsym,
double **  arr,
int  rsym,
int *  firstr,
int *  lastr,
int *  firsts,
int *  lasts,
int *  occ,
int  bra_ket_symm,
int *  ioff,
int  printflag,
FILE *  out 
)

iwl_buf_wrt_mp2r12a()

Write to an Integrals With Labels formatted PSI 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

This routine is a modified form of iwl_buf_wrt() specific to mp2-type restricted transforms. It's not general, but it should work. Daniel, 9/25/95

This routine is a modified form of iwl_buf_wrt_mp2() specific to mp2r12a-type restricted transforms. Edward, 8/04/99

void psi::iwl_buf_wrt_val ( struct iwlbuf *  Buf,
int  p,
int  q,
int  r,
int  s,
double  value,
int  printflag,
FILE *  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

void psi::iwl_buf_wrt_val_SI ( struct iwlbuf *  Buf,
short int  p,
short int  q,
short int  r,
short int  s,
double  value,
int  printflag,
FILE *  out,
int  dirac 
)

iwl_buf_wrt_val_SI()

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

Uses short int's as indices. May be useful. Ed Valeev, February 1999

int psi::iwl_rdone ( int  itap,
const char *  label,
double *  ints,
int  ntri,
int  erase,
int  printflg,
FILE *  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_rdtwo ( int  itap,
double *  ints,
int *  ioff,
int  norbs,
int  nfzc,
int  nfzv,
int  printflg,
FILE *  out 
)

iwl_rdtwo(): read two electron ints from the given file. The "iwl" stands for "integrals with labels," and this is the proposed new standard for storing two-electron integrals and their (absolute) orbital labels.

Parameters:
itap = unit to read from
ints = two electron integrals (already allocated)
ioff = the old ioff array for lexical ordering
norbs = number of orbitals
nfzc = number of frozen core orbitals
nfzv = number of frozen virtual orbitals
printflg = print integrals as they're read
out = output file pointer
David Sherrill, 1995

void psi::iwl_wrtone ( int  itap,
const char *  label,
int  ntri,
double *  onel_ints 
)

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

void psi::iwl_wrttwo ( int  itap,
int  nbfso,
double *  ints,
int *  ioff,
double  toler,
int  printflg,
FILE *  out 
)

iwl_wrttwo()

Write two electron ints to output in lexical order The "iwl" stands for "integrals with labels," and this is the proposed new standard for storing two-electron integrals and their (absolute) orbital labels. This function closes the output file when finished.

Parameters:
itap = unit to write to
nbfso = number of basis functions in symmetry orbitals
ints = two electron integrals
ioff = the old ioff array for lexical ordering
printflg = print flag (1 or 0)
out = output file
Revised 6/27/96 by CDS

void psi::sortbuf ( struct iwlbuf *  Inbuf,
struct iwlbuf *  Outbuf,
double *  ints,
int  fpq,
int  lpq,
int *  ioff,
int *  ioff2,
int  nbfso,
int  elbert,
int  intermediate,
int  no_pq_perm,
int  qdim,
int  add,
int  printflg,
FILE *  out 
)

sortbuf()

Function reads a file of two-electron integrals into core and writes them back out again in canonical order. Used in Yoshimine sorts where we have a file containing all rs for a few values of pq, but the ints are not in canonical order. At the very least, we need to sort to make sure that all (pq|rs) for a given pq are grouped together, since the transformation program wants to work with all rs for a single pq value at one time. We may or may not use the restriction pq >= rs (not used if intermediate = 1, which is how this routine is always called right now).

One interesting issue here is that the intermediate array ('ints') must be big enough to hold the integrals in the current buffer, but we don't generally want it to be much larger than necessary! Thus we calculate an 'offset' which is the canonical index of the first integral in the buffer, and we use this so that the first integral in the buffer is stored in ints[0]. What's different for the Elbert ordering is that we have all rs for a given pq but rs >= pq! If we want our canonical indices to be consecutive WITHIN THE CURRENT BUFFER, we MUST use upper triangle ordering rather than lower triangle! That's what ioff2 is used for. Obviously the offset must also be calculated with ioff2 for the Elbert order. Formula for ioff2: ioff2[0] = 0; ioff2[i] = ioff2[i-1] + n - i; Note that this is not the case when this routine is used for MP2 sorts. The definitions of the ioff arrays can be confusing, so care should be taken when using this routine.

Parameters:
Inbuf = IWL buffer for input
Outbuf = IWL buffer for output
ints = array to hold integrals in
fpq = first pq for this tape
lpq = last pq for this tape
ioff = offset array for the left indices
ioff2 = offset array for Elbert sorts or for the right indices when no_pq_perm=1
nbfso = number of basis functions in SO's
lastsort = 1 if this is the last intape, 0 otherwise
elbert = integrals obey rs >= pq. Use ioff2 to get offset.
intermediate= 1 if sorting a intermediate in the transformation which is indexed as X[ij][kl] where ij runs from fpq to lpq and kl runs from 0 to nbstri
no_pq_perm = don't use permutational symmetry to swap p and q (appropriate for MP2 where one is occ and one is virt)
qdim = dimensions for the q index...nvirt for MP2
add = add contributions to the same integral during sort
printflg = 1 for printing, 0 otherwise
out = output file pointer
Returns: none

Revised 6/27/96 by CDS for new IWL format N.B. Now need to iwl_flush the output buffer...not done in here!!


Generated on Mon Dec 21 14:14:44 2009 for PSI by  doxygen 1.5.6