Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
q3::PseudopotentialSet Class Reference

#include <set.hpp>

Public Member Functions

 PseudopotentialSet ()=default
 
 PseudopotentialSet (const PseudopotentialSet &)=delete
 
 PseudopotentialSet (PseudopotentialSet &&)=default
 
const PawPseudopotential & as_paw (int index) const
 Access as PAW pseudopotential.
 
const UltrasoftPseudopotential & as_ultrasoft (int index) const
 
PseudopotentialSet clone () const
 Deep-clone the entire set (preserves derived types).
 
bool empty () const
 
bool has_augmentation_charges () const
 
bool has_pseudopotential_type (PseudopotentialType target_type) const
 
PseudopotentialSet & operator= (const PseudopotentialSet &)=delete
 
PseudopotentialSet & operator= (PseudopotentialSet &&)=default
 
Pseudopotential & operator[] (int index)
 Access by index (mutable reference).
 
const Pseudopotential & operator[] (int index) const
 Access by index (const reference).
 
void push_back (std::unique_ptr< Pseudopotential > pseudopotential)
 Move a unique_ptr into the set.
 
int size () const
 

Detailed Description

Polymorphic container for pseudopotentials.

Stores unique_ptrs internally but exposes const Pseudopotential& via operator[], so all existing .field access patterns work unchanged.

Definition at line 29 of file set.hpp.

Constructor & Destructor Documentation

◆ PseudopotentialSet() [1/3]

q3::PseudopotentialSet::PseudopotentialSet ( const PseudopotentialSet &  )
delete

◆ PseudopotentialSet() [2/3]

q3::PseudopotentialSet::PseudopotentialSet ( PseudopotentialSet &&  )
default

◆ PseudopotentialSet() [3/3]

q3::PseudopotentialSet::PseudopotentialSet ( )
default

Member Function Documentation

◆ as_paw()

const PawPseudopotential & q3::PseudopotentialSet::as_paw ( int  index) const
inline

Access as PAW pseudopotential.

Definition at line 81 of file set.hpp.

◆ as_ultrasoft()

const UltrasoftPseudopotential & q3::PseudopotentialSet::as_ultrasoft ( int  index) const
inline

Access as ultrasoft pseudopotential.

A PAW dataset also satisfies this cast — it extends the ultrasoft class because it carries the same augmentation apparatus — so the check below tests the storage layout, not the pseudopotential kind. Use pseudopotential_type_enum() to distinguish the two.

Definition at line 63 of file set.hpp.

Referenced by q3::UltrasoftPlanewaveBasis::augmentation_overlap_integral(), and q3::UltrasoftPlanewaveBasis::compute_q_g_single().

◆ clone()

PseudopotentialSet q3::PseudopotentialSet::clone ( ) const
inline

Deep-clone the entire set (preserves derived types).

Definition at line 139 of file set.hpp.

References push_back().

Referenced by q3::NormConservingPlanewaveBasis::init(), and q3::bindings::SCFSolver::solve().

◆ empty()

bool q3::PseudopotentialSet::empty ( ) const
inline

Definition at line 102 of file set.hpp.

Referenced by q3::tabulate_atomic_charge_density_in_g_space().

◆ has_augmentation_charges()

bool q3::PseudopotentialSet::has_augmentation_charges ( ) const
inline

Whether any species needs the augmentation machinery.

The question the plane-wave side actually asks — it wants to know whether to build Q(G) tables, an S-operator and a per-step D matrix, and both ultrasoft and PAW datasets answer yes. Asking it by capability rather than by == ultrasoft is what lets a PAW dataset reach that machinery at all: PAW is a layered extension of ultrasoft here, so a type equality test silently routes it down the norm-conserving path where its augmentation charges are simply dropped.

Definition at line 129 of file set.hpp.

References size().

Referenced by q3::internal::build_wannier_interface_record(), q3::NonlocalPseudopotentialForceCalculator::compute(), q3::NormConservingPlanewaveBasisFactory::create(), q3::NormConservingPlanewaveKohnShamQuantumSystemFactory::create(), q3::create_kohn_sham_iterator(), and q3::hubbard_augmentation_overlap().

◆ has_pseudopotential_type()

bool q3::PseudopotentialSet::has_pseudopotential_type ( PseudopotentialType  target_type) const
inline

Check whether any pseudopotential in this set is of the given type.

Definition at line 109 of file set.hpp.

References size().

Referenced by q3::create_kohn_sham_iterator().

◆ operator=() [1/2]

PseudopotentialSet & q3::PseudopotentialSet::operator= ( const PseudopotentialSet &  )
delete

◆ operator=() [2/2]

PseudopotentialSet & q3::PseudopotentialSet::operator= ( PseudopotentialSet &&  )
default

◆ operator[]() [1/2]

Pseudopotential & q3::PseudopotentialSet::operator[] ( int  index)
inline

Access by index (mutable reference).

Definition at line 50 of file set.hpp.

◆ operator[]() [2/2]

const Pseudopotential & q3::PseudopotentialSet::operator[] ( int  index) const
inline

Access by index (const reference).

Definition at line 44 of file set.hpp.

◆ push_back()

void q3::PseudopotentialSet::push_back ( std::unique_ptr< Pseudopotential >  pseudopotential)
inline

Move a unique_ptr into the set.

Definition at line 39 of file set.hpp.

Referenced by clone(), q3::enumerate_atomic_orbitals(), and q3::load_pseudopotentials().

◆ size()


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