molsysmt.build.remove_overlapping_molecules#

molsysmt.build.remove_overlapping_molecules(molecular_system, selection, selection_2=None, structure_index=0, threshold='3 angstroms', pbc=True, syntax='MolSysMT')[source]#

Removing molecules that overlap a reference selection within a distance threshold.

Given a reference selection (and optionally a second selection), this function finds contacts closer than threshold and removes the molecules containing the overlapping atoms.

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

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

  • selection_2 (str, list, tuple, or numpy.ndarray, default=None) – Second selection string or boolean/integer array.

  • structure_index (object, default=0) – Argument structure_index.

  • threshold (float or quantity, default='3 angstroms') – Distance cutoff threshold quantity.

  • pbc (bool, default=True) – Whether to take periodic boundary conditions into account.

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

Returns:

The pruned molecular system with overlapping molecules removed.

Return type:

molecular system