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

interactions energies including CrystalExplorer model energies More...

Namespaces

namespace  polarization_partitioning
 
namespace  transform
 

Classes

struct  CEEnergyComponents
 
class  CEEnergyModel
 
struct  CEModelInteraction
 
struct  CEMonomerCalculationParameters
 
struct  CEParameterizedModel
 
struct  ElatResults
 
class  EnergyModelBase
 
class  ExternalEnergyModel
 
struct  ExternalEnergyOptions
 
class  FileSystemPairEnergyStore
 
struct  LatticeConvergenceSettings
 
class  LatticeEnergyCalculator
 
struct  LatticeEnergyResult
 
class  MemoryPairEnergyStore
 
struct  PairEnergy
 
class  PairEnergyStore
 
class  PairEnergyStoreBase
 
struct  WolfCouplingResult
 
struct  WolfCouplingTerm
 
struct  WolfParameters
 
class  WolfSum
 
class  XTBEnergyModel
 

Functions

double coulomb_energy (Eigen::Ref< const Vec > charges, Eigen::Ref< const Mat3N > positions)
 
double coulomb_pair_energy (Eigen::Ref< const Vec > charges_a, Eigen::Ref< const Mat3N > positions_a, Eigen::Ref< const Vec > charges_b, Eigen::Ref< const Mat3N > positions_b)
 
Vec3 coulomb_efield (Eigen::Ref< const Vec > charges, Eigen::Ref< const Mat3N > positions, Eigen::Ref< const Vec3 > point)
 
std::pair< Mat3N, Mat3N > coulomb_pair_efield (Eigen::Ref< const Vec > charges_a, Eigen::Ref< const Mat3N > positions_a, Eigen::Ref< const Vec > charges_b, Eigen::Ref< const Mat3N > positions_b)
 
double coulomb_interaction_energy_asym_charges (const occ::core::Dimer &, Eigen::Ref< const Vec > charges_asym)
 
std::pair< Mat3N, Mat3N > coulomb_efield_asym_charges (const occ::core::Dimer &, Eigen::Ref< const Vec > charges_asym)
 
double coulomb_self_energy_asym_charges (const occ::core::Molecule &, Eigen::Ref< const Vec > charges)
 
void to_json (nlohmann::json &j, const CEEnergyComponents &)
 
void from_json (const nlohmann::json &j, CEEnergyComponents &)
 
void to_json (nlohmann::json &j, const polarization_partitioning::CouplingTerm &)
 
void from_json (const nlohmann::json &j, polarization_partitioning::CouplingTerm &)
 
void to_json (nlohmann::json &j, const polarization_partitioning::MoleculeCouplingResults &)
 
void from_json (const nlohmann::json &j, polarization_partitioning::MoleculeCouplingResults &)
 
void write_elat_json (const std::string &filename, const ElatResults &results)
 Write elat JSON results in compact format.
 
ElatResults read_elat_json (const std::string &filename)
 Read elat JSON results and reconstruct data structures.
 
Wavefunction load_wavefunction (const std::string &filename)
 
template<int derivative_order = 0>
Mat lennard_jones (Eigen::Ref< const Mat3N > positions, Eigen::Ref< const Mat > params)
 
template<>
Mat lennard_jones< 0 > (Eigen::Ref< const Mat3N > positions, Eigen::Ref< const Mat > params)
 
template<>
Mat lennard_jones< 1 > (Eigen::Ref< const Mat3N > positions, Eigen::Ref< const Mat > params)
 
double dreiding_type_hb_correction (double eps, double sigma, const occ::core::Dimer &dimer)
 
void compute_ce_model_energies (Wavefunction &wfn, HartreeFock &hf, const CEMonomerCalculationParameters &params={})
 
template<typename Procedure >
double compute_polarization_energy (const Wavefunction &wfn_a, const Procedure &proc_a, const Wavefunction &wfn_b, const Procedure &proc_b)
 
CEParameterizedModel ce_model_from_string (const std::string &name)
 The CrystalExplorer model called name (case-insensitive): ce-b3lyp, ce-hf, ce-1p, ce-2p or ce-5p, with their -xdm and -wb97m-v aliases.
 
bool model_name_implies_xtb (const std::string &name)
 Whether name selects the in-tree xtb backend, which implements GFN2-xTB only: xtb, gfn2 or gfn2-xtb, case-insensitive.
 
double ce_model_polarization_energy (const occ::IVec &atomic_numbers, const occ::Mat3N &efield, bool charged=false)
 
double polarization_energy (const occ::Vec &polarizabilities, const occ::Mat3N &efield)
 
double wolf_coulomb_energy (double qi, const Vec3 &pi, Eigen::Ref< const Vec > qj, Eigen::Ref< const Mat3N > pj, const WolfParameters &params)
 
double wolf_pair_energy (Eigen::Ref< const Vec > charges_a, Eigen::Ref< const Mat3N > positions_a, Eigen::Ref< const Vec > charges_b, Eigen::Ref< const Mat3N > positions_b, const WolfParameters &params)
 
Mat3N wolf_electric_field (Eigen::Ref< const Vec > charges, Eigen::Ref< const Mat3N > source_positions, Eigen::Ref< const Mat3N > target_positions, const WolfParameters &params)
 
WolfCouplingResult compute_wolf_coupling_terms (const std::vector< Mat3N > &electric_fields_per_neighbor, Eigen::Ref< const Vec > polarizabilities)
 

Variables

CEParameterizedModel CE_HF_321G
 
CEParameterizedModel CE_B3LYP_631Gdp
 
CEParameterizedModel CE_XDM_FIT
 
constexpr double CE1p_XDM_KREP {0.77850434}
 
CEParameterizedModel CE1_XDM_B3LYP
 
CEParameterizedModel CE1_XDM_WB97MV
 
CEParameterizedModel CE2_XDM_B3LYP
 
CEParameterizedModel CE2_XDM_WB97MV
 
CEParameterizedModel CE5_XDM_WB97MV
 
CEParameterizedModel CE1_XDM = CE1_XDM_B3LYP
 
CEParameterizedModel CE2_XDM = CE2_XDM_B3LYP
 
CEParameterizedModel CE5_XDM = CE5_XDM_WB97MV
 
const std::array< double, 110 > Thakkar_atomic_polarizability
 
const std::array< double, 110 > Charged_atomic_polarizibility
 

Detailed Description

interactions energies including CrystalExplorer model energies

Function Documentation

◆ ce_model_from_string()

CEParameterizedModel occ::interaction::ce_model_from_string ( const std::string &  name)
inline

The CrystalExplorer model called name (case-insensitive): ce-b3lyp, ce-hf, ce-1p, ce-2p or ce-5p, with their -xdm and -wb97m-v aliases.

An unknown name is an error.

◆ ce_model_polarization_energy()

double occ::interaction::ce_model_polarization_energy ( const occ::IVec &  atomic_numbers,
const occ::Mat3N &  efield,
bool  charged = false 
)

◆ compute_ce_model_energies()

void occ::interaction::compute_ce_model_energies ( Wavefunction &  wfn,
HartreeFock &  hf,
const CEMonomerCalculationParameters &  params = {} 
)

◆ compute_polarization_energy()

template<typename Procedure >
double occ::interaction::compute_polarization_energy ( const Wavefunction &  wfn_a,
const Procedure &  proc_a,
const Wavefunction &  wfn_b,
const Procedure &  proc_b 
)

◆ compute_wolf_coupling_terms()

WolfCouplingResult occ::interaction::compute_wolf_coupling_terms ( const std::vector< Mat3N > &  electric_fields_per_neighbor,
Eigen::Ref< const Vec >  polarizabilities 
)

◆ coulomb_efield()

Vec3 occ::interaction::coulomb_efield ( Eigen::Ref< const Vec >  charges,
Eigen::Ref< const Mat3N >  positions,
Eigen::Ref< const Vec3 >  point 
)

◆ coulomb_efield_asym_charges()

std::pair< Mat3N, Mat3N > occ::interaction::coulomb_efield_asym_charges ( const occ::core::Dimer &  ,
Eigen::Ref< const Vec >  charges_asym 
)

◆ coulomb_energy()

double occ::interaction::coulomb_energy ( Eigen::Ref< const Vec >  charges,
Eigen::Ref< const Mat3N >  positions 
)

◆ coulomb_interaction_energy_asym_charges()

double occ::interaction::coulomb_interaction_energy_asym_charges ( const occ::core::Dimer &  ,
Eigen::Ref< const Vec >  charges_asym 
)

◆ coulomb_pair_efield()

std::pair< Mat3N, Mat3N > occ::interaction::coulomb_pair_efield ( Eigen::Ref< const Vec >  charges_a,
Eigen::Ref< const Mat3N >  positions_a,
Eigen::Ref< const Vec >  charges_b,
Eigen::Ref< const Mat3N >  positions_b 
)

◆ coulomb_pair_energy()

double occ::interaction::coulomb_pair_energy ( Eigen::Ref< const Vec >  charges_a,
Eigen::Ref< const Mat3N >  positions_a,
Eigen::Ref< const Vec >  charges_b,
Eigen::Ref< const Mat3N >  positions_b 
)

◆ coulomb_self_energy_asym_charges()

double occ::interaction::coulomb_self_energy_asym_charges ( const occ::core::Molecule &  ,
Eigen::Ref< const Vec >  charges 
)

◆ dreiding_type_hb_correction()

double occ::interaction::dreiding_type_hb_correction ( double  eps,
double  sigma,
const occ::core::Dimer &  dimer 
)

◆ from_json() [1/3]

void occ::interaction::from_json ( const nlohmann::json &  j,
CEEnergyComponents &   
)

◆ from_json() [2/3]

void occ::interaction::from_json ( const nlohmann::json &  j,
polarization_partitioning::CouplingTerm &   
)

◆ from_json() [3/3]

void occ::interaction::from_json ( const nlohmann::json &  j,
polarization_partitioning::MoleculeCouplingResults &   
)

◆ lennard_jones()

template<int derivative_order = 0>
Mat occ::interaction::lennard_jones ( Eigen::Ref< const Mat3N >  positions,
Eigen::Ref< const Mat >  params 
)

◆ lennard_jones< 0 >()

template<>
Mat occ::interaction::lennard_jones< 0 > ( Eigen::Ref< const Mat3N >  positions,
Eigen::Ref< const Mat >  params 
)

◆ lennard_jones< 1 >()

template<>
Mat occ::interaction::lennard_jones< 1 > ( Eigen::Ref< const Mat3N >  positions,
Eigen::Ref< const Mat >  params 
)

◆ load_wavefunction()

Wavefunction occ::interaction::load_wavefunction ( const std::string &  filename)

◆ model_name_implies_xtb()

bool occ::interaction::model_name_implies_xtb ( const std::string &  name)
inline

Whether name selects the in-tree xtb backend, which implements GFN2-xTB only: xtb, gfn2 or gfn2-xtb, case-insensitive.

Any other name starting with "gfn" or "xtb" (gfn1, gfnff, ...) is an error.

◆ polarization_energy()

double occ::interaction::polarization_energy ( const occ::Vec &  polarizabilities,
const occ::Mat3N &  efield 
)

◆ read_elat_json()

ElatResults occ::interaction::read_elat_json ( const std::string &  filename)

Read elat JSON results and reconstruct data structures.

Loads crystal and reconstructs LatticeEnergyResult with energies mapped from the compact JSON format produced by write_elat_json()

Parameters
filenamePath to elat JSON results file
Returns
ElatResults containing crystal and lattice energy data

◆ to_json() [1/3]

void occ::interaction::to_json ( nlohmann::json &  j,
const CEEnergyComponents &   
)

◆ to_json() [2/3]

void occ::interaction::to_json ( nlohmann::json &  j,
const polarization_partitioning::CouplingTerm &   
)

◆ to_json() [3/3]

void occ::interaction::to_json ( nlohmann::json &  j,
const polarization_partitioning::MoleculeCouplingResults &   
)

◆ wolf_coulomb_energy()

double occ::interaction::wolf_coulomb_energy ( double  qi,
const Vec3 &  pi,
Eigen::Ref< const Vec >  qj,
Eigen::Ref< const Mat3N >  pj,
const WolfParameters &  params 
)

◆ wolf_electric_field()

Mat3N occ::interaction::wolf_electric_field ( Eigen::Ref< const Vec >  charges,
Eigen::Ref< const Mat3N >  source_positions,
Eigen::Ref< const Mat3N >  target_positions,
const WolfParameters &  params 
)

◆ wolf_pair_energy()

double occ::interaction::wolf_pair_energy ( Eigen::Ref< const Vec >  charges_a,
Eigen::Ref< const Mat3N >  positions_a,
Eigen::Ref< const Vec >  charges_b,
Eigen::Ref< const Mat3N >  positions_b,
const WolfParameters &  params 
)

◆ write_elat_json()

void occ::interaction::write_elat_json ( const std::string &  filename,
const ElatResults &  results 
)

Write elat JSON results in compact format.

Writes crystal, dimers, and energy data to JSON file

Parameters
filenameOutput filename
resultsElatResults to write

Variable Documentation

◆ CE1_XDM

CEParameterizedModel occ::interaction::CE1_XDM = CE1_XDM_B3LYP
inline

◆ CE1_XDM_B3LYP

CEParameterizedModel occ::interaction::CE1_XDM_B3LYP
inline
Initial value:
{
1.0, 1.0, CE1p_XDM_KREP, CE1p_XDM_KREP, 1.0, "CE-1p-B3LYP",
"b3lyp", "def2-svp", true, 0.65, 1.70}
constexpr double CE1p_XDM_KREP
Definition pairinteraction.h:46

◆ CE1_XDM_WB97MV

CEParameterizedModel occ::interaction::CE1_XDM_WB97MV
inline
Initial value:
{
1.0, 1.0, CE1p_XDM_KREP, CE1p_XDM_KREP, 1.0, "CE-1p-wB97M-V",
"wb97m-v", "def2-svp", true, 0.65, 1.70}

◆ CE1p_XDM_KREP

constexpr double occ::interaction::CE1p_XDM_KREP {0.77850434}
inlineconstexpr

◆ CE2_XDM

CEParameterizedModel occ::interaction::CE2_XDM = CE2_XDM_B3LYP
inline

◆ CE2_XDM_B3LYP

CEParameterizedModel occ::interaction::CE2_XDM_B3LYP
inline
Initial value:
{
1.0, 0.485, 0.485, 0.803, 1.0, "CE-2p-B3LYP",
"b3lyp", "def2-svp", true, 0.65, 1.70}

◆ CE2_XDM_WB97MV

CEParameterizedModel occ::interaction::CE2_XDM_WB97MV
inline
Initial value:
{
1.0, 0.485, 0.485, 0.803, 1.0, "CE-2p-wB97M-V",
"wb97m-v", "def2-svp", true, 0.65, 1.70}

◆ CE5_XDM

CEParameterizedModel occ::interaction::CE5_XDM = CE5_XDM_WB97MV
inline

◆ CE5_XDM_WB97MV

CEParameterizedModel occ::interaction::CE5_XDM_WB97MV
inline
Initial value:
{
1.0051, 0.6705, 0.6, 0.7929, 1.0509, "CE5p-XDM-wB97M-V",
"wb97m-v", "def2-svp", true, 0.65, 1.70}

◆ CE_B3LYP_631Gdp

CEParameterizedModel occ::interaction::CE_B3LYP_631Gdp
inline
Initial value:
{1.0573, 0.6177, 0.6177,
0.7399, 0.8708, "CE-B3LYP",
"b3lyp", "6-31g**", false}

◆ CE_HF_321G

CEParameterizedModel occ::interaction::CE_HF_321G
inline
Initial value:
{1.019, 0.811, 0.811, 0.651, 0.901,
"CE-HF", "hf", "3-21g", false}

◆ CE_XDM_FIT

CEParameterizedModel occ::interaction::CE_XDM_FIT
inline
Initial value:
{
1.0, 1.0, 1.0, 1.0, 1.0, "CE-XDM-FIT",
"wb97m-v", "def2-svp", true, 0.65, 1.70}

◆ Charged_atomic_polarizibility

const std::array<double, 110> occ::interaction::Charged_atomic_polarizibility
extern

◆ Thakkar_atomic_polarizability

const std::array<double, 110> occ::interaction::Thakkar_atomic_polarizability
extern