remove_pbc#
- biotite.structure.remove_pbc(atoms, selection=None)[source]#
Remove segmentation caused by periodic boundary conditions from each molecule in the given structure.
In this process the centroid of each molecule is moved into the dimensions of the box. To determine the molecules the structure is required to have an associated BondList. Otherwise segmentation removal is performed on a per-chain basis.
- Parameters:
- atomsAtomArray, shape=(n,) or AtomArrayStack, shape=(m,n)
The potentially segmented structure. The
boxattribute must be set in the structure. An associatedbondsattribute is recommended.- selectionndarray, dtype=bool, shape=(n,)
Specifies which parts of atoms are sanitized, i.e the segmentation is removed.
- Returns:
- sanitized_atomsAtomArray or AtomArrayStack
The input structure with removed segmentation over periodic boundaries.
See also
remove_pbc_from_coordVariant that acts directly on coordinates.
Notes
This function ensures that adjacent atoms in the input
AtomArray/AtomArrayStackare spatially close to each other, i.e. their distance to each other is be smaller than the half box size.