psi::libtrans::IntegralTransform Class Reference

#include <integraltransform.h>

List of all members.

Public Types

enum  TransformationType { Restricted, Unrestricted, SemiCanonical }
enum  MOOrdering { QTOrder, PitzerOrder }
enum  OutputType { DPDOnly, IWLOnly, IWLAndDPD }
enum  FrozenOrbitals { None, OccOnly, VirOnly, OccAndVir }
enum  SpinType { Alpha, Beta }

Public Member Functions

 IntegralTransform (const SpaceVec &spaces, TransformationType transformationType=Restricted, OutputType outputType=DPDOnly, MOOrdering moOrdering=QTOrder, FrozenOrbitals frozenOrbitals=OccAndVir, bool initialize=true)
void initialize ()
void presort_so_tei ()
void generate_oei ()
void transform_oei (const shared_ptr< MOSpace > s1, const shared_ptr< MOSpace > s2, const char *label)
void transform_tei (const shared_ptr< MOSpace > s1, const shared_ptr< MOSpace > s2, const shared_ptr< MOSpace > s3, const shared_ptr< MOSpace > s4)
void transform_tei_first_half (const shared_ptr< MOSpace > s1, const shared_ptr< MOSpace > s2)
void transform_tei_second_half (const shared_ptr< MOSpace > s1, const shared_ptr< MOSpace > s2, const shared_ptr< MOSpace > s3, const shared_ptr< MOSpace > s4)
void print_dpd_lookup ()
int DPD_ID (const char c)
int DPD_ID (char *str)
int DPD_ID (const char *str)
int DPD_ID (const std::string &str)
int DPD_ID (const shared_ptr< MOSpace > s1, const shared_ptr< MOSpace > s2, SpinType spin, bool pack)
void set_print (int n)
 Set the level of printing used during transformations (0 -> 6).
int get_print () const
 The level of printing used during transformations.
void set_keep_ht_ints (bool val)
 Set the library to keep or delete the half-transformed integrals in DPD form after processing.
bool get_keep_ht_ints () const
 Whether the library will keep or delete the half-transformed integrals in DPD form after processing.
void set_keep_dpd_so_ints (bool val)
 Set the library to keep or delete the SO integrals in DPD form after processing.
bool get_keep_dpd_so_ints () const
 Whether the library will keep or delete the SO integrals in DPD form after processing.
void set_keep_iwl_so_ints (bool val)
 Set the library to keep or delete the SO integrals in IWL form after processing.
bool get_keep_iwl_so_ints () const
 Whether the library will keep or delete the SO integrals in IWL form after processing.
void set_memory (size_t memory)
 Set the memory (in MB) available to the library.
size_t get_memory () const
 The amount of memory (in MB) available to the library.
void set_dpd_id (int n)
 Set the number of the DPD instance to be used in the transformation.
int get_dpd_id () const
 The number of the DPD instance used in the transformation.

Protected Member Functions

void semicanonicalize ()
void raid_checkpoint ()
void process_eigenvectors ()
void process_spaces ()
void trans_one (int m, int n, double *input, double *output, double **C, int soOffset, int *order)
void build_fzc_and_fock (int p, int q, int r, int s, double value, double *aFzcD, double *bFzcD, double *aFzcOp, double *bFzcOp, double *aD, double *bD, double *aFock, double *bFock)
void idx_permute_presort (dpdfile4 *File, int &thisBucket, int **&bucketMap, int **&bucketOffset, int &p, int &q, int &r, int &s, double &value)
void idx_error (const char *message, int p, int q, int r, int s, int pq, int rs, int pq_sym, int rs_sym)

Protected Attributes

PSIO_psio
Chkpt_chkpt
TransformationType _transformationType
const SpaceVec & _uniqueSpaces
MOOrdering _moOrdering
OutputType _outputType
FrozenOrbitals _frozenOrbitals
std::vector< char > _spacesUsed
std::vector< int * > _spaceArrays
std::map< char, int * > _aOrbsPI
std::map< char, int * > _bOrbsPI
std::map< char, double *** > _aMOCoefficients
std::map< char, double *** > _bMOCoefficients
std::map< char, int * > _aIndices
std::map< char, int * > _bIndices
std::map< std::string, int > _dpdLookup
int _dpdIntFile
int _aHtIntFile
int _bHtIntFile
int _iwlAAIntFile
int _iwlABIntFile
int _iwlBBIntFile
int _nirreps
int _nmo
int _nso
int _nTriSo
int _nTriMo
int _nao
int _nfzc
int _nfzv
char * _spaces
char ** _labels
double _enuc
double _escf
double _tolerance
size_t _memory
int _moIntFileAA
int _moIntFileAB
int _moIntFileBB
int _myDPDNum
int _print
int * _sopi
int * _sosym
int * _mopi
int * _clsdpi
int * _openpi
int * _frzcpi
int * _frzvpi
int * _cacheFiles
int ** _cacheList
double *** _Ca
double *** _Cb
bool _keepIwlSoInts
bool _keepDpdSoInts
bool _keepHtInts
bool _printTei
bool _useIWL
bool _useDPD


Detailed Description

The IntegralTransform class transforms one- and two-electron integrals within general spaces

Member Enumeration Documentation

Possible Transformations:-

Restricted - Same alpha and beta orbitals Unrestricted - Different alpha and beta orbitals SemiCanonical - Start from restricted orbitals and diagnonalize alpha

  • and beta occ-occ and vir-vir block seperately, leading
  • to different alpha and beta orbitals

Ordering of the resulting integrals:-

QTOrder - Ordered by class (frozen docc < docc < socc < virtual < frozen virtual ) then by irrep within these classes Pitzer - Ordered by irreps, then by orbital energy within irreps

Output format for the resulting integrals:-

DPDOnly - Write the integrals to (a) DPD structure(s) IWLOnly - Write the integrals to (an) IWL structure(s) IWLAndDPD - Write the integrals to an IWL-formatted file in addition to the

  • DPD buffer

Which orbitals are to be "frozen" i.e. excluded from the transformation. N.B. Orbitals are only frozen if input detected a request to do so. That means that requesting a frozen-core transformation will result in an all-electron transformation, unless some orbitals were actually frozen.

None - No orbitals are excluded OccOnly - Only the frozen occupied orbitals are excluded VirOnly - Only the frozen virtual orbitals are excluded OccAndVir - The frozen occupied and the frozen core orbitals are excluded

The spin of the electron. This could, of course, be a boolean but an enum makes things a little more transparent

Alpha = spin up Beta = spin down


Constructor & Destructor Documentation

psi::libtrans::IntegralTransform::IntegralTransform ( const SpaceVec &  spaces,
TransformationType  transformationType = Restricted,
OutputType  outputType = DPDOnly,
MOOrdering  moOrdering = QTOrder,
FrozenOrbitals  frozenOrbitals = OccAndVir,
bool  initialize = true 
)

Set up a transformation involving four MO spaces

Parameters:
spaces A vector containing smart pointers to the unique space(s) involved in any transformations that this object will perform
transformationType The type of transformation, described by the enum TransformationType
moOrdering The ordering convention of the resulting integrals, see enum MOOrdering. This only affects IWL output.
outputType The storage format of the transformed integrals, see enum OutputType
frozenOrbitals Which orbitals are to be excluded from the transformation, see enum FrozenOrbitals
initialize Whether to initialize during construction or not. Useful if some options need to be tweaked before initialization.


Member Function Documentation

void psi::libtrans::IntegralTransform::initialize (  ) 

Sets up the DPD buffers and performs semicanonicalization, if necessary.

void psi::libtrans::IntegralTransform::presort_so_tei (  ) 

Presort the two-electron integrals into DPD buffers to prepare them for the transformation. The frozen core operator is built simultaneously. If this action has already been performed, it will just load the frozen core operator from disk and return.

void psi::libtrans::IntegralTransform::generate_oei (  ) 

Generates the frozen core operator, Fock matrix and one electron integrals in the MO basis by looping over the IWL SO integral file on disk. The resulting integrals are written to PSIF_SO_OEI and are labelled according to the macros in psifiles.h. Regardless of any parameters, all integrals are transformed and only IWL format is used to store the results.

void psi::libtrans::IntegralTransform::transform_oei ( const shared_ptr< MOSpace s1,
const shared_ptr< MOSpace s2,
const char *  label 
)

Transforms the one-electron integrals. This function is currently limited to IWL input and output and Pitzer ordering, regarless of how the parameters passed to the constructor.

Parameters:
s1 - the MOSpace for the bra
s2 - the MOSpace for the ket
N.B. This need not be called if a two-electron transformation is performed, as the sort_so_tei routine will perform this transformation in addition to the Fock matrix construction.

void psi::libtrans::IntegralTransform::transform_tei ( const shared_ptr< MOSpace s1,
const shared_ptr< MOSpace s2,
const shared_ptr< MOSpace s3,
const shared_ptr< MOSpace s4 
)

Transform the two-electron integrals from the SO to the MO basis in the spaces specified

Parameters:
s1 - the MO space for the first index
s2 - the MO space for the second index
s3 - the MO space for the third index
s4 - the MO space for the fourth index

void psi::libtrans::IntegralTransform::print_dpd_lookup (  ) 

Prints the dpd index for each pair type used in this object

int psi::libtrans::IntegralTransform::DPD_ID ( const char  c  ) 

Computes the DPD number of the space corresponding to a given MO space label

Parameters:
c - the label of the MO space
Returns:
the number associated with the MO space in the transformation object's DPD instance

int psi::libtrans::IntegralTransform::DPD_ID ( char *  str  ) 

Just a wrapper to the string version.

int psi::libtrans::IntegralTransform::DPD_ID ( const char *  str  ) 

Just a wrapper to the string version, provided for those const-safe role models out there

int psi::libtrans::IntegralTransform::DPD_ID ( const std::string &  str  ) 

Computes the DPD number that gives the most packing for a given pair of spaces

Parameters:
str - a string describing the pair packing scheme
The following entries are possible for str "[a,a]" - Both indices belong to space 'a' and are not packed "[a>a]+" - Both indices belong to space 'a' and are packed without the diagonal elements. The tensor is symmetric w.r.t. permutation of these indices. "[a>a]-" - Both indices belong to space 'a' and are packed without the diagonal elements. The tensor is antisymmetric w.r.t. permutation of these indices. "[a>=a]+" - Both indices belong to space 'a' and are packed with the diagonal elements. The tensor is symmetric w.r.t. permutation of these indices. "[a>=a]-" - Both indices belong to space 'a' and are packed with the diagonal elements. The tensor is antisymmetric w.r.t. permutation of these indices. [a,b] - One index belongs to space 'a', the other to 'b'. No packing is possible.

int psi::libtrans::IntegralTransform::DPD_ID ( const shared_ptr< MOSpace s1,
const shared_ptr< MOSpace s2,
SpinType  spin,
bool  pack 
)

Computes the DPD number that gives the most packing for a given pair of spaces This version is specifically for chemists' notation integrals and is useful when the spaces are not known at call time, because it can decide how to pack the integrals based on whether s1 and s2 are equivalent or not. For all other purposes, use the string based routines of the same name.

Parameters:
s1 - the first MoSpace
s2 - the second MoSpace
spin - the spin of the first MoSpace; either Alpha or Beta can be specified
  • for SO spaces or for restricted transformations
pack - if true, compute the pair number with maximum packing (for disk storage),
  • else assume no packing (for in-core handling)
Returns:
the DPD number to use for disk storage

void psi::libtrans::IntegralTransform::semicanonicalize (  )  [protected]

This will read in the alpha and beta Fock matrices, which were computed during the two-electron SO integral sort and diagonalize the occ-occ and vir-vir blocks in the alpha and beta spaces. This routine is called automatically if the TransformationType is set to Semicanonical. The resulting integral transformation is then unrestricted.

void psi::libtrans::IntegralTransform::raid_checkpoint (  )  [protected]

Gathers MO information from the checkpoint file

void psi::libtrans::IntegralTransform::process_eigenvectors (  )  [protected]

Sets up the eigenvectors for the transformation by querying the MO spaces passed into the constructor. This is done seperately to the DPD setup to give us a chance to semicanonicalize the orbitals if necessary.

void psi::libtrans::IntegralTransform::process_spaces (  )  [protected]

Sets up the DPD information for the transformation by querying the MO spaces passed into the constructor

void psi::libtrans::IntegralTransform::trans_one ( int  m,
int  n,
double *  input,
double *  output,
double **  C,
int  soOffset,
int *  order 
) [protected]

Transforms a packed symmetric matrix.

Parameters:
m - input matrix row dimension
n - output matrix row dimension
input - pointer to input integrals (the lower-triangle of a symmetric matrix)
pointer to output integrals (the lower-triangle of a symmetric matrix)
C transformation matrix (rectangular, m X n)
soOffset - the point in the full list of SOs where we want to start. This is useful for transforming integrals one irrep at a time and in this case the offset would correspond to the position of the first orbital in the current irrep.
order - a reordering array to change the order of the output

void psi::libtrans::IntegralTransform::build_fzc_and_fock ( int  p,
int  q,
int  r,
int  s,
double  value,
double *  aFzcD,
double *  bFzcD,
double *  aFzcOp,
double *  bFzcOp,
double *  aD,
double *  bD,
double *  aFock,
double *  bFock 
) [protected]

Builds the frozen core operator and Fock matrix using the integral currently in memory. N.B. all matrices are passed in lower triangular array form.

Parameters:
p - the first index in the integral
q - the second index in the integral
r - the third index in the integral
s - the fourth index in the integral
value - the integral (pq|rs)
aFzcD - the alpha frozen core density
bFzcD - the beta frozen core density
aFzcOp - the alpha frozen core operator
bFzcOp - the beta frozen core operator
aD - the alpha density
bD - the beta density
aFock - the alpha Fock matrix
bFock - the beta Fock matrix


The documentation for this class was generated from the following files:

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