%load_ext autoreload
%autoreload 2
import molsysmt as msm
import numpy as np

Flip#

crd = msm.systems['POPC']['popc.crd']
psf = msm.systems['POPC']['popc.psf']
molsys = msm.convert([crd, psf])
msm.info(molsys, element='group')
index id name type n atoms component index chain index molecule index molecule type entity index entity name
0 1 POPC lipid 134 0 0 0 lipid 0 POPC
molsys = msm.structure.center(molsys, selection='all', center_of_selection='atom_name=="P"',
                              center_coordinates=[0.0, 0.0, 2.0]*msm.pyunitwizard.quantity('nm'))
msm.get(molsys, selection='atom_name=="P"', coordinates=True)
Magnitude
[[[0.0 0.0 2.0]]]
Unitsnanometer
molsys2 = msm.structure.flip(molsys, vector=[0,0,1], point='[0,0,0] nm')
msm.get(molsys2, selection='atom_name=="P"', coordinates=True)
Magnitude
[[[0.0 0.0 -2.0]]]
Unitsnanometer