75 throw std::runtime_error(purpose +
76 " needs norm-conserving pseudopotentials: with ultrasoft or "
77 "PAW datasets the Hamiltonian comes with an overlap operator S, "
78 "which it cannot carry.");
103 int projector_index_i,
104 int projector_index_j,
105 int spin = 0)
const override {
109 atom_index, projector_index_i, projector_index_j, spin);
113 int number_of_channels =
basis.number_of_projector_channels(species_type);
114 if (projector_index_i < number_of_channels && projector_index_j < number_of_channels) {
115 int beta_projector_a =
basis.projector_to_beta_index(species_type, projector_index_i);
116 int beta_projector_b =
basis.projector_to_beta_index(species_type, projector_index_j);
117 if (
basis.projector_combined_lm_index(species_type, projector_index_i) ==
118 basis.projector_combined_lm_index(species_type, projector_index_j)) {
119 return basis.bare_d_matrix_element(
120 species_type, beta_projector_a, beta_projector_b);
const NormConservingPlanewaveBasis & pseudopotential_basis() const
std::unique_ptr< NormConservingPlanewaveBasis > norm_conserving_basis_
NC pseudopotential basis: local potential, beta projectors, core charge, atomic densities.
const PlanewaveBasis & basis() const
const PlanewaveBasis * basis_
Crystal * crystal_structure
void init(const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis, const PseudopotentialSet &pseudopotential_set) override
bool is_initialized() const
Real element(int atom_index, int projector_index_i, int projector_index_j, int spin=0) const
UltrasoftPlanewaveBasis * ultrasoft_planewave_basis_
Non-owning pointer to the ultrasoft-typed basis (owned by parent's unique_ptr).
void require_identity_overlap(const std::string &purpose) const override
Real d_matrix_element(int atom_index, int species_type, int projector_index_i, int projector_index_j, int spin=0) const override
bool has_ultrasoft() const override
UltrasoftPlanewaveEffectivePotential owned_nonlocal_effective_potential_
~UltrasoftPlanewaveKohnShamQuantumSystem() override=default
UltrasoftPlanewaveEffectivePotential * active_nonlocal_effective_potential_
void init(const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis, const PseudopotentialSet &pseudopotential_set) override
const UltrasoftPlanewaveBasis & ultrasoft_basis() const
void set_nonlocal_effective_potential(const UltrasoftPlanewaveEffectivePotential &nonlocal_effective_potential)
void set_nonlocal_effective_potential(UltrasoftPlanewaveEffectivePotential *nonlocal_effective_potential)
UltrasoftPlanewaveKohnShamQuantumSystem()=default