.. oe:namespace:: OEShape

.. meta::
   :keywords: OEShapeQueryBase, ShapeQueryBase


.. _OEShape_OEShapeQueryBase:

.. oe:class:: OEShapeQueryBase

   .. oe:api::

      class OEShapeQueryBase : public OEBase

   The :ref:`OEShapeQueryBase <OEShape_OEShapeQueryBase>` is an abstract base class. This
   class defines an interface for creating a shape query, useful for defining
   a reference system for shape/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 :ref:`OEShapeQueryBase <OEShape_OEShapeQueryBase>` class defines the following public methods:
    * :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 following classes derive from this class:
    * :ref:`OEShapeQuery <OEShape_OEShapeQuery>`

   .. _OEShape_OEShapeQueryBase_GetAtomStrength:

   .. oe:method:: GetAtomStrength

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

         .. oe:api::

            unsigned GetAtomStrength(const OEChem::OEAtomBase&) const

      .. oe:language:: python

         .. oe:api:: python

            GetAtomStrength(arg2: OEAtomBase) -> int

      Returns the strength of the specified atom. The default strength of any
      atom that is part of the molecule within the query is 1.

   .. oe:method:: GetColorForceField

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

         .. oe:api::

            const OEColorForceField* GetColorForceField() const

      .. oe:language:: python

         .. oe:api:: python

            GetColorForceField() -> OEColorForceField

      Returns a pointer to the color force field associated with this query.

   .. oe:method:: GetColorGaussians

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

         .. oe:api::

            OESystem::OEIterBase<const OESystem::OEGaussianBase>* GetColorGaussians() const

      .. oe:language:: python

         .. oe:api:: python

            GetColorGaussians() -> Iterable[OEGaussianBase]

      Returns an iterator over the color gaussians currently contained in this query.

   .. oe:method:: GetCompositeMolecule

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

         .. oe:api::

            bool GetCompositeMolecule(OEChem::OEMolBase& mol) const

      .. oe:language:: python

         .. oe:api:: python

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

      This method is useful in extracting the molecule contained in the query with
      atom strengths explicitly taken care of. Atoms with strength larger than 1 are
      explicitly represented by multiple atoms in the composite molecule.

   .. oe:method:: GetMolecule

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

         .. oe:api::

            const OEChem::OEMolBase& GetMolecule() const

      .. oe:language:: python

         .. oe:api:: python

            GetMolecule() -> OEGraphMol

      Returns the molecule currently contained in this query. In contrast to the
      :oe:meth:`GetCompositeMolecule<OEShape::OEShapeQueryBase::GetCompositeMolecule>` method,
      this method returns the molecule as is.

   .. oe:method:: GetShapeGaussians

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

         .. oe:api::

            OESystem::OEIterBase<const OESystem::OEGaussianBase>* GetShapeGaussians() const

      .. oe:language:: python

         .. oe:api:: python

            GetShapeGaussians() -> Iterable[OEGaussianBase]

      Returns an iterator over the shape gaussians currently contained in this query.

   .. oe:method:: GetShapeGrid

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

         .. oe:api::

            const OESystem::OEScalarGrid& GetShapeGrid() const

      .. oe:language:: python

         .. oe:api:: python

            GetShapeGrid() -> OEScalarGrid

      Returns the shape grid currently contained in this query.

   .. oe:method:: GetTitle

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

         .. oe:api::

            const char* GetTitle() const

      .. oe:language:: python

         .. oe:api:: python

            GetTitle() -> str

      Returns the title of the query.

   .. oe:method:: HasColor

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

         .. oe:api::

            bool HasColor() const

      .. oe:language:: python

         .. oe:api:: python

            HasColor() -> bool

      Returns `True` if the query currently contains any color atoms or color gaussians.

   .. oe:method:: HasMolecule

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

         .. oe:api::

            bool HasMolecule() const

      .. oe:language:: python

         .. oe:api:: python

            HasMolecule() -> bool

      Returns `True` if the query currently contains any molecule.

   .. oe:method:: HasShape

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

         .. oe:api::

            bool HasShape() const

      .. oe:language:: python

         .. oe:api:: python

            HasShape() -> bool

      Returns `True` if the query currently contains any molecule, shape grid, or shape gaussians.

   .. oe:method:: HasShapeGrid

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

         .. oe:api::

            bool HasShapeGrid() const

      .. oe:language:: python

         .. oe:api:: python

            HasShapeGrid() -> bool

      Returns `True` if the query currently contains any shape grid.

   .. oe:method:: IsEmpty

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

         .. oe:api::

            bool IsEmpty() const

      .. oe:language:: python

         .. oe:api:: python

            IsEmpty() -> bool

      Returns `True` if the query currently contains no shape or color.

   .. oe:method:: SetTitle

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

         .. oe:api::

            bool SetTitle(const char *)
            bool SetTitle(const std::string&)

      .. oe:language:: python

         .. oe:api:: python

            SetTitle(argTitle: str) -> bool

      Sets the title of the query.
