Has PBC#
Checking whether a molecular system possesses periodic boundary conditions.
The function molsysmt.pbc.has_pbc() tests if a molecular system contains valid unit cell box vectors and periodic boundary conditions.
Added in version 1.0.0.
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function: molsysmt.pbc.has_pbc().
Basic usage#
Let’s check the PBC status of Met-enkephalin before and after solvation:
import molsysmt as msm
molsys = msm.convert(msm.systems['Met-enkephalin']['met_enkephalin.h5msm'])
print('Has PBC (isolated peptide):', msm.pbc.has_pbc(molsys))
Has PBC (isolated peptide): False
Note
Demo Systems Catalog
This tutorial uses demonstration datasets provided by MolSysMT. To explore the full catalog of bundled systems, forms, and file paths, visit the Demo Systems guide.
After solvating the system, periodic boundary conditions are established:
molsys_solvated = msm.build.solvate(molsys, box_shape='cubic', clearance='14.0 angstroms', engine='PDBFixer')
print('Has PBC (solvated system):', msm.pbc.has_pbc(molsys_solvated))
Has PBC (solvated system): True
See also
Related Tools & References
Convert: Convert molecular systems with
molsysmt.basic.convert().Solvate: Solvate molecular systems with
molsysmt.build.solvate().Get box with shape: Construct standard box matrices with
molsysmt.pbc.get_box_with_shape().Wrap to PBC: Wrap coordinates to periodic box with
molsysmt.pbc.wrap_to_pbc().