|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
Parsed input data — holds raw values read from input files. More...
#include <data.hpp>
Public Member Functions | |
| void | set_free_lattice_vectors (const Matrix3x3 &vectors_bohr, Real preset_lattice_parameter=0.0) |
|
inline |
Store a "free" lattice (bravais_lattice_index 0) from explicit lattice vectors given in bohr. Single source for both input formats that build an explicit cell: the YAML general-lattice path and the QE CELL_PARAMETERS bohr/angstrom card.
| vectors_bohr | Rows a1,a2,a3 in bohr. |
| preset_lattice_parameter | If > 0, used as alat directly (QE's celldm(1)-takes-precedence rule when CELL_PARAMETERS coexists with an explicit celldm). If <= 0 (the YAML case: there is no prior alat), alat is derived as |a1| instead. |
Definition at line 317 of file data.hpp.
References bravais_lattice_index, cell_dimension_1, has_explicit_lattice_vectors, and lattice_vectors.
Referenced by q3::YAMLInputParser::parse_material(), and q3::substitute_material().
| std::vector<Real> q3::InputData::atomic_starting_magnetization |
Initial magnetization per ATOM, parallel to atoms (same [-1, 1] convention). Empty = unset. When set it overrides starting_magnetization atom by atom, so atoms of one species can start with different moments (a same-species antiferromagnet); such atoms are also kept symmetry-inequivalent (see site_symmetry_classes_from_input).
Definition at line 57 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::site_symmetry_classes_from_input(), and q3::bindings::SCFSolver::solve().
| std::vector<Atom> q3::InputData::atoms |
Definition at line 156 of file data.hpp.
Referenced by q3::build_crystal_from_input(), q3::build_material_json(), q3::QEInputParser::parse(), q3::YAMLInputParser::parse_material(), report_resolved_input(), q3::site_symmetry_classes_from_input(), q3::bindings::SCFSolver::solve(), and q3::substitute_material().
| std::vector<std::pair<std::string, Vector3D> > q3::InputData::band_path |
Definition at line 117 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::bindings::SCFSolver::solve().
| int q3::InputData::band_path_points_per_segment = 20 |
Definition at line 118 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::bindings::SCFSolver::solve().
| int q3::InputData::bravais_lattice_index = 0 |
Definition at line 128 of file data.hpp.
Referenced by q3::build_crystal_from_input(), q3::QEInputParser::parse(), q3::YAMLInputParser::parse_material(), and set_free_lattice_vectors().
| std::string q3::InputData::calculation = "self_consistent_field" |
Definition at line 116 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), q3::parse_input(), report_resolved_input(), q3::run_flavor(), q3::bindings::run_nscf(), q3::bindings::run_scf(), and q3::bindings::SCFSolver::solve().
| Real q3::InputData::cell_dimension_1 = 0.0 |
Definition at line 129 of file data.hpp.
Referenced by q3::build_crystal_from_input(), q3::QEInputParser::parse(), q3::YAMLInputParser::parse_material(), set_free_lattice_vectors(), and q3::substitute_material().
| Real q3::InputData::cell_dimension_2 = 0.0 |
The remaining cell dimensions, in the same convention as get_lattice_vectors_from_bravais_index: b/a, c/a, and three cosines whose meaning depends on the Bravais index. Zero for every lattice that does not need them (all cubic ones), which is why the default is 0 rather than 1.
Definition at line 137 of file data.hpp.
Referenced by q3::build_crystal_from_input(), and q3::QEInputParser::parse().
| Real q3::InputData::cell_dimension_3 = 0.0 |
Definition at line 138 of file data.hpp.
Referenced by q3::build_crystal_from_input(), and q3::QEInputParser::parse().
| Real q3::InputData::cell_dimension_4 = 0.0 |
Definition at line 139 of file data.hpp.
Referenced by q3::build_crystal_from_input(), and q3::QEInputParser::parse().
| Real q3::InputData::cell_dimension_5 = 0.0 |
Definition at line 140 of file data.hpp.
Referenced by q3::build_crystal_from_input(), and q3::QEInputParser::parse().
| Real q3::InputData::cell_dimension_6 = 0.0 |
Definition at line 141 of file data.hpp.
Referenced by q3::build_crystal_from_input(), and q3::QEInputParser::parse().
| Real q3::InputData::charge_density_energy_cutoff = 0.0 |
Definition at line 111 of file data.hpp.
Referenced by q3::PlanewaveProvenanceRecord::add_representation_method_details(), q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), report_resolved_input(), and q3::bindings::SCFSolver::solve().
| bool q3::InputData::compute_projections = false |
Atomic-orbital (ortho-atomic/Löwdin) projections, used when calculation == "non_self_consistent_field". Opt-in: adds a Löwdin orthogonalization + projection pass per k-point on top of plain NSCF.
Definition at line 242 of file data.hpp.
Referenced by q3::NonSelfConsistentFieldFlavor::run_calculation().
| Real q3::InputData::convergence_threshold = 1e-6 |
Definition at line 32 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), q3::NonSelfConsistentFieldFlavor::run_calculation(), q3::VerificationFlavor::run_calculation(), and q3::bindings::SCFSolver::solve().
| int q3::InputData::davidson_basis_expansion_factor = 2 |
Davidson working basis size as a multiple of the band count. Two arrays of this many vectors dominate the solver's memory, so this is the one deck key that trades restart frequency against footprint.
Definition at line 66 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::NonSelfConsistentFieldFlavor::run_calculation().
| bool q3::InputData::davidson_basis_expansion_factor_set_by_deck = false |
Whether the deck named method.scf.davidson.basis_expansion_factor itself. A non-self-consistent pass raises the default to its own floor, but keeps a factor the deck asked for.
Definition at line 72 of file data.hpp.
Referenced by q3::NonSelfConsistentFieldFlavor::run_calculation().
| std::string q3::InputData::diagonalization_method = "davidson" |
Definition at line 113 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| bool q3::InputData::disable_symmetry = false |
true = use no symmetry at all: the k-point mesh is not reduced, and the density, forces and stress are not symmetrized (Quantum ESPRESSO's nosym + noinv). A shifted mesh then gives the raw-mesh energy rather than the symmetrized-mesh one.
Definition at line 192 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), report_resolved_input(), q3::SelfConsistentFieldFlavor::run_calculation(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::dispersion_correction = "none" |
Definition at line 78 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), report_resolved_input(), q3::SelfConsistentFieldFlavor::run_calculation(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::exchange_correlation_functional |
Empty when the input names no functional. parse_input() then fills in the one the pseudopotentials state, as pw.x does without input_dft; the former default, "PZ", ran PBE datasets as LDA without a word.
Definition at line 41 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), q3::parse_input(), report_resolved_input(), and q3::bindings::SCFSolver::solve().
| bool q3::InputData::has_explicit_lattice_vectors = false |
Definition at line 148 of file data.hpp.
Referenced by q3::build_crystal_from_input(), set_free_lattice_vectors(), and q3::substitute_material().
| std::vector<HubbardSpecification> q3::InputData::hubbard |
Definition at line 85 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and report_resolved_input().
| int q3::InputData::hubbard_fixed_occupation_iterations = 0 |
SCF iterations for which the seeded occupation matrix is held in place (drop-in mixing_fixed_ns). 0 = seed the first iteration and let self-consistency take over immediately.
Definition at line 107 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::QEInputParser::parse().
| std::string q3::InputData::hubbard_projector_type = "atomic" |
Projector convention for the Hubbard manifold: "atomic" (raw pseudo-atomic UPF orbitals, QE's HUBBARD {atomic} card) or "ortho-atomic" (Lowdin-orthogonalized over the FULL system-wide atomic-orbital set, then the Hubbard manifold's columns selected out – QE's HUBBARD {ortho-atomic} card). A single joint diagonalization over the whole system, so this is a per-run choice, not settable per manifold.
Definition at line 93 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and report_resolved_input().
| std::vector<HubbardStartingEigenvalue> q3::InputData::hubbard_starting_eigenvalues |
First-iteration occupation-eigenvalue overrides (drop-in starting_ns_eigenvalue, YAML hubbard_starting_eigenvalues). Empty = no seeding. Indices are 0-based here; parsers convert.
Definition at line 100 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::QEInputParser::parse().
| std::string q3::InputData::ibz_reduction_method = "internal" |
Definition at line 193 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input().
| InterpolationSpecification q3::InputData::interpolation |
control.interpolation: a build request on an NSCF run, an evaluation request on calculation == "interpolation" (see the struct's header).
Definition at line 248 of file data.hpp.
Referenced by q3::NonSelfConsistentFieldFlavor::run_calculation(), and q3::write_and_export_interpolation_record().
| bool q3::InputData::is_relaxation_step = false |
True when the input asked for a relaxation ('relax'/'vc-relax'), which runs here as one SCF at the input's geometry – a step of the relaxation q3.workflows drives. The relaxation parameters below are then reported in the results' provenance, for that driver to read.
Definition at line 268 of file data.hpp.
Referenced by q3::parse_input(), and q3::QuantumSystemProvenanceRecord::to_json().
| std::string q3::InputData::isolated_system_correction = "none" |
Isolated (charged) system correction: "none" (default) or "makov-payne" (QE's assume_isolated='makov-payne' analog). Cubic lattices only (see MakovPayneCorrectionCalculator); opt-in since it's meaningless for genuinely periodic bulk systems and only appropriate for a net-charged cell modeling an isolated defect/molecule.
Definition at line 209 of file data.hpp.
Referenced by q3::QEInputParser::parse(), report_resolved_input(), and q3::SelfConsistentFieldFlavor::run_calculation().
| int q3::InputData::kpoint_grid_dimension_1 = 1 |
Definition at line 159 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::QEInputParser::parse(), and report_resolved_input().
| int q3::InputData::kpoint_grid_dimension_2 = 1 |
Definition at line 159 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::QEInputParser::parse(), and report_resolved_input().
| int q3::InputData::kpoint_grid_dimension_3 = 1 |
Definition at line 159 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::QEInputParser::parse(), and report_resolved_input().
| int q3::InputData::kpoint_grid_shift_1 = 0 |
Definition at line 160 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::QEInputParser::parse(), and report_resolved_input().
| int q3::InputData::kpoint_grid_shift_2 = 0 |
Definition at line 160 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::QEInputParser::parse(), and report_resolved_input().
| int q3::InputData::kpoint_grid_shift_3 = 0 |
Definition at line 160 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::QEInputParser::parse(), and report_resolved_input().
Explicit k-point list for NSCF calculations (calculation == "non_self_consistent_field"). Each entry is (crystal-coordinate k-vector, weight). Takes precedence over kpoint_grid when non-empty.
Definition at line 125 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), report_resolved_input(), and q3::NonSelfConsistentFieldFlavor::run_calculation().
| Matrix3x3 q3::InputData::lattice_vectors {} |
Explicit lattice vectors (rows a1,a2,a3 in units of cell_dimension_1). Set for "free" lattices (bravais_lattice_index == 0): YAML general cells (hexagonal, slab, triclinic, explicit vectors) and QE CELL_PARAMETERS.
Definition at line 147 of file data.hpp.
Referenced by q3::build_crystal_from_input(), set_free_lattice_vectors(), and q3::substitute_material().
| int q3::InputData::maximum_iterations = 100 |
Definition at line 33 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), q3::NonSelfConsistentFieldFlavor::run_calculation(), q3::VerificationFlavor::run_calculation(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::mean_field_export = "none" |
Mean-field export for an external many-body-perturbation-theory code: "none" (default) or "berkeleygw" (writes WFN/RHO/vxc.dat – see create_mean_field_exporter()). BerkeleyGW normally consumes an NSCF run with many empty (conduction) bands rather than the SCF run itself, but the export is wired into both flavors unconditionally (Null object for "none"), writing into output_directory.
Definition at line 219 of file data.hpp.
Referenced by q3::export_and_record_mean_field(), and q3::export_and_record_mean_field_under_topology().
| bool q3::InputData::mean_field_export_kleinman_bylander_projectors = false |
With mean_field_export "berkeleygw", also write the nonlocal pseudopotential at every k-point as BerkeleyGW's VKB file – the projectors ParaBands needs, with VSC, to add bands to WFN. Off by default: VKB holds one plane-wave vector per projector channel per k-point, usually more than WFN's own bands. Norm-conserving runs only (see add_kleinman_bylander_projectors_to_mean_field_record()).
| int q3::InputData::methfessel_paxton_order = 1 |
Definition at line 77 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::bindings::SCFSolver::solve().
| Real q3::InputData::mixing_beta = 0.7 |
Definition at line 59 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| int q3::InputData::mixing_history_size = 8 |
Definition at line 60 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::mixing_mode = "broyden" |
Definition at line 58 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::mixing_preconditioning = "default" |
Definition at line 73 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| Real q3::InputData::mixing_q0 = 1.0 |
Definition at line 74 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::nonlocal_stress_derivative_method = "analytical" |
Stress tensor options "analytical" (default) = differentiate Lagrange interpolation polynomial (matches QE) "numerical" = finite-difference derivatives of beta projectors and Ylm
Definition at line 200 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::SelfConsistentFieldFlavor::run_calculation(), and q3::bindings::SCFSolver::solve().
| int q3::InputData::number_of_atoms = 0 |
Definition at line 149 of file data.hpp.
Referenced by q3::QEInputParser::parse(), and q3::YAMLInputParser::parse_material().
| int q3::InputData::number_of_bands = 0 |
Definition at line 112 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| int q3::InputData::number_of_kpoint_pools = 0 |
Parallelization Number of k-point pool groups. Each pool handles a subset of k-points. 0 = choose automatically from the irreducible k-point count.
Definition at line 280 of file data.hpp.
Referenced by q3::create_scf_iterator_mpi(), and q3::QEInputParser::parse().
| int q3::InputData::number_of_species = 0 |
Definition at line 150 of file data.hpp.
Referenced by q3::QEInputParser::parse(), and q3::YAMLInputParser::parse_material().
| int q3::InputData::number_of_spin_components = 1 |
Definition at line 42 of file data.hpp.
Referenced by q3::build_global_kpoint_grid_from_input(), q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), report_resolved_input(), q3::site_symmetry_classes_from_input(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::output_directory = "./" |
Definition at line 177 of file data.hpp.
Referenced by q3::QEInputParser::parse(), q3::VolumetricCommand::run(), q3::NonSelfConsistentFieldFlavor::run_calculation(), q3::SelfConsistentFieldFlavor::run_calculation(), q3::VerificationFlavor::run_calculation(), q3::bindings::run_nscf(), q3::bindings::run_scf(), q3::bindings::SCFSolver::solve(), and q3::write_and_export_interpolation_record().
| std::string q3::InputData::prefix = "q3" |
Definition at line 178 of file data.hpp.
Referenced by q3::build_material_json(), q3::export_and_record_mean_field(), q3::QEInputParser::parse(), q3::VolumetricCommand::run(), q3::NonSelfConsistentFieldFlavor::run_calculation(), q3::SelfConsistentFieldFlavor::run_calculation(), q3::VerificationFlavor::run_calculation(), q3::bindings::run_nscf(), q3::bindings::run_scf(), q3::bindings::SCFSolver::solve(), and q3::write_and_export_interpolation_record().
| std::string q3::InputData::pseudopotential_directory = "./" |
Definition at line 163 of file data.hpp.
Referenced by q3::bindings::SCFSolver::SCFSolver(), q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::parse_input().
| Real q3::InputData::relax_energy_threshold = 1.0e-4 |
Definition at line 273 of file data.hpp.
Referenced by q3::QEInputParser::parse(), and q3::QuantumSystemProvenanceRecord::to_json().
| Real q3::InputData::relax_force_threshold = 1.0e-3 |
Definition at line 272 of file data.hpp.
Referenced by q3::QEInputParser::parse(), and q3::QuantumSystemProvenanceRecord::to_json().
| int q3::InputData::relax_maximum_steps = 100 |
Definition at line 271 of file data.hpp.
Referenced by q3::QEInputParser::parse(), and q3::QuantumSystemProvenanceRecord::to_json().
| std::string q3::InputData::smearing = "none" |
Definition at line 75 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| Real q3::InputData::smearing_width = 0.0 |
Definition at line 76 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::source_format |
Canonical name of the registered input format this run was read from ("yaml", "qe", or a name a build-time add-on registers), recorded by parse_input(). Empty for an InputData assembled in code.
The finished run is handed back to that format for the companion outputs its own conventions expect (io/output/companion_outputs.hpp), so those files are written only beside a run that was read from it.
Definition at line 174 of file data.hpp.
Referenced by q3::parse_input(), and q3::write_companion_outputs().
| std::vector<AtomSpecies> q3::InputData::species |
Definition at line 153 of file data.hpp.
Referenced by q3::bindings::SCFSolver::SCFSolver(), q3::build_material_json(), q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), q3::parse_input(), q3::YAMLInputParser::parse_material(), and report_resolved_input().
| bool q3::InputData::start_from_saved_charge_density = false |
Start the SCF from the charge density a previous run saved in output_directory/prefix.save (pw.x startingpot = 'file'), rather than from overlapping atoms. A relaxation driven step by step sets it, so each geometry starts from the last one's density. A density that does not fit this run's grid, or a missing one, falls back to the atoms. The saved bands are offered the same way, as the starting wavefunctions; a k-point whose file does not fit this basis starts from the atomic + random guess.
Definition at line 260 of file data.hpp.
Referenced by q3::QEInputParser::parse(), q3::parse_input(), and q3::SelfConsistentFieldFlavor::run_calculation().
| std::vector<Real> q3::InputData::starting_magnetization |
Initial magnetization per species, parallel to species (QE starting_magnetization(i) convention: values in [-1, 1], negative = opposite sublattice for AFM). May be shorter than species; missing entries mean 0. Empty = unset (spin-polarized runs then use a default).
Definition at line 49 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), and q3::bindings::SCFSolver::solve().
| std::string q3::InputData::theory = "kohn_sham" |
Definition at line 29 of file data.hpp.
Referenced by q3::create_iterator().
| Real q3::InputData::total_charge = 0.0 |
Net cell charge in electrons removed (QE tot_charge convention): positive = cationic (electrons removed), negative = anionic (electrons added).
Definition at line 83 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::QEInputParser::parse().
| bool q3::InputData::use_deterministic_fft_planning = false |
FFT planning determinism. false (default) = FFTW_MEASURE: each process times several transform algorithms at startup and keeps the fastest, which is the better-performing choice but makes runs whose SCF trajectory is sensitive to Allreduce/summation-order noise (e.g. a metallic system with a soft, nearly-degenerate magnetic moment under hot smearing) vary slightly from run to run. true = FFTW_ESTIMATE: a fixed heuristic plan with no runtime timing, giving bit-reproducible repeated runs at some performance cost. See TODOs.md §2.3.
Definition at line 292 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator().
| bool q3::InputData::use_exact_wavefunction_grid = false |
Wavefunction FFT grid size. false (default) = the 2 x ecutwfc grid: faster, but approximate – V(r)ψ(r) and |ψ(r)|² alias, which is harmless where the wavefunctions have little weight near the cutoff and up to mRy off pw.x on hard pseudopotentials at low cutoffs. true = the exact grid, sized for 4 x ecutwfc as pw.x sizes it, at 1.4x to 2.3x the solver time on the silicon and copper examples. YAML control.use_exact_wavefunction_grid; the QE-format reader always sets it, so a pw.x deck runs on pw.x's grid.
Definition at line 303 of file data.hpp.
Referenced by q3::create_kohn_sham_iterator(), and q3::QEInputParser::parse().
| std::string q3::InputData::verbosity = "default" |
How much the run says about itself on stdout: "default" (the physics and the SCF trajectory) or "high" (that, plus the per-iteration and per-phase diagnostics – Davidson micro-iterations, timing breakdowns, mixer internals – which are logged at debug level). Quantum ESPRESSO's verbosity maps onto this; an explicit –log-level overrides it.
Definition at line 186 of file data.hpp.
Referenced by q3::bindings::SCFSolver::SCFSolver(), q3::QEInputParser::parse(), q3::cli::read_input(), q3::bindings::run_nscf(), and q3::bindings::run_scf().
| Real q3::InputData::wavefunction_energy_cutoff = 30.0 |
Definition at line 110 of file data.hpp.
Referenced by q3::PlanewaveProvenanceRecord::add_representation_method_details(), q3::create_kohn_sham_iterator(), q3::QEInputParser::parse(), report_resolved_input(), and q3::bindings::SCFSolver::solve().