Chemical Types#
Public chemical database and residue-type objects.
Chemical residue types, patches, and connectivity utilities.
- class tmol.chemical.BondType(*values)[source]#
Bases:
IntEnumSupported covalent bond orders for residue-type topology.
- class tmol.chemical.RefinedResidueType(name: str, base_name: str, name3: str, io_equiv_class: str, atoms: Tuple[Atom, ...], atom_aliases: Tuple[AtomAlias, ...], bonds: Tuple[tuple, ...], connections: Tuple[Connection, ...], torsions: Tuple[Torsion, ...], icoors: Tuple[Icoor, ...], properties: ChemicalProperties, chi_samples: Tuple[ChiSamples, ...], default_jump_connection_atom: str, hydrogens_regenerated: bool = False, is_ligand_fragment: bool = False, one_letter_code: str | None = None, atom_names_set: Set[str] = NOTHING, atom_to_idx: Mapping[str, AtomIndex] = NOTHING, aliases_map: Mapping[str, str] = NOTHING, coord_dtype: dtype = NOTHING, bond_indices: ndarray = NOTHING, bond_to_type: Mapping = NOTHING, bond_to_ringness: Mapping = NOTHING, connection_to_idx: Mapping[str, AtomIndex] = NOTHING, connection_to_cidx: Mapping[str | None, ConnectionIndex] = NOTHING, ordered_connection_atoms: ndarray = NOTHING, connection_bond_types: ndarray = NOTHING, all_bonds: ndarray = NOTHING, down_connection_ind: int = NOTHING, up_connection_ind: int = NOTHING, torsion_to_uaids: Mapping[str, Tuple[Tuple[AtomIndex, ConnectionIndex, BondCount]]] = NOTHING, ordered_torsions: ndarray = NOTHING, is_torsion_mc: ndarray = NOTHING, mc_torsions: ndarray = NOTHING, sc_torsions: ndarray = NOTHING, which_mcsc_torsion: ndarray = NOTHING, path_distance: ndarray = NOTHING, atom_paths_from_conn: ndarray = NOTHING, atom_downstream_of_conn: ndarray = NOTHING, icoors_index: Mapping[str, AtomIndex] = NOTHING, at_to_icoor_ind: ndarray = NOTHING, icoors_ancestors: ndarray = NOTHING, icoors_geom: ndarray = NOTHING, ideal_coords: ndarray = NOTHING, default_jump_connection_atom_index: int = NOTHING)[source]#
Bases:
RawResidueTypeResidue type augmented with indexed atoms, bonds, and kinematic metadata.
- class tmol.chemical.ResidueTypeSet(residue_types: Sequence[RefinedResidueType], restype_map: Mapping[ResName3, Sequence[RefinedResidueType]], chem_db: PatchedChemicalDatabase)[source]#
Bases:
objectCollection of residue types refined from one chemical database.
- classmethod get_default() ResidueTypeSet[source]#
Load and return the residue type set constructed from the default param db
- tmol.chemical.bonds_and_bond_ranges(n_atoms: int, intra_res_bonds: NDArray[slice(None, None, None), 2], ordered_connection_atoms: NDArray) Tuple[NDArray[slice(None, None, None), 3], NDArray[slice(None, None, None), 2]][source]#
Concatenate the set of intra- and inter-block bonds
The intra-block bonds should list each bond twice, once for each of the two atoms it connects. The ordered-connection-atoms array lists the atom on this block that connects to another block such that the ith position in this array represents the ith inter-block connection; the cases when a single atom serves as a connection point to multiple other blocks (as might happen with metal ions) is handled correctly.
This function returns a pair of arrays. The first array lists each bond as a tuple of (atom-ind, (other-atom)) where “other-atom” is similar to an unresolved-atom-id: it is itself a 2-tuple where if the indicated atom is a member of this block, then the first value in the tuple is a non-negative integer index of that atom, and if not, then the sentinel value of -1; if the atom is not a member of this block, then the second value in the tuple is the non-negative connection id, which can then be used to look up which other block, and which connection on that block is this block connected to in the PoseStack’s data. The second array gives for each atom on this block the start and end indices of its bonds in the first array (all bonds in the first array for a single atom are contiguous).
- tmol.chemical.build_coords_from_icoors(icoors_ancestors: NDArray[slice(None, None, None), 3], icoors_geom: NDArray[slice(None, None, None), 3]) NDArray[slice(None, None, None), 3][source]#
Build Cartesian coordinates from ancestor indices and internal geometry.
- tmol.chemical.build_ideal_coords(restype: RefinedResidueType) NDArray[slice(None, None, None), 3][source]#
Build ideal Cartesian coordinates for a refined residue type.
- tmol.chemical.frame_from_coords(p1: NDArray, p2: NDArray, p3: NDArray) NDArray[4, 4][source]#
Construct a homogeneous frame from three Cartesian points.
- tmol.chemical.one2three(one: str) str | None[source]#
Return the three-letter amino acid code given its one-letter code, or None if not a valid one-letter code.
- tmol.chemical.three2one(three: str) str | None[source]#
Return the one-letter amino acid code given its three letter code, or None if not a valid three-letter code
Public constants and aliases#
|
|