molsysmt.structure.flip#

molsysmt.structure.flip(molecular_system, vector=None, point='[0,0,0] nm', selection='all', structure_indices='all', syntax='MolSysMT', in_place=False)[source]#

Reflect (flip) atomic coordinates of a selection through a plane defined by a vector and a point.

Each selected atom’s position is reflected across the plane that passes through point and is perpendicular to vector. The native kernel The reflection is performed in-place on the coordinate array by the compute kernel.

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

  • vector (array-like or None, default=None) – Normal vector of the reflection plane.

  • point (PyUnitWizard quantity, default='[0,0,0] nm') – Point on the reflection plane, in units of length.

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

  • structure_indices (int, list, tuple, or numpy.ndarray, default='all') – Structure indices (0-based) to include or process.

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

  • in_place (bool, default=False) – Whether to modify the input molecular system in place.

Returns:

A new molecular system with the reflected coordinates when in_place=False; None when in_place=True.

Return type:

molecular system or None

Added in version 1.0.0.