OEFastaToMol
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 OEFastaToMol function
and prints out the number of alpha carbon atoms in the molecule.
mol = oechem.OEGraphMol()
fastastr = "AVILMPTWSTNQCGPRHKDE"
oechem.OEFastaToMol(mol, fastastr)
print("{} has {} C-alpha atoms".format(fastastr, oechem.OECount(mol, oechem.OEIsCAlpha())))
See also
OEReadFASTAFilefunction