.. oe:namespace:: OEShape

.. meta::
   :keywords: OEAddColorAtom

.. oe:function:: OEAddColorAtom

   .. oe:language:: c++ java csharp

      .. oe:api::

         OEChem::OEAtomBase* OEAddColorAtom(OEChem::OEMolBase& mol,
                                            const float* coords, unsigned type,
                                            const std::string& typeName,
                                            const std::string& parentName = std::string())
         OEChem::OEAtomBase* OEAddColorAtom(OEChem::OEMolBase& mol,
                                            const OEChem::OEAtomBase** parents,
                                            unsigned num, unsigned type,
                                            const std::string& typeName)
         OEChem::OEAtomBase* OEAddColorAtom(OEChem::OEMCMolBase& mol,
                                            const OEChem::OEAtomBase** parents,
                                            unsigned num, unsigned type,
                                            const std::string& typeName)

   .. oe:language:: python

      .. oe:api:: python

         OEAddColorAtom(mol: Union[OEGraphMol,OEMol,OEQMol],
                        coords: OEFloatArray, type: int, typeName: str,
                        parentName: str = str()) -> OEAtomBase
         OEAddColorAtom(mol: Union[OEGraphMol,OEQMol], parents: OEAtomBase,
                        num: int, type: int, typeName: str) -> OEAtomBase
         OEAddColorAtom(mol: OEMol, parents: OEAtomBase, num: int, type: int,
                        typeName: str) -> OEAtomBase

   These functions allow adding color atoms manually, as opposed to
   being assigned via SMARTS matches from a color force field.  Note
   that the color atom will either be placed at the coordinates
   supplied in the first version, or at the center of mass of the
   *parents* atoms. ``num`` is the number of atoms in the parent
   array.

   .. oe:api:

      OEChem::OEAtomBase *OEAddColorAtom(OEChem::OEMolBase &mol, unsigned type,
                                         const std::string &typeName,
                                         const std::string &parentName)
      OEChem::OEAtomBase *OEAddColorAtom(OEChem::OEMCMolBase &mol, unsigned type,
                                         const std::string &typeName,
                                         const std::string &parentName)
