# ImproperTorsionPotential¶

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

Constructor of the potential.

Parameters: 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 in radian)
getAllParameterNames()

Return the names of all used parameters as a list.

getAllParameters()

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.

getParameter(parameterName)

Get the current value of the parameter parameterName.

setParameter(parameterName, value)

Set the parameter parameterName to the given value.

Parameters: parameterName (str) – The name of the parameter that will be modified. value – The new value that will be assigned to the parameter parameterName.
setPsi0(psi0)

Set the parameter psi0.

Parameters: psi0 (PhysicalQuantity of type angle) – Potential parameter (the equilibrium angle in radian).
setk(k)

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]]
molecule_configuration.setImproperDihedralIndices(improper_dihedral_indices)

# 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(
particleType1='C',
particleType2='H',
particleType3='H',
particleType4='C',
k=0.1*eV,
psi0=3.1415926,
)
# 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 ethene_improper_torsion_potential.py.

## Notes¶

• 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 torsion angle $$\psi$$ is then calculated as the angle between the two planes (a,b,c) and (b,c,d), i.e. the torsion around $$\mathbf{r}_{b,c}$$.

• The improper torsion potential is calculated as

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