pairinteraction
A Rydberg Interaction Calculator
pairinteraction::Database Class Reference

#include <Database.hpp>

Public Member Functions

 Database ()
 
 Database (bool download_missing)
 
 Database (std::filesystem::path database_dir)
 
 Database (bool download_missing, bool use_cache, std::filesystem::path database_dir)
 
 ~Database ()
 
std::shared_ptr< const KetAtomget_ket (const std::string &species, const AtomDescriptionByParameters &description)
 
template<typename Scalar >
std::shared_ptr< const BasisAtom< Scalar > > get_basis (const std::string &species, const AtomDescriptionByRanges &description, std::vector< size_t > additional_ket_ids)
 
template<typename Scalar >
Eigen::SparseMatrix< Scalar, Eigen::RowMajor > get_matrix_elements (std::shared_ptr< const BasisAtom< Scalar > > initial_basis, std::shared_ptr< const BasisAtom< Scalar > > final_basis, OperatorType type, int q)
 
bool get_download_missing () const
 
bool get_use_cache () const
 
std::filesystem::path get_database_dir () const
 

Static Public Member Functions

static Databaseget_global_instance ()
 
static Databaseget_global_instance (bool download_missing)
 
static Databaseget_global_instance (std::filesystem::path database_dir)
 
static Databaseget_global_instance (bool download_missing, bool use_cache, std::filesystem::path database_dir)
 

Detailed Description

Definition at line 38 of file Database.hpp.

Constructor & Destructor Documentation

◆ Database() [1/4]

pairinteraction::Database::Database ( )

Definition at line 30 of file Database.cpp.

◆ Database() [2/4]

pairinteraction::Database::Database ( bool  download_missing)

Definition at line 32 of file Database.cpp.

◆ Database() [3/4]

pairinteraction::Database::Database ( std::filesystem::path  database_dir)

Definition at line 35 of file Database.cpp.

◆ Database() [4/4]

pairinteraction::Database::Database ( bool  download_missing,
bool  use_cache,
std::filesystem::path  database_dir 
)

Definition at line 38 of file Database.cpp.

References pairinteraction::paths::get_config_directory(), and pairinteraction::utils::hash_combine().

+ Here is the call graph for this function:

◆ ~Database()

pairinteraction::Database::~Database ( )
default

Member Function Documentation

◆ get_basis()

template<typename Scalar >
std::shared_ptr< const BasisAtom< Scalar > > pairinteraction::Database::get_basis ( const std::string &  species,
const AtomDescriptionByRanges description,
std::vector< size_t >  additional_ket_ids 
)

◆ get_database_dir()

std::filesystem::path pairinteraction::Database::get_database_dir ( ) const

Definition at line 1058 of file Database.cpp.

◆ get_download_missing()

bool pairinteraction::Database::get_download_missing ( ) const

Definition at line 1054 of file Database.cpp.

◆ get_global_instance() [1/4]

Database & pairinteraction::Database::get_global_instance ( )
static

Definition at line 1068 of file Database.cpp.

Referenced by pairinteraction::DOCTEST_TEST_CASE(), and pairinteraction::run_unit_tests().

+ Here is the caller graph for this function:

◆ get_global_instance() [2/4]

Database & pairinteraction::Database::get_global_instance ( bool  download_missing)
static

Definition at line 1073 of file Database.cpp.

◆ get_global_instance() [3/4]

Database & pairinteraction::Database::get_global_instance ( bool  download_missing,
bool  use_cache,
std::filesystem::path  database_dir 
)
static

Definition at line 1097 of file Database.cpp.

◆ get_global_instance() [4/4]

Database & pairinteraction::Database::get_global_instance ( std::filesystem::path  database_dir)
static

Definition at line 1083 of file Database.cpp.

◆ get_ket()

◆ get_matrix_elements()

template<typename Scalar >
Eigen::SparseMatrix< Scalar, Eigen::RowMajor > pairinteraction::Database::get_matrix_elements ( std::shared_ptr< const BasisAtom< Scalar > >  initial_basis,
std::shared_ptr< const BasisAtom< Scalar > >  final_basis,
OperatorType  type,
int  q 
)

Definition at line 905 of file Database.cpp.

Referenced by pairinteraction::DOCTEST_TEST_CASE().

+ Here is the caller graph for this function:

◆ get_use_cache()

bool pairinteraction::Database::get_use_cache ( ) const

Definition at line 1056 of file Database.cpp.


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