.. # split from OEBioFunctions.rst:71

.. include:: ../substitutions

.. oe:namespace:: OEBio

.. meta::
   :keywords: OEExpandCrystalSymmetry

.. oe:function:: OEExpandCrystalSymmetry

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

      .. oe:api::

         bool OEExpandCrystalSymmetry(OEChem::OEMolBase& mol, float radius,
                                      float* center = 0)

   .. oe:language:: python

      .. oe:api:: python

         OEExpandCrystalSymmetry(mol: Union[OEGraphMol,OEMol,OEQMol],
                                 radius: float, center: OEFloatArray = None) -> bool

   Expands atoms to fill the desired radius and optional
   center using the existing crystal symmetry on the molecule. If no
   center is specified, the center of the molecule is used. This
   function adds symmetry atoms and bonds to the molecule.
   ``mol`` must have 3D coordinates assigned and crystal symmetry set
   (see :oe:func:`OEBio::OESetCrystalSymmetry`).

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

      .. oe:api::

         bool OEExpandCrystalSymmetry(OEChem::OEMCMolBase& expanded,
                                      const OEChem::OEMolBase& src)

   .. oe:language:: python

      .. oe:api:: python

         OEExpandCrystalSymmetry(operators: OEMol,
                                 src: Union[OEGraphMol,OEMol,OEQMol]) -> bool


   Apply each symmetry operator to the input molecule ``src`` and
   generate a new conformer for each operator in ``expanded``.
   ``src`` must have 3D coordinates assigned and crystal symmetry set
   (see :oe:func:`OEBio::OESetCrystalSymmetry`).

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

      .. oe:api::

         bool OEExpandCrystalSymmetry(OEChem::OEMCMolBase& expanded,
                                      const OEChem::OEMolBase& src,
                                      float radius, float* center = 0)

   .. oe:language:: python

      .. oe:api:: python

         OEExpandCrystalSymmetry(expanded: OEMol,
                                 mol: Union[OEGraphMol,OEMol,OEQMol],
                                 radius: float, center: OEFloatArray = None) -> bool


   This expands each symmetry operator within the symmetry of ``src``
   within the given radius and center.  Each symmetry operator forms a
   new conformer in ``expanded``. ``expanded`` is cleared before new conformers
   are added.

   If the center is not supplied, the center of the original molecule
   is used.
   ``src`` must have 3D coordinates assigned and crystal symmetry set
   (see :oe:func:`OEBio::OESetCrystalSymmetry`).
