Difference between revisions of "Nmr cnstr"

From PyMOLWiki
Jump to navigation Jump to search
 
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<source lang="python">
+
{{Infobox script-repo
##############################################################################################################
+
|type      = script
# Pymol Script: For visualizing the NMR constrains (DYANA & CNS format), on top of the calculated structure. #
+
|filename  = nmr_cnstr.py
#              Author: Evangelos Papadopoulos.                                                              #
+
|author    = [[User:Evangelos|Evangelos Papadopoulos]]
#  current affiliation: Dept. of Biochemistry and Biophysics,                                                #
+
|license  = -
#                      Arrhenius Laboratories,                                                              #
+
}}
#                      Stockholm University                                                                #
 
#                      SE-106 91 Stockholm, Sweden                                                          #
 
#                email:evangelos@dbb.su.se  tel: +468164580                                                #
 
#                NOTES: This is a preliminary version.                                                      #
 
##############################################################################################################
 
  
  
 +
This script will display the NMR constrains used for a structure calculation atop a structure. Usage: Save this as "NMRcnstr.py" load your protein in PyMOL, and run the script. type upl('fname') or cns('fname') where fname is the filename with the NMR constrains you want to display. It is still a very preliminary version.
  
def upl(fname):
+
If you generated the structure by CYANA type:
  
f=open(fname,'r')
+
cyana> read final.pdb
i=1
 
upl=f.readline()
 
#
 
while upl<>'':
 
 
print upl,i
 
cns=string.split(upl)
 
cmd.dist('upl'+str(i),'i. '+cns[0]+' & n. '+cns[2],'i. '+cns[3]+' & n. '+cns[5])
 
upl=f.readline()
 
i=i+1
 
#
 
f.close()
 
cmd.hide('labels')
 
cmd.set ('dash_gap', 0.05)
 
cmd.do ("orient")
 
cmd.set ('movie_delay', 1500)
 
  
def cns(fname):
+
to input the structure in cyana then:
 +
 +
cyana>pseudo=1
  
f=open(fname,'r')
+
before exporting the structure again by:
i=1
+
 
upl=f.readline()
+
cyana> write final.pdb
print upl,i
+
 
while upl<>'':
+
this way the structure will contain the appropriate pseudoatoms nomeclature.
if upl=='\n':
+
 
upl=f.readline()
+
Welcome to contact me if you need some help to set it up.
continue
+
 
cns=string.split(upl)
+
[[Image:Cns.png]] [[Image:Upl.png]]
print cns,i
+
 
if cns[0]=='assign' :  
+
[[Category:Script_Library|Show NMR Constraints]]
print 'CNS'
+
[[Category:Structural_Biology_Scripts]]
if cns[5]=='HB*': print 'CNS***'
+
[[Category:Pymol-script-repo]]
cmd.dist('upl'+str(i),'i. '+cns[2]+' & n. '+cns[5],'i. '+cns[7]+' & n. '+cns[10])
 
i=i+1
 
upl=f.readline()
 
print '*'+upl+'*',i
 
 
f.close()
 
cmd.set ('dash_gap', 0.05)
 
cmd.hide('labels')
 
cmd.do ("orient")
 
cmd.set ('movie_delay', 1500)</source>
 

Latest revision as of 11:04, 15 January 2012

Type Python Script
Download nmr_cnstr.py
Author(s) Evangelos Papadopoulos
License -
This code has been put under version control in the project Pymol-script-repo


This script will display the NMR constrains used for a structure calculation atop a structure. Usage: Save this as "NMRcnstr.py" load your protein in PyMOL, and run the script. type upl('fname') or cns('fname') where fname is the filename with the NMR constrains you want to display. It is still a very preliminary version.

If you generated the structure by CYANA type:

cyana> read final.pdb

to input the structure in cyana then:

cyana>pseudo=1

before exporting the structure again by:

cyana> write final.pdb

this way the structure will contain the appropriate pseudoatoms nomeclature.

Welcome to contact me if you need some help to set it up.

Cns.png Upl.png