.. oe:namespace:: OEShape

.. meta::
   :keywords: OEColorForceField, ColorForceField


.. _OEShape_OEColorForceField:

.. oe:class:: OEColorForceField

   .. oe:api::


      class OEColorForceField

   Defines chemical feature types and their interaction rules for color overlap calculations.

   
   .. oe:method:: Constructors

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

         .. oe:api::

            OEColorForceField()
            OEColorForceField(const OEColorForceField& rhs)
            OEColorForceField(const OEColorForceFieldImpl* impl)

      .. oe:language:: python

         .. oe:api:: python

            OEColorForceField() -> OEColorForceField
            OEColorForceField(rhs: OEColorForceField) -> OEColorForceField
            OEColorForceField(impl: OEColorForceFieldImpl) -> OEColorForceField

      Default and copy constructors.

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEColorForceField &operator=(const OEColorForceField &rhs)

      Assignment operator.


   .. oe:method:: AddColorer

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

         .. oe:api::

            bool AddColorer(unsigned int type, const char* smarts)
            bool AddColorer(unsigned int type, const std::string& smarts)

      .. oe:language:: python

         .. oe:api:: python

            AddColorer(type: int, smarts: str) -> bool

   .. oe:method:: AddInteraction

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

         .. oe:api::

            bool AddInteraction(unsigned int type1, unsigned int type2,
                                const std::string& interaction_type,
                                float weight, float range)

      .. oe:language:: python

         .. oe:api:: python

            AddInteraction(type1: int, type2: int, interaction_type: str,
                           weight: float, range: float) -> bool

   .. oe:method:: AddType

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

         .. oe:api::

            unsigned int AddType(const char* name)
            unsigned int AddType(const std::string& name)

      .. oe:language:: python

         .. oe:api:: python

            AddType(name: str) -> int

   .. oe:method:: Clear

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

         .. oe:api::

            void Clear()

      .. oe:language:: python

         .. oe:api:: python

            Clear() -> None

   .. oe:method:: ClearInteractions

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

         .. oe:api::

            void ClearInteractions()

      .. oe:language:: python

         .. oe:api:: python

            ClearInteractions() -> None

   .. oe:method:: GetTitle

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

         .. oe:api::

            const char* GetTitle() const

      .. oe:language:: python

         .. oe:api:: python

            GetTitle() -> str

   .. oe:method:: GetType

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

         .. oe:api::

            unsigned int GetType(std::string k) const

      .. oe:language:: python

         .. oe:api:: python

            GetType(k: str) -> int

   .. oe:method:: GetTypeName

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

         .. oe:api::

            std::string GetTypeName(unsigned int type) const

      .. oe:language:: python

         .. oe:api:: python

            GetTypeName(type: int) -> str

   .. oe:method:: GetTypes

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

         .. oe:api::

            OESystem::OEIterBase<unsigned int>* GetTypes() const

      .. oe:language:: python

         .. oe:api:: python

            GetTypes() -> Iterable[int]

   
   .. _OEShape_OEColorForceField_Init:

   .. oe:method:: Init

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

         .. oe:api::

            bool Init(unsigned int cffType)
            bool Init(OEPlatform::oeistream& is, bool verbose = false)
            bool Init(const std::string& filename, bool verbose = false)

      .. oe:language:: python

         .. oe:api:: python

            Init(cffType: int) -> bool
            Init(ifs: oeistream, verbose: bool = False) -> bool
            Init(filename: str, verbose: bool = False) -> bool

   .. oe:method:: Ready

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

         .. oe:api::

            bool Ready() const

      .. oe:language:: python

         .. oe:api:: python

            Ready() -> bool

   .. oe:method:: SetTitle

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

         .. oe:api::

            bool SetTitle(const char* title)

      .. oe:language:: python

         .. oe:api:: python

            SetTitle(title: str) -> bool

   .. oe:method:: Write

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

         .. oe:api::

            bool Write(OEPlatform::oeostream& os)

      .. oe:language:: python

         .. oe:api:: python

            Write(os: oeostream) -> bool

