.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEPreserveRotCompress

.. oe:function:: OEPreserveRotCompress

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

      .. oe:api::

         bool OEPreserveRotCompress(oemolstreambase& str)

   .. oe:language:: python

      .. oe:api:: python

         OEPreserveRotCompress(str: oemolstreambase) -> bool

   Instructs the :ref:`oemolstreambase <OEChem_oemolstreambase>` to preserve
   rotor-offset-compression data on :ref:`OEMCMolBase <OEChem_OEMCMolBase>`
   objects when being read from the ``OEB`` file format. This should
   be called on the :ref:`oemolistream <OEChem_oemolistream>` object if the
   molecule needs to be output and preserve compression.

   .. warning::

      Altering the coordinates or connection table of an
      :ref:`OEMCMolBase <OEChem_OEMCMolBase>` molecule that has been read through
      this mechanism is undefined. Modifications to conformer
      coordinates will likely be lost. Modifications to the connection
      table will likely result in an error during
      :oe:func:`OEChem::OEWriteMolecule`.



