
.. oe:language:: c++

   .. oe:namespace:: OEDocking

   .. meta::
      :keywords: OEWriteReceptorToString


   .. oe:function:: OEWriteReceptorToString

      .. oe:api:: c++

         std::string OEWriteReceptorToString(const std::string& format,
                                             const OEMolBase& mol)
         std::string OEWriteReceptorToString(const std::string& format,
                                             OEMolBase& mol)

         std::string OEWriteReceptorToString(unsigned int format,
                                             unsigned int flavor, bool gzip,
                                             const OEMolBase& mol)
         std::string OEWriteReceptorToString(unsigned int format,
                                             unsigned int flavor, bool gzip,
                                             OEMolBase& mol)


.. oe:language:: java

   .. oe:namespace:: OEDocking

   .. meta::
      :keywords: OEWriteReceptorToString, OEWriteReceptorToByteArray

   .. oe:function:: OEWriteReceptorToByteArray

      .. oe:api:: java

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

.. oe:language:: python

   .. oe:namespace:: OEDocking

   .. meta::
      :keywords: OEWriteReceptorToString, OEWriteReceptorToBytes

   .. oe:function:: OEWriteReceptorToBytes

      .. oe:api:: python

         OEWriteReceptorToBytes(format, oemol) -> bytes
         OEWriteReceptorToBytes(format, flavor, gzip, oemol) -> bytes

.. oe:language:: csharp

   .. oe:namespace:: OEDocking

   .. meta::
      :keywords: OEWriteReceptorToString, OEWriteReceptorToBytes

   .. oe:function:: OEWriteReceptorToBytes

      .. oe:api:: csharp

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

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

   Encodes a receptor in terms of 'format'. 'format' must be a file extension
   that is writeable by OpenEye, for example: ".oeb.gz". Overloads which take
   an unsigned 'format', unsigned 'flavor' and Boolean 'gzip' parameters expect
   the format and flavor to be specified by one of the constants
   in :oe:constns:`OEChem::OEFormat` and :oe:constns:`OEChem::OEOFlavor`.

.. oe:language:: c++

   Returns a non-empty std::string if the molecule to encode is identified as a receptor and encoding was successful.

.. oe:language:: java csharp

   Returns a non-empty byte[] if the molecule to encode is identified as a receptor and encoding was successful.

.. oe:language:: python

   Returns bytes if the molecule to encode is identified as a receptor and encoding was successful, otherwise, ''None''.

.. oe:language:: c++

   .. oe:source:: ReceptorIO.cpp
      :language: c++
      :frag:     SNIPPET-RECEPTOR-IO-3
      :noindent:

   .. oe:source:: ReceptorIO.cpp
      :language: c++
      :frag:     SNIPPET-RECEPTOR-IO-4
      :noindent:

   ..
      .. oe:source:: ReceptorIO.cpp
         :language: c++
         :frag:     SNIPPET-RECEPTOR-IO-5
         :noindent:

      .. oe:source:: ReceptorIO.cpp
         :language: c++
         :frag:     SNIPPET-RECEPTOR-IO-6
         :noindent:

   .. oe:source:: ReceptorIO.cpp
      :language: c++
      :frag:     SNIPPET-RECEPTOR-IO-7
      :noindent:

   .. oe:source:: ReceptorIO.cpp
      :language: c++
      :frag:     SNIPPET-RECEPTOR-IO-8
      :noindent:

   ..
      .. oe:source:: ReceptorIO.cpp
         :language: c++
         :frag:     SNIPPET-RECEPTOR-IO-9
         :noindent:

      .. oe:source:: ReceptorIO.cpp
         :language: c++
         :frag:     SNIPPET-RECEPTOR-IO-10
         :noindent:

.. oe:language:: python

   .. oe:source:: ReceptorIO.py
      :language: python
      :frag:     SNIPPET-RECEPTOR-IO-3
      :noindent:

   .. oe:source:: ReceptorIO.py
      :language: python
      :frag:     SNIPPET-RECEPTOR-IO-4
      :noindent:

   ..
      .. oe:source:: ReceptorIO.py
         :language: python
         :frag:     SNIPPET-RECEPTOR-IO-5
         :noindent:

      .. oe:source:: ReceptorIO.py
         :language: python
         :frag:     SNIPPET-RECEPTOR-IO-6
         :noindent:

   .. oe:source:: ReceptorIO.py
      :language: python
      :frag:     SNIPPET-RECEPTOR-IO-7
      :noindent:

   .. oe:source:: ReceptorIO.py
      :language: python
      :frag:     SNIPPET-RECEPTOR-IO-8
      :noindent:

   ..
      .. oe:source:: ReceptorIO.py
         :language: python
         :frag:     SNIPPET-RECEPTOR-IO-9
         :noindent:

      .. oe:source:: ReceptorIO.py
         :language: python
         :frag:     SNIPPET-RECEPTOR-IO-10
         :noindent:

.. oe:language:: java

   .. oe:source:: ReceptorIO.java
      :language: java
      :frag:     SNIPPET-RECEPTOR-IO-3
      :noindent:

   .. oe:source:: ReceptorIO.java
      :language: java
      :frag:     SNIPPET-RECEPTOR-IO-4
      :noindent:

   ..
      .. oe:source:: ReceptorIO.java
         :language: java
         :frag:     SNIPPET-RECEPTOR-IO-5
         :noindent:

      .. oe:source:: ReceptorIO.java
         :language: java
         :frag:     SNIPPET-RECEPTOR-IO-6
         :noindent:

   .. oe:source:: ReceptorIO.java
      :language: java
      :frag:     SNIPPET-RECEPTOR-IO-7
      :noindent:

   .. oe:source:: ReceptorIO.java
      :language: java
      :frag:     SNIPPET-RECEPTOR-IO-8
      :noindent:

   ..
      .. oe:source:: ReceptorIO.java
         :language: java
         :frag:     SNIPPET-RECEPTOR-IO-9
         :noindent:

      .. oe:source:: ReceptorIO.java
         :language: java
         :frag:     SNIPPET-RECEPTOR-IO-10
         :noindent:

.. oe:language:: csharp

   .. oe:source:: ReceptorIO.cs
      :language: csharp
      :frag:     SNIPPET-RECEPTOR-IO-3
      :noindent:

   .. oe:source:: ReceptorIO.cs
      :language: csharp
      :frag:     SNIPPET-RECEPTOR-IO-4
      :noindent:

   ..
      .. oe:source:: ReceptorIO.cs
         :language: csharp
         :frag:     SNIPPET-RECEPTOR-IO-5
         :noindent:

      .. oe:source:: ReceptorIO.cs
         :language: csharp
         :frag:     SNIPPET-RECEPTOR-IO-6
         :noindent:

   .. oe:source:: ReceptorIO.cs
      :language: csharp
      :frag:     SNIPPET-RECEPTOR-IO-7
      :noindent:

   .. oe:source:: ReceptorIO.cs
      :language: csharp
      :frag:     SNIPPET-RECEPTOR-IO-8
      :noindent:

   ..
      .. oe:source:: ReceptorIO.cs
         :language: csharp
         :frag:     SNIPPET-RECEPTOR-IO-9
         :noindent:

      .. oe:source:: ReceptorIO.cs
         :language: csharp
         :frag:     SNIPPET-RECEPTOR-IO-10
         :noindent:


