molsysmt.build.get_missing_residues#
- molsysmt.build.get_missing_residues(molecular_system, sequence=None, selection='all', syntax='MolSysMT', engine='MolSysMT')[source]#
Identify residues that are missing from a molecular system relative to a reference sequence.
This function compares the residues present in the molecular system against a reference sequence and returns a mapping of insertion positions to the names of the residues that are absent.
- Parameters:
molecular_system (molecular system) – Molecular system in any supported MolSysMT format.
sequence (object, default=None) – Argument sequence.
selection (str, list, tuple, or numpy.ndarray, default='all') – Selection string or boolean/integer array specifying elements.
syntax (str, default='MolSysMT') – Selection syntax used to evaluate selection (e.g., ‘MolSysMT’, ‘MDTraj’).
engine (object, default='MolSysMT') – Argument engine.
- Returns:
Dictionary mapping
(chain_index, insertion_position)tuples to lists of residue names (str).chain_indexis the 0-based index of the chain in the (sub)system;insertion_positionis the 0-based index within that chain’s structural sequence before which the missing residues should be inserted. For insertions after the last residue of a chain theinsertion_positionequals the number of residues in that chain.- Return type:
dict
- Raises:
NotImplementedMethodError – Raised if the requested
engineis not supported.
Notes
engine=’MolSysMT’ limitations: Only amino-acid and nucleotide chains with a detectable reference sequence are analysed. Non-standard residues in the reference that are absent from the structure will be reported as missing; non-standard residues present in the structure but absent from the reference will be silently ignored.
Post-1.0 roadmap: When
sequence=Noneand the molecular system has no embedded sequence information, a future version will optionally query UniProt or the PDB REST API using the entity name or PDB ID.Added in version 1.0.0.