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

#include <init.hpp>

Public Member Functions

int number_of_atoms () const
 
int number_of_g_vectors () const
 
int number_of_kpoint_states () const
 (k-point, spin) state count – the row count of eigenvalues/occupations.
 
int number_of_kpoints () const
 

Public Attributes

std::vector< Vector3D > atom_positions_cartesian
 Cartesian positions in alat units, parallel to atomic_numbers.
 
std::vector< int > atom_species_indices
 0-based species index of each atom, parallel to atomic_numbers.
 
std::vector< int > atomic_numbers
 
std::shared_ptr< const MeanFieldBandSource > band_source
 
int bravais_lattice_index = 0
 QE ibrav convention; 0 means explicit/free lattice vectors.
 
Real cell_volume = 0.0
 
Real charge_density_energy_cutoff = 0.0
 Plane-wave kinetic-energy cutoffs, Rydberg (BGW's ecutrho/ecutwfc).
 
std::vector< std::vector< Complex > > charge_density_g
 
std::vector< IntegerVector3D > charge_density_miller_indices
 
std::vector< std::vector< Real > > eigenvalues_rydberg
 Indexed [kpoint_state_index][band_index]; Rydberg.
 
std::vector< Complex > exchange_correlation_potential_g
 
std::array< int, 3 > fft_grid_dimensions = {0, 0, 0}
 Charge-density ("dense") FFT grid dimensions.
 
bool is_gamma_only = false
 
std::vector< Vector3D > kpoint_coordinates
 Crystal (fractional) coordinates, one per physical k-point.
 
std::vector< std::vector< int > > kpoint_g_vector_indices
 Per physical k-point, indices into charge_density_miller_indices.
 
std::array< int, 3 > kpoint_grid_dimensions = {0, 0, 0}
 
std::array< int, 3 > kpoint_grid_shifts = {0, 0, 0}
 
std::vector< Real > kpoint_weights
 Engine-convention weights; formats renormalize as they require.
 
Real lattice_parameter = 0.0
 
Matrix3x3 lattice_vectors
 
std::vector< std::vector< std::vector< Real > > > nonlocal_coefficients
 
int number_of_bands = 0
 
int number_of_spin_components = 1
 
std::vector< std::vector< Real > > occupations
 Indexed [kpoint_state_index][band_index]; max 1 per (k, spin) state.
 
std::vector< int > plane_waves_per_kpoint
 
std::shared_ptr< const MeanFieldProjectorSource > projector_source
 
std::vector< int > projectors_per_species
 Projector channels – one per (β, m) – of each species.
 
Matrix3x3 reciprocal_lattice_vectors
 
std::vector< std::vector< Complex > > self_consistent_potential_g
 
std::vector< SymmetryOperation > symmetry_operations
 
Real two_pi_over_lattice_parameter = 0.0
 
Real wavefunction_energy_cutoff = 0.0
 

Detailed Description

Definition at line 71 of file init.hpp.

Member Function Documentation

◆ number_of_atoms()

int q3::MeanFieldRecord::number_of_atoms ( ) const
inline

Definition at line 188 of file init.hpp.

◆ number_of_g_vectors()

int q3::MeanFieldRecord::number_of_g_vectors ( ) const
inline

Definition at line 192 of file init.hpp.

Referenced by q3::BerkeleyGWFieldFile::write().

◆ number_of_kpoint_states()

int q3::MeanFieldRecord::number_of_kpoint_states ( ) const
inline

(k-point, spin) state count – the row count of eigenvalues/occupations.

Definition at line 197 of file init.hpp.

Referenced by q3::build_mean_field_record(), and q3::write_mean_field_record().

◆ number_of_kpoints()

int q3::MeanFieldRecord::number_of_kpoints ( ) const
inline

Definition at line 184 of file init.hpp.

Member Data Documentation

◆ atom_positions_cartesian

std::vector<Vector3D> q3::MeanFieldRecord::atom_positions_cartesian

Cartesian positions in alat units, parallel to atomic_numbers.

Definition at line 83 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), and q3::write_mean_field_record().

◆ atom_species_indices

std::vector<int> q3::MeanFieldRecord::atom_species_indices

0-based species index of each atom, parallel to atomic_numbers.

Filled only when the projectors were requested (control.mean_field_export_kleinman_bylander_projectors), and only for norm-conserving datasets: then V_NL = Σ_atom |β⟩ D ⟨β| is the whole nonlocal part of H. projector_source stays null otherwise, and the VKB file is not written.

Definition at line 173 of file init.hpp.

Referenced by q3::add_kleinman_bylander_projectors_to_mean_field_record().

◆ atomic_numbers

std::vector<int> q3::MeanFieldRecord::atomic_numbers

◆ band_source

std::shared_ptr<const MeanFieldBandSource> q3::MeanFieldRecord::band_source

◆ bravais_lattice_index

int q3::MeanFieldRecord::bravais_lattice_index = 0

QE ibrav convention; 0 means explicit/free lattice vectors.

Definition at line 74 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), and q3::write_mean_field_record().

◆ cell_volume

◆ charge_density_energy_cutoff

Real q3::MeanFieldRecord::charge_density_energy_cutoff = 0.0

Plane-wave kinetic-energy cutoffs, Rydberg (BGW's ecutrho/ecutwfc).

Definition at line 107 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), and q3::write_mean_field_record().

◆ charge_density_g

std::vector<std::vector<Complex> > q3::MeanFieldRecord::charge_density_g

Charge density on the charge-density G set, one entry per spin channel, each parallel to charge_density_miller_indices.

G-space rather than real-space on purpose. The engine holds rho(r) and the writers used to call PlanewaveBasis::rho_r_to_g() themselves – a computation, which a converter reading files has no basis to perform. Doing the transform once while the record is built keeps the record purely descriptive, and matches exchange_correlation_potential_g, which is G-space already. Not scaled by the cell volume: that is BerkeleyGW's convention, applied by its writer.

Definition at line 148 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), q3::write_mean_field_record(), and q3::BerkeleyGWChargeDensityFile::write_to_file().

◆ charge_density_miller_indices

std::vector<IntegerVector3D> q3::MeanFieldRecord::charge_density_miller_indices

Miller indices of the charge-density G set, in the engine's own order. Only the integer indices are kept: every mean-field format writes those, and none of them needs the Cartesian coordinates or |G|^2 that the engine's GVector also carries. Keeping this order stable matters – per-k-point G sets below index into it.

Definition at line 104 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), q3::BerkeleyGWRecordWriter::write_charge_density_gvectors(), q3::BerkeleyGWRecordWriter::write_kpoint_gvectors(), q3::write_mean_field_record(), and q3::BerkeleyGWExchangeCorrelationFile::write_to_file().

◆ eigenvalues_rydberg

std::vector<std::vector<Real> > q3::MeanFieldRecord::eigenvalues_rydberg

Indexed [kpoint_state_index][band_index]; Rydberg.

Definition at line 129 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), and q3::write_mean_field_record().

◆ exchange_correlation_potential_g

std::vector<Complex> q3::MeanFieldRecord::exchange_correlation_potential_g

Exchange-correlation potential on the charge-density G set, Rydberg, parallel to charge_density_miller_indices. Empty when the producing run did not have one; vxc.dat export refuses rather than inventing values.

Definition at line 154 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), q3::write_mean_field_record(), q3::BerkeleyGWExchangeCorrelationFile::write_to_file(), and q3::BerkeleyGWExchangeCorrelationPotentialFile::write_to_file().

◆ fft_grid_dimensions

std::array<int, 3> q3::MeanFieldRecord::fft_grid_dimensions = {0, 0, 0}

Charge-density ("dense") FFT grid dimensions.

Definition at line 96 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), and q3::write_mean_field_record().

◆ is_gamma_only

bool q3::MeanFieldRecord::is_gamma_only = false

◆ kpoint_coordinates

std::vector<Vector3D> q3::MeanFieldRecord::kpoint_coordinates

Crystal (fractional) coordinates, one per physical k-point.

Definition at line 118 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), q3::BerkeleyGWRecordWriter::write_kpoint_coordinates(), and q3::write_mean_field_record().

◆ kpoint_g_vector_indices

std::vector<std::vector<int> > q3::MeanFieldRecord::kpoint_g_vector_indices

Per physical k-point, indices into charge_density_miller_indices.

Definition at line 123 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), q3::BerkeleyGWRecordWriter::write_kpoint_gvectors(), and q3::write_mean_field_record().

◆ kpoint_grid_dimensions

std::array<int, 3> q3::MeanFieldRecord::kpoint_grid_dimensions = {0, 0, 0}

Monkhorst-Pack grid dimensions and 0/1 shift flags as requested. Explicit k-point lists retain zero dimensions and shifts.

Definition at line 115 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), and q3::write_mean_field_record().

◆ kpoint_grid_shifts

std::array<int, 3> q3::MeanFieldRecord::kpoint_grid_shifts = {0, 0, 0}

◆ kpoint_weights

std::vector<Real> q3::MeanFieldRecord::kpoint_weights

Engine-convention weights; formats renormalize as they require.

Definition at line 120 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), q3::write_mean_field_record(), and q3::BerkeleyGWRecordWriter::write_normalized_kpoint_weights().

◆ lattice_parameter

Real q3::MeanFieldRecord::lattice_parameter = 0.0

◆ lattice_vectors

Matrix3x3 q3::MeanFieldRecord::lattice_vectors

◆ nonlocal_coefficients

std::vector<std::vector<std::vector<Real> > > q3::MeanFieldRecord::nonlocal_coefficients

D_ij in Rydberg, indexed [spin][atom], each block projectors_per_species[species] squared values with the first index fastest – the channel order of projector_source's rows for that atom.

Definition at line 181 of file init.hpp.

Referenced by q3::add_kleinman_bylander_projectors_to_mean_field_record().

◆ number_of_bands

int q3::MeanFieldRecord::number_of_bands = 0

◆ number_of_spin_components

◆ occupations

std::vector<std::vector<Real> > q3::MeanFieldRecord::occupations

Indexed [kpoint_state_index][band_index]; max 1 per (k, spin) state.

Definition at line 131 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), and q3::write_mean_field_record().

◆ plane_waves_per_kpoint

◆ projector_source

std::shared_ptr<const MeanFieldProjectorSource> q3::MeanFieldRecord::projector_source

Definition at line 182 of file init.hpp.

Referenced by q3::BerkeleyGWExporter::export_to_directory().

◆ projectors_per_species

std::vector<int> q3::MeanFieldRecord::projectors_per_species

Projector channels – one per (β, m) – of each species.

Definition at line 175 of file init.hpp.

Referenced by q3::add_kleinman_bylander_projectors_to_mean_field_record().

◆ reciprocal_lattice_vectors

Matrix3x3 q3::MeanFieldRecord::reciprocal_lattice_vectors

◆ self_consistent_potential_g

std::vector<std::vector<Complex> > q3::MeanFieldRecord::self_consistent_potential_g

The local Kohn-Sham potential the Hamiltonian applied – ionic local plus Hartree plus exchange-correlation – one entry per spin channel, Rydberg, parallel to charge_density_miller_indices, G = 0 the cell average. Empty when the producing run did not have one, which includes every record read back from mean-field.q3mf; VSC export then refuses.

Definition at line 162 of file init.hpp.

Referenced by q3::build_mean_field_record(), and q3::BerkeleyGWSelfConsistentPotentialFile::write_to_file().

◆ symmetry_operations

std::vector<SymmetryOperation> q3::MeanFieldRecord::symmetry_operations

Already resolved, so a converter never needs spglib. reciprocal_rotation is (rotation^-1)^T, which is what BerkeleyGW's tnp record is built from – see berkeleygw/header.hpp.

Definition at line 92 of file init.hpp.

Referenced by q3::build_mean_field_record(), q3::read_mean_field_record(), q3::BerkeleyGWCommonHeader::write(), and q3::write_mean_field_record().

◆ two_pi_over_lattice_parameter

Real q3::MeanFieldRecord::two_pi_over_lattice_parameter = 0.0

◆ wavefunction_energy_cutoff

Real q3::MeanFieldRecord::wavefunction_energy_cutoff = 0.0

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