Loading...
Searching...
No Matches
q3::bindings::SCFSolver Class Reference

#include <q3_core_api.hpp>

Public Member Functions

 SCFSolver (const SCFSolver &)=delete
 
 SCFSolver (const std::string &input_path)
 
 SCFSolver (SCFSolver &&)=default
 
SCFSolver & operator= (const SCFSolver &)=delete
 
SCFSolver & operator= (SCFSolver &&)=default
 
std::string solve (const std::vector< std::vector< double > > &coordinates, bool write_output_files=true)
 

Detailed Description

Stateful SCF Solver for in-process calculations.

Caches loaded pseudopotentials to avoid disk I/O between successive calculations (e.g. during geometry optimization steps).

Definition at line 110 of file q3_core_api.hpp.

Constructor & Destructor Documentation

◆ SCFSolver() [1/3]

q3::bindings::SCFSolver::SCFSolver ( const SCFSolver &  )
delete

◆ SCFSolver() [2/3]

q3::bindings::SCFSolver::SCFSolver ( SCFSolver &&  )
default

◆ SCFSolver() [3/3]

q3::bindings::SCFSolver::SCFSolver ( const std::string &  input_path)
inlineexplicit

Built once here rather than per solve(): nothing provenance records varies between steps of a relaxation – it describes the engine, the datasets and the requested numerics, never the coordinates – and re-reading and re-hashing every dataset on each of a hundred steps would be pure repetition.

Definition at line 117 of file q3_core_api.hpp.

References q3::log::apply_verbosity(), q3::build_provenance_json(), q3::load_pseudopotentials(), q3::parse_input(), q3::InputData::pseudopotential_directory, q3::InputData::species, and q3::InputData::verbosity.

Member Function Documentation

◆ operator=() [1/2]

SCFSolver & q3::bindings::SCFSolver::operator= ( const SCFSolver &  )
delete

◆ operator=() [2/2]

SCFSolver & q3::bindings::SCFSolver::operator= ( SCFSolver &&  )
default

◆ solve()

std::string q3::bindings::SCFSolver::solve ( const std::vector< std::vector< double > > &  coordinates,
bool  write_output_files = true 
)
inline

Solve the SCF problem for the given atomic coordinates.

Shared builders (io/input/system_builder.hpp) — the same crystal and k-grid construction the iterator factory uses; input semantics must never drift between the two entry points.

The same quantities SelfConsistentFieldFlavor lists, filled by the same helpers from the same accessors, so the bindings and the command line cannot disagree about what a run reported.

kpoint_grid() holds one entry per PHYSICAL k-point; eigenvalue_matrix is indexed by k-point STATE (physical kpoint * spin) – see the identical convention in iterator/kohn_sham/planewave/execution/kpoint_states.hpp.

Definition at line 136 of file q3_core_api.hpp.

References q3::add_band_edge_records(), q3::InputData::atomic_starting_magnetization, q3::KohnShamSCFIteratorConfig::atomic_starting_magnetization, q3::InputData::atoms, q3::InputData::band_path, q3::KohnShamSCFIteratorConfig::band_path, q3::InputData::band_path_points_per_segment, q3::KohnShamSCFIteratorConfig::band_path_points_per_segment, q3::build_crystal_from_input(), q3::build_global_kpoint_grid_from_input(), q3::InputData::calculation, q3::KohnShamSCFIteratorConfig::calculation, q3::InputData::charge_density_energy_cutoff, q3::KohnShamSCFIteratorConfig::charge_density_energy_cutoff, q3::PseudopotentialSet::clone(), q3::ForceCalculator::compute_forces(), q3::compute_stress(), q3::InputData::convergence_threshold, q3::SCFIteratorConfig::convergence_threshold, q3::create_planewave_pseudopotential_iterator(), q3::SCFIteratorConfig::crystal_structure, q3::log::debug(), q3::InputData::diagonalization_method, q3::KohnShamSCFIteratorConfig::diagonalization_method, q3::InputData::disable_symmetry, q3::InputData::dispersion_correction, q3::InputData::exchange_correlation_functional, q3::KohnShamSCFIteratorConfig::exchange_correlation_functional, q3::SymmetryAnalyzer::find_spacegroup(), q3::ProfilingCounters::instance(), q3::InputData::maximum_iterations, q3::SCFIteratorConfig::maximum_iterations, q3::InputData::methfessel_paxton_order, q3::KohnShamSCFIteratorConfig::methfessel_paxton_order, q3::InputData::mixing_beta, q3::KohnShamSCFIteratorConfig::mixing_beta, q3::InputData::mixing_history_size, q3::KohnShamSCFIteratorConfig::mixing_history_size, q3::InputData::mixing_mode, q3::KohnShamSCFIteratorConfig::mixing_mode, q3::InputData::mixing_preconditioning, q3::KohnShamSCFIteratorConfig::mixing_preconditioning, q3::InputData::mixing_q0, q3::KohnShamSCFIteratorConfig::mixing_q0, q3::new_results(), q3::InputData::nonlocal_stress_derivative_method, q3::KohnShamSCFIteratorConfig::nonlocal_stress_derivative_method, q3::InputData::number_of_bands, q3::KohnShamSCFIteratorConfig::number_of_bands, q3::InputData::number_of_spin_components, q3::SCFIteratorConfig::number_of_spin_components, q3::InputData::output_directory, q3::InputData::prefix, q3::KohnShamSCFIteratorConfig::pseudopotential_set, q3::SelfConsistentFieldFlavor::record_convergence(), q3::SelfConsistentFieldFlavor::record_forces(), q3::SelfConsistentFieldFlavor::record_hubbard_occupations(), q3::SelfConsistentFieldFlavor::record_magnetization(), q3::SelfConsistentFieldFlavor::record_stress(), q3::ProfilingCounters::reset(), q3::results_json_string(), q3::set_energy_records(), q3::set_fermi_energy(), q3::set_record(), q3::InputData::smearing, q3::KohnShamSCFIteratorConfig::smearing, q3::InputData::smearing_width, q3::KohnShamSCFIteratorConfig::smearing_width, q3::InputData::starting_magnetization, q3::KohnShamSCFIteratorConfig::starting_magnetization, q3::InputData::wavefunction_energy_cutoff, q3::KohnShamSCFIteratorConfig::wavefunction_energy_cutoff, and q3::write_results_json().


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