.. oe:namespace:: OEShape

.. meta::
   :keywords: OESetCachedSelfColor

.. oe:function:: OESetCachedSelfColor

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

      .. oe:api::

         bool OESetCachedSelfColor(OEChem::OEMCMolBase& mol,
                                   const OEColorForceField& cff)
         bool OESetCachedSelfColor(OEChem::OEMolBase& mol,
                                   const OEColorForceField& cff)

   .. oe:language:: python

      .. oe:api:: python

         OESetCachedSelfColor(mol: OEMol, cff: OEColorForceField) -> bool
         OESetCachedSelfColor(mol: Union[OEGraphMol,OEQMol],
                              cff: OEColorForceField) -> bool

   Using the passed-in OEColorForceField, calculate and store the self color
   on each molecule. For the OEMCMolBase, each conformer gets its own
   stored value.  To retrieve the value, use :oe:func:`OEShape::OEGetCachedSelfColor`.
   OEColorOverlap and OEBestOverlay will use the cached value instead of re-calculating
   the self terms.
