.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEFastaToMol

.. oe:function:: OEFastaToMol

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

      .. oe:api::

         bool OEFastaToMol(OEMolBase& mol, const std::string& str)

   .. oe:language:: python

      .. oe:api:: python

         OEFastaToMol(mol: Union[OEGraphMol,OEMol,OEQMol], str: str) -> bool

   Converts a FASTA sequence into a molecule.

   The following code demonstrates how to create a molecule from a
   FASTA sequence using the :oe:func:`OEChem::OEFastaToMol` function
   and prints out the number of alpha carbon atoms in the molecule.

   .. oe:source:: FastaToMol.cpp
      :language: c++
      :frag:     SNIPPET

   .. oe:source:: FastaToMol.py
      :language: python
      :frag:     SNIPPET

   .. oe:source:: FastaToMol.java
      :language: java
      :frag:     SNIPPET

   .. oe:source:: FastaToMol.cs
      :language: csharp
      :frag:     SNIPPET

   .. seealso::

      * :oe:func:`OEChem::OEReadFASTAFile` function
