OEB files generated through these functions will only be readable by OEChem 2.0.2 (2014.Oct) and higher. By default, ‘PRE-compressed’ will not be generated by OEChem in order to ensure backward compatibility with software built against OEChem versions prior to OEChem 2.0.2 (2014.Oct).

bool OEPRECompress(oemolstreambase &str)

Enables the passed in oemolostream to write rotor-offset-compressed molecules in the perfect-rotor-encoding format, even for float precision molecules. These molecules will only be readable by programs that use OEChem 2.0.2 and above.


The following function overload is deprecated and only ever worked in C++. Please use OEPrepareFastROCSMol instead to create molecules optimized for ROCS type calculations.

bool OEPRECompress(OEMol &dst, const OEMCMolBase &src)

Prepares the molecule src for perfect-rotor-encoding to an OEFormat.OEB file and places it in the dst molecule. In addition to preparing for a more efficient encoding method for rotors, this function also does the following:

  • Converts the molecule to 16-bit floating point: OEHalfFloat
  • Sets the energy of each conformer to 0.0 to avoid writing it to OEB.
  • Suppresses hydrogens and reorders reference conformers for compression.