File ResultsAutoCompleter.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
class ResultsAutoCompleter
#include <ResultsAutoCompleter.h>

Provides functionality to autocomplete the results of a calculation.

Public Functions

ResultsAutoCompleter(AtomCollection &atomCollection)

Generates an instance of ResultsAutoCompleter.

The Density Matrix, Thermochemistry, Atomic Charges and Bond Orders will be set as target properties. This selection can be changed e.g. via setWantedProperties(). Use setTemperature(), setMolecularSymmetryNumber() and setZPVEInclusion() to adapt the settings used for calculating thermochemical properties. The core charges used during the computation are set equal to the nuclear charges as a default and can be adapted via setCoreCharges().

void addOneWantedProperty(Property wantedProperty)

Adds wantedProperty to the list of properties to be autocompleted.

Note that this does not guarantee that the property can be generated from the available results (see propertyGeneratable()).

void setWantedProperties(PropertyList wantedProperties)

Sets the list of properties wanted to be autocompleted to PropertyList wantedProperties.

Note that this does not guarantee that all of these properties can be generated from the results (see propertyGeneratable()).

void setAllPropertiesAsWanted()

Sets all properties encoded in PropertyList as targets for autocompletion.

Note that this does not guarantee that all of them can be generated (see propertyGeneratable()).

bool propertyGeneratable(const Results &results, const Property &wantedProperty) const

Checks whether property wantedProperty can be autocompleted from the available results.

The following properties can be derived if the listed results are present:

Properties for which no dependencies are given are always considered to be not generatable.

void generateProperties(Results &results, const AtomCollection &atomCollection)

Computes properties from wantedPropertyList from results if possible according to propertyGeneratable()

For all properties in the list of wanted properties it is checked, whether they can be computed from the properties already present in the results. If yes, the property is calculated and added to the results. Since the results are updated during the run, initially ungeneratable properties may still be computed during the run if that requires only the prior computation of other derived and generatable properties.

void setTemperature(double temperature)

Sets the temperature employed in the ThermochemistryCalculator class.

The default is 298.15 K.

void setMolecularSymmetryNumber(int sigma)

Sets the molecular symmetry number employed in the ThermochemistryCalculator.

The default is 1. Employing a wrong symmetry number results into an incorrect rotational entropy contribution.

void setZPVEInclusion(ZPVEInclusion zpveInclusion)

Sets whether the energy already included the zero point vibrational energy.

The default is that it is not included.

void setCoreChargesToNuclearCharges(AtomCollection &atomCollection)

Sets the core charges to the nuclear charges.

void setCoreCharges(std::vector<double> coreCharges)

Sets the core Charges employed in the calculation of AtomicCharges.

They default to be the nuclear charges, but have to be adapted dependent on the employed method, e.g., when effective core potentials are used.

Private Functions

void fillRequiredPropertiesMap()

Sets requiredPropertiesMap_ to hardcoded values.

void setDefaultWantedProperties()

Sets the default choice for properties to be generated from the results if possible.

void generateThermochemistry(Results &results, const AtomCollection &atomCollection)

Calculates Thermochemistry from results and stores it there.

The default symmetry factor (1) is assumed, potentially leading to wrong rotational contributions for symmetric molecules. The default temperature of 298.5 K is assumed.

void generateDensityMatrix(Results &results)

Calculates DensityMatrix from results and stores it there.

void generateAtomicCharges(Results &results)

Calculates AtomicCharges (Mulliken charges) from results and stores them there.

void generateBondOrderMatrix(Results &results)

Calculates BondOrderMatrix (Mayer bond orders) from results and stores them there.

Private Members

std::map<Property, PropertyList> requiredPropertiesMap_
PropertyList wantedProperties_

List of Properties to be autocompleted if possible.

double temperature_ = {298.15}

Temperature employed in ThermochemistryCalculator.

int sigma_ = {1}
ZPVEInclusion zpveIncluded_ = {ZPVEInclusion::notIncluded}
std::vector<double> coreCharges_