dihedral

A module containing the Dihedral class.

Summary

Classes:

Dihedral

A class to represent a dihedral in a molecular topology.

Reference

class Dihedral(
index1: PositiveInt,
index2: PositiveInt,
index3: PositiveInt,
index4: PositiveInt,
equilibrium_angle: PositiveReal | None = None,
dihedral_type: int | None = None,
is_linker: bool = False,
is_improper: bool = False,
comment: str | None = None,
)[source]

Bases: object

A class to represent a dihedral in a molecular topology.

Parameters:
  • index1 (PositiveInt) – The index of the first atom in the dihedral.

  • index2 (PositiveInt) – The index of the second atom in the dihedral.

  • index3 (PositiveInt) – The index of the third atom in the dihedral.

  • index4 (PositiveInt) – The index of the fourth atom in the dihedral.

  • equilibrium_angle (PositiveReal, optional) – The equilibrium angle of the dihedral, by default None.

  • dihedral_type (int, optional) – The type of the dihedral, by default None.

  • is_linker (bool, optional) – A flag to indicate if the dihedral is a linker, by default False.

  • is_improper (bool, optional) – A flag to indicate if the dihedral is an improper dihedral, by default False.

  • comment (str, optional) – A comment for the dihedral, by default None.

__eq__(value: object) bool[source]

Compare the Dihedral object with another object.

Parameters:

value (object) – The object to compare with the Dihedral object.

Returns:

True if the objects are equal, False otherwise.

Return type:

bool

copy() Dihedral[source]

A method to create a copy of the dihedral.

Returns:

A copy of the dihedral.

Return type:

Dihedral