-->> Message: 2
>> Date: Fri, 28 Nov 2008 16:39:19 +0300
>> From: DimitryASuplatov <gene...@gmail.com>
>> Subject: [PyMOL] Secondary structure elements
>> To: pymol-users@lists.sourceforge.net
>> Message-ID: <1227879559.914.24.ca...@leiden.genebee.msu.ru>
>> Content-Type: text/plain
>>
>> Hello,
>> Is there a way to incorporate dssp into pymol for secondary structure
>> annotation?
>> Thank you.
>> SDA


[ ..snip .. ]

>> Message: 3
>> Date: Fri, 28 Nov 2008 14:15:57 +0000
>> From: "gilleain torrance" <gilleain.torra...@gmail.com>
>> Subject: Re: [PyMOL] Secondary structure elements
>> To: pymol-users <pymol-users@lists.sourceforge.net>
>> Message-ID:
>>         <d0d153660811280615x514c775flb2316a24bf593...@mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Hello,
>>
>> Possibly.
>>
>> I have python code that attempts to parse dssp files. Add that to a
>> script to call dssp (not so hard) and then call the parsing code, then
>> annotate the structure with the result...
>>
>> Maybe all this already exists somewhere?
>>
>> gilleain



SDA & Gilleain,

I'm not sure this will help -- hopefully it'll help someone, but PDB + PyMOL =
cool tricks.  Here's a small script that will:
 (1) fetch a PDB
 (2) use the PDB web services to get the SS from PDB (KabschSander SS)
 (3) change the SS to match that from the PDB

You can easily modify this to fetch and insert your own features.

#
# -- PDB Web Services Example
# -- Posted on the PyMOLWiki:
# --   http://www.pymolwiki.org/index.php/PDB_Web_Services_Script
#
import pymol
from pymol import stored, cmd
import SOAPpy
import string

# 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'}

# fetch some molecule; yes, 1foo exists
cmd.fetch("1foo", async=0)
# get the sequence from PyMOL
stored.pyMOLSeq = []
cmd.iterate( "1foo and c. A and n. CA" , "stored.pyMOLSeq.append(
one_letter[resn] )" )

# open up the PDB web services and make a connection
stored.pyMOLSeq = string.join( stored.pyMOLSeq, '' )
server = SOAPpy.SOAPProxy("http://www.pdb.org/pdb/services/pdbws";)

# fetch the secondary structure assignment from the PDB &
# split it up into an array of characters
stored.ss = [ x for x in server.getKabschSander("1foo", "A") ]

# get the sequence
pdbSeq = server.getSequenceForStructureAndChain("1foo", "A")
offset = string.find( pdbSeq, stored.pyMOLSeq )

# make the assignment in PyMOL
cmd.alter( "1foo and c. A and n. CA and i. " + str(offset) + "-",
"ss=stored.ss.pop(0)" )

cmd.as("cartoon")


-- Jason

-- 

Jason Vertrees, PhD

Dartmouth College : j...@cs.dartmouth.edu
Boston University : jas...@bu.edu

PyMOLWiki : http://www.pymolwiki.org/

Jason Vertrees, PhD

Boston U. -- jas...@bu.edu
Dartmouth -- j...@cs.dartmouth.edu




Reply via email to