Loading...
Searching...
No Matches
factory.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * create_overlap_operator — selects the overlap operator for the eigenproblem.
5 *
6 * Norm-conserving pseudopotential_set get the identity overlap (standard eigenproblem);
7 * ultrasoft pseudopotential_set get the augmentation overlap (generalized eigenproblem).
8 */
9
10#include <memory>
11
19
20namespace q3 {
21
22inline std::unique_ptr<OverlapOperator>
23create_overlap_operator(const Crystal& crystal_structure,
25 const Matrix<Complex>& kleinman_bylander_potential,
26 const execution::ExecutionPolicy& execution_policy) {
27 if (quantum_system.has_ultrasoft()) {
28 return std::make_unique<UltrasoftPseudopotentialOverlapOperator>(
29 crystal_structure, quantum_system, kleinman_bylander_potential, execution_policy);
30 }
31 return std::make_unique<PseudopotentialOverlapOperator>(
32 crystal_structure, quantum_system, kleinman_bylander_potential, execution_policy);
33}
34
35} // namespace q3
std::unique_ptr< OverlapOperator > create_overlap_operator(const Crystal &crystal_structure, const NormConservingPlanewaveKohnShamQuantumSystem &quantum_system, const Matrix< Complex > &kleinman_bylander_potential, const execution::ExecutionPolicy &execution_policy)
Definition factory.hpp:23