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

.. oe:namespace:: OEBio

.. oe:function:: OECalculateDPI

   .. attention::

      |TWOLANGUAGE|

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

      .. oe:api::

         bool OECalculateDPI(OEIridiumData& irid, const OEChem::OEMolBase& mol)

   .. oe:language:: python

      .. oe:api:: python

         OECalculateDPI(irid: OEIridiumData,
                        mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool

   Returns ``true`` if the diffraction-component precision index (DPI) value can
   be calculated; otherwise, it returns ``false``. The calculated DPI value, the
   Rfree value, and the resolution of the crystal structure are stored in the
   ``irid`` (an :ref:`OEIridiumData <OEBio_OEIridiumData>` object).

   If the DPI is not readily readable from the PDB header data, it is calculated
   using the Blow equation (eq.1 in [Warren-2012]_), derived from work by Blow [Blow-2002]_ and Cruickshank [Cruickshank-1999]_.

   .. seealso::

      * :ref:`OEIridiumData <OEBio_OEIridiumData>` class
      * :ref:`chapter_sprucetk_iridium` section in **OESpruce TK**
