.. oe:namespace:: OEGraphSim

.. meta::
   :keywords: OEFingerPrint, FingerPrint


.. _OEGraphSim_OEFingerPrint:

.. oe:class:: OEFingerPrint

   .. oe:api::

      class OEFingerPrint : public OESystem::OEBitVector

   :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` class is used to encode
   molecular properties.
   An :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object is a *typed* bitvector
   (:ref:`OEBitVector <OESystem_OEBitVector>`).
   The type of an :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object is set
   when it is initialized.

   .. seealso::

      * :oe:meth:`OEGraphSim::OEFingerPrint::GetFPTypeBase`
      * :oe:meth:`OEGraphSim::OEFingerPrint::SetFPTypeBase`

   The following methods are publicly inherited from :ref:`OEBitVector <OESystem_OEBitVector>`:

   ============================================================= ============================================================== =============================================================
   :oe:meth:`operator\<<OESystem::OEBitVector::operator<>`       :oe:meth:`FirstBit<OESystem::OEBitVector::FirstBit>`           :oe:meth:`PrevBit<OESystem::OEBitVector::PrevBit>`           
   :oe:meth:`operator=<OESystem::OEBitVector::operator=>`        :oe:meth:`FromHexString<OESystem::OEBitVector::FromHexString>` :oe:meth:`SetBitOff<OESystem::OEBitVector::SetBitOff>`       
   :oe:meth:`operator-=<OESystem::OEBitVector::operator-=>`      :oe:meth:`GetData<OESystem::OEBitVector::GetData>`             :oe:meth:`SetBitOn<OESystem::OEBitVector::SetBitOn>`         
   :oe:meth:`operator[]<OESystem::OEBitVector::operator[]>`      :oe:meth:`GetSize<OESystem::OEBitVector::GetSize>`             :oe:meth:`SetData<OESystem::OEBitVector::SetData>`           
   :oe:meth:`operator^=<OESystem::OEBitVector::operator^=>`      :oe:meth:`IsBitOn<OESystem::OEBitVector::IsBitOn>`             :oe:meth:`SetRangeOff<OESystem::OEBitVector::SetRangeOff>`   
   :oe:meth:`operator|=<OESystem::OEBitVector::operator|=>`      :oe:meth:`IsEmpty<OESystem::OEBitVector::IsEmpty>`             :oe:meth:`SetRangeOn<OESystem::OEBitVector::SetRangeOn>`     
   :oe:meth:`operator &=<OESystem::OEBitVector::operator&=>`     :oe:meth:`LastBit<OESystem::OEBitVector::LastBit>`             :oe:meth:`SetSize<OESystem::OEBitVector::SetSize>`           
   :oe:meth:`ClearBits<OESystem::OEBitVector::ClearBits>`        :oe:meth:`NegateBits<OESystem::OEBitVector::NegateBits>`       :oe:meth:`ToHexString<OESystem::OEBitVector::ToHexString>`   
   :oe:meth:`CountBits<OESystem::OEBitVector::CountBits>`        :oe:meth:`NextBit<OESystem::OEBitVector::NextBit>`             :oe:meth:`ToggleBit<OESystem::OEBitVector::ToggleBit>`       
   ============================================================= ============================================================== =============================================================


   .. oe:method:: Constructors

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

         .. oe:api::

            OEFingerPrint()

      .. oe:language:: python

         .. oe:api:: python

            OEFingerPrint() -> OEFingerPrint

      Default constructor that creates an
      :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object with an uninitialized
      type, zero pointer (:ref:`OEFPTypeBase <OEGraphSim_OEFPTypeBase>`).

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

         .. oe:api::

            OEFingerPrint(const OEFingerPrint& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEFingerPrint(rhs: OEFingerPrint) -> OEFingerPrint

      Copy constructor.


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

      .. oe:api::

         OEFingerPrint &operator=(const OEFingerPrint &rhs)

      Assignment operator that copies the data of the ``rhs``
      :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object into the left-hand side
      :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object.


      Assignment operator.


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

      .. oe:api::

         bool operator==(const OEFingerPrint& rhs) const

      Two :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` objects are considered
      to be equivalent only if they have the same fingerprint type
      (:ref:`OEFPTypeBase <OEGraphSim_OEFPTypeBase>`) and have identical bit-vectors
      (:ref:`OEBitVector <OESystem_OEBitVector>`).


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

      .. oe:api::

         bool operator!=(const OEFingerPrint& rhs) const

      Two :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` objects are considered
      to be different if either they have different fingerprint types
      (:ref:`OEFPTypeBase <OEGraphSim_OEFPTypeBase>`) or they have different bit-vectors
      (:ref:`OEBitVector <OESystem_OEBitVector>`).


   .. oe:method:: operator bool

      .. oe:language:: c++

         .. oe:api:: c++

            operator bool() const

      .. oe:language:: python

         .. oe:api:: python

            IsValid() -> bool

      .. oe:language:: java

         .. oe:api:: java

            boolean IsValid()

      .. oe:language:: csharp

         .. oe:api:: csharp

            bool IsValid()

      Returns whether the :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` has been
      initialized, *i.e.*, has a valid type.


   .. oe:method:: GetFPTypeBase

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

         .. oe:api::

            const OEFPTypeBase* GetFPTypeBase() const

      .. oe:language:: python

         .. oe:api:: python

            GetFPTypeBase() -> OEFPTypeBase

      Returns a *const* pointer to the fingerprint type
      (:ref:`OEFPTypeBase <OEGraphSim_OEFPTypeBase>`) of the
      :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object.
      This method will return ``0`` if the
      :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object has not been
      initialized. 


   .. oe:method:: SetFPTypeBase

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

         .. oe:api::

            void SetFPTypeBase(const OEFPTypeBase* t)

      .. oe:language:: python

         .. oe:api:: python

            SetFPTypeBase(t: OEFPTypeBase) -> None

      Sets the fingerprint type of a :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>`
      object.

      The following functions set the type of the fingerprint when
      an :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object is initialized:

      * :oe:func:`OEGraphSim::OEMakeFP`
      * :oe:func:`OEGraphSim::OEMakeMACCS166FP`
      * :oe:func:`OEGraphSim::OEMakeLingoFP`
      * :oe:func:`OEGraphSim::OEMakePathFP`
      * :oe:func:`OEGraphSim::OEMakeCircularFP`
      * :oe:func:`OEGraphSim::OEMakeTreeFP`

      .. warning::

         Use this method with caution.

         The type of a :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` object (that
         is an :ref:`OEFPTypeBase <OEGraphSim_OEFPTypeBase>`) encodes how the
         fingerprint is generated. Changing this type can mean that
         the information represented by bitvector of the fingerprint
         will be misinterpreted.

