Objective_function.Properties.energy_property module

Description

This module defines the ParaMol.Objective_function.Properties.energy_property.EnergyProperty class, which is a ParaMol representation of the energy property.

class ParaMol.Objective_function.Properties.energy_property.EnergyProperty(systems=[], weight=1.0)

Bases: ParaMol.Objective_function.Properties.property.Property

ParaMol representation of the energy property.

Parameters
Variables
  • name (str) – ‘ENERGY’

  • systems (list of ParaMol.System.system.ParaMolSystem) – List of ParaMol Systems. Currently not used and it is set to None.

  • units (simtk.unit.Quantity) – kj/mol

  • value (float) – Current value of this property

  • weight (float) – Weight of this property in the objective function.

  • variance (list of floats) – Variance of the energy for each system.

add_system(system)

Method that adds a system to the property.

Parameters

system (ParaMol.System.system.ParaMolSystem) – ParaMol System.

Returns

system (list of ParaMol.System.system.ParaMolSystem) – Attribute system that contains a list of ParaMol Systems.

calculate_property(emm_data)

Method that calculates the value of the energy property.

Notes

This method should be modified by the user if another objective function form is to be used. Calculates the square of the difference of the MM and QM energies, i.e.:

\(\sum_k^{N_{conf}} (E_k^{MM} - E_k^{QM}-<E^{MM}-E^{QM}>)^2\)

Parameters

emm_data (np.array) – Array containing the MM energies for each conformation

Returns

obj_fun_energies (list of float) – Value of the energy property contribution to the objective function for every system.

calculate_variance()

Method that calculates the variance of the QM energies, i.e., \(var(E_{QM})=<E^2_{QM}>-<E_{QM}>^2\).

Notes

The variance will be stored in the attribute self.variance. It is used as a normalization factor in the objective function because it introduces the correct rescaling that make the residuals, i.e., \(\Delta E=E^{QM}-E^{MM}\), adimensional and with unit magnitude.

Returns

variance (np.array of floats) – Array containing the variance of the QM (reference) energies for each system.