pestifer.objs.crot module

A C-rotation is a transformation in which atoms are rotated around a given bond by a given amount. The “C” designation means that only the “downstream” atoms of the bond are moved; upstream atoms, along with the atoms of the bond itself, are not moved. The set of upstream atoms and the set of downstream atoms must naturally have no topological connection other than the bond itself. Typically, this can be used to execute rotation of a backbone loop in a C-terminal loop, a side-chain angle, usually in the service of reducing steric clashes. The primary job of this class is to translate the C-rotation shortcodes specified by the user into TcL commands to be incorporated in a psfgen script.

class pestifer.objs.crot.Crot(*args, angle: str, chainID: str | None = None, resid1: ResID | None = None, resid2: ResID | None = None, resid3: ResID | None = None, segname: str | None = None, atom1: str | None = None, atom2: str | None = None, segname1: str | None = None, segname2: str | None = None, segnamei: str | None = None, residi: ResID | None = None, atomi: str | None = None, segnamejk: str | None = None, residj: ResID | None = None, atomj: str | None = None, residk: ResID | None = None, atomk: str | None = None, degrees: float | None = None)[source]

Bases: BaseObj

A class for managing so-called “C-rotations” in a molecular structure.

angle: str
atom1: str | None
atom2: str | None
atomi: str | None
atomj: str | None
atomk: str | None
chainID: str | None
degrees: float | None
model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': False}

Configuration for pydantic.BaseModel.

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

resid1: ResID | None
resid2: ResID | None
resid3: ResID | None
residi: ResID | None
residj: ResID | None
residk: ResID | None
segname: str | None
segname1: str | None
segname2: str | None
segnamei: str | None
segnamejk: str | None
shortcode() str[source]
class pestifer.objs.crot.CrotList(initlist: Iterable[T] = ())[source]

Bases: BaseObjList[Crot]

A class for managing lists of Crot objects. This class inherits from BaseObjList and provides methods to handle multiple Crot objects. It allows for writing Tcl commands for all Crot objects in the list.

describe()[source]

Returns a string description of the CrotList, including the number of Crot objects it contains.

Returns:

A string describing the CrotList.

Return type:

str