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
pointand is perpendicular tovector. The native kernel The reflection is performed in-place on the coordinate array by the compute kernel.- Parameters:
molecular_system (molecular system) – Input system in any form supported by MolSysMT.
vector (array-like of float, default [0, 0, 1]) – Normal vector of the reflection plane (need not be unit length). The reflection plane is perpendicular to this vector.
point (str or quantity, default '[0,0,0] nm') – A point lying on the reflection plane, given as a PyUnitWizard length quantity or a parseable string (e.g.
'[0,0,0] nm').selection (str, list, tuple or numpy.ndarray, default 'all') – Atoms whose coordinates are reflected.
structure_indices ('all' or array-like, default 'all') – Frame indices over which the reflection is applied.
syntax (str, default 'MolSysMT') – Selection syntax used when
selectionis a string.in_place (bool, default False) – If
Truethe molecular system is modified in-place andNoneis returned. IfFalsea new copy is returned with the reflected coordinates.
- Returns:
molecular system or None – A new molecular system with the reflected coordinates when
in_place=False;Nonewhenin_place=True... versionadded:: 1.0.0