occ
Loading...
Searching...
No Matches
occ::driver Namespace Reference

Namespaces

namespace  impl

Classes

struct  AccelerationPlan
struct  CGPreparation
 Result of loading and configuring a cg run: the crystal, the calculator options and any per-molecule charges. More...
struct  DMAReferenceLevel
 Reference QM level for the monomer multipoles in the DMA+exp-6 model. More...
struct  CGConfig
struct  SolventSpec
 A solvent, possibly a mixture, at a temperature. More...
struct  CGSolvationResult
 Per-monomer solvation surfaces, plus the wavefunctions the model can offer for solution-phase monomer and interaction energies. More...
class  CGSolvationModel
 Produces solvation surfaces for the cg pipeline. More...
struct  CGSolvationSettings
 Settings the concrete models need; a superset, each uses what applies. More...
struct  CorrelationOptions
 Options for a post-HF correlation calculation on a converged SCF wavefunction. More...
struct  CorrelationResult
 Result of a post-HF correlation calculation. More...
struct  ConductorSettings
 Settings for the ideal-conductor COSMO calculation the segment descriptors are built from. More...
struct  ConductorResult
struct  CosmoRSSolvationSettings
 Settings for a single-molecule openCOSMO-RS solvation free energy. More...
struct  CosmoRSSolvation
 A solvation free energy and the intermediates worth keeping. More...
struct  CosmoRSSettings
struct  AssignedEnergy
struct  CrystalGrowthCalculatorOptions
class  CrystalGrowthCalculator
class  DummyCrystalGrowthCalculator
class  CEModelCrystalGrowthCalculator
class  XTBCrystalGrowthCalculator
struct  MorphologyOptions
 Options for the particle size/shape-dependent energy calculation. More...
struct  NamedShape
 One named shape from a multi-shape file. More...
struct  FacetEnergies
struct  CrystalSurfaceEnergies
struct  DMAConfig
class  DMADriver
struct  MethodSpec
struct  VibrationalAnalysisConfig
 Configuration options for vibrational frequency analysis. More...
class  Molecule
 Storage class for relevant information of a Molecule. More...
struct  Wavefunction
struct  CornerMorphology
 A symmetry-unique corner type of the particle shape. More...
struct  EdgeMorphology
 A symmetry-unique edge type of the particle shape. More...
struct  FacetMorphology
 A facet of the (Wulff or user) particle shape. More...
struct  MorphologyResult
 Particle size/shape-dependent (surface + edge + corner) energies. More...
struct  NeighbourBond
 One stamped neighbour interaction, as the decomposition sees it. More...
struct  ParticleSample
 Broken-bond excess energy of a finite particle at one size, decomposed by inclusion-exclusion so e_excess == e_surface + e_edge + e_corner exactly. More...
struct  ShapeFace
 One active face of the particle shape, as the decomposition uses it: the support distance is per unit scale, and the optimal-cut offset and interplanar spacing are what snap it to a molecular termination. More...

Typedefs

using WavefunctionList = std::vector<Wavefunction>
using MoleculeList = std::vector<occ::core::Molecule>

Enumerations

enum class  AccelerationUse { Energy , Gradient , CoarseGradient , NoCOSX }
 What an SCF set up by apply_acceleration is for. More...
enum class  SolvationModelKind { None , Smd , CosmoRS }
enum class  WavefunctionChoice { GasPhase , Solvated }
enum class  MethodKind {
  HF , DFT , MP2 , CCSD ,
  CCSD_T , GFN2
}

Functions

std::size_t df_exchange_memory_budget ()
 Decide SCF acceleration (density fitting / COSX) for a calculation.
std::size_t df_exchange_intermediate_bytes (std::size_t nocc, std::size_t nbf, std::size_t ndf)
 Bytes DF-K would need for its half-transformed intermediate.
AccelerationPlan plan_acceleration (io::RIPolicy policy, const std::string &orbital_basis_name, std::size_t nbf, double exact_exchange, const std::string &user_df_basis, bool user_cosx, std::size_t df_exchange_bytes=0)
std::string cosx_grid_description (const io::OccInput &config, AccelerationUse use)
 The COSX grid apply_acceleration sets up, for the log.
template<typename Proc>
void apply_acceleration (Proc &proc, std::size_t nbf, const io::OccInput &config, AccelerationUse use=AccelerationUse::Energy)
 Apply the active acceleration policy (DF / COSX) to an SCF procedure.
CGPreparation prepare_cg (CGConfig const &config)
 Load the crystal and build calculator options + charges from config.
occ::cg::CrystalGrowthResult run_cg_pipeline (CrystalGrowthCalculator &calc, const CrystalGrowthCalculatorOptions &opts, CGConfig const &config)
 Run the full crystal-growth pipeline on an already-constructed calculator: monomer energies -> lattice convergence -> molecular surroundings -> surface energies / morphology -> JSON serialization.
occ::cg::CrystalGrowthResult run_cg (CGConfig const &)
SolvationModelKind parse_solvation_model (const std::string &)
std::string solvation_model_name (SolvationModelKind)
std::unique_ptr< CGSolvationModel > make_cg_solvation_model (SolvationModelKind kind, const CGSolvationSettings &settings)
CorrelationResult run_correlation (const qm::Wavefunction &wfn, const CorrelationOptions &opts={})
 Run an MP2 / CCSD / CCSD(T) calculation on a converged SCF wavefunction, with the same backend dispatch, auxiliary-basis resolution and frozen-core handling as the CLI.
qm::cc::CorrelatedDensity run_correlated_density (const qm::Wavefunction &wfn, const CorrelationOptions &opts={}, bool local=false, const qm::HartreeFock *scf_jk=nullptr)
 The one-particle density of a correlation method on a converged closed-shell RHF wavefunction, as natural orbitals: relaxed for MP2, unrelaxed (Lambda equations) for CCSD and CCSD(T); with local the cluster-in-molecule CCSD / CCSD(T) density.
solvent::cosmors::Segments conductor_segments (const qm::Wavefunction &wavefunction, const solvent::cosmors::Parameters &params={}, double probe_radius_angs=0.0, int angular_points=590, bool constrain_charge=true, Vec *dielectric_energies=nullptr, double *cavity_volume_angs3=nullptr)
 Build segments from a wavefunction that has already been converged in the ideal-conductor reaction field, with both σ and σ⊥ averaged on params.
ConductorResult conductor_profile (const qm::Wavefunction &gas_wavefunction, const ConductorSettings &settings={})
 Converge the SCF in the ideal-conductor reaction field starting from a gas-phase wavefunction, then build the segments.
CosmoRSSolvation cosmors_solvation_free_energy (const core::Molecule &solute, const std::string &solvent_name, const CosmoRSSolvationSettings &settings={})
 Solvation free energy of solute in a named solvent, end to end.
CosmoRSSolvation cosmors_solvation_free_energy (const core::Molecule &solute, const core::Molecule &solvent, const CosmoRSSolvationSettings &settings={})
 The same, computing the solvent's conductor cavity from its geometry instead of loading a cached ensemble.
std::vector< std::string > available_cosmors_solvents ()
 Solvent names with a cached segment ensemble, sorted.
CGSolvationResult cosmors_solvation (const std::string &basename, const std::vector< core::Molecule > &molecules, const std::vector< qm::Wavefunction > &gas_wavefunctions, const SolventSpec &solvent, const CosmoRSSettings &settings={})
 Build openCOSMO-RS solvation surfaces for each molecule in solvent.
std::vector< AssignedEnergy > assign_interaction_terms_to_nearest_neighbours (const crystal::CrystalDimers::MoleculeNeighbors &neighbors, const std::vector< double > &dimer_energies, double cg_radius)
MorphologyResult compute_crystal_morphology (const occ::crystal::Crystal &crystal, const occ::crystal::CrystalDimers &uc_dimers, const CrystalSurfaceEnergies &surface_energies, const occ::cg::CrystalGrowthResult &growth_result, const MorphologyOptions &options={})
 Compute the particle size/shape-dependent (surface + edge + corner) energy.
std::vector< std::pair< occ::crystal::HKL, double > > read_morphology_shape (std::istream &input)
 Read a particle shape for MorphologyOptions::user_shifts: one face per line as h k l distance, one face per form (its symmetry-equivalent faces are added), distances in any one unit since only their ratios matter.
std::vector< NamedShape > read_morphology_shapes (std::istream &input)
 Read one or more shapes.
bool is_lower_cut (double energy, double offset, double best_energy, double best_offset)
 Whether a cut (energy, offset) should replace the best one so far.
CrystalSurfaceEnergies calculate_crystal_surface_energies (const std::string &filename, const occ::crystal::Crystal &crystal, const occ::crystal::CrystalDimers &uc_dimers, int max_number_of_surfaces, int sign=-1, double min_interplanar_spacing=0.0)
 Surface energies for the morphologically important faces.
void to_json (nlohmann::json &j, const FacetEnergies &)
void to_json (nlohmann::json &j, const CrystalSurfaceEnergies &)
qm::Wavefunction geometry_optimization (const io::OccInput &config)
 Perform geometry optimization.
std::pair< qm::Wavefunction, Mat3N > energy_and_gradient (const io::OccInput &config)
 Energy and analytic gradient at the input geometry, evaluated as a converged optimisation step would be (COSX on its gradient grids).
std::pair< qm::Wavefunction, core::VibrationalModes > geometry_optimization_with_frequencies (const io::OccInput &config, bool run_frequencies=true)
 Perform geometry optimization with optional vibrational analysis.
MethodSpec parse_method_string (const std::string &method_string)
 Parse a method string into base method, dispersion, kind and backend.
MethodKind method_kind_from_string (const std::string &name)
qm::SpinorbitalKind determine_spinorbital_kind (const std::string &name, int multiplicity, MethodKind method_kind)
occ::qm::Wavefunction calculate_wavefunction (const occ::core::Molecule &mol, const std::string &name, const std::string &energy_model, bool spherical, occ::io::JsonCache &cache)
WavefunctionList calculate_wavefunctions (const std::string &basename, const MoleculeList &molecules, const std::string &energy_model, bool spherical, occ::io::JsonCache &cache)
occ::qm::Wavefunction calculate_wavefunction (const occ::core::Molecule &mol, const std::string &name, const std::string &method, const std::string &basis, bool spherical, occ::io::JsonCache &cache)
 Compute a wavefunction at an explicit method/basis rather than a CE model name.
WavefunctionList calculate_wavefunctions (const std::string &basename, const MoleculeList &molecules, const std::string &method, const std::string &basis, bool spherical, occ::io::JsonCache &cache)
void compute_monomer_energies (const std::string &basename, WavefunctionList &wavefunctions, const std::string &model_name, occ::io::JsonCache &cache)
const std::vector< std::string > & partial_charge_schemes ()
 Names accepted by partial_charges(), in a stable order.
Vec partial_charges (const qm::Wavefunction &wfn, const std::string &scheme)
 Partial atomic charges (e) of a wavefunction by scheme.
qm::Wavefunction single_point (const io::OccInput &)
qm::Wavefunction single_point (const io::OccInput &, const qm::Wavefunction &)
template<typename Run, typename... SolvationArgs>
decltype(auto) with_solvated_procedure (const std::string &method, const occ::gto::AOBasis &basis, Run &&run, SolvationArgs &&...solvation_args)
 Build the SCF procedure that method names – Hartree-Fock or a DFT functional – on basis, wrap it in a solvation correction constructed from solvation_args, and hand the wrapped procedure to run.
core::VibrationalModes vibrational_analysis (const io::OccInput &config, const qm::Wavefunction &wfn, const VibrationalAnalysisConfig &vib_config={})
 Perform vibrational frequency analysis on an optimized geometry.
core::VibrationalModes vibrational_analysis (const io::OccInput &config, const qm::Wavefunction &wfn)
 Convenience function for standard frequency analysis.

Typedef Documentation

◆ MoleculeList

◆ WavefunctionList

typedef std::vector< occ::qm::Wavefunction > occ::driver::WavefunctionList = std::vector<Wavefunction>

Enumeration Type Documentation

◆ AccelerationUse

enum class occ::driver::AccelerationUse
strong

What an SCF set up by apply_acceleration is for.

CoarseGradient keeps COSX on GRIDX1 for the whole SCF, for optimisation steps far from convergence.

Enumerator
Energy 
Gradient 
CoarseGradient 
NoCOSX 

◆ MethodKind

enum class occ::driver::MethodKind
strong
Enumerator
HF 
DFT 
MP2 
CCSD 
CCSD_T 
GFN2 

◆ SolvationModelKind

Enumerator
None 

gas phase, no solvation surfaces

Smd 

SMD via a solvated DFT SCF.

CosmoRS 

openCOSMO-RS 24a on an ideal-conductor cavity

◆ WavefunctionChoice

Enumerator
GasPhase 
Solvated 

Function Documentation

◆ apply_acceleration()

template<typename Proc>
void occ::driver::apply_acceleration ( Proc & proc,
std::size_t nbf,
const io::OccInput & config,
AccelerationUse use = AccelerationUse::Energy )

Apply the active acceleration policy (DF / COSX) to an SCF procedure.

Works for both HartreeFock and DFT (both expose the DF and COSX setters). COSX is only enabled when there is exact exchange to replace, full-range or long-range (range-separated hybrids).

Parameters
usewhat the SCF is for. Energy runs COSX on ORCA's energy schedule (GRIDX1 -> GRIDX2, final energy on GRIDX3). Gradient refines on GRIDX3 so the COSX gradient matches the reported energy. NoCOSX downgrades COSX to DF exchange (finite-difference Hessians, whose displaced SCFs do not carry COSX).

◆ assign_interaction_terms_to_nearest_neighbours()

std::vector< AssignedEnergy > occ::driver::assign_interaction_terms_to_nearest_neighbours ( const crystal::CrystalDimers::MoleculeNeighbors & neighbors,
const std::vector< double > & dimer_energies,
double cg_radius )

◆ available_cosmors_solvents()

std::vector< std::string > occ::driver::available_cosmors_solvents ( )

Solvent names with a cached segment ensemble, sorted.

◆ calculate_crystal_surface_energies()

CrystalSurfaceEnergies occ::driver::calculate_crystal_surface_energies ( const std::string & filename,
const occ::crystal::Crystal & crystal,
const occ::crystal::CrystalDimers & uc_dimers,
int max_number_of_surfaces,
int sign = -1,
double min_interplanar_spacing = 0.0 )

Surface energies for the morphologically important faces.

Faces are considered in Bravais-Friedel-Donnay-Harker order, largest interplanar spacing first. min_interplanar_spacing (Angstrom, positive to use) is the crystallographically meaningful cut: every face with d >= the threshold is included, so the selection never depends on where a count happens to land.

max_number_of_surfaces is the older count-based cut, kept for compatibility. It can split a Friedel pair — two distinct forms that are exactly degenerate in d whenever the point group is non-centrosymmetric — and produce an asymmetric Wulff construction, so it warns when it does. Set min_interplanar_spacing instead where you can.

◆ calculate_wavefunction() [1/2]

occ::qm::Wavefunction occ::driver::calculate_wavefunction ( const occ::core::Molecule & mol,
const std::string & name,
const std::string & energy_model,
bool spherical,
occ::io::JsonCache & cache )

◆ calculate_wavefunction() [2/2]

occ::qm::Wavefunction occ::driver::calculate_wavefunction ( const occ::core::Molecule & mol,
const std::string & name,
const std::string & method,
const std::string & basis,
bool spherical,
occ::io::JsonCache & cache )

Compute a wavefunction at an explicit method/basis rather than a CE model name.

◆ calculate_wavefunctions() [1/2]

WavefunctionList occ::driver::calculate_wavefunctions ( const std::string & basename,
const MoleculeList & molecules,
const std::string & energy_model,
bool spherical,
occ::io::JsonCache & cache )

◆ calculate_wavefunctions() [2/2]

WavefunctionList occ::driver::calculate_wavefunctions ( const std::string & basename,
const MoleculeList & molecules,
const std::string & method,
const std::string & basis,
bool spherical,
occ::io::JsonCache & cache )

◆ compute_crystal_morphology()

MorphologyResult occ::driver::compute_crystal_morphology ( const occ::crystal::Crystal & crystal,
const occ::crystal::CrystalDimers & uc_dimers,
const CrystalSurfaceEnergies & surface_energies,
const occ::cg::CrystalGrowthResult & growth_result,
const MorphologyOptions & options = {} )

Compute the particle size/shape-dependent (surface + edge + corner) energy.

Parameters
uc_dimersmust already carry interaction energies (as produced by the cg flow via InteractionMapper); dimer.interaction_energy("Total") is read.

◆ compute_monomer_energies()

void occ::driver::compute_monomer_energies ( const std::string & basename,
WavefunctionList & wavefunctions,
const std::string & model_name,
occ::io::JsonCache & cache )

◆ conductor_profile()

ConductorResult occ::driver::conductor_profile ( const qm::Wavefunction & gas_wavefunction,
const ConductorSettings & settings = {} )

Converge the SCF in the ideal-conductor reaction field starting from a gas-phase wavefunction, then build the segments.

◆ conductor_segments()

solvent::cosmors::Segments occ::driver::conductor_segments ( const qm::Wavefunction & wavefunction,
const solvent::cosmors::Parameters & params = {},
double probe_radius_angs = 0.0,
int angular_points = 590,
bool constrain_charge = true,
Vec * dielectric_energies = nullptr,
double * cavity_volume_angs3 = nullptr )

Build segments from a wavefunction that has already been converged in the ideal-conductor reaction field, with both σ and σ⊥ averaged on params.

Reusing a cached conductor wavefunction here is the whole point of the model: the segment descriptors are solvent independent, so one calculation serves every solvent.

◆ cosmors_solvation()

CGSolvationResult occ::driver::cosmors_solvation ( const std::string & basename,
const std::vector< core::Molecule > & molecules,
const std::vector< qm::Wavefunction > & gas_wavefunctions,
const SolventSpec & solvent,
const CosmoRSSettings & settings = {} )

Build openCOSMO-RS solvation surfaces for each molecule in solvent.

The conductor wavefunction is solvent independent, so it is computed once per molecule and cached as <basename>_<i>_conductor.owf.json. Changing solvent then costs one apparent-surface-charge solve and a contraction, not another SCF.

Three of the model's terms are additive over surface elements and become cg channels: dielectric (gas to ideal conductor), residual (conductor to solvent), and cavity (the per-atom τ_α A_α term). The rest — combinatorial, ring, reference state and the constant η — are per-molecule with no surface-element home, so they carry no channel, but they are still added into total_solvation_energy so the reported figure is the model's whole solvation free energy. They are identical for a bulk and a surface molecule, so they cancel in the attachment-energy difference cg forms.

◆ cosmors_solvation_free_energy() [1/2]

CosmoRSSolvation occ::driver::cosmors_solvation_free_energy ( const core::Molecule & solute,
const core::Molecule & solvent,
const CosmoRSSolvationSettings & settings = {} )

The same, computing the solvent's conductor cavity from its geometry instead of loading a cached ensemble.

Two SCFs rather than one, but it works for any solvent.

◆ cosmors_solvation_free_energy() [2/2]

CosmoRSSolvation occ::driver::cosmors_solvation_free_energy ( const core::Molecule & solute,
const std::string & solvent_name,
const CosmoRSSolvationSettings & settings = {} )

Solvation free energy of solute in a named solvent, end to end.

Runs the gas-phase SCF, converges it again in the ideal-conductor reaction field, builds the segment descriptors on the model's own averaging radii, loads the solvent's cached segment ensemble and assembles the free energy. This is the whole model in one call; the pieces are available separately for callers that need them.

◆ cosx_grid_description()

std::string occ::driver::cosx_grid_description ( const io::OccInput & config,
AccelerationUse use )
inline

The COSX grid apply_acceleration sets up, for the log.

◆ determine_spinorbital_kind()

qm::SpinorbitalKind occ::driver::determine_spinorbital_kind ( const std::string & name,
int multiplicity,
MethodKind method_kind )
inline

◆ df_exchange_intermediate_bytes()

std::size_t occ::driver::df_exchange_intermediate_bytes ( std::size_t nocc,
std::size_t nbf,
std::size_t ndf )
inline

Bytes DF-K would need for its half-transformed intermediate.

◆ df_exchange_memory_budget()

std::size_t occ::driver::df_exchange_memory_budget ( )
inline

Decide SCF acceleration (density fitting / COSX) for a calculation.

Parameters
policyrequested RIPolicy (Auto by default)
orbital_basis_nameprimary orbital basis name (for aux-basis lookup)
nbfnumber of basis functions (for the COSX crossover)
exact_exchangefraction of exact (HF) exchange: 1.0 for HF, the hybrid mixing fraction for DFT, 0.0 for a pure GGA
user_df_basisexplicit –df-basis/–aux value ("" if unset)
user_cosxexplicit –cosx flag
df_exchange_bytessize of the DF-K intermediate, 0 if unknown

Explicit user settings always win; Auto only fills in choices left unset. The Auto rule (ORCA-style): density-fit the Coulomb term for every SCF method, and for exact exchange use DF-K below the basis-function crossover, seminumerical COSX above it.

Memory budget for the DF exchange intermediate, in bytes.

DF-K half-transforms the three-centre integrals into B[i][mu][P], which is nocc x nbf x ndf doubles. That intermediate cannot be blocked over the auxiliary index – K = sum_i B_i V^-1 B_i^T, and V^-1 couples every auxiliary function to every other – so its size is a hard requirement of the method rather than something an implementation can trade away.

COSX needs no such intermediate, which makes it the right choice once the DF-K workspace stops fitting, independent of how many basis functions there are.

◆ energy_and_gradient()

std::pair< qm::Wavefunction, Mat3N > occ::driver::energy_and_gradient ( const io::OccInput & config)

Energy and analytic gradient at the input geometry, evaluated as a converged optimisation step would be (COSX on its gradient grids).

Returns
Wavefunction and gradient in Hartree/Bohr

◆ geometry_optimization()

qm::Wavefunction occ::driver::geometry_optimization ( const io::OccInput & config)

Perform geometry optimization.

Parameters
configInput configuration
Returns
Optimized wavefunction

◆ geometry_optimization_with_frequencies()

std::pair< qm::Wavefunction, core::VibrationalModes > occ::driver::geometry_optimization_with_frequencies ( const io::OccInput & config,
bool run_frequencies = true )

Perform geometry optimization with optional vibrational analysis.

Parameters
configInput configuration
run_frequenciesIf true, compute vibrational frequencies after optimization
Returns
Pair of optimized wavefunction and vibrational modes (empty if not computed)

◆ is_lower_cut()

bool occ::driver::is_lower_cut ( double energy,
double offset,
double best_energy,
double best_offset )
inline

Whether a cut (energy, offset) should replace the best one so far.

Symmetry-equivalent terminations of a face have equal energies up to summation-order noise, which differs run to run under threading. Treat energies within a relative 1e-9 as tied and keep the lower offset, so the chosen termination, and the particle built from it, is reproducible.

◆ make_cg_solvation_model()

std::unique_ptr< CGSolvationModel > occ::driver::make_cg_solvation_model ( SolvationModelKind kind,
const CGSolvationSettings & settings )
nodiscard

◆ method_kind_from_string()

MethodKind occ::driver::method_kind_from_string ( const std::string & name)
inline

◆ parse_method_string()

MethodSpec occ::driver::parse_method_string ( const std::string & method_string)
inline

Parse a method string into base method, dispersion, kind and backend.

Single source of truth: a leading "ri-"/"df-"/"thc-" backend prefix (only for correlation methods) is split off, then a dispersion suffix, then the base is classified. Anything not matching a known method alias is a DFT functional.

Examples: "pbe-d4" -> {base "pbe", disp "d4", kind DFT} "hf-d4" -> {base "hf", disp "d4", kind HF} "ccsd(t)" -> {base "ccsd(t)", kind CCSD_T, backend ""} "ri-ccsd(t)" -> {base "ccsd(t)", kind CCSD_T, backend "df"} "thc-mp2" -> {base "mp2", kind MP2, backend "thc"} "b97-d" -> {base "b97-d", kind DFT} (prefix/suffix kept)

◆ parse_solvation_model()

SolvationModelKind occ::driver::parse_solvation_model ( const std::string & )
nodiscard

◆ partial_charge_schemes()

const std::vector< std::string > & occ::driver::partial_charge_schemes ( )

Names accepted by partial_charges(), in a stable order.

◆ partial_charges()

Vec occ::driver::partial_charges ( const qm::Wavefunction & wfn,
const std::string & scheme )

Partial atomic charges (e) of a wavefunction by scheme.

mulliken and lowdin partition the density matrix; chelpg fits the wavefunction's ESP (for GFN2-xTB its point-multipole ESP); hirshfeld partitions an all-electron density against free-atom densities; eeq uses the geometry and total charge only; xtb returns the stored GFN2-xTB charges. Throws for an unknown scheme, or one that does not apply to wfn (xtb without xTB data, hirshfeld on a valence-only GFN2-xTB density).

◆ plan_acceleration()

AccelerationPlan occ::driver::plan_acceleration ( io::RIPolicy policy,
const std::string & orbital_basis_name,
std::size_t nbf,
double exact_exchange,
const std::string & user_df_basis,
bool user_cosx,
std::size_t df_exchange_bytes = 0 )
inline

◆ prepare_cg()

CGPreparation occ::driver::prepare_cg ( CGConfig const & config)

Load the crystal and build calculator options + charges from config.

◆ read_morphology_shape()

std::vector< std::pair< occ::crystal::HKL, double > > occ::driver::read_morphology_shape ( std::istream & input)

Read a particle shape for MorphologyOptions::user_shifts: one face per line as h k l distance, one face per form (its symmetry-equivalent faces are added), distances in any one unit since only their ratios matter.

Blank lines and anything after '#' are ignored; a malformed line, or a distance that is not positive, is an error.

◆ read_morphology_shapes()

std::vector< NamedShape > occ::driver::read_morphology_shapes ( std::istream & input)

Read one or more shapes.

A line shape <name> opens a named shape and the faces that follow belong to it; a file with no such line is a single unnamed shape, so every file read_morphology_shape accepts is still valid here.

Scanning habits is what a user shape is for, and the shape itself is the cheap part of the calculation: the pair energies, the monomers and the surface enumeration are all independent of it. Reading the whole set at once lets those be done once rather than once per habit.

◆ run_cg()

occ::cg::CrystalGrowthResult occ::driver::run_cg ( CGConfig const & )

◆ run_cg_pipeline()

occ::cg::CrystalGrowthResult occ::driver::run_cg_pipeline ( CrystalGrowthCalculator & calc,
const CrystalGrowthCalculatorOptions & opts,
CGConfig const & config )

Run the full crystal-growth pipeline on an already-constructed calculator: monomer energies -> lattice convergence -> molecular surroundings -> surface energies / morphology -> JSON serialization.

◆ run_correlated_density()

qm::cc::CorrelatedDensity occ::driver::run_correlated_density ( const qm::Wavefunction & wfn,
const CorrelationOptions & opts = {},
bool local = false,
const qm::HartreeFock * scf_jk = nullptr )

The one-particle density of a correlation method on a converged closed-shell RHF wavefunction, as natural orbitals: relaxed for MP2, unrelaxed (Lambda equations) for CCSD and CCSD(T); with local the cluster-in-molecule CCSD / CCSD(T) density.

Method prefixes, backend (exact or df; thc has no density), auxiliary basis and frozen core resolve as in run_correlation. SCS/SOS scaling has no density and is refused. scf_jk, set up as the SCF was (density fitting, COSX), gives the relaxed MP2 orbital response the SCF's own Coulomb and exchange; null = four-centre.

◆ run_correlation()

CorrelationResult occ::driver::run_correlation ( const qm::Wavefunction & wfn,
const CorrelationOptions & opts = {} )

Run an MP2 / CCSD / CCSD(T) calculation on a converged SCF wavefunction, with the same backend dispatch, auxiliary-basis resolution and frozen-core handling as the CLI.

Handles restricted and unrestricted references.

◆ single_point() [1/2]

qm::Wavefunction occ::driver::single_point ( const io::OccInput & )

◆ single_point() [2/2]

qm::Wavefunction occ::driver::single_point ( const io::OccInput & ,
const qm::Wavefunction &  )

◆ solvation_model_name()

std::string occ::driver::solvation_model_name ( SolvationModelKind )
nodiscard

◆ to_json() [1/2]

void occ::driver::to_json ( nlohmann::json & j,
const CrystalSurfaceEnergies &  )

◆ to_json() [2/2]

void occ::driver::to_json ( nlohmann::json & j,
const FacetEnergies &  )

◆ vibrational_analysis() [1/2]

core::VibrationalModes occ::driver::vibrational_analysis ( const io::OccInput & config,
const qm::Wavefunction & wfn )

Convenience function for standard frequency analysis.

Uses default settings optimized for most common use cases:

  • Finite differences with acoustic sum rule
  • Step size: 0.005 Bohr
  • No projection of translational/rotational modes
Parameters
configInput configuration from OCC input file
wfnConverged wavefunction from optimization or single point
Returns
VibrationalModes Complete vibrational analysis results

◆ vibrational_analysis() [2/2]

core::VibrationalModes occ::driver::vibrational_analysis ( const io::OccInput & config,
const qm::Wavefunction & wfn,
const VibrationalAnalysisConfig & vib_config = {} )

Perform vibrational frequency analysis on an optimized geometry.

This function computes the molecular Hessian using finite differences and performs normal mode analysis to obtain vibrational frequencies. It can be called after geometry optimization to characterize the stationary point.

Parameters
configInput configuration from OCC input file
wfnConverged wavefunction from optimization or single point
vib_configConfiguration options for vibrational analysis
Returns
VibrationalModes Complete vibrational analysis results

◆ with_solvated_procedure()

template<typename Run, typename... SolvationArgs>
decltype(auto) occ::driver::with_solvated_procedure ( const std::string & method,
const occ::gto::AOBasis & basis,
Run && run,
SolvationArgs &&... solvation_args )

Build the SCF procedure that method names – Hartree-Fock or a DFT functional – on basis, wrap it in a solvation correction constructed from solvation_args, and hand the wrapped procedure to run.

The solvated calculations (SMD surfaces, the COSMO-RS conductor) take their method from the energy model, and a CE model can name either kind, so they cannot assume DFT. run is called with one of two procedure types and must return the same type for both, which a generic lambda does naturally.