.. oe:namespace:: OEBio



.. meta::
   :keywords: OEReceptorConstraintFeature


.. _OEBio_OEReceptorConstraintFeature:

.. oe:class:: OEReceptorConstraintFeature

   .. oe:api::

      class OEReceptorConstraintFeature

   OEBio_OEReceptorConstraintFeature represents a single custom
   docking constraint in an :ref:`OEReceptor <OEBio_OEReceptor>`.

   To satisfy a docking constraint a pose must either have: 

   #. At least one atom that
      matches one of the SMARTS patterns returned by 
      :ref:`GetSmarts <OEBio_GetSmarts>`
      **and** falls within one of the spheres returned by 
      :ref:`GetFeatureSpheres <OEBio_OEReceptorConstraintFeature_GetFeatureSpheres>`.

   #. At least one heavy atom that falls within one of the spheres
      returned by :ref:`GetFeatureSpheres <OEBio_OEReceptorConstraintFeature_GetFeatureSpheres>`, 
      **if** the :ref:`OEReceptorConstraintFeature<OEBio_OEReceptorConstraintFeature>` has
      no SMARTS patterns.

   .. oe:method:: Constructor

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

         .. oe:api::

            OEReceptorConstraintFeature()
            OEReceptorConstraintFeature(const OEReceptorConstraintFeature&)

      .. oe:language:: python

         .. oe:api:: python

            OEReceptorConstraintFeature() -> OEReceptorConstraintFeature
            OEReceptorConstraintFeature(arg2: OEReceptorConstraintFeature) -> OEReceptorConstraintFeature

      Default and copy constructors.

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

      .. oe:api::

         OEReceptorConstraintFeature& operator=(const OEReceptorConstraintFeature&)

      Assignment operator.

   ..   _OEBio_OEReceptorConstraintFeature_GetFeatureSpheres:

   .. oe:method:: GetFeatureSpheres

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

         .. oe:api::

            OESystem::OEIterBase<OEMath::OESphere>* GetFeatureSpheres()
            OESystem::OEIterBase<OEMath::OESphere>* GetFeatureSpheres()

      .. oe:language:: python

         .. oe:api:: python

            GetFeatureSpheres() -> Iterable[OESphere]

      Returns all spheres associated with this custom constraint feature.

   .. oe:method:: AddNewSphere

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

         .. oe:api::

            OEMath::OESphere* AddNewSphere()
            OEMath::OESphere* AddNewSphere(const OEMath::OESphere& sph)

      .. oe:language:: python

         .. oe:api:: python

            AddNewSphere() -> OESphere
            AddNewSphere(arg2: OESphere) -> OESphere

      Adds an :ref:`OESphere <OEMath_OESphere>` object to this class.  If
      *sph* is passed the created sphere will be a copy of *sph* otherwise
      a default constructed sphere will be created.

      Note that the returned memory is owned by this class and will be
      destroyed by the destructor of this class.

   .. oe:method:: DeleteSphere

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

         .. oe:api::

            bool DeleteSphere(const OEMath::OESphere* sph)

      .. oe:language:: python

         .. oe:api:: python

            DeleteSphere(arg2: OESphere) -> bool

      Deletes a :ref:`OESphere <OEMath_OESphere>` held by this class.  Note
      that after this call *sph* will no longer point to a valid 
      :ref:`OESphere <OEMath_OESphere>` object.

   .. oe:method:: NumSpheres

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

         .. oe:api::

            unsigned int NumSpheres() const

      .. oe:language:: python

         .. oe:api:: python

            NumSpheres() -> int

      Returns the number of spheres held by this object.

   .. oe:method:: ClearSpheres

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

         .. oe:api::

            bool ClearSpheres()

      .. oe:language:: python

         .. oe:api:: python

            ClearSpheres() -> bool

      Returns this object to its default constructed state.  Deleting all
      spheres and SMARTS patterns it currently holds.

   ..   _OEBio_GetSmarts:

   .. oe:method:: GetSmarts

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

         .. oe:api::

            OESystem::OEIterBase<const std::string>* GetSmarts() const
            OESystem::OEIterBase<std::string>* GetSmarts()

      .. oe:language:: python

         .. oe:api:: python

            GetSmarts() -> Iterable[str]

      Returns an iterator over all SMARTS patterns associated with this
      :ref:`OEReceptorConstraintFeature <OEBio_OEReceptorConstraintFeature>`.

   .. oe:method:: AddSmarts

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

         .. oe:api::

            bool AddSmarts(const std::string& smarts)

      .. oe:language:: python

         .. oe:api:: python

            AddSmarts(Smarts: str) -> bool

      Adds a SMARTS pattern to this :ref:`OEReceptorConstraintFeature <OEBio_OEReceptorConstraintFeature>`.

   .. oe:method:: DeleteSmarts

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

         .. oe:api::

            bool DeleteSmarts(const std::string& smarts)

      .. oe:language:: python

         .. oe:api:: python

            DeleteSmarts(smarts: str) -> bool

      Deletes the specified SMARTS pattern from this :ref:`OEReceptorConstraintFeature <OEBio_OEReceptorConstraintFeature>`.

   .. oe:method:: NumSmarts

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

         .. oe:api::

            unsigned int NumSmarts() const

      .. oe:language:: python

         .. oe:api:: python

            NumSmarts() -> int

      Returns the number of SMARTS patterns held by this 
      :ref:`OEReceptorConstraintFeature <OEBio_OEReceptorConstraintFeature>`.

   .. oe:method:: ClearSmarts

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

         .. oe:api::

            bool ClearSmarts()

      .. oe:language:: python

         .. oe:api:: python

            ClearSmarts() -> bool

      Deletes all SMARTS patterns associated with this 
      :ref:`OEReceptorConstraintFeature <OEBio_OEReceptorConstraintFeature>`.

   .. oe:method:: SetFeatureName

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

         .. oe:api::

            void SetFeatureName(const std::string&)

      .. oe:language:: python

         .. oe:api:: python

            SetFeatureName(arg2: str) -> None

      Sets the name of this feature.

   .. oe:method:: GetFeatureName

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

         .. oe:api::

            std::string GetFeatureName() const

      .. oe:language:: python

         .. oe:api:: python

            GetFeatureName() -> str

      Returns the name of the feature.

   .. oe:method:: SetEnabled

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

         .. oe:api::

            void SetEnabled(const bool enabled)

      .. oe:language:: python

         .. oe:api:: python

            SetEnabled(enabled: bool) -> None

      Sets whether this feature is enabled or not.  If the feature
      is disabled the constraint will be ignored 
      during the docking process.

   .. oe:method:: GetEnabled

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

         .. oe:api::

            bool GetEnabled() const

      .. oe:language:: python

         .. oe:api:: python

            GetEnabled() -> bool

      Returns whether this feature is enabled.  If this function
      returns false this constraint will be ignored during the
      docking process.

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEReceptorConstraintFeature* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEReceptorConstraintFeature

      Creates a copy of this :ref:`OEReceptorConstraintFeature <OEBio_OEReceptorConstraintFeature>`.  Note
      that the memory returned by this function is **not** owned by
      this class, and is the responsibility of the calling function.

