SolvationEnergy

class SolvationEnergy(configuration)

Create the object, calculating the solvation and gas phase energies.

Parameters:

configuration (MoleculConfiguration | SurfaceConfiguration | BulkConfiguration) – The configuration for which the energy is calculated. This configuration must have an attached calculator that contains a solvation model, such as an LCAOCalculator that has COSMO enabled.

evaluate()
Returns:

The total solvation energy of the system.

Return type:

PhysicalQuantity of type energy

gasEnergy()
Returns:

The calculated gas phase energy.

Return type:

TotalEnergy

metatext()
Returns:

The metatext of the object or None if no metatext is present.

Return type:

str | None

nlinfo()
Returns:

Information about the solvation energy calculation.

Return type:

dict

nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:

stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()

setMetatext(metatext)

Set a given metatext string on the object.

Parameters:

metatext (str | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

solventEnergy()
Returns:

The calculated solvation energy.

Return type:

TotalEnergy

totalSolvationEnergy()
Returns:

Return the total solvation energy.

Return type:

PhysicalQuantity of type energy

uniqueString()

Return a unique string representing the state of the object.

Usage Examples

Calculate the solvation energy of ammonia in a toluene solvent. This calculation gives a solvation energy of approximately -2.38 kcal/mol, which is in agreement with the experimental value[1].

solvation_parameters = CosmoSolvationParameters(
    solvent_dielectric_constant=2.3741,
    solvent_surface_tension=27.9*dyne/cm
)

calculator = LCAOCalculator(
    basis_set=basis_set,
    solvation_parameters=solvation_parameters
)

# Set the calculator
configuration.setCalculator(calculator)
configuration.update()
nlsave('ammonia_toluene.hdf5', configuration)

# Optimize the geometry
optimized_configuration = OptimizeGeometry(
    configuration=configuration,
    trajectory_filename='ammonia_toluene.hdf5'
)
nlsave('ammonia_toluene.hdf5', optimized_configuration)

# Calculate the solvation energy
solvation_energy = SolvationEnergy(
    configuration=optimized_configuration
)
nlsave('ammonia_toluene.hdf5', solvation_energy)

ammonia_toluene.py

Notes

The SolvationEnergy analysis allows the calculation of the solvation energy of a molecule or surface, including the gas phase reference energy. In the case of a surface, the solvation energy is the solvation energy for the surface area of the unit cell. The solvent and gas phase energy calculations are performed with the same calculator settings, except for the inclusion of a continuum solvation model. This removes the need for changing calculators during the calculation to obtain both energies.

In setting up the calculation, the configuration passed to the SolvationEnergy class must have an :class”~.LCAOCalculator or DeviceLCAOCalculator with an appropriate solvation model. The solvated molecular energy is calculated including this solvation model. Once the calculation is finished, the total solvation energy can be obtained using either the evaluate or the totalSolvationEnergy methods. The total energy of both solvent and gas phases can also be obtained using the solventEnergy and gasEnergy methods respectively. These both return a TotalEnergy analysis object. This allows the different energy components in each calculation to be inspected.