Pose#
tmol.PoseStack stores a padded batch of molecular coordinates and
block topology. tmol.PoseStackBuilder combines compatible poses,
while tmol.PackedBlockTypes holds the shared block-type vocabulary.
Constraint data is stored in tmol.ConstraintSet. These classes, and
the pose queries tmol.get_sequence(), tmol.get_ligand_mask(),
tmol.block_for_residue_label(), and tmol.get_torsion_names(), are
imported from the top-level package and documented in Top-level API.
The tmol.pose package provides the labelling and selection helpers
below.
Pose stacks, packed residue types, and structural metadata.
- tmol.pose.atom_label(pose_stack: PoseStack, pose: int, atom: int) str[source]#
“chain resnum name3 atom” for a per-pose atom index.
- tmol.pose.get_named_torsions(pose_stack: PoseStack, poses=None, blocks=None, names=None, degrees: bool = True)[source]#
Measure named torsions.
Returns a single float when
poses,blocksandnamesare all scalars, a {name: value} dict when onlynamesis left open, and otherwise a list-of-lists of such dicts indexed [pose][block]. Torsions that reach an absent neighboring residue measure as nan.
- tmol.pose.get_polymer_type_mask(pose_stack: PoseStack, polymer_type) Tensor[source]#
Boolean mask shaped
[n_poses, max_n_blocks], true where a block’sproperties.polymer.polymer_typeequalspolymer_type(one of"amino_acid","nucleic_acid", orNonefor a non-polymer like a ligand or ion). Padding blocks are false.
- tmol.pose.metal_blocks(pose_stack: PoseStack, pose: int) List[int][source]#
Indices of the blocks in one pose that carry metal sites.
- tmol.pose.repeat_pose_stack(pose_stack: PoseStack, n_poses: int) PoseStack[source]#
A PoseStack of
n_posesindependent copies of a single pose.Unlike
PoseStackBuilder.from_poses()this keeps the coordinate dtype and the constraint set.
- tmol.pose.residue_label(pose_stack: PoseStack, pose: int, block: int) str[source]#
“chain resnum name3” for one block.
- tmol.pose.select_blocks(pose_stack: PoseStack, blocks: Sequence[int]) PoseStack[source]#
Compact PoseStack holding
blocks(in the given order) of every pose.All poses must share one block layout. Connections to omitted blocks are cleared, and connections between retained blocks are remapped. Chain ids, PDB metadata and bond separations are carried over; constraints and split block mappings are dropped.