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

Rotate your drug to test different starting orientations. In this module, you will learn to translate and rotate your inhibitor in the Mpro active site.

import molsysmt as msm
import numpy as np
molsys = msm.convert('pdb:6LU7', to_form='molsysmt.MolSys')
angle = np.deg2rad(45.0)
rotation = np.array([[np.cos(angle), -np.sin(angle), 0.0], [np.sin(angle), np.cos(angle), 0.0], [0.0, 0.0, 1.0]])
rotation_center = msm.structure.get_center(molsys, selection='molecule_type=="small molecule"')
msm.structure.rotate(molsys, selection='molecule_type=="small molecule"', rotation=rotation, rotation_center=rotation_center, in_place=True)