Path D - Module 46: Geometric Transformations (Space)#

Align the pore axis with the Z-axis of the box. In this module, you will learn to orient your membrane systems for professional production.

import molsysmt as msm
import numpy as np
molsys = msm.convert('pdb:1K4C', to_form='molsysmt.MolSys')
rotation = np.array([[1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, 1.0, 0.0]])
rotation_center = msm.structure.get_center(molsys)
msm.structure.rotate(molsys, rotation=rotation, rotation_center=rotation_center, in_place=True)