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.

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

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