Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
factory.hpp
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* Factory for planewave Kohn-Sham wavefunction checkpoint writers.
5
*
6
* Supported formats: "qe" (Fortran unformatted, default).
7
*/
8
9
#include <memory>
10
#include <stdexcept>
11
#include <string>
12
13
#include "
io/wavefunction/kohn_sham/planewave/checkpoint/init.hpp
"
14
#include "
io/wavefunction/kohn_sham/planewave/checkpoint/qe.hpp
"
15
16
namespace
q3
{
17
18
inline
std::unique_ptr<PlanewaveKohnShamWavefunctionCheckpoint>
19
create_wavefunction_checkpoint
(
const
NormConservingPlanewaveKohnShamSCFState
& scf_state,
20
const
std::string& format =
"qe"
) {
21
if
(format ==
"qe"
) {
22
return
std::make_unique<QEPlanewaveKohnShamWavefunctionCheckpoint>(scf_state);
23
}
24
throw
std::runtime_error(
"Unknown wavefunction checkpoint format: "
+ format);
25
}
26
27
}
// namespace q3
init.hpp
q3
Definition
q3_core_api.hpp:33
q3::create_wavefunction_checkpoint
std::unique_ptr< PlanewaveKohnShamWavefunctionCheckpoint > create_wavefunction_checkpoint(const NormConservingPlanewaveKohnShamSCFState &scf_state, const std::string &format="qe")
Definition
factory.hpp:19
q3::NormConservingPlanewaveKohnShamSCFState
Definition
init.hpp:31
qe.hpp
src
io
wavefunction
kohn_sham
planewave
checkpoint
factory.hpp
Generated by
1.9.8