10
$\begingroup$

I have the following SMILES, wrapped in Python RDKit:

from rdkit import Chem
m = Chem.MolFromSmiles('[H]N[C@@H](CCCCN)C(=O)N[C@@H](CCCCN)C(=O)N[C@@H](C)C(=O)N[C@@H](CC1=CNC2=C1C=CC=C2)C(O)=O'

Is there away I can convert that into an Amino acid sequence, e.g, KKAW?

I'm open to other solution than RDKit.


Update

I tried this:

from rdkit.Chem.rdmolfiles import MolFromMolFile, MolToFASTA
fa = MolToFASTA( Chem.MolFromSmiles('[H]N[C@@H](CCCCN)C(=O)N[C@@H](CCCCN)C(=O)N[C@@H](C)C(=O)N[C@@H](CC1=CNC2=C1C=CC=C2)C(O)=O')) 
fa

But fa returns empty string.

Documentation said this:

rdkit.Chem.rdmolfiles.MolToFASTA((Mol)mol) → str :
Returns the FASTA string for a molecule
ARGUMENTS:

mol: the molecule

NOTE: the molecule should contain monomer information in AtomMonomerInfo structures

RETURNS:

a string

C++ signature :
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > MolToFASTA(RDKit::ROMol)

I don't know how to check if my mol contains monomer information in AtomMonomerInfo structures. And how to add it if it doesn't have those.

$\endgroup$
1
  • 2
    $\begingroup$ To prevent clutter on this page, let's continue in this chatroom. $\endgroup$
    – Buttonwood
    Nov 1, 2021 at 14:07

2 Answers 2

7
$\begingroup$

openbabel could also be used to tackle this problem.

  1. Convert initial structure to PDB format. I suspect this can be done directly from whatever format you are using for the skeletal structure, but I would need to know your initial format to test this. However, if that doesn't seem to work, you can go from your SMILES to PDB with this snippet:
obabel -:'[H]N[C@@H](CCCCN)C(=O)N[C@@H](CCCCN)C(=O)N[C@@H](C)C(=O)N[C@@H](CC1=CNC2=C1C=CC=C2)C(O)=O' -O output.pdb
  1. Convert PDB to FASTA. The command to run is very similar to the previous one:
obabel output.pdb -O new.fasta

The FASTA file will have a header line, followed by the single letter amino acid sequence.

>output.pdb 4 bp; generated with OpenBabel 3.0.0
KKAW

RDKit should be able to perform a similar set of steps:

from rdkit import Chem
import rdkit.Chem.rdmolfiles  as rdmol

m = Chem.MolFromSmiles('[H]N[C@@H](CCCCN)C(=O)N[C@@H](CCCCN)C(=O)N[C@@H](C)C(=O)N[C@@H](CC1=CNC2=C1C=CC=C2)C(O)=O'
pdb= rdmol.MolToPDBBlock(m)
m2= rdmol.MolFromPDBBlock(pdb)
fa= rdmol.MolToFASTA(m2)

The intermediate conversion to PDB should add in the monomer information that is left out when converting directly from SMILES.

$\endgroup$
0
7
$\begingroup$

Based on your recent comment to want to assemble a protein from scratch, and assuming you want to stick to the naturally occurring $\alpha$-amino acids, I suggest to type the amino acids by their three-letter code. ChemDraw has a name2structure conversion routine understanding these codes. If your institution doesn't have a campus license, the JavaScript sample page may be an alternative for you. (Get in touch with your supervisor if he/she is fine with this in advance.)

enter image description here

Both SMILES and the sequence may be exported from the program for further processing. Likely, a dictionary-based string substitution of the sequence string offers access to FASTA.

By this, you stick to the amino acids known the program. However, it is faster (and less prone to errors) than constructing the amino acids atom by atom. Other export formats (e.g., .svg or .mol) are at your disposition, too. Possibly other programs offer a name2structure conversion of amino acid sequences, too; however, I don't know if the sample pages of e.g., Marvin or ChemDoodle are prepared for this operation.

$\endgroup$
2
  • $\begingroup$ My OP stated that I want SMILES -> FASTA. But your answer is for FASTA -> SMILES. So I don't think it answer my question. $\endgroup$
    – neversaint
    Nov 1, 2021 at 14:03
  • 1
    $\begingroup$ @neversaint Then please clarify design in your comment «The idea is that I would design the molecule using this PubChem Sketcher. After you draw it, it will give you SMILES.» If you use FASTA to encode amino acids by one character, or amino acids with their three-letter code, where is the difference conceptually? $\endgroup$
    – Buttonwood
    Nov 1, 2021 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.