moleculekit.tools.crystalpacking module#
- moleculekit.tools.crystalpacking.generateCrystalPacking(pdbid: str, hexagonal: bool = False, visualize: bool = False, viewerhandle=None)#
Generates the crystal packing of a PDB protein.
It is possible to inspect it immediately with the visualize option. It can only be generated if there is crystallographic information in the PDB entry.
- Parameters:
pdbid (str) – ID from the Protein Databank
hexagonal (bool) – If True and the crystal space group is hexagonal, builds and returns the hexagonal unit cell (and, when visualizing, draws hexagonal unit cell boundaries) instead of the default rectangular cell.
visualize (bool) – If True, this function also visualizes the crystal packing
viewerhandle (
VMDobject, optional) – A specific viewer in which to visualize the molecule. If None it will use the current default viewer.
- Returns:
mol – Molecule object with the crystal packing
- Return type:
Molecule