32#ifndef _chemistry_qc_mbptr12_moindexspace_h
33#define _chemistry_qc_mbptr12_moindexspace_h
36#include <util/ref/ref.h>
37#include <util/state/statein.h>
38#include <util/state/stateout.h>
39#include <math/scmat/abstract.h>
40#include <util/state/statein.h>
41#include <chemistry/qc/basis/basis.h>
60 enum IndexOrder { symmetry = 0, energy = 1, undefined = 2 };
82 const vector<int>&
offsets,
const vector<int>& nmopi,
108 const std::string
name()
const;
156 vector<int> offsets_;
157 vector<int> map_to_full_space_;
162 void check_mosym()
const;
175 static void dquicksort(
double *item,
int *index,
int n);
176 static void dqs(
double *item,
int *index,
int left,
int right);
static std::ostream & out0()
Return an ostream that writes from node 0.
Class MOIndexSpace describes a range of molecular orbitals or similar objects that are linear combina...
Definition: moindexspace.h:55
int nblocks() const
Returns the number of blocks.
size_t memory_in_use() const
Returns how much "significant" (i.e. O^2) memory this object uses.
const RefDiagSCMatrix evals() const
Returns the "eigenvalues" matrix.
void print(std::ostream &o=ExEnv::out0()) const
Prints out this.
int to_full_space(const int i) const
Returns the full-space index.
Ref< Integral > integral() const
Returns the integral factory used to instantiate the coefficient matrix.
vector< int > nmo() const
Returns the number of orbitals in each block.
int rank() const
Returns the rank of the space.
MOIndexSpace(std::string name, const RefSCMatrix &full_coefs, const Ref< GaussianBasisSet > basis, const Ref< Integral > &integral, const RefDiagSCMatrix &evals, int nfzc, int nfzv, IndexOrder moorder=energy)
This constructor should be used when the MOIndexSpace object is a subspace of a full orbital space.
MOIndexSpace(std::string name, const Ref< MOIndexSpace > &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.
int full_rank() const
Returns the rank of the full space.
MOIndexSpace(std::string name, const RefSCMatrix &full_coefs, const Ref< GaussianBasisSet > basis, const Ref< Integral > &integral, const vector< int > &offsets, const vector< int > &nmopi, IndexOrder moorder=symmetry, const RefDiagSCMatrix &evals=0)
This function constructs an MOIndexSpace from (blocked) space full_coefs.
void print_summary(std::ostream &os) const
Produces a short summary.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
const RefSCMatrix coefs() const
Returns the coefficient matrix.
IndexOrder moorder() const
Returns the order of the orbitals.
MOIndexSpace(std::string name, const RefSCMatrix &full_coefs, const Ref< GaussianBasisSet > basis, const Ref< Integral > &integral)
This constructor should be used when the MOIndexSpace object is the full orbital space.
IndexOrder
Describes the ordering of indices.
Definition: moindexspace.h:60
const std::string name() const
Returns the name of this MOIndexSpace.
vector< int > offsets() const
Returns the full-space index of the first orbital in each block.
vector< int > mosym() const
Returns the orbital symmetry array.
const Ref< GaussianBasisSet > basis() const
Returns the AO basis set.
The RefDiagSCMatrix class is a smart pointer to an DiagSCMatrix specialization.
Definition: matrix.h:380
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:156
The RefSCMatrix class is a smart pointer to an SCMatrix specialization.
Definition: matrix.h:135
A template class that maintains references counts.
Definition: ref.h:332
Base class for objects that can save/restore state.
Definition: state.h:46
Restores objects that derive from SavableState.
Definition: statein.h:70
Serializes objects that derive from SavableState.
Definition: stateout.h:61