class ImproperTorsionPotential(particleType1, particleType2, particleType3, particleType4, k, psi0)

Constructor of the potential.

  • particleType1 (ParticleType or ParticleIdentifier) – Identifier of the first particle type. This is the central atom when calculating the angle.
  • particleType2 (ParticleType or ParticleIdentifier) – Identifier of the second particle type.
  • particleType3 (ParticleType or ParticleIdentifier) – Identifier of the third particle type.
  • particleType4 (ParticleType or ParticleIdentifier) – Identifier of the fourth particle type.
  • k (PhysicalQuantity of type energy / angle**2) – Potential parameter.
  • psi0 (PhysicalQuantity of type angle) – Potential parameter (the equilibrium angle)

Return the names of all used parameters as a list.


Return all parameters of this potential and their current values as a <parameterName / parameterValue> dictionary.

static getDefaults()

Get the default parameters of this potential and return them in form of a dictionary of <parameter name, default value> key-value pairs.


Get the current value of the parameter parameterName.

setParameter(parameterName, value)

Set the parameter parameterName to the given value.

  • parameterName (str) – The name of the parameter that will be modified.
  • value – The new value that will be assigned to the parameter parameterName.

Set the parameter psi0.

Parameters:psi0 (PhysicalQuantity of type angle) – Potential parameter (the equilibrium angle).

Set the parameter k.

Parameters:k (PhysicalQuantity of type energy / angle**2) – Potential parameter.

Usage Examples

Set up a bonded potential with a ImproperTorsionPotential for an ethene molecule.

# Set up improper dihedral indices for two SP2-carbon atoms.
improper_dihedral_indices = [[1, 0, 2, 3], [3, 4, 5, 1]]

# Set up a new TremoloXPotentialSet
potential_set = TremoloXPotentialSet(name='Ethene_bonded')

# Add particle types for Carbon and Hydrogen.
    ParticleType.fromElement(Carbon, charge=-0.2*elementary_charge)
    ParticleType.fromElement(Hydrogen, charge=0.1*elementary_charge)

# Add improper torsion potential around SP2-carbon atoms.
improper_torsion_potential = ImproperTorsionPotential(
# Create a new TremoloXCalculator with this potential.
calculator = TremoloXCalculator(parameters=potential_set)

Here, only the ImproperTorsionPotential block of the script is shown. The full script can be found found in the file


  • Improper torsion (also called improper dihedral) potentials are typically used in biomolecular force fields to model the out-of-plane torsion of a planar group of atoms, e.g. around an SP2-carbon atom in a benzene molecule. Improper torsion potentials work similar to regular torsion potentials (e.g. CosineTorsionPotential), however, the quadruple of atoms (a,b,c,d) is typically not connected by a sequence of bonds, as in regular torsion potentials.

  • As they cannot be inferred from the bonded topology, improper dihedrals have to be defined separately. They can be set on a configuration via configuration.setImproperDihedralIndices(improper_dihedral_indices) where improper_dihedral_indices is a list or array of all improper dihedral quadruples that should be used for the configuration. Each entry in this list must be a sequence of 4 atom indices (a,b,c,d).

  • The improper torsion angle is defined by taking one of the atoms around the center as a common atom. So for instance if a is the central atom and b is taken as the common atom, the improper torsion angle \(\psi\) is then calculated as the angle between the two planes (a,b,c) and (a,b,d). This is the equivalent of calculating the torsion angle of atoms (c,a,b,d).

  • Given the 4 atom indices (a,b,c,d) there are 3 possible improper torsions that can be defined by taking different atoms as the common atom. The ImproperTorsionPotential calculates the potential using all 3 definitions of the improper torsion angle. This means that only one potential needs to be added for each type of central planar atom.

  • The improper torsion potential has a simple quadratic form where the energy \(V\) is given as:

    \[V(\psi) = k \left(\psi - \psi_0 \right)^2\]

    Here \(\psi\) is the improper torsion angle, \(\psi_0\) is the equilibrium improper torsion angle and \(k\) is the stiffness of the improper torsion.