Path C - Module 40: PBC Geometry & Conventions#

To simulate a drug in its target, you need to define the periodic box. In this module, you will learn to configure the simulation world for your SARS-CoV-2 Mpro complex.

import molsysmt as msm
molsys = msm.convert('pdb:6LU7', to_form='molsysmt.MolSys')
solvated = msm.build.solvate(molsys)
box = msm.get(solvated, element='system', box=True)
print(f"Simulation Box:\n{box}")

Box parameters and volume#

MolSysMT reports box lengths in nanometers and computes the volume directly from the lengths and angles.

lengths, angles = msm.pbc.get_lengths_and_angles_from_box(box)
volume = msm.pbc.get_volume_from_lengths_and_angles(lengths, angles)
print(f"Box lengths: {lengths}")
print(f"Box angles: {angles}")
print(f"Box volume: {volume}")