occ
Loading...
Searching...
No Matches
occ::driver::SolventSpec Struct Reference

A solvent, possibly a mixture, at a temperature. More...

#include <cg_solvation_model.h>

Public Member Functions

bool is_mixture () const
const std::string & single () const
 The single component name; throws for a mixture.
std::string to_string () const
std::string filename_tag () const
 Filesystem-safe label for output filenames: water, or water0.75-ethanol0.25 for a mixture.

Static Public Member Functions

static SolventSpec parse (const std::string &text)
 water or water:0.7,ethanol:0.3.

Public Attributes

std::vector< std::string > components {"water"}
Vec mole_fractions {Vec::Ones(1)}
double temperature {298.15}

Detailed Description

A solvent, possibly a mixture, at a temperature.

Parsed from water, or water:0.7,ethanol:0.3 for a mixture. Only the σ-potential model accepts mixtures; the others reject them explicitly rather than silently using the first component.

Member Function Documentation

◆ filename_tag()

std::string occ::driver::SolventSpec::filename_tag ( ) const
nodiscard

Filesystem-safe label for output filenames: water, or water0.75-ethanol0.25 for a mixture.

Colons and commas are not portable in filenames.

◆ is_mixture()

bool occ::driver::SolventSpec::is_mixture ( ) const
inlinenodiscard

◆ parse()

SolventSpec occ::driver::SolventSpec::parse ( const std::string & text)
staticnodiscard

water or water:0.7,ethanol:0.3.

Fractions are normalised; omitting them for a multi-component spec is an error.

◆ single()

const std::string & occ::driver::SolventSpec::single ( ) const
nodiscard

The single component name; throws for a mixture.

◆ to_string()

std::string occ::driver::SolventSpec::to_string ( ) const
nodiscard

Member Data Documentation

◆ components

std::vector<std::string> occ::driver::SolventSpec::components {"water"}

◆ mole_fractions

Vec occ::driver::SolventSpec::mole_fractions {Vec::Ones(1)}

◆ temperature

double occ::driver::SolventSpec::temperature {298.15}

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