|
Did you know...
== Overview ==
A short snippet of code utilizing the new PDB Web Services.
Notes:
- See PDB Web Services
- You need SOAP for Python installed
- The sequence of a chain fetched from the PDB does not always equal the sequence of a chain fetched from the PDB Web Services. I believe the PDB Web Services has the complete biological chain, not just what's in the structure.
- The offset is a hack; it uses a trick in PyMOL and may not be robust at all. Use at your own caution.
The Code
<source lang="python">
import pymol
from pymol import stored, cmd
import SOAPpy
- define a mapping from three letters to one
- Thanks to whomever posted this on the PyMOLWiki:
- http://www.pymolwiki.org/index.php/Label
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y', \
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A', \
'GLY':'G', 'PRO':'P', 'CYS':'C'} ..→
|
|
|
A Random PyMOL-generated Cover. See Covers.
|