.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEMolParameter, MolParameter


.. _OEChem_OEMolParameter:

.. oe:class:: OEMolParameter

   .. oe:api::

      class OEMolParameter : public OESystem::OEPointerParameter<OEMolBase>

   The :ref:`OEMolParameter <OEChem_OEMolParameter>` represents parameter that has value
   of :ref:`OEMolBase <OEChem_OEMolBase>` type.

   Following methods are publicly inherited from :ref:`OEParameter <OESystem_OEParameter>`:
    * :oe:meth:`AddAlias<OESystem::OEParameter::AddAlias>` and
      :oe:meth:`GetAliases<OESystem::OEParameter::GetAliases>` 
    * :oe:meth:`AddDetail<OESystem::OEParameter::AddDetail>` and
      :oe:meth:`GetDetail<OESystem::OEParameter::GetDetail>`
    * :oe:meth:`AddIllegalRange<OESystem::OEParameter::AddIllegalRange>` and
      :oe:meth:`GetIllegalRanges<OESystem::OEParameter::GetIllegalRanges>`
    * :oe:meth:`AddIllegalValue<OESystem::OEParameter::AddIllegalValue>` and
      :oe:meth:`GetIllegalValues<OESystem::OEParameter::GetIllegalValues>`
    * :oe:meth:`AddLegalRange<OESystem::OEParameter::AddLegalRange>` and
      :oe:meth:`GetLegalRanges<OESystem::OEParameter::GetLegalRanges>`
    * :oe:meth:`AddStringDefault<OESystem::OEParameter::AddStringDefault>` ,
      :oe:meth:`GetStringDefault<OESystem::OEParameter::GetStringDefault>` and
      :oe:meth:`GetStringDefaults<OESystem::OEParameter::GetStringDefaults>`
    * :oe:meth:`AddStringValue<OESystem::OEParameter::AddStringValue>` ,
      :oe:meth:`GetStringValue<OESystem::OEParameter::GetStringValue>` and
      :oe:meth:`GetStringValues<OESystem::OEParameter::GetStringValues>`
    * :oe:meth:`ClearDefaults<OESystem::OEParameter::ClearDefaults>`
    * :oe:meth:`ClearValues<OESystem::OEParameter::ClearValues>`
    * :oe:meth:`CreateCopy<OESystem::OEParameter::CreateCopy>`
    * :oe:meth:`GetBrief<OESystem::OEParameter::GetBrief>` and
      :oe:meth:`SetBrief<OESystem::OEParameter::SetBrief>`
    * :oe:meth:`GetHasDefault<OESystem::OEParameter::GetHasDefault>`
    * :oe:meth:`GetHasValue<OESystem::OEParameter::GetHasValue>`
    * :oe:meth:`GetIsList<OESystem::OEParameter::GetIsList>` and
      :oe:meth:`SetIsList<OESystem::OEParameter::SetIsList>`
    * :oe:meth:`GetKeyless<OESystem::OEParameter::GetKeyless>` and
      :oe:meth:`SetKeyless<OESystem::OEParameter::SetKeyless>`
    * :oe:meth:`GetName<OESystem::OEParameter::GetName>` and
      :oe:meth:`SetName<OESystem::OEParameter::SetName>`
    * :oe:meth:`GetOrderPriority<OESystem::OEParameter::GetOrderPriority>` and
      :oe:meth:`SetOrderPriority<OESystem::OEParameter::SetOrderPriority>`
    * :oe:meth:`GetVisibility<OESystem::OEParameter::GetVisibility>` and
      :oe:meth:`SetVisibility<OESystem::OEParameter::SetVisibility>`
    * :oe:meth:`IsLegalString<OESystem::OEParameter::IsLegalString>`
    * :oe:meth:`IsSet<OESystem::OEParameter::IsSet>` and
      :oe:meth:`IsSetToString<OESystem::OEParameter::IsSetToString>`

   The :ref:`OEMolParameter <OEChem_OEMolParameter>` class defines the following public methods:
    * :oe:meth:`GetSetting<OEChem::OEMolParameter::GetSetting>`
    * :oe:meth:`GetValue<OEChem::OEMolParameter::GetValue>`
    * :oe:meth:`SetValue<OEChem::OEMolParameter::SetValue>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEMolParameter()
            OEMolParameter(const std::string& name)
            OEMolParameter(const OEMolParameter&)

      .. oe:language:: python

         .. oe:api:: python

            OEMolParameter(name: str) -> OEMolParameter
            OEMolParameter() -> OEMolParameter
            OEMolParameter(arg2: OEMolParameter) -> OEMolParameter

      Default and copy constructors.

      Constructs an :ref:`OEMolParameter <OEChem_OEMolParameter>` instance using the specified set of parameters.

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

      .. oe:api::

         OEMolParameter &operator=(const OEMolParameter &)

      The assignment operator.

      Assignment operator.


   .. oe:method:: GetSetting

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

         .. oe:api::

            const OEChem::OEMolBase& GetSetting() const

      .. oe:language:: python

         .. oe:api:: python

            GetSetting() -> OEGraphMol

      Returns the current setting of the parameter.

   .. oe:method:: GetValue

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

         .. oe:api::

            const OEChem::OEMolBase& GetValue() const

      .. oe:language:: python

         .. oe:api:: python

            GetValue() -> OEGraphMol

      Returns the current user-defined value of the parameter.

   .. oe:method:: SetValue

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

         .. oe:api::

            bool SetValue(OEChem::oemolistream& fstream)
            bool SetValue(const OEChem::OEMolBase& mol)

      .. oe:language:: python

         .. oe:api:: python

            SetValue(fstream: oemolistream) -> bool
            SetValue(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

      Sets the user-defined value of the parameter.  For the overload with the ``OEChem::oemolistream``,
      the first molecule is used as the value.

