Search Results

Documentation
Wavefunction = opaque function of atoms, only has 2 states: computed and not computed. Every Wavefunction lives in a world
Public Member Functions | |
Wavefunction (const KeyVal &kv) | |
The KeyVal constructor. More... | |
virtual ~Wavefunction () | |
const std::shared_ptr< WavefunctionWorld > & wfn_world () const | |
virtual void obsolete () | |
bool computed () const | |
const std::shared_ptr< const Molecule > & atoms () const | |
virtual void print (std::ostream &os=ExEnv::out0()) const | |
![]() | |
DescribedClass ()=default | |
virtual ~DescribedClass () | |
std::string class_key () const | |
![]() | |
virtual ~enable_shared_from_this ()=default | |
std::shared_ptr< DescribedClass > shared_from_this () | |
returns the pointer to this object More... | |
std::shared_ptr< std::add_const_t< DescribedClass > > shared_from_this () const | |
returns the pointer to this object More... | |
![]() | |
virtual ~virt_base_of_enable_shared_from_this ()=default | |
bool shared_from_this_possible () const | |
template<typename Target , typename = std::enable_if_t<!std::is_const_v<Target>>> | |
std::shared_ptr< Target > cast_shared_from_this_to () | |
returns the pointer to this cast to a particular type More... | |
template<typename Target > | |
std::shared_ptr< std::add_const_t< Target > > cast_shared_from_this_to () const | |
returns the pointer to this cast to a particular type More... | |
![]() | |
Observer ()=default | |
template<typename Observee > | |
Observer (Observee *observee, std::function< void()> message) | |
Observer (const Observer &other)=delete | |
Observer & operator= (const Observer &other)=delete | |
Observer (Observer &&other)=default | |
Observer & operator= (Observer &&other)=default | |
virtual ~Observer () | |
Protected Member Functions | |
template<typename WfnWorldType > | |
std::enable_if_t< std::is_base_of< WavefunctionWorld, WfnWorldType >::value, void > rebuild_wfn_world (const KeyVal &kv) | |
const std::string wfn_world_path () const | |
![]() | |
template<typename Observee > | |
void register_message (Observee *observee, std::function< void()> message) | |
void clear_messages () | |
Protected Attributes | |
bool computed_ = false | |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< DescribedClass >(* keyval_ctor_wrapper_type) (const KeyVal &) | |
![]() | |
static keyval_ctor_wrapper_type type_to_keyval_ctor (const std::string &type_name) | |
template<typename T > | |
static void register_keyval_ctor () | |
template<typename T > | |
static bool is_registered () | |
template<typename T > | |
static std::string class_key () | |
static const keyval_ctor_registry_type & keyval_ctor_registry () | |
returns const ref to the keyval ctor registry More... | |
Constructor & Destructor Documentation
◆ Wavefunction()
mpqc::Wavefunction::Wavefunction | ( | const KeyVal & | kv | ) |
The KeyVal constructor.
- Parameters
-
[in] kv The KeyVal object; it will be queried for the following keywords: | Keyword | Type | Default| Description | |------—|---—|-----—|----------—| | "wfn_world"
| WavefunctionWorld or a class derived from it | If not given, will recursively look for"wfn_world"
at every keyword level above the current, i.e."..:wfn_world"
, then "..:..:wfn_world", etc.; if still not found the contents of this KeyVal object will be used to construct a WavefunctionWorld object directly and assigned to "wfn_world" path of the given KeyVal (see the note below). | This specifies the WavefunctionWorld object in which this object will live initially. |
- Note
- If WavefunctionWorld was directly constructed from
kv
then it will be registered with keyword"wfn_world"
. The pointer will be removed from the KeyVal registry when this object is destructed so thatkv
is returned to its original state. The following code illustrates this:auto atoms = std::make_shared<Molecule>(Molecule({{9, {0.0, 0.0,0.0}}, {1, {0.0, 0.0, 1.8}}})); auto basis =std::make_shared<AtomicBasis>(KeyVal{}.assign("atoms", mol).assign("name",wfn = std::make_shared<Wavefunction>(kv);assert(kv.exists_object("wfn_world"));wfn.reset();assert(!kv.exists_object("wfn_world"));
Usually the derived class will need to ensure that the WavefunctionWorld object used by this object has the appropriate type, typically derived from WavefunctionWorld (e.g. lcao::WavefunctionWorld). To avoid the need for the user to specify the "wfn_world:type"
keyword that matches the type expected by the derived Wavefunction, the derived ctor can use Wavefunction::rebuild_wfn_world to reconstruct the WavefunctionWorld object with the appropriate type.
◆ ~Wavefunction()
|
virtual |
Reimplemented in mpqc::lcao::Wavefunction.
Member Function Documentation
◆ atoms()
|
inline |
◆ computed()
|
inline |
◆ obsolete()
|
inlinevirtual |
obsoletes the object so that after calling this method this->computed()
returns false
Reimplemented in mpqc::lcao::AOWavefunction< Tile, Policy >.
◆ print()
|
inlinevirtual |
◆ rebuild_wfn_world()
|
inlineprotected |
rebuilds wfn_world using WfnWorldType, if needed, using the same section from the same location as before. Used by the derived class' ctor to make the world of the matching derived world type
- Template Parameters
-
WfnWorldType a class derived from WavefunctionWorld
- Parameters
-
[in,out] kv the KeyVal object, assumed to be the same kv as used to construct this object
- Note
- this asserts (using MPQC_ASSERT) that this is only done once
◆ wfn_world()
|
inline |
- Returns
- shared_ptr to the WavefunctionWorld object that this Wavefunction belongs to
◆ wfn_world_path()
|
inlineprotected |
- Returns
- the path at which wfn_world object is located in kv
Member Data Documentation
◆ computed_
|
protected |
The documentation for this class was generated from the following files: