molsysmt.structure.get_rmsd#

molsysmt.structure.get_rmsd(molecular_system, selection='atom_type!="H"', structure_indices='all', reference_molecular_system=None, reference_selection=None, reference_structure_index=0, syntax='MolSysMT', engine='MolSysMT', heavy_mode='auto', use_gpu=None, parallel=None, num_threads=None)[source]#

Compute the RMSD between structures without prior superposition.

The function measures the root-mean-square deviation of atomic positions relative to a reference frame. No rotation or translation is applied; use get_least_rmsd if you want the optimal superposition (Kabsch) RMSD, or least_rmsd_fit to align the coordinates first.

For large trajectories a chunked execution path is activated automatically (heavy_mode='auto') to keep memory usage bounded.

The function handles three broadcasting scenarios:

  • Many query structures vs. one reference — each query frame is compared to the single reference frame.

  • One query structure vs. many reference frames — the single query is compared to each reference frame.

  • Equal numbers of frames on both sides — frame-by-frame comparison.

Parameters:
  • molecular_system (molecular system) – The candidate system containing the structures to evaluate.

  • selection (str or array-like, default 'atom_type!="H"') – Atoms to include in the RMSD calculation.

  • structure_indices ('all' or array-like, default 'all') – Candidate frames to evaluate.

  • reference_molecular_system (molecular system, optional) – The reference system. Defaults to molecular_system.

  • reference_selection (str or array-like, optional) – Reference atoms. Defaults to selection.

  • reference_structure_index (int, default 0) – Reference structure frame index.

  • syntax (str, default 'MolSysMT') – Atom selection syntax.

  • engine ({'MolSysMT'}, default 'MolSysMT') – Calculation backend.

  • heavy_mode (str, default 'auto') – Chunked execution path: ‘auto’ | ‘force’ | ‘off’.

  • use_gpu (bool or 'auto', optional) – Whether to run calculations on GPU if supported.

  • parallel (bool or str, optional) – Parallel mode override: True | False | ‘auto’.

  • num_threads (int, optional) – Number of threads override.

Returns:

PyUnitWizard length quantity of shape (n_structures,) containing the RMSD values in the standard length unit (nm).

Return type:

quantity

Raises:
  • NotImplementedMethodError – If an unsupported engine is requested.

  • StructuralInconsistencyError – If the number of atoms resolved by selection and reference_selection differ.

  • .. versionadded: – 1.0.0: