.. oe:language:: c++

   .. oe:namespace:: OEChem

   .. meta::
      :keywords: OEReadMolFromString

   ..   _OEChem_OEReadMolFromString:

   .. oe:function:: OEReadMolFromString

      .. oe:api:: c++

         bool OEReadMolFromString(OEMolBase& mol, const std::string& format,
                                  const std::string& data)
         bool OEReadMolFromString(OEMolBase& mol, unsigned format, bool gzip,
                                  const std::string& data)
         bool OEReadMolFromString(OEMolBase& mol, unsigned format,
                                  unsigned flavor, bool gzip,
                                  const std::string& data)

         bool OEReadMolFromString(OEMCMolBase& mol, const std::string& format,
                                  const std::string& data)
         bool OEReadMolFromString(OEMCMolBase& mol, unsigned format, bool gzip,
                                  const std::string& data)
         bool OEReadMolFromString(OEMCMolBase& mol, unsigned format,
                                  unsigned flavor, bool gzip,
                                  const std::string& data)


.. oe:language:: java

   .. oe:namespace:: OEChem

   .. meta::
      :keywords: OEReadMolFromByteArray

   ..   _OEChem_OEReadMolFromByteArray:

   .. oe:function:: OEReadMolFromByteArray

      .. oe:api:: java

         boolean OEReadMolFromByteArray(OEMolBase mol, String format,
                                        byte[] data)
         boolean OEReadMolFromByteArray(OEMolBase mol, int format,
                                        boolean gzip, byte[] data)
         boolean OEReadMolFromByteArray(OEMolBase mol, int format, int flavor,
                                        boolean gzip, byte[] data)

         boolean OEReadMolFromByteArray(OEMCMolBase mol, String format,
                                        byte[] data)
         boolean OEReadMolFromByteArray(OEMCMolBase mol, int format,
                                        boolean gzip, byte[] data)
         boolean OEReadMolFromByteArray(OEMCMolBase mol, int format,
                                        int flavor, boolean gzip, byte[] data)

.. oe:language:: python

   .. oe:namespace:: OEChem

   .. meta::
      :keywords: OEReadMolFromBytes

   ..   _OEChem_OEReadMolFromBytes:

   .. oe:function:: OEReadMolFromBytes

      .. oe:api:: python

         OEReadMolFromBytes(OEMolBase, format, data) -> bool
         OEReadMolFromBytes(OEMolBase, format, gzip, data) -> bool
         OEReadMolFromBytes(OEMolBase, format, flavor, gzip, data) -> bool

         OEReadMolFromBytes(OEMCMolBase, format, data) -> bool
         OEReadMolFromBytes(OEMCMolBase, format, gzip, data) -> bool
         OEReadMolFromBytes(OEMCMolBase, format, flavor, gzip, data) -> bool

.. oe:language:: csharp

   .. oe:namespace:: OEChem

   .. meta::
      :keywords: OEReadMolFromBytes, OEReadMolFromByteArray, OEReadMolFromString

   ..   _OEChem_OEReadMolFromBytes:

   .. oe:function:: OEReadMolFromBytes

      .. oe:api:: csharp

         boolean OEReadMolFromByteArray(OEMolBase mol, String format,
                                        OEIntArray data)
         boolean OEReadMolFromByteArray(OEMCMolBase mol, String format,
                                        OEIntArray data)

         boolean OEReadMolFromBytes(OEMCMolBase mol, String format, byte[] data)
         boolean OEReadMolFromBytes(OEMCMolBase mol, int format, int flavor,
                                    boolean gzip, byte[] data)

         boolean OEReadMolFromBytes(OEMolBase mol,  String format, byte[] data)
         boolean OEReadMolFromBytes(OEMolBase mol, int format, int flavor,
                                    boolean gzip, byte[] data)

         boolean OEReadMolFromBytes(OEMCMolBase mol, String format, byte[] data)
         boolean OEReadMolFromBytes(OEMCMolBase mol, int format, int flavor,
                                    boolean gzip, byte[] data)

.. oe:language:: python c++ java

   Instantiates a molecule from the contents of 'data' in terms of 'format'. 'format' must be a file extension
   that is readable by OpenEye, for example: ".oeb.gz". Overloads which take
   a Boolean 'gzip' parameter or an unsigned 'flavor' and Boolean 'gzip' parameters expect
   the format or the format and flavor to be specified by one of the constants 
   in :oe:constns:`OEChem::OEFormat` and :oe:constns:`OEChem::OEIFlavor`.

   Returns 'true' if decoding was successful.

.. oe:language:: csharp

   Instantiates a molecule from the contents of 'data' in terms of 'format'. 'format' must be a file extension
   that is readable by OpenEye, for example: ".oeb.gz". Overloads which take
   an unsigned 'format', unsigned 'flavor' and Boolean 'gzip' parameters expect
   the format or the format and flavor to be specified by one of the constants
   in :oe:constns:`OEChem::OEFormat` and :oe:constns:`OEChem::OEIFlavor`.

   Returns 'true' if decoding was successful.

   .. warning::

      The overload that takes an :ref:`OEIntArray <OEChem_OEIntArray>` is deprecated as of 2018.Feb and will be removed in a future
      version of **OEChem TK**, please use :oe:func:`OEChem::OEReadMolFromBytes` instead.

.. oe:language:: c++

   .. oe:source:: EncodeMols.cpp
      :language: c++
      :frag:     SNIPPET-READMOL
      :noindent:

   .. oe:source:: EncodeMols.cpp
      :language: c++
      :frag:     SNIPPET-READMOL2
      :noindent:

   .. oe:source:: EncodeMols.cpp
      :language: c++
      :frag:     SNIPPET-READMOL3
      :noindent:

.. oe:language:: python

   .. oe:source:: EncodeMols.py
      :language: python
      :frag:     SNIPPET-READMOL
      :noindent:

   .. oe:source:: EncodeMols.py
      :language: python
      :frag:     SNIPPET-READMOL2
      :noindent:

   .. oe:source:: EncodeMols.py
      :language: python
      :frag:     SNIPPET-READMOL3
      :noindent:

.. oe:language:: java

   .. oe:source:: EncodeMols.java
      :language: java
      :frag:     SNIPPET-READMOL
      :noindent:

   .. oe:source:: EncodeMols.java
      :language: java
      :frag:     SNIPPET-READMOL2
      :noindent:

   .. oe:source:: EncodeMols.java
      :language: java
      :frag:     SNIPPET-READMOL3
      :noindent:

.. oe:language:: csharp

   .. oe:source:: EncodeMols.cs
      :language: csharp
      :frag:     SNIPPET-READMOL
      :noindent:

   .. oe:source:: EncodeMols.cs
      :language: csharp
      :frag:     SNIPPET-READMOL3
      :noindent:

