#include <DOCIHamtilonian.h>
|
| static unsigned int | CountBits (mybitset) |
| |
| static int | CalcSign (unsigned int i, unsigned int j, const mybitset a) |
| |
| static unsigned int | CountBits (mybitset) |
| |
| static int | CalcSign (unsigned int i, unsigned int j, const mybitset a) |
| |
| static unsigned int | CountBits (mybitset) |
| |
| static int | CalcSign (unsigned int i, unsigned int j, const mybitset a) |
| |
DOCIHamiltonian will store the actual hamiltonian in a sparse format It needs a Permutation object for the basisset and a Molecule object for the matrix elements
Definition at line 18 of file DOCIHamtilonian.h.
| DOCIHamiltonian::DOCIHamiltonian |
( |
const Molecule & |
mol | ) |
|
| DOCIHamiltonian::DOCIHamiltonian |
( |
Molecule && |
mol | ) |
|
| virtual doci::DOCIHamiltonian::~DOCIHamiltonian |
( |
| ) |
|
|
virtualdefault |
| doci::DOCIHamiltonian::DOCIHamiltonian |
( |
const Molecule & |
| ) |
|
| doci::DOCIHamiltonian::DOCIHamiltonian |
( |
Molecule && |
mol | ) |
|
| virtual doci::DOCIHamiltonian::~DOCIHamiltonian |
( |
| ) |
|
|
virtualdefault |
| doci::DOCIHamiltonian::DOCIHamiltonian |
( |
const Molecule & |
| ) |
|
| doci::DOCIHamiltonian::DOCIHamiltonian |
( |
Molecule && |
mol | ) |
|
| virtual doci::DOCIHamiltonian::~DOCIHamiltonian |
( |
| ) |
|
|
virtualdefault |
| void DOCIHamiltonian::Build |
( |
| ) |
|
| void doci::DOCIHamiltonian::Build |
( |
| ) |
|
| void doci::DOCIHamiltonian::Build |
( |
| ) |
|
| double doci::DOCIHamiltonian::CalcEnergy |
( |
| ) |
const |
| double DOCIHamiltonian::CalcEnergy |
( |
| ) |
const |
Calcalate the lowest eigenvalue using lanczos method. We use arpack for this.
- Returns
- the lowest eigenvalue
Definition at line 291 of file DOCIHamiltonian.cpp.
| double doci::DOCIHamiltonian::CalcEnergy |
( |
| ) |
const |
| std::vector<double> doci::DOCIHamiltonian::CalcEnergy |
( |
int |
| ) |
const |
| std::vector< double > DOCIHamiltonian::CalcEnergy |
( |
int |
number | ) |
const |
Calculate the number lowest energy levels
- Parameters
-
| number | the number of energy levels to calculate |
- Returns
- list of the energies
Definition at line 507 of file DOCIHamiltonian.cpp.
| static int doci::DOCIHamiltonian::CalcSign |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
const mybitset |
a |
|
) |
| |
|
static |
| static int doci::DOCIHamiltonian::CalcSign |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
const mybitset |
a |
|
) |
| |
|
static |
| int DOCIHamiltonian::CalcSign |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
const mybitset |
a |
|
) |
| |
|
static |
Calculate the sign by counting the number of set bits in a between position i and j
- Parameters
-
| i | the first position |
| j | the second position, i < j |
| a | the set of bits to calcalute on |
- Returns
- the number of bits set between i and j in a
Definition at line 467 of file DOCIHamiltonian.cpp.
| static unsigned int doci::DOCIHamiltonian::CountBits |
( |
mybitset |
| ) |
|
|
static |
| static unsigned int doci::DOCIHamiltonian::CountBits |
( |
mybitset |
| ) |
|
|
static |
| unsigned int DOCIHamiltonian::CountBits |
( |
mybitset |
bits | ) |
|
|
static |
Wrapper function for gcc buildin popcount
- Parameters
-
| bits | the unsigned long long to count the bits from |
- Returns
- the number of ones in bits
Definition at line 451 of file DOCIHamiltonian.cpp.
| std::pair< double,std::vector<double> > doci::DOCIHamiltonian::Diagonalize |
( |
| ) |
const |
| std::pair< double, std::vector< double > > DOCIHamiltonian::Diagonalize |
( |
| ) |
const |
Calcalate the lowest eigenvalue and eigenvector using lanczos method. We use arpack for this.
- Returns
- a pair of the lowest eigenvalue and corresponding normalized eigenvector
Definition at line 276 of file DOCIHamiltonian.cpp.
| std::pair< double,std::vector<double> > doci::DOCIHamiltonian::Diagonalize |
( |
| ) |
const |
| std::pair< std::vector<double>,helpers::matrix > doci::DOCIHamiltonian::DiagonalizeFull |
( |
| ) |
const |
| std::pair< std::vector< double >, helpers::matrix > DOCIHamiltonian::DiagonalizeFull |
( |
| ) |
const |
Convert the sparse matrix to a full matrix and use exact diagonalization to find the eigenvalues and eigenvectors.
- Returns
- a pair of a vector with all the eigenvalues (sorted) and a matrix with the corresponding orthonormal eigenvectors
Definition at line 421 of file DOCIHamiltonian.cpp.
| std::pair< std::vector<double>,helpers::matrix > doci::DOCIHamiltonian::DiagonalizeFull |
( |
| ) |
const |
| unsigned int doci::DOCIHamiltonian::getdim |
( |
| ) |
const |
| unsigned int doci::DOCIHamiltonian::getdim |
( |
| ) |
const |
| unsigned int DOCIHamiltonian::getdim |
( |
| ) |
const |
| Molecule const& doci::DOCIHamiltonian::getMolecule |
( |
| ) |
const |
| Molecule const& doci::DOCIHamiltonian::getMolecule |
( |
| ) |
const |
| Molecule const & DOCIHamiltonian::getMolecule |
( |
| ) |
const |
| Molecule& doci::DOCIHamiltonian::getMolecule |
( |
| ) |
|
| Molecule& doci::DOCIHamiltonian::getMolecule |
( |
| ) |
|
| Molecule & DOCIHamiltonian::getMolecule |
( |
| ) |
|
| Permutation const & DOCIHamiltonian::getPermutation |
( |
| ) |
const |
| Permutation const& doci::DOCIHamiltonian::getPermutation |
( |
| ) |
const |
| Permutation const& doci::DOCIHamiltonian::getPermutation |
( |
| ) |
const |
| void doci::DOCIHamiltonian::ReadFromFile |
( |
std::string |
| ) |
|
| void doci::DOCIHamiltonian::ReadFromFile |
( |
std::string |
| ) |
|
| void DOCIHamiltonian::ReadFromFile |
( |
std::string |
filename | ) |
|
Read the sparse matrix from a file. Reads only the sparse matrix, not number of electrons, ... You still need to construct a object first with a suited Molecule object.
- Parameters
-
| filename | the name of the file |
Definition at line 497 of file DOCIHamiltonian.cpp.
| void doci::DOCIHamiltonian::SaveToFile |
( |
std::string |
| ) |
const |
| void DOCIHamiltonian::SaveToFile |
( |
std::string |
filename | ) |
const |
Save the sparse matrix to a file. Stores only the sparse matrix, not number of electrons, ...
- Parameters
-
| filename | the name of the file |
Definition at line 486 of file DOCIHamiltonian.cpp.
| void doci::DOCIHamiltonian::SaveToFile |
( |
std::string |
| ) |
const |
The documentation for this class was generated from the following files: