MPQC  3.0.0-alpha

Class OrbitalSpace describes a range of orbitals that are linear combinations of Gaussian basis functions (e.g. More...

#include <chemistry/qc/wfn/orbitalspace.h>

Inheritance diagram for sc::OrbitalSpace:
sc::SavableState sc::DescribedClass sc::RefCount sc::AtomicOrbitalSpace sc::EmptyOrbitalSpace sc::MaskedOrbitalSpace sc::NonblockedOrbitalSpace sc::OrbitalSpaceUnion sc::OrderedOrbitalSpace< Order > sc::OrderedSpinOrbitalSpace< Order >

Public Types

enum  IndexOrder { symmetry = 0, energy = 1, correlated = 2, general = 3 }
 Describes the ordering of indices. More...
 

Public Member Functions

 OrbitalSpace (StateIn &)
 
 OrbitalSpace (const OrbitalSpace &)
 Copy constructor.
 
 OrbitalSpace (const std::string &id, const std::string &name, const RefSCMatrix &full_coefs, const RefDiagSCMatrix &evals, const Ref< GaussianBasisSet > &basis, const Ref< Integral > &integral, const std::vector< unsigned int > &block_offsets, const std::vector< unsigned int > &block_sizes)
 This function constructs an OrbitalSpace from a set of vectors whose coefficients are given by full_coefs. More...
 
 OrbitalSpace (const std::string &id, const std::string &name, const RefSCMatrix &full_coefs, const Ref< GaussianBasisSet > &basis, const Ref< Integral > &integral, const std::vector< unsigned int > &block_offsets, const std::vector< unsigned int > &block_sizes, const IndexOrder &moorder=symmetry, const RefDiagSCMatrix &evals=0)
 This function constructs an OrbitalSpace from (blocked) space full_coefs. More...
 
 OrbitalSpace (const std::string &id, const std::string &name, const RefSCMatrix &full_coefs, const Ref< GaussianBasisSet > &basis, const Ref< Integral > &integral, const RefDiagSCMatrix &evals, unsigned int nfzc, unsigned int nfzv, const IndexOrder &moorder=energy)
 This constructor should be used when the OrbitalSpace object is a subspace of a full orbital space. More...
 
 OrbitalSpace (const std::string &id, const std::string &name, const RefSCMatrix &full_coefs, const Ref< GaussianBasisSet > &basis, const Ref< Integral > &integral)
 This constructor should be used when the OrbitalSpace object is the full orbital space. More...
 
 OrbitalSpace (const std::string &id, const std::string &name, const Ref< OrbitalSpace > &orig_space, const RefSCMatrix &new_coefs, const Ref< GaussianBasisSet > &new_basis)
 This constructor is a true hack introduced because I have no idea how to construct what I need. More...
 
void save_data_state (StateOut &)
 Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. More...
 
OrbitalSpaceoperator= (const OrbitalSpace &other)
 
const std::string & name () const
 Returns a self-contained expressive label.
 
const std::string & id () const
 Returns a short (preferably, one, max 10 character) identifier for the space. More...
 
const RefSCDimensiondim () const
 returns the dimension corresponding to this space
 
const Ref< GaussianBasisSet > & basis () const
 Returns the AO basis set.
 
const Ref< Integral > & integral () const
 Returns the integral factory used to instantiate the coefficient matrix.
 
const RefSCMatrixcoefs () const
 Returns the coefficient matrix.
 
RefSCMatrix coefs_nb () const
 Returns the coefficient matrix built with a non-blocked kit.
 
const RefDiagSCMatrixevals () const
 Returns the "eigenvalues" matrix.
 
const std::vector< unsigned int > & orbsym () const
 Returns the orbital symmetry array.
 
unsigned int rank () const
 Returns the rank of the space.
 
unsigned int nblocks () const
 Returns the number of blocks.
 
const std::vector< unsigned int > & block_sizes () const
 Returns the number of orbitals in each block.
 
size_t memory_in_use () const
 Returns how much "significant" (i.e. O^2) memory this object uses.
 
void print (std::ostream &o=ExEnv::out0()) const
 Prints out this.
 
void print_summary (std::ostream &os) const
 Produces a short summary.
 
void print_detail (std::ostream &o=ExEnv::out0()) const
 Prints out this in details (coefficients, etc.)
 
- Public Member Functions inherited from sc::SavableState
SavableStateoperator= (const SavableState &)
 
void save_state (StateOut &)
 Save the state of the object as specified by the StateOut object. More...
 
void save_object_state (StateOut &)
 This can be used for saving state when the exact type of the object is known for both the save and the restore. More...
 
virtual void save_vbase_state (StateOut &)
 Save the virtual bases for the object. More...
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const MPQC__NOEXCEPT
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
Ref< DescribedClassref ()
 Return this object wrapped up in a Ref smart pointer. More...
 
- Public Member Functions inherited from sc::RefCount
size_t identifier () const
 Return the unique identifier for this object that can be compared for different objects of different types. More...
 
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 

Protected Member Functions

 OrbitalSpace ()
 Empty constructor only useful for derived classes – don't forget to call init()
 
void init (const std::string &id, const std::string &name, const Ref< GaussianBasisSet > &basis, const Ref< Integral > &integral, const RefSCMatrix &coefs, const RefDiagSCMatrix &evals, const std::vector< unsigned int > &orbsyms, unsigned int nblocks, const std::vector< BlockedOrbital > &indexmap)
 initialize the object by mapping the original space to a space with indexmap
 
- Protected Member Functions inherited from sc::SavableState
 SavableState (const SavableState &)
 
 SavableState (StateIn &)
 Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above. More...
 
- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

Additional Inherited Members

- Static Public Member Functions inherited from sc::SavableState
static void save_state (SavableState *s, StateOut &)
 
static SavableStaterestore_state (StateIn &si)
 Restores objects saved with save_state. More...
 
static SavableStatekey_restore_state (StateIn &si, const char *keyword)
 Like restore_state, but keyword is used to override values while restoring.
 
static SavableStatedir_restore_state (StateIn &si, const char *objectname, const char *keyword=0)
 

Detailed Description

Class OrbitalSpace describes a range of orbitals that are linear combinations of Gaussian basis functions (e.g.

atomic orbitals). In general, such sets are subspaces of a full space of orbitals supported by the given basis. Orbitals can be symmetry-blocked, ordered by energy, etc. Examples of sets that can be described using OrbitalSpace are occupied MOs and virtual MOs.

Member Enumeration Documentation

◆ IndexOrder

Describes the ordering of indices.

Enumerator
symmetry 

symmetry corresponds to orbitals ordered by symmetry, then (i.e. within each symmetry block) by energy.

energy 

energy corresponds to orbitals ordered by energy.

correlated 

correlated corresponds to orbitals ordered as: frozen occupied, active occupied, active virtual, frozen virtual; within each block orbitals are ordered by symmetry, and within each symmetry block orbitals are ordered by energy.

general 

any other

Constructor & Destructor Documentation

◆ OrbitalSpace() [1/5]

sc::OrbitalSpace::OrbitalSpace ( const std::string &  id,
const std::string &  name,
const RefSCMatrix full_coefs,
const RefDiagSCMatrix evals,
const Ref< GaussianBasisSet > &  basis,
const Ref< Integral > &  integral,
const std::vector< unsigned int > &  block_offsets,
const std::vector< unsigned int > &  block_sizes 
)

This function constructs an OrbitalSpace from a set of vectors whose coefficients are given by full_coefs.

Block i will contain vectors [ block_offsets[i], block_offsets[i]+block_sizes[i] ). The number of blocks is given by block_offsets.size(); it must be identical to block_sizes.size().

Parameters
id– identifier for this orbital space
name– descriptive name for this orbital space
full_coefs– symmetry-blocked transformation coefficient matrix (AO by MO) for the full space
evals– the orbital energies
basis– basis set
integral– integral factory
block_offsets– block offsets
block_sizes– new block sizes

◆ OrbitalSpace() [2/5]

sc::OrbitalSpace::OrbitalSpace ( const std::string &  id,
const std::string &  name,
const RefSCMatrix full_coefs,
const Ref< GaussianBasisSet > &  basis,
const Ref< Integral > &  integral,
const std::vector< unsigned int > &  block_offsets,
const std::vector< unsigned int > &  block_sizes,
const IndexOrder moorder = symmetry,
const RefDiagSCMatrix evals = 0 
)

This function constructs an OrbitalSpace from (blocked) space full_coefs.

Block i will contain vectors [ offsets[i], offsets[i]+nmopi[i]-1 ] . By default, the space maintains the same blocked structure and the same order within blocks as the original space (moorder=symmetry). If moorder=energy and eigenvalues evals are provided, then all vectors will be put in one block and sorted according to ascending evals.

Parameters
id– identifier for this orbital space
name– descriptive name for this orbital space
full_coefs– symmetry-blocked transformation coefficient matrix (AO by MO) for the full space
basis– basis set
integral– integral factory
block_offsets– block offsets
block_sizes– new block sizes
moorder– specifies new ordering of vectors
evals– used to sort the vectors

◆ OrbitalSpace() [3/5]

sc::OrbitalSpace::OrbitalSpace ( const std::string &  id,
const std::string &  name,
const RefSCMatrix full_coefs,
const Ref< GaussianBasisSet > &  basis,
const Ref< Integral > &  integral,
const RefDiagSCMatrix evals,
unsigned int  nfzc,
unsigned int  nfzv,
const IndexOrder moorder = energy 
)

This constructor should be used when the OrbitalSpace object is a subspace of a full orbital space.

Similarly to the previous constructor, it constructs an OrbitalSpace object using a symmetry-blocked transformation coefficient matrix (AO by MO) for the full space, basis set, "eigenvalues" and the number of orbitals with lowest (nfzc) and highest (nfzv) eigenvalues to be dropped. The orbitals in the constructed space are ordered by energy.

◆ OrbitalSpace() [4/5]

sc::OrbitalSpace::OrbitalSpace ( const std::string &  id,
const std::string &  name,
const RefSCMatrix full_coefs,
const Ref< GaussianBasisSet > &  basis,
const Ref< Integral > &  integral 
)

This constructor should be used when the OrbitalSpace object is the full orbital space.

The orbitals will be symmetry-blocked.

◆ OrbitalSpace() [5/5]

sc::OrbitalSpace::OrbitalSpace ( const std::string &  id,
const std::string &  name,
const Ref< OrbitalSpace > &  orig_space,
const RefSCMatrix new_coefs,
const Ref< GaussianBasisSet > &  new_basis 
)

This constructor is a true hack introduced because I have no idea how to construct what I need.

It will copy orig_space but replace its coefs with new_coefs, and its basis with new_basis.

Member Function Documentation

◆ id()

const std::string& sc::OrbitalSpace::id ( ) const

Returns a short (preferably, one, max 10 character) identifier for the space.

Suggested convention: i – active occupied orbitals a – active unoccupied orbitals m – all occupied orbitals e – all virtual orbitals p – all Hartree-Fock orbitals p' – all RI functions

◆ save_data_state()

void sc::OrbitalSpace::save_data_state ( StateOut )
virtual

Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them.

This must be implemented by the derived class if the class has data.

Reimplemented from sc::SavableState.

Reimplemented in sc::EmptyOrbitalSpace, sc::OrbitalSpaceUnion, sc::AtomicOrbitalSpace, sc::NonblockedOrbitalSpace, sc::MaskedOrbitalSpace, sc::OrderedSpinOrbitalSpace< Order >, and sc::OrderedOrbitalSpace< Order >.

Referenced by sc::OrderedOrbitalSpace< Order >::save_data_state(), and sc::OrderedSpinOrbitalSpace< Order >::save_data_state().


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

Generated at Sun Jan 26 2020 23:24:08 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.