pestifer.objs.transfer_coords module

A coordinate-transfer coormod: copies atomic coordinates from a selected subset of a donor system directly onto the corresponding atoms of the pipeline system.

Unlike Align, which computes a rigid-body transformation, transfer_coords overwrites positions atom-by-atom and therefore handles non-rigid changes (re-modeled loops, isolated energy-minimization, ligand repositioning, etc.).

An optional pre-alignment step can be requested by supplying both align_donor_sel and align_mobile_sel. When present, the entire donor molecule is rigidly fitted to the pipeline system using those selections before the coordinate transfer is performed. Supplying only one of the two raises a ValueError.

All selection strings must be supplied explicitly; no defaults are inferred from each other in order to avoid hidden decision-making. Congruent selections (same atom count, same order) are required for both the alignment pair and the transfer pair.

class pestifer.objs.transfer_coords.TransferCoords(*args, donor_pdb: str, donor_psf: str | None = None, donor_sel: str, mobile_sel: str, align_donor_sel: str | None = None, align_mobile_sel: str | None = None)[source]

Bases: BaseObj

Copy coordinates from a donor PDB onto a selection in the pipeline system, with an optional prior rigid-body alignment of the donor to the pipeline.

Parameters (from YAML specs)

donor_pdbstr

Path to the donor PDB file.

donor_psfstr, optional

Path to a donor PSF file. When provided both files are loaded so that VMD selection syntax can reference topology attributes.

donor_selstr

VMD atomselect string for the atoms to copy from in the donor.

mobile_selstr

VMD atomselect string for the atoms to overwrite in the pipeline system. Must select the same number of atoms as donor_sel, in the same order.

align_donor_selstr, optional

VMD atomselect string for donor atoms used in the pre-alignment fit. Must be supplied together with align_mobile_sel; omitting both skips the alignment step entirely.

align_mobile_selstr, optional

VMD atomselect string for pipeline atoms used in the pre-alignment fit. Must be supplied together with align_donor_sel.

align_donor_sel: str | None
align_mobile_sel: str | None
donor_pdb: str
donor_psf: str | None
donor_sel: str
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.

property pre_align: bool
class pestifer.objs.transfer_coords.TransferCoordsList(initlist: Iterable[T] = ())[source]

Bases: BaseObjList[TransferCoords]

describe()[source]

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