pestifer.objs.rottrans module

A class for handling translation and rotation of segments in a molecular structure. This class represents a move operation that can either be a translation or a rotation.

class pestifer.objs.rottrans.RotTrans(*args, movetype: str, x: float | None = None, y: float | None = None, z: float | None = None, axis: str | None = None, angle: float | None = None)[source]

Bases: BaseObj

A class for handling translation and rotation of segments in a molecular structure.

angle: float | None
axis: str | 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.

movetype: str
shortcode() str[source]
x: float | None
y: float | None
z: float | None
class pestifer.objs.rottrans.RotTransList(initlist: Iterable[T] = ())[source]

Bases: BaseObjList[RotTrans]

A class for handling lists of RotTrans objects. This class inherits from BaseObjList and provides methods to manage a list of RotTrans objects.

describe()[source]

Describe the RotTransList object.

Returns:

A string description of the RotTransList object, including the number of items in the list.

Return type:

str