.. oe:namespace:: OEChem



.. _OEChem_OEMolPropertyFxn:

.. oe:class:: OEMolPropertyFxn

   .. oe:api::

      class OEMolPropertyFxn

   The :ref:`OEMolPropertyFxn <OEChem_OEMolPropertyFxn>` is an abstract base class. This class defines
   the interface for functions which can be used to access molecule properties defined
   as SDF file data fields or generic data in a molecule.
   

   The following classes derive from this class:
    * :ref:`OEMolGDPropertyFxn <OEChem_OEMolGDPropertyFxn>`
    * :ref:`OEMolSDPropertyFxn <OEChem_OEMolSDPropertyFxn>`
    * :ref:`OEMolTaggedPropertyFxn <OEChem_OEMolTaggedPropertyFxn>`

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

      .. oe:api::

         OEMolPropertyFxn & operator=(const OEMolPropertyFxn &)

      Assignment operator.

   

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEMolPropertyFxn* CreateCopy() const = 0

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEMolPropertyFxn

      A virtual constructor which allows copying of concrete derived objects using a reference 
      to this base class.

   .. oe:method:: Get

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

         .. oe:api::

            double Get(const OEChem::OEMolBase& mol) const = 0
            double Get(const OEChem::OEMCMolBase& mol) const = 0

      .. oe:language:: python

         .. oe:api:: python

            Get(mol: Union[OEGraphMol,OEQMol]) -> float
            Get(mol: OEMol) -> float

      Returns the property value for the specified molecule. Method returns a large number
      (limiting large double in C++) when a value is not found.

   .. oe:method:: Has

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

         .. oe:api::

            bool Has(const OEChem::OEMolBase& mol) const = 0
            bool Has(const OEChem::OEMCMolBase& mol) const = 0

      .. oe:language:: python

         .. oe:api:: python

            Has(mol: Union[OEGraphMol,OEQMol]) -> bool
            Has(mol: OEMol) -> bool

      Checks if the property value exists for the specified molecule. Returns ``True`` if 
      a value exists.

