molsysmt.topology.get_sequence_identity#

molsysmt.topology.get_sequence_identity(molecular_system, selection='all', reference_molecular_system=None, reference_selection='all', syntax='MolSysMT', engine='Biopython')[source]#

Calculating sequence identity between two molecular systems.

Parameters:
  • molecular_system (molecular system) – Molecular system in any supported MolSysMT format.

  • selection (str, list, tuple, or numpy.ndarray, default='all') – Selection string or boolean/integer array specifying elements.

  • reference_molecular_system (object, default=None) – Argument reference_molecular_system.

  • reference_selection (object, default='all') – Argument reference_selection.

  • syntax (str, default='MolSysMT') – Selection syntax used to evaluate selection (e.g., ‘MolSysMT’, ‘MDTraj’).

  • engine (object, default='Biopython') – Argument engine.

Returns:

  • float – Sequence identity percentage (0–100).

  • list of int – Group indices in the query sequence that matched.

  • list of int – Group indices in the reference sequence that matched.

Raises:

NotImplementedError – If an unsupported engine is requested.

Notes

  • Uses get_sequence_alignment to align the two selections and counts identical, aligned positions.

Added in version 1.0.0.