molsysmt.pbc.wrap_to_mic#

molsysmt.pbc.wrap_to_mic(molecular_system, selection='all', structure_indices='all', mic_origin='[0,0,0] nanometers', center_of_selection=None, center_coordinates='[0,0,0] nanometers', weights=None, keep_covalent_bonds=False, syntax='MolSysMT', engine='MolSysMT', in_place=False, skip_digestion=False)[source]#

Wrap coordinates into the minimum image convention (MIC) box.

Parameters:
  • molecular_system (molecular system) – Input system.

  • selection (str, list, tuple or numpy.ndarray, default 'all') – Atoms to wrap.

  • structure_indices ('all' or array-like, default 'all') – Structures/frames to process.

  • mic_origin (quantity, default '[0,0,0] nanometers') – Origin of the MIC box.

  • center_of_selection (str or array-like, optional) – Selection to center before wrapping (uses center_coordinates).

  • center_coordinates (quantity, default '[0,0,0] nanometers') – Target coordinates for centering the center_of_selection.

  • weights (array-like, optional) – Weights for centering when center_of_selection is given.

  • keep_covalent_bonds (bool, default False) – Placeholder (not implemented) to preserve covalent connectivity across PBC.

  • syntax (str, default 'MolSysMT') – Selection syntax for string selections.

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

  • in_place (bool, default False) – If True, modify the input system; otherwise return a wrapped copy.

  • skip_digestion (bool, default False) – Whether to skip argument digestion.

Returns:

Wrapped system when in_place=False, otherwise None.

Return type:

molecular system or None

Raises: