biotite.structure.io.pdb.set_structure

biotite.structure.io.pdb.set_structure(pdb_file, array, hybrid36=False)[source]

write an AtomArray or AtomArrayStack into a PDBFile.

This function is a thin wrapper around the PDBFile method set_structure() for the sake of consistency with other structure.io subpackages.

This will save the coordinates, the mandatory annotation categories and the optional annotation categories ‘atom_id’, ‘b_factor’, ‘occupancy’ and ‘charge’.

Parameters
pdb_filePDBFile

The file object.

arrayAtomArray or AtomArrayStack

The structure to be written. If a stack is given, each array in the stack will be in a separate model.

hybrid36: boolean, optional

Defines wether the file should be written in hybrid-36 format.

Notes

If array has an associated BondList, CONECT records are also written for all non-water hetero residues and all inter-residue connections.