biotite.structure.io.pdbx.set_component

biotite.structure.io.pdbx.set_component(pdbx_file, array, data_block=None)[source]

Set the chem_comp_atom and, if bonds are available, chem_comp_bond category with atom information from an AtomArray.

This will save the coordinates, the mandatory annotation categories and the optional charge category as well as an associated BondList, if available.

Parameters
pdbx_fileCIFFile or CIFBlock or BinaryCIFFile or BinaryCIFBlock

The file object.

arrayAtomArray

The chemical component to be written. Must contain only a single residue.

data_blockstr, optional

The name of the data block. Default is the first (and most times only) data block of the file. If the file is empty, a new data will be created. If the data block object is passed directly to pdbx_file, this parameter is ignored.