.. _section_example_oechem_setchemcomp:

Setting mmCIF Chemical Component Header
================================================================================

Use the reference molecule to populate or replace a residue's _chem_comp., _chem_comp_atom., and _chem_comp_bond.
header information from the input CIF file.

Example
--------------------------------------------------------------------------------

.. oe:language:: python

   .. code-block:: console

      prompt > setchemcomp.py input.cif reference.odb output.cif

Code
--------------------------------------------------------------------------------

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`setchemcomp.py <../../../../../wrappers/python/examples/oechem/setchemcomp.py>`

      .. literalinclude:: ../../../../../wrappers/python/examples/oechem/setchemcomp.py

   .. only:: oepdf

      .. oe:source:: setchemcomp.py
         :language: python

.. seealso::

   * :oe:func:`OEChem::OESetMMCIFChemCompData` function
   * :oe:cls:`OEChem::OECIFData` class
