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

.. oe:namespace:: OEChem

.. meta::
   :keywords: OESweepMDLStereoGroups

.. oe:function:: OESweepMDLStereoGroups

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

      .. oe:api::

         bool OESweepMDLStereoGroups(OEMolBase& mol,
                                     bool clearmdlstereomarks = true)

   .. oe:language:: python

      .. oe:api:: python

         OESweepMDLStereoGroups(mol: Union[OEGraphMol,OEMol,OEQMol],
                                clearstereomarks: bool = True) -> bool

   Removes all atoms that lack atom stereo parity information from enhanced stereogroups.
   If the resulting stereogroup basis is empty, the group itself is also deleted.
   The ``clearmdlstereomarks`` argument controls whether stereomarks to the
   identified nonstereo atom(s) should also be removed.  Stereomarks to atoms that are
   not a member of any enhanced stereogroup are unaffected.

   A return status of ``true`` indicates that the provided molecule has been altered.

   .. seealso::

      * :oe:cls:`OEIsMDLStereoGroup<OEChem::OEIsMDLStereoGroup>`
      * :oe:meth:`GetGroups<OEChem::OEMolBase::GetGroups>`
      * :oe:constns:`OEChem::OEBondStereo`

