peleffy.topology.Dihedral

class peleffy.topology.Dihedral(index=- 1, atom1_idx=None, atom2_idx=None, atom3_idx=None, atom4_idx=None, periodicity=None, prefactor=None, constant=None, phase=None)[source]

It represents a dihedral in the topology.

It can be a proper or an improper dihedral.

__init__(index=- 1, atom1_idx=None, atom2_idx=None, atom3_idx=None, atom4_idx=None, periodicity=None, prefactor=None, constant=None, phase=None)[source]

It initiates an Dihedral object.

Parameters
  • index (int) – The index of this Dihedral object

  • atom1_idx (int) – The index of the first atom involved in this Dihedral

  • atom2_idx (int) – The index of the second atom involved in this Dihedral

  • atom3_idx (int) – The index of the third atom involved in this Dihedral

  • atom4_idx (int) – The index of the fourth atom involved in this Dihedral

  • periodicity (int) – The periodicity of this Dihedral

  • prefactor (int) – The prefactor of this Dihedral

  • constant (simtk.unit.Quantity) – The constant of this Dihedral

  • phase (simtk.unit.Quantity) – The phase constant of this Dihedral

apply_lambda(attributes_to_modify, lambda_value, reverse=False, final_state=None)

Given a lambda value, it modifies a set of attributes of this topological element. A lambda equal to 0 will keep the original attributes of this topological element. A lambda equal to 1 will remove completely the effects of the attributes. This behavior will be the opposite when reverse is set to True.

Parameters
  • attributes_to_modify (list[str]) – The list attribute names that will be modified

  • lambda_value (float) – A value between 0 and 1 that defined the lambda to apply to the attributes

  • reverse (bool) – When set to true the effects of lambda will be the opposite

  • final_state (a peleffy.topology.topology._TopologyElement object) – The topology element that represents the final state when lambda equals 1.0. Default is None, which means that the final state is not defined and therefore the topological element will disappear or will start from scratch

plot()[source]

It plots this Dihedral as a function of phi angle.

set_atom1_idx(index)[source]

It sets atom1’s index.

Parameters

index (int) – The index of the first atom involved in this Dihedral

set_atom2_idx(index)[source]

It sets atom2’s index.

Parameters

index (int) – The index of the second atom involved in this Dihedral

set_atom3_idx(index)[source]

It sets atom3’s index.

Parameters

index (int) – The index of the third atom involved in this Dihedral

set_atom4_idx(index)[source]

It sets atom4’s index.

Parameters

index (int) – The index of the fourth atom involved in this Dihedral

set_index(index)[source]

It sets the index of the dihedral.

Parameters

index (int) – The index of this Dihedral object

Attributes

atom1_idx

Dihedral’s atom1 index.

atom2_idx

Dihedral’s atom2 index.

atom3_idx

Dihedral’s atom3 index.

atom4_idx

Dihedral’s atom4 index.

constant

Dihedral’s constant.

index

Dihedral’s index.

n_writable_attrs

The number of writable attributes this topological element has.

name

The name that this topological element has.

periodicity

Dihedral’s periodicity.

phase

Dihedral’s phase constant.

prefactor

Dihedral’s prefactor.