Nmr cnstr: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Infobox script-repo
|type      = script
|filename  = nmr_cnstr.py
|author    = [[User:Evangelos|Evangelos Papadopoulos]]
|license  = -
}}
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.  
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.  


[[Image:Cns.png]] [[Image:Upl.png]]
If you generated the structure by CYANA type:


 
cyana> read final.pdb


<source lang="python">
to input the structure in cyana then:
##############################################################################################################
   
# Pymol Script: For visualizing the NMR constrains (DYANA & CNS format), on top of the calculated structure. #
cyana>pseudo=1
#              Author: Evangelos Papadopoulos.                                                              #
# current affiliation: Dept. of Biochemistry and Biophysics,                                                #
#                      Arrhenius Laboratories,                                                              #
#                      Stockholm University                                                                #
#                      SE-106 91 Stockholm, Sweden                                                          #
#                email:evangelos@dbb.su.se  tel: +468164580                                                #
#                NOTES: This is a preliminary version.                                                      #
##############################################################################################################


before exporting the structure again by:


cyana> write final.pdb


def upl(fname):
this way the structure will contain the appropriate pseudoatoms nomeclature.


f=open(fname,'r')
Welcome to contact me if you need some help to set it up.
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):
[[Image:Cns.png]] [[Image:Upl.png]]


f=open(fname,'r')
[[Category:Script_Library|Show NMR Constraints]]
i=1
[[Category:Structural_Biology_Scripts]]
upl=f.readline()
[[Category:Pymol-script-repo]]
print upl,i
while upl<>'':
if upl=='\n':  
upl=f.readline()
continue
cns=string.split(upl)
print cns,i
if cns[0]=='assign' :
print 'CNS'
if cns[5]=='HB*': print 'CNS***'
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>
</source>

Latest revision as of 10: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