.. oe:namespace:: OEShape

.. meta::
   :keywords: OEShapeQuery, ShapeQuery


.. _OEShape_OEShapeQuery:

.. oe:class:: OEShapeQuery

   .. oe:api::


      class OEShapeQuery : public OEShapeQueryBase

   The :ref:`OEShapeQuery <OEShape_OEShapeQuery>` class defines
   an interface for creating a shape query, which is useful for defining a reference system
   for shape and color overlap calculations.

   The following methods are publicly inherited from :ref:`OEBase <OESystem_OEBase>`:
    * :oe:meth:`operator=<OESystem::OEBase::operator=>` 
    * :oe:meth:`operator+=<OESystem::OEBase::operator+=>`  
    * :oe:meth:`AddBaseData<OESystem::OEBase::AddBaseData>` 
    * :oe:meth:`AddData<OESystem::OEBase::AddData>` 
    * :oe:meth:`CreateCopy<OESystem::OEBase::CreateCopy>` 
    * :oe:meth:`DeleteData<OESystem::OEBase::DeleteData>` 
    * :oe:meth:`GetBoolData<OESystem::OEBase::GetBoolData>` 
    * :oe:meth:`GetData<OESystem::OEBase::GetData>`
    * :oe:meth:`GetDataIter<OESystem::OEBase::GetDataIter>`
    * :oe:meth:`GetDataType<OESystem::OEBase::GetDataType>` 
    * :oe:meth:`GetDoubleData<OESystem::OEBase::GetDoubleData>`
    * :oe:meth:`GetFloatData<OESystem::OEBase::GetFloatData>` 
    * :oe:meth:`GetIntData<OESystem::OEBase::GetIntData>` 
    * :oe:meth:`GetStringData<OESystem::OEBase::GetStringData>` 
    * :oe:meth:`HasData<OESystem::OEBase::HasData>`          
    * :oe:meth:`IsDataType<OESystem::OEBase::IsDataType>`      
    * :oe:meth:`SetBaseData<OESystem::OEBase::SetBaseData>`          
    * :oe:meth:`SetBoolData<OESystem::OEBase::SetBoolData>`    
    * :oe:meth:`SetData<OESystem::OEBase::SetData>`               
    * :oe:meth:`SetDoubleData<OESystem::OEBase::SetDoubleData>`
    * :oe:meth:`SetFloatData<OESystem::OEBase::SetFloatData>`  
    * :oe:meth:`SetIntData<OESystem::OEBase::SetIntData>`              
    * :oe:meth:`SetStringData<OESystem::OEBase::SetStringData>`

   The following methods are publicly inherited from :ref:`OEShapeQueryBase <OEShape_OEShapeQueryBase>`:
    * :oe:meth:`GetAtomStrength<OEShape::OEShapeQueryBase::GetAtomStrength>`
    * :oe:meth:`GetColorForceField<OEShape::OEShapeQueryBase::GetColorForceField>`
    * :oe:meth:`GetColorGaussians<OEShape::OEShapeQueryBase::GetColorGaussians>`
    * :oe:meth:`GetCompositeMolecule<OEShape::OEShapeQueryBase::GetCompositeMolecule>`
    * :oe:meth:`GetMolecule<OEShape::OEShapeQueryBase::GetMolecule>`
    * :oe:meth:`GetShapeGaussians<OEShape::OEShapeQueryBase::GetShapeGaussians>` 
    * :oe:meth:`GetShapeGrid<OEShape::OEShapeQueryBase::GetShapeGrid>`
    * :oe:meth:`GetTitle<OEShape::OEShapeQueryBase::GetTitle>`
    * :oe:meth:`HasColor<OEShape::OEShapeQueryBase::HasColor>`
    * :oe:meth:`HasMolecule<OEShape::OEShapeQueryBase::HasMolecule>`
    * :oe:meth:`HasShape<OEShape::OEShapeQueryBase::HasShape>` 
    * :oe:meth:`HasShapeGrid<OEShape::OEShapeQueryBase::HasShapeGrid>`
    * :oe:meth:`IsEmpty<OEShape::OEShapeQueryBase::IsEmpty>`
    * :oe:meth:`SetTitle<OEShape::OEShapeQueryBase::SetTitle>`

   The :ref:`OEShapeQuery <OEShape_OEShapeQuery>` class defines the following public methods:
    * :oe:meth:`AddColorGaussian<OEShape::OEShapeQuery::AddColorGaussian>`
    * :oe:meth:`AddColorGaussians<OEShape::OEShapeQuery::AddColorGaussians>`
    * :oe:meth:`AddShapeGaussian<OEShape::OEShapeQuery::AddShapeGaussian>`
    * :oe:meth:`AddShapeGaussians<OEShape::OEShapeQuery::AddShapeGaussians>`
    * :oe:meth:`Clear<OEShape::OEShapeQuery::Clear>`
    * :oe:meth:`ClearColorGaussians<OEShape::OEShapeQuery::ClearColorGaussians>`
    * :oe:meth:`ClearMolecule<OEShape::OEShapeQuery::ClearMolecule>`
    * :oe:meth:`ClearShapeGaussians<OEShape::OEShapeQuery::ClearShapeGaussians>`
    * :oe:meth:`ClearShapeGrid<OEShape::OEShapeQuery::ClearShapeGrid>`
    * :oe:meth:`DeleteColorGaussian<OEShape::OEShapeQuery::DeleteColorGaussian>`
    * :oe:meth:`DeleteShapeGaussian<OEShape::OEShapeQuery::DeleteShapeGaussian>`
    * :oe:meth:`SetAtomStrength<OEShape::OEShapeQuery::SetAtomStrength>`
    * :oe:meth:`SetMolecule<OEShape::OEShapeQuery::SetMolecule>`
    * :oe:meth:`SetShapeGrid<OEShape::OEShapeQuery::SetShapeGrid>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEShapeQuery(const OEShapeQueryOptions& argOptions = OEShapeQueryOptions())
            OEShapeQuery(const OEShapeQuery&)
            OEShapeQuery(const OEShapeQueryBase&);

      .. oe:language:: python

         .. oe:api:: python

            OEShapeQuery(argOptions: OEShapeQueryOptions = OEShapeQueryOptions()) -> OEShapeQuery
            OEShapeQuery(arg2: OEShapeQuery) -> OEShapeQuery
            OEShapeQuery(arg2: OEShapeQueryBase) -> OEShapeQuery

      Default and copy constructors.

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

      .. oe:api::

         OEShapeQuery &operator=(const OEShapeQuery &)

      The assignment operator.

   .. _OEShape_OEShapeQuery_AddColorGaussian:

      Assignment operator.


   .. oe:method:: AddColorGaussian

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

         .. oe:api::

            void AddColorGaussian(const OESystem::OEGaussianBase&)

      .. oe:language:: python

         .. oe:api:: python

            AddColorGaussian(c: OEGaussianBase) -> None

      Adds the specified color Gaussian to the query.

   .. _OEShape_OEShapeQuery_AddColorGaussians:

   .. oe:method:: AddColorGaussians

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

         .. oe:api::

            unsigned AddColorGaussians(const OESystem::OEScalarGrid& grid,
                                       const unsigned colorType)
            unsigned AddColorGaussians(const OESystem::OEScalarGrid& grid,
                                       const unsigned colorType,
                                       const double relGridContour)

      .. oe:language:: python

         .. oe:api:: python

            AddColorGaussians(grid: OEScalarGrid, colorType: int) -> int
            AddColorGaussians(grid: OEScalarGrid, colorType: int,
                              relativeGridContourVal: float) -> int

      Adds Gaussians of the specified color type to the query, based on the input grid. Gaussians are placed to
      reproduce the shape of the input grid. The optional argument ``relGridContour`` refers to the grid values
      relative to the maximum, below which a Gaussian should not be placed.

   .. _OEShape_OEShapeQuery_AddShapeGaussian:

   .. oe:method:: AddShapeGaussian

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

         .. oe:api::

            void AddShapeGaussian(const OESystem::OEGaussianBase&)

      .. oe:language:: python

         .. oe:api:: python

            AddShapeGaussian(gauss: OEGaussianBase) -> None

      Adds the specified shape Gaussian to the query.


   .. _OEShape_OEShapeQuery_AddShapeGaussians:

   .. oe:method:: AddShapeGaussians

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

         .. oe:api::

            unsigned AddShapeGaussians(const OESystem::OEScalarGrid& grid)

      .. oe:language:: python

         .. oe:api:: python

            AddShapeGaussians(grid: OEScalarGrid) -> int

      Adds shape Gaussians to the query, based on the input grid. Gaussians are placed to
      reproduce the shape of the input grid. The optional argument ``options`` refers to the options class that controls the grid
      to Gaussian algorithm.


   .. _OEShape_OEShapeQuery_Clear:

   .. oe:method:: Clear

      .. oe:api::

         void Clear()

      Removes all the current contents from the query.

   .. _OEShape_OEShapeQuery_ClearColorGaussians:

   .. oe:method:: ClearColorGaussians

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

         .. oe:api::

            void ClearColorGaussians()

      .. oe:language:: python

         .. oe:api:: python

            ClearColorGaussians() -> None

      Removes all the color Gaussians from the query.

   .. _OEShape_OEShapeQuery_ClearMolecule:

   .. oe:method:: ClearMolecule

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

         .. oe:api::

            void ClearMolecule()

      .. oe:language:: python

         .. oe:api:: python

            ClearMolecule() -> None

      Removes the molecule from the query.

   .. _OEShape_OEShapeQuery_ClearShapeGaussians:

   .. oe:method:: ClearShapeGaussians

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

         .. oe:api::

            void ClearShapeGaussians()

      .. oe:language:: python

         .. oe:api:: python

            ClearShapeGaussians() -> None

      Removes all the shape Gaussians from the query.

   .. _OEShape_OEShapeQuery_ClearShapeGrid:

   .. oe:method:: ClearShapeGrid

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

         .. oe:api::

            void ClearShapeGrid()

      .. oe:language:: python

         .. oe:api:: python

            ClearShapeGrid() -> None

      Removes the shape grid from the query.

   .. _OEShape_OEShapeQuery_DeleteColorGaussian:

   .. oe:method:: DeleteColorGaussian

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

         .. oe:api::

            bool DeleteColorGaussian(OESystem::OEGaussianBase*)

      .. oe:language:: python

         .. oe:api:: python

            DeleteColorGaussian(c: OEGaussianBase) -> bool

      Removes the specified color Gaussian from the query.

   .. _OEShape_OEShapeQuery_DeleteShapeGaussian:

   .. oe:method:: DeleteShapeGaussian

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

         .. oe:api::

            bool DeleteShapeGaussian(OESystem::OEGaussianBase*)

      .. oe:language:: python

         .. oe:api:: python

            DeleteShapeGaussian(gauss: OEGaussianBase) -> bool

      Removes the specified shape Gaussian from the query.

   .. _OEShape_OEShapeQuery_SetAtomStrength:

   .. oe:method:: SetAtomStrength

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

         .. oe:api::

            bool SetAtomStrength(OEChem::OEAtomBase& atom,
                                 const unsigned strength)

      .. oe:language:: python

         .. oe:api:: python

            SetAtomStrength(atom: OEAtomBase, strength: int) -> bool

      Sets the strength of the specified atom.  A strength of larger than 1 means
      that the atom should be represented by multiple atoms at the same location.
      The atom must be a part of the molecule contained in the query and may not
      be a color atom. The method returns ``False`` if the strength cannot be set.

   .. _OEShape_OEShapeQuery_SetMolecule:

   .. oe:method:: SetMolecule

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

         .. oe:api::

            void SetMolecule( const OEChem::OEMolBase&)

      .. oe:language:: python

         .. oe:api:: python

            SetMolecule(arg2: Union[OEGraphMol,OEMol,OEQMol]) -> None

      Adds the specified molecule to the query.

   .. _OEShape_OEShapeQuery_SetShapeGrid:

   .. oe:method:: SetShapeGrid

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

         .. oe:api::

            void SetShapeGrid(const OESystem::OEScalarGrid&)

      .. oe:language:: python

         .. oe:api:: python

            SetShapeGrid(g: OEScalarGrid) -> None

      Adds the specified shape grid to the query.
