Nmr cnstr: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by 2 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.                                                              #
# previous affiliation: Dept. of Biochemistry and Biophysics,                                                #
#                      Arrhenius Laboratories,                                                              #
#                      Stockholm University                                                                #
#                      SE-106 91 Stockholm, Sweden                                                          #
#                email:evangelos.papadopoulos@gmail.com  tel: +468164580                                    #
#                NOTES: This is a preliminary version.                                                      #
#                                                                                                            #
#    '''Reference:''' please if you find this script usefull add the following reference:                  #
#    NMR Solution Structure of the Peptide Fragment 1-30, Derived from Unprocessed Mouse Doppel            #
#    Protein, in DHPC Micelles. Biochemistry. 2006 Jan 10;45(1):159-166. PMID: 16388591                    #
#                                                                                                            #
##############################################################################################################


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+=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')
i=1
upl=f.readline()
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+=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>
[[Category:Script_Library|Show NMR Constraints]]
[[Category:Script_Library|Show NMR Constraints]]
[[Category:Structural_Biology_Scripts]]
[[Category:Structural_Biology_Scripts]]
[[Category:Pymol-script-repo]]

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