On Mon, Sep 13, 2010 at 12:30 AM, Jason Vertrees
<jason.vertr...@schrodinger.com> wrote:
> # get it's one-letter residue id
> print string.split(cmd.get_fastastr("mySelection"),'\n')[1]
> # get it's three-letter residue id
> print three_letter[string.split(cmd.get_fastastr("mySelection"),'\n')[1]]
>
> I just posted this on http://www.pymolwiki.org/index.php/Aa_codes.
> (You will need the two dictionaries found there.)

a note regarding the "one_letter" dictionary. I always import the
"to_one_letter_code" dictionary from biopython for that purpose, it
has also three-letter shortcuts for many modified residues.

from Bio.PDB import to_one_letter_code as one_letter

Cheers,
  Thomas

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to