parmed.openmm.energy_decomposition

parmed.openmm.energy_decomposition(structure, context, nrg=Unit({BaseUnit(base_dim=BaseDimension('amount'), name='mole', symbol='mol'): - 1.0, ScaledUnit(factor=4.184, master=kilojoule, name='kilocalorie', symbol='kcal'): 1.0}))[source]

This computes the energy of every force group in the given structure and computes the energy for each force group for the given Context. Note, the context must have positions already assigned.

Parameters
structureStructure

This should be the Structure object from which the System object in the Context was created

contextmm.Context

The OpenMM context set up for computing forces and energies

nrgenergy unit, optional

The unit to convert all energies into. Default is kcal/mol

Returns
dict {str:float}

A dictionary mapping the name of the force group (taken from the attribute names of the format XXX_FORCE_GROUP in the structure object) with the energy of that group in