pestifer.objs.align module

An alignment coormod: computes the rigid-body transformation that minimizes RMSD between a selection in the pipeline system and the same (or a different) selection in a reference coordinate file, then applies that transformation to the pipeline system.

VMD’s measure fit is used to compute the 4×4 homogeneous transformation matrix; the reference molecule is loaded and deleted within the generated script so it leaves no persistent state.

class pestifer.objs.align.Align(*args, ref_pdb: str | None = None, ref_sourceID: str | None = None, ref_psf: str | None = None, mobile_sel: str = 'all', ref_sel: str | None = None, apply_to: str = 'all')[source]

Bases: BaseObj

Align the pipeline system to a reference coordinate file.

Parameters (from YAML specs)

ref_pdbstr, optional

Path or filename of the reference PDB file. Mutually exclusive with ref_sourceID.

ref_sourceIDstr, optional

RCSB PDB ID for the reference structure. The PDB file is downloaded to the working directory if not already present. Mutually exclusive with ref_pdb. Exactly one of ref_pdb / ref_sourceID must be supplied.

ref_psfstr, optional

Path to the reference PSF file. When omitted the reference is loaded as a plain PDB (sufficient for coordinate fitting).

mobile_selstr, optional

VMD atomselect string for the pipeline atoms used in the fit. Defaults to "all".

ref_selstr, optional

VMD atomselect string for the reference atoms used in the fit. Defaults to mobile_sel when omitted.

apply_tostr, optional

VMD atomselect string for the pipeline atoms that are actually moved by the fitted transformation. Defaults to "all".

Notes

Both selections passed to measure fit must contain the same number of atoms in the same order. Mismatched counts will cause a VMD error.

apply_to: str
property effective_ref_pdb: str

Resolved filename of the reference PDB (local path or derived from ref_sourceID).

mobile_sel: str
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.

ref_pdb: str | None
ref_psf: str | None
ref_sel: str | None
ref_sourceID: str | None
class pestifer.objs.align.AlignList(initlist: Iterable[T] = ())[source]

Bases: BaseObjList[Align]

describe()[source]

Abstract method to describe the contents of the BaseObjList. Subclasses should implement this method to provide a meaningful description.