molsysmt.build.get_missing_terminal_cappings#
- molsysmt.build.get_missing_terminal_cappings(molecular_system, selection='all', syntax='MolSysMT', engine='MolSysMT')[source]#
Identify terminal capping atoms that are missing from chain termini in a molecular system.
This function detects atoms expected at the C-terminus of protein chains that are absent from the current structure. Currently the only terminal heavy atom checked is
OXT(C-terminal oxygen). The result maps group (residue) indices to the list of missing terminal atoms.- Parameters:
molecular_system (molecular system) – Molecular system in any of the supported forms.
selection (str, list, tuple, or numpy.ndarray, default 'all') – Atom selection used to restrict the search to a subset of the system.
syntax (str, default 'MolSysMT') – Syntax used to interpret the
selectionstring.engine ({'MolSysMT', 'PDBFixer'}, default 'MolSysMT') –
Backend used to detect missing terminal atoms.
'MolSysMT': native implementation. For each chain, identifies the C-terminal amino-acid residue (last by group sequence number) and checks whetherOXTis present. Works with any supported form; no external dependency required.'PDBFixer': delegates topdbfixer.findMissingAtoms/missingTerminals.
- Returns:
Dictionary mapping group (residue) indices (int) in the original molecular system to lists of missing terminal atom names (list of str). Only terminal groups with missing cappings are included.
- Return type:
dict
- Raises:
NotImplementedError – Raised if the requested
engineis not supported.
Notes
When
engine='MolSysMT'the C-terminal residue of each chain is found by sorting the chain’s amino-acid groups by their group sequence number (group_idcast toint) and taking the last one. This correctly handles structures where group indices are not stored in chain-sequence order (e.g. multi-model assemblies).Non-amino-acid chains (water, ions, small molecules) are silently skipped.
Added in version 1.0.0.