ENORA and multi-state structure calculations: Difference between revisions

From CYANA Wiki
Jump to navigation Jump to search
(Created page with "In this tutorial we will determine the resonance assignments and the structure of a protein-ligand complex using modules of CYANA. To this end we will first run the CYANA mo...")
 
 
(561 intermediate revisions by the same user not shown)
Line 1: Line 1:
In this tutorial we will determine the resonance assignments and the structure of a protein-ligand complex using modules of CYANA.  
In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.


To this end we will first run the CYANA module FLYA to obtain the resonance assignments from backbone, side chain and NOESY experiments  (actually, the XEASY peak lists of these experiments).  
To this end we will first run the modules of eNORA and then use the obtained eNOEs to calculate a single state and a two-states structure model using automated sorting to group the states. Along the way you will see some additional CYANA skills useful for other purposes as well.


Then we will use noeassign to assign the NOESY spectra and calculate the holo protein structure without the ligand.
The eNORA module offers in principle two methods to calculate spin diffusion, FRM and TSS. FRM is the recommended way to do these calculations and we will set a main focus on that method, we will however in one section explain the principles at play for TSS and how to set it up.


In a next step we will first draw the ligand, convert the obtained SMILES code to a *.mol2 file and generate the *.lib file for CYANA.
== CYANA setup  ==


Then we will assign intermolecular peaks lists and redo the structure calculation, this time of the protein-ligand complex.
==== Obtaining and installing the CYANA demo version and data ====
 
To finalize you will compare the calculated NMR structure to an X-ray structure and generate statistics.
 
And ultimately you can try to improve your structure results by studying and applying the options available within the FLYA and noeassign modules of CYANA.
 
 
== CYANA setup for the AUREMN Practical NMR Course in Campino (24-26 February 2018) ==


Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):


# Go to your home directory (or data directory).
# Go to your home directory (or data directory).
# Get the data for the practical from the server (AUREMN2018.tgz).
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.
# Unpack the input data for the practical.
# Unpack the demo data for the practical.
# Get the demo version of CYANA for this practical.
# Get the demo version of CYANA.
# Unpack CYANA.
# Unpack CYANA.
# Setup the CYANA environment variables.
# Setup the CYANA environment variables.
# Change into the newly created directory 'AUREMN2018'.
# Change into the newly created directory 'eNORA'.
# Copy the demo_data directory to 'flyabb'.
# Copy the demo_data directory to 'enoe'.
# Change into the subdirectory 'flyabb'.
# Change into the subdirectory 'enoe'.
# Test whether CYANA can be started by typing its name, 'cyana'.
# Test whether CYANA can be started by typing its name, 'cyana'.
# Exit from CYANA by typing 'q' or 'quit'.
# Exit from CYANA by typing 'q' or 'quit'.
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]
# Download Avogadro (to your personal laptop) from: [https://avogadro.cc/ Avogadro]


cd ~
To unpack the demo data:
cp /home/julien/AUREMN2018.tar.gz .
  tar zxf demo_data.tar.gz  
  tar zxf AUREMN2018.tar.gz  
 
To unpack CYANA demo version:
wget <nowiki>'http://www.cyana.org/wiki/images/6/64/Cyana-3.98bin-180213Demo.tgz'</nowiki>
  tar zxf Cyana-3.98.9_Demo.tgz
  tar zxf Cyana-3.98bin-180213Demo.tgz
  cd cyana-3.98.9/
  cd cyana-3.98/
  ./setup
  ./setup
cd ~
cd AUREMN2018
cp -r demo_data flyabb
cd flyabb
<!---
../../cyana-3.98/cyana
--->


Change into enoe1pt demo directory: 
cd enoe1pt
Try to run CYANA by entering 'cyana' at the command prompt of your terminal (q to quit cyana):


  cyana
  cyana
Line 61: Line 46:
   
   
     Demo license valid for specific sequences until 2018-12-31
     Demo license valid for specific sequences until 2018-12-31
    Library file "/Users/deans/cyana-3.98/lib/cyana.lib" read, 41 residue types.
*** ERROR: Illegal residue name "LIG".
*** ERROR: Cannot read line 114:
            LIG  333
  cyana> q
  cyana> q
   
   


If all worked, you are ready to go in terms of everything related to CYANA! The reason you see the ERROR message, is because you have a sequence file in the directory, but not a library file for the ligand yet.
If all worked, you are ready to go in terms of running the CYANA routine!
Don't worry, this is as expected and you will take care of it during the exercise.


If you want to return to your practical later, using your own Linux or Mac OS X computer, you can download the demo version of CYANA from [http://www.cyana.org/wiki/images/6/64/Cyana-3.98bin-180213Demo.tgz here].
==== Execution scripts or "macros" in CYANA ====


'''Hint:''' More information on the CYANA commands etc. is in the [[CYANA 3.0 Reference Manual]].
For more complex task within CYANA, rather than to enter the execution commands line by line at the CYANA prompt, the necessary commands are collected in a file named '*.cya'. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.


== Automated resonance assignment ==
'''Hint:''' For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].
Resonance assignment within cyana is done using the module FLYA.  


In the most general sense, there are two type of experiments used for protein resonance assignments.
== Preparing input data ==
Through bond, TOSCY kind of experiments and through space NOESY type of experiments.
Each of these two experiments carries distinct information that help the resonance assignment.
The HSQC, HMQC or TROSY elements of these experiments merely help the resolution, by allowing the separation of resonances according to spin types (1H, 13C, 15N) into additional dimensions.


At the very minimum, for small systems and in favorable cases, a NOESY experiment may be sufficient to get an assignment and enough distance restraints for a structure calculation.
=== Structure input for spin-diffusion calculations ===


=== Experimental input data ===
==== Preparing an xray structure to use within CYANA ====


Spectra are processed and referenced relative to each other. Peak lists in XEASY format are prepared by automatic peak picking with a visualization program such as CcpNmr Analysis, NMRdraw or NMRview and saved as ''XXX''.peaks, where ''XXX'' denotes the name of the xeasy peak list file.
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.
Then they are cleaned (unnecessary water and noise peaks removed).  
Using the regularize command one can get a structure recalculated within CYANA that has these issues fixed but is still very close to the input structure.


As part of the data supplied for the exercises, experimental peak lists are available for the following spectra:
In the data directory you find the 'regulabb' directory and the 'CALC_reg.cya' macro and an 'init.cya' macro.
* HNtrosy            (spectrum type  'N15HSQC' in the CYANA library)


* trHNCA              (spectrum type 'HNCA' in the CYANA library)
The initialization macro has the fixed name 'init.cya' and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing 'init'. It contains normally at least two commands, one to read the library and one to read the sequence.
* HNCOCA          (spectrum type 'HNcoCA' in the CYANA library)
However, for now there is only one command, the one to read the library.
* HNCACB            (spectrum type 'CBCANH' in the CYANA library)
* HCCCHTOCSY  (the spectrum type will have to be determined in the first exercise)
* NTOCSY            (spectrum type 'N15TOCSY' in the CYANA library)


* 3D <sup>13</sup>C-resolved NOESY  called aro (spectrum type 'C13NOESY' in the CYANA library)
cyanalib
* 3D <sup>13</sup>C-resolved NOESY  called cnoesy (spectrum type 'C13NOESY' in the CYANA library)
The command 'cyanalib' reads the standard CYANA library.
* 3D <sup>15</sup>N-resolved NOESY  called nnoesy (spectrum type 'N15NOESY' in the CYANA library)


Each peak list starts with a header that defines the experiment type and the order of dimensions. For instance, for HNCA.peaks:
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list.  


# Number of dimensions 3
Inspection of the 'CALC_reg.cya':
#FORMAT xeasy3D
  read 1PIN.pdb unknown=warn hetatm new
#INAME 1 HN
  write 1PIN.seq
#INAME 2 C
  write 1PIN_2.pdb
  #INAME 3 N
#SPECTRUM HNCA HN C N
      5  6.475  58.033  98.548 1 U  2.769E+02  0.000E+00 e 0    0    0    0
      6  6.476  62.123 98.126 1 U  2.571E+01  0.000E+00 e 0    0    0    0
      7  6.475  54.017  98.159 1 U  2.547E+01 0.000E+00 e 0    0    0    0


The first line specifies the number of dimensions (3 in this case). The '#SPECTRUM' (no space between characters) lines gives the experiment type (HNCA, which refers to the corresponding experiment definition in the CYANA library), followed by an identifier for each dimension of the peak list (HN C N) that specifies which chemical shift is stored in the corresponding dimension of the peak list. The experiment type and identifiers must correspond to an experiment definition in the general CYANA library (see below). If a definition is missing for an experiment it must be added to the CYANA library. After the '#SPECTRUM' line follows one line for every peak. For example, the first peak in the 'HNCA.peaks' list has
Where the option 'hetatm' allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter 'new' directs CYANA to read the sequence from the pdb.


* Peak number 5
We require two mutations to the sequence (S18N and W34F), furthermore we do not have a ligand and the expressed protein for NMR is truncated. Therefore we use cyana to truncate the Xray structure and build in the mutations.
* HN chemical shift 6.475 ppm
We read the structure again, but this time provide a sequence, containing the two mutations and use the options unknown=warn or unknown=skip to skip the parts of the Xray structure not specified in the sequence file and later reconstruct those during regularization:
* C (CA) chemical shift 58.033 ppm
* N chemical shift 98.548 ppm


The other data are irrelevant for automated chemical shift assignment with FLYA. In particular, the peak volume or intensity (2.769E+02) is ''not'' used by the algorithm.
read demo.seq
read 1PIN_2.pdb rigid unknown=warn
write 1PIN_ed.pdb
./init
read pdb 1PIN_ed.pdb
regularize steps=20000 link=LL keep


'''Hint:''' The formats of other CYANA files are described in the [[CYANA 3.0 Reference Manual]].
Download the Xray structure used for this exercise:


wget <nowiki>'https://files.rcsb.org/view/1PIN.pdb' </nowiki>


The protein sequence is supplied by three-letter code in a XXX.seq file.
or for mac os x:
curl <nowiki>https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb </nowiki>


As part of the supplied data for the exercises there are two sequences:
Inspect the pdb using chimera: There are several issues with the Xray structure, besides HETATM, that we are handling within CYANA before using the structure.
* demoShort.seq              (the protein sequence alone)
* demoLong.seq              (the protein sequence, ligand and a linker that connects the two molecules)


Linker sequences serve to keep two or more molecules close in coordinate space during calculations, is usually between 15-20 elements long and is composed of dummy atoms that allow the linking.
Execute the 'CALC_reg.cya' macro:


==== SPECTRUM definitions in the CYANA library ====
cyana CALC_reg.cya
The resulting structure is 'regula.pdb'.


When you start CYANA, the program reads the library and '''displays the full path name of the library file'''. You can open the standard library file to inspect, for example, the NMR experiment definitions that define which expected peaks are generated by FLYA. For instance, the definition for the HNCA spectrum (search for 'HNCA' in the library file 'cyana.lib') is
==== Calculating a structure from an experimental peak list ====


SPECTRUM HNCA  HN N C
In the data directory you find the 'noecalib' directory.
  0.980  HN:H_AMI  N:N_AM*  C:C_ALI  C_BYL
  0.800  HN:H_AMI  N:N_AMI  (C_ALI) C_BYL  C:C_ALI


The first line corresponds to the '#SPECTRUM' line in the peak list. It specifies the experiment name and identifies the atoms that are detected in each dimension of the spectrum. The number of identifiers defines the dimensionality of the experiment (3 in case of HNCA).
The 'CALC_noecalib.cya' contains the following commands:


Each line below defines a (formal) magnetization transfer pathway that gives rise to an expected peak. in the case of HNCA there are two lines, corresponding to the intraresidual and sequential peak. For instance, the definition for the intraresidual peak starts with the probability to observe the peak (0.980), followed by a series of atom types, e.g. H_AMI for amide proton etc. An expected peak is generated for each molecular fragment in which these atom types occur connected by single covalent bonds. The atoms whose chemical shifts appear in the spectrum are identified by their labels followed by ':', e.g. for HNCA 'HN:', 'N:', and 'C:'.
peaks:=5.peaks
calibration peaks=$peaks
peaks calibrate simple
write upl noesimple.upl


=== Exercise 1: Determine the spectrum type ===  
The following block of commands, reads the restraints 'noesimple.upl', an angle file called 'demo.aco', calculates a structure:
read upl noesimple.upl   
read aco talos.aco
calc_all 100 steps=50000        
overview demo.ovw structures=20 pdb


For the HCCCHToscy, determine the spectrum type and put the definition in the HCCCHTocsy.peaks file with the appropriate syntax.
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the 'demo.pdb'.


The experiment is a TOCSY, a through-bond experiment. It allows you to see, in this case, from the backbone all the way out into the side chains.
=== Estimating spin-diffusion  ===


* Use the less command (to view files in the terminal but not change) to search the spectrum type in the 'cyana.lib' file.
Before recording NOESY spectra, it makes sense to estimate the ideal mixing time (or for a NOESY series, the mixing times), where the buildup is still in the linear regime and spin diffusion not prohibitively strong. CYANA has features built in that accomplish this task conveniently.


'''Hint:''' Look at the definitions themselves and not just the SPECTRUM names, to determine which TOCSY is the appropriate one.
In the directory 'spinDiff' you find the macro 'CALC_spinDiff.cya':
Take the experiment with the most through-bond transfers.
* work in the copy of the data directory ('cd flyabb')
* Use a graphic text editor (or if you feel comfortable, use the vi terminal text editor) to manipulate the HCCCHTOCSY.peaks file and enter the appropriate spectrum type and identifiers in the correct order.
* '''Check that the order of the dimensions in your SPECTRUM definition matches the actual experiment.'''


Depending on how the xeasy peak file was generated, the order of the dimensions does not have to match the way experiments are recorded, and of course they do not in general match the SPECTRUM definition given in the 'cyana.lib' file. If it does not match, do not change it in the 'cyana.lib' file but switch the order of the atom labels it in the definition you add to your '*.peaks' file.
echo:= on
mixingtimes = '0.02,0.03,0.04,0.05,0.06'
b0field    = 700
mode        = 3
# ----------------------------------        structure input        ----------------------------------
# specify the conformers for calculations
read pdb demo rigid
structure select 1
 
# ----------------------------------        spin-diffusion          ----------------------------------
[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode
[[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode
[[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes


It does the following:
* reading the structure and use the first conformer for spin diffusion calculations.
* '[[CYANA Command: enoe spindiff |enoe spindiff]]' the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied.
* '[[CYANA Command: enoe twospin |enoe twospin]]' direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied.
* '[[CYANA Command: enoe spdcorr |enoe spdcorr]]' calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.


'''Hint:''' A quick determination of the order of the dimensions and  atom types, can be done by looking at the columns of the chemical shifts and detect the chemical shift patterns.
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===
Bi-directional eNOEs are the most accurate eNOEs with in general no tolerance applied. To obtain these and fulfill the normalization requirements, it is prudent to record combined 13C/14N spectra where the diagonals of 13C bound and 15N bound protons are available in the same spectra.


This may be harder than it sounds at first instance, take your time to detect the pattern if it is not immediately obvious to you.
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454


As you know, the chemical shifts of specific atom types and groups are quite distinct. If you need help with the chemical shift statistics, go to: [http://www.bmrb.wisc.edu/ref_info/stats.php?set=filt&restype=aa&output=html BMRB]
The pulse sequence are found here:
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc


'''Hint:''' For information on how to use the vi terminal editor: [https://www.cs.colostate.edu/helpdocs/vi.html vi editor]


=== Exercise 2: Run FLYA ===
[[Image:pulseseq.jpg|400px]]


* work in the copy of the data directory ('cd flyabb')
=== Preparing experimental peak lists ===


Using the text editor of your choice, create your 'init.cya' macro as outlined ('''The init macro''') and also your 'CALC.cya' macro ('''The FLYA CALC macro''') to run FLYA. Be extra careful to avoid typos and unwanted spaces in coma lists etc.
Peak lists in XEASY format are prepared by automatic peak picking with a visualization program such as CcpNmr Analysis, NMRdraw or NMRview and saved as ''XXX''.peaks, where ''XXX'' denotes the name of the xeasy peak list file.
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format.  


==== Execution scripts or "macros" in CYANA ====
# Number of dimensions 3
#FORMAT xeasy3D
#INAME 1 H
#INAME 2 HN
#INAME 3 N
#SPECTRUM N15NOESY H HN N
    17086    4.098    4.099  57.441 1 U  6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5
    89532    4.355    1.829  33.507 1 U  1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6    CB.6
    89544    4.353    1.757  33.513 1 U  2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6    CB.6


For more complex task within CYANA, rather than to enter the execution commands line by line at the CYANA prompt, the necessary commands are collected in a file named '*.cya'. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.
The first line specifies the number of dimensions (3 in this case). The '#SPECTRUM' (no space between characters) lines gives the experiment type (N15NOESY, which refers to the corresponding experiment definition in the CYANA library), followed by an identifier for each dimension of the peak list (H HN N) that specifies which chemical shift is stored in the corresponding dimension of the peak list. The experiment type and identifiers must correspond to an experiment definition in the general CYANA library (see below) in most uses of the definition, here however we cheat slightly because for eNOE calculations we record our NOESY spectra with simultaneous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).


==== The init macro ====
After the '#SPECTRUM' line follows one line for every peak. For example, the first peak in the 'HNCA.peaks' list has


The initialization macro file has the fixed name 'init.cya' and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing 'init'. It contains normally at least two commands that read the CYANA library and the protein sequence:
* Peak number 17086
* H chemical shift 4.098 ppm
* ("HN") chemical shift 4.099 ppm (in this case 13C bound)
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)


rmsdrange:=15-111
The other data are relevant entry for the eNOE modules is the peak volume or intensity (6.990943E+08).
cyanalib
read demoShort.seq


The first line sets the appropriate rmsdrange, and the command 'cyanalib' reads the standard CYANA library. The next command reads the protein sequence.
==== SPECTRUM definitions in the CYANA library ====


The protein sequence is stored in three-letter code in the file 'demo.seq'.
When you start CYANA, the program reads the library and '''displays the full path name of the library file'''. You can open the standard library file to inspect, for example, the NMR experiment definitions . For instance, the definition for the N15NOESY spectrum (search for 'N15NOESY' in the library file 'cyana.lib') is


==== The FLYA CALC macro ====
SPECTRUM N15NOESY H HN N
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*


The 'CALC.cya' starts with the specification of the names of the input peak lists:
The first line corresponds to the '#SPECTRUM' line in the peak list. It specifies the experiment name and identifies the atoms that are detected in each dimension of the spectrum. The number of identifiers defines the dimensionality of the experiment (3 in case of N15NOESY).


  peaks:=aro,cnoesy,nnoesy,HNtrosy,trHNCA,HNCOCA,HNCACB,NTocsy,HCCCHTocsy
Each of the following lines defines a (formal) magnetization transfer pathway that gives rise to an expected peak. in the case of N15NOESY there are five lines, corresponding to the through space magnetization transfer by dipol-dipol mechanism. The peak definition starts with the probability to observe the peak (0.900), followed by a series of atom types, e.g. H_AMI for amide proton etc. The atoms whose chemical shifts appear in the spectrum are identified by their labels followed by ':', e.g. for N15NOESY 'H:', 'HN:', and 'N:'. If you were to use the CYANA functions to simulate peaks, expected peaks are generated for each molecular fragment in which these atom types occur.


The peak list names are separated by commas (without blanks!). The files on disk have the file name extension .peaks, e.g. 'HNCA.peaks'.
You may have realized that our peak list contains peaks that are 13C bound, therefore the spectrum definition is wrong, since we are only reading the peak lists and not generating any, this is not a problem.


The command above will use all available peak lists. You can choose any subset of them by modifying the 'peaks:=...' statement.
==== From nmrDraw to XEASY ====


These are followed by tolerances for chemical shift matching:
In the 'nmrDrawX' directory you find the 'nmrDrawX.cya' macro:


  assigncs_accH=0.03
  # read nmrDraw tab file
  assigncs_accC=0.4
read tab demo.tab
  assigncs_accN=assigncs_accC
  tolerance:=$assigncs_accH,$assigncs_accH,$assigncs_accC
# sort the peaks
peaks sort
   
  # write out peak lists
  do i 1 npkl
  peaks select "** list=${i}"
  write peaks $i.peaks names
end do


In this case, a tolerance of 0.03 ppm will be used for protons, and 0.4 ppm for carbon and nitrogen.
It does the following:
The 'assigncs_accX' variables are used within flya, the tolerance variable is used in consolidation.
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).
* Sorting of the peaks in each peaks list per mixing time.
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.


The next parameter specifies the seed value for the random number generator (an arbitrary positive integer is ok).
=== Using Talos to generate torsion angle restraints ===
randomseed=101


The next parameter chooses the "quick" optimization schedule in order to speed up the calculation for this practical:
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only "strong assignments" to generate these restraints.


<!---
If you do not have TALOS installed get it from [https://www.ibbr.umd.edu/nmrpipe/install.html here]. It is part of the nmrpipe software package.
shiftassign_population=25 (we do not set this, so the default of XX is used)
-->
shiftassign_quick=.true.


In production runs, better results can be expected (at the expense of longer computation times) if this parameter is not set.  
In the 'acoPREP' directory, inspect the 'CALC_talos.cya' file with the commands to calculate the talos angle restraints:
<!---
* The population size for the genetic algorithm, i.e. how many assignments form one generation (25; chosen smaller than in normal production runs in order to speed up the calculation) 
-->
The next command specifies that swapping of diastereotopic pairs is optimized with respect to the supplied reference assignment (only applied during consolidation):


  shifts_consolidate_swap=.true.
  read 5.peaks
shifts initialize
shifts adapt
[[CYANA Command: atoms set|atoms set]] "* shift=990.0.." shift=none
write demo.prot
read prot demo.prot unknown=skip
talos talos=talos+               
talosaco pred.tab
write aco talos.aco


Finally, there is the command to start the FLYA algorithm:
This will call the program TALOS+ and store the resulting torsion angle restraints in the file 'talos.aco'.


flya runs=10 assignpeaks=$peaks shiftreference=manREF.prot
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the 'CALC_talos.cya' macro from the prompt.


Here, the given parameters of the 'flya' command specify the following:


* The number of independent runs of the algorithm, from which the consolidated shift will be calculated (chosen smaller than in normal production runs in order to speed up the calculation).
'''Hint: ''' change to a cshell before running cyana (since talos needs a cshell to run):
* The input peak lists that will be used (as defined above).
csh
* An ensemble of random structures will be calculated for generating expected peaks (leads to prediction of short range NOES in NOESY-type experiments).
* The results will be compared with the reference chemical shifts in the file 'manREF.prot' (which have been determined by conventional methods).


== eNOE  calculations  ==


When you have prepared the 'init.cya' and the 'CALC.cya' start your FLYA ('CALC.cya') macro using 10 processors by calling it as outlined just below. It will take between 10-20 minutes (depending on your system) to complete the assignment, once the calculation starts.
All eNOE related calculations within cyana are carried out using the eNORA modules.  


To run the FLYA calculation, one could start CYANA and execute the 'CALC.cya' macro from the CYANA prompt, however on a computer with multiple processors it is better to speed up the calculation by running the 'CALC.cya' macro in parallel:
For best results, NOESY experiments are measured at different mixing times (keeping the mixing times as much as possible within the linear regime of NOE buildup). However one can obtain very good results from a single mixing time. The advantage of a buildup series lies manly in the ability to see NOEs that do not behave as expected, in order to exclude them from use in structure calculation.


cyana -n 10 CALC.cya
=== eNORA (single mixing time) ===


This starts 10 independent calculations on 10 processors by using the MPI scheduler (if installed on your system, otherwise shared memory will be used).
In the 'enoe1pt' directory you find the relevant 'init.cya' and 'CALC_enoe1pt.cya' macro's.


It is strongly recommended that you check the MPI scheduler if your calculation is running. If you made a mistake in one of the two macros, the calculation may or may not start, or get interrupted at some point.
==== The init macro ====


ls -ltr
The initialization macro file has the fixed name 'init.cya' and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing 'init'. It contains normally at least two commands that read the CYANA library and the protein sequence:


This command allows you to check whether the calculation has generated intermediary files or final results, with a time stamp.
rmsdrange:=8-33
cyanalib
read seq demo.seq


<!---
The first line sets the appropriate rmsdrange, and the command 'cyanalib' reads the standard CYANA library. The next command reads the protein sequence.
To check the queuing on the server use (PEND or if running you see the time elapsed and JOBID):


squeue
The protein sequence is stored in three-letter code in the file 'demo.seq'.
            JOBID PARTITION    NAME    USER ST      TIME  NODES NODELIST(REASON)
              4414      bnmr    CALC    dxxxx  R      0:56      3 guri[1,5-6]


And to cancel the processes started by you before completion:
===== Stereo-specificity of dia-stereocenters =====


  scancel 4414
  atoms stereo "HA? 10"
atoms stereo "HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38"
atoms stereo "HG? 8 12 14 17 36 37"
atoms stereo "HD2? 18 26 30"
atoms stereo "QG? 22"
atoms stereo "QD? 7"
atoms stereo "HE2? 33"
atoms stereo "HD? 8 14 21 37"
atoms stereo "HG1? 28"


--->
However, one may do the following to supply all atoms as stereo specific:
   
  atoms select
To check the general load on your local computer use:
atoms stereo


  top
or to supply all atoms as non stereo specific, use:
  atoms select
atoms stereo delete


To kill all processes running (from you):
To get a feedback of the supplied stereo specific assignment add to your 'init.cya' the command:
atoms stereo list


skill -u <username>
===== D20 exchange =====


=== FLYA output files ===
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:
[[CYANA Command: atoms set|atoms set]] "H" protlev=0.97


The FLYA algorithm will produce the following output files:
===== TauC setting =====


* '''flya.prot:''' Consensus assigned chemical shifts. This file contains a chemical shift for every atom that has been assigned to least one peak.
Individual correlation times may be set per atom, the overall tumbling time is set as:
* '''flya.tab:''' Table with details about the chemical shift assignment of each atom (comparison with reference shifts). In this file you can see for each atom whether the assignment is "strong" (self-consistent) or "weak" (only tentative).
[[CYANA Command: atoms set|atoms set]] "*" tauc=4.25
* '''flya.txt:''' Assignment statistics
* '''flya.pdf:''' Graphical representation of the assignment results
* '''''XXX''_exp.peaks:''' List of expected peaks, corresponding to input peak list ''XXX''.peaks
* '''''XXX''_asn.peaks:''' Assigned peak list, corresponding to input peak list ''XXX''.peaks


==== The flya.txt file ====
==== The eNORA CALC macro ====


This output file starts with overall assignment statistics for each group of atoms as defined by 'analyzeassign_group:=...':
Below you find the 'CALC.cya' script. You will find comments for the commands options, where we found it appropriate.


    ____________________________________________________________
The 'CALC_enoe1pt.cya':
   
   
    CHEMICAL SHIFT ASSIGNMENT
# ----------------------------------          eNORA routine        ----------------------------------
    ____________________________________________________________
# ----------------------------------  basic parameter definitions  ----------------------------------
   
   
    SEED: 1
echo:= on
     chemical shifts for 542 atoms found
mixingtimes = 0.06
    Peaks assigned from frequencies
b0field     = 700
maxdistance = 6.5
normed      = 0
  normspin    = 2
mode        = 3
   
   
     BB: REFERENCES(2):512 CHEMICALSHIFTS(1):542 (1)and(2):512 MATCH:507(99.0% of (2))
* The parameter definitions, their function is explained later with respect to the functions that use them.
 
# ----------------------------------        structure input        ----------------------------------
* REFERENCES(2) is the number of reference assignments (in the selected group)
 
* CHEMICALSHIFTS(1) is is the number of atoms assigned by FLYA
# specify the conformers for calculations
* (1)and(2) is the number of atoms that are assigned by FLYA and in the reference.  
read pdb demo rigid
* MATCH is the number of atoms with the same assignment by FLYA and in the reference. The percentage is relative to the number of reference assignments.
structure select 1
 
Further below comes a table with information about each peak list:
* The structure input and which conformers to use for spin-diffusion calculations. If multiple conformers are used to average the spin-diffusion values, the command 'structure select' may be used to select multiple conformers of the pdb.
# ----------------------------------        peak file reading      ----------------------------------
# read in the peak lists
read peaks 5.peaks
 
# ----------------------------------  initializing the routine     ----------------------------------
# initialize the routine, fit experimental decays and buildups
[[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes
* '[[CYANA Command: enoe init |enoe init]]' orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones.
# fit experimental decays
[[CYANA Command: enoe diag |enoe diag]] opt=1
# fit experimental buildups
[[CYANA Command: enoe cross |enoe cross]]
[[CYANA Command: enoe sig |enoe sig]] opt=1
 
# ----------------------------------        spin-diffusion          ----------------------------------
# calculate the spin-diffusion correction
[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode
[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode
[[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes
* '[[CYANA Command: enoe spindiff |enoe spindiff]]' calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).
 
# ----------------------------------    apply spin-diffusion      ----------------------------------
# apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma
[[CYANA Command: enoe sig |enoe sig]] opt=2
# calculate reff
[[CYANA Command: enoe reff |enoe reff]] b0field=b0field
# prepare the cyana restraints (scaling, error margins)
[[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0
* '[[CYANA Command: enoe restraint |enoe restraint]]' applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).
# ----------------------------------        write restraints        ----------------------------------
# delete fixed distances from upl/lol output
distance delete fixed
# write the distance restraints to file
write upl enoe.upl
write lol enoe.lol
   
   
    PEAKLISTS
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant ('distance delete fixed').
    #Expected: Total number of expected peaks
 
    noRef: Number of expected peaks with missing reference shifts
# ----------------------------------            overview            ----------------------------------
    noPeak: Number of expected peaks for wich no peak can be measured
    Assigned: Number of expected peaks that could be assigned
    Match: Number of assigned peaks that fit reference shifts
    #Measured: Total number of peaks in peak list
    Assigned: Number of measured peaks that could be assigned to expected peaks
    exp/meas: Ratio of assigned expected and measured peaks
   
   
    Lists      #Expected noRef  noPeak  Assigned        Match    #Measured Assigned  exp/meas Assigned
  [[CYANA Command: enoe overview |enoe overview]]
    N15HSQC        106      8      1  104( 98.11%)    97( 91.51%)    131    96( 73.28%)  1.1
    HNCA          211      15      11  194( 91.94%)  186( 88.15%)    329    179( 54.41%)  1.1
    HNcaCO        211      15      11  197( 93.36%)  183( 86.73%)    246    176( 71.54%)  1.1
    HNCO          105      7      1  101( 96.19%)    97( 92.38%)    158    97( 61.39%)  1.0
    HNcoCA        105      7      0  101( 96.19%)    97( 92.38%)    158    99( 62.66%)  1.0
    CBCANH        399      26      25  361( 90.48%)  350( 87.72%)    623    339( 54.41%)  1.1
    CBCAcoNH      200      13      2  196( 98.00%)  185( 92.50%)    324    192( 59.26%)  1.0
    ALL          1337      91      51  1254( 93.79%)  1195( 89.38%)  1969  1178( 59.83%)  1.1
   
   
It contains the following data:
* '[[CYANA Command: enoe overview |enoe overview]]' writes the overview file 'enoe.ovw'.


* '''#Expected:''' Total number of expected peaks
* '''noRef:''' Number of expected peaks with missing reference shifts
* '''noPeak:''' Number of expected peaks for which no peak can be measured
* '''Assigned:''' Number of expected peaks that could be assigned based on the reference chemical shift assignments. The theoretical maximum of 100% corresponds to the situation that the spectra “explain” all expected peaks. Each expected peak can be mapped to at most one measured peak. Remaining expected peaks correspond to missing peaks in the measured peak list.
* '''Match:''' Number of assigned peaks that fit (within tolerance) reference shifts. The theoretical maximum of 100% corresponds to having all measured peaks assigned. Note that several expected peaks can be mapped to the same measured peak, i.e. the assignments of measured peaks can be unambiguous or ambiguous. Remaining unassigned measured peaks are likely to be artifacts.
* '''#Measured:''' Total number of peaks in peak list
* '''Assigned:''' Number of measured peaks that could be assigned to expected peaks
* '''exp/meas:''' Ratio of assigned expected and measured peaks


There is more information on the results of the assignment calculation in the 'flya.txt' file (not described here).
Run the eNOE calculation such as:


==== The flya.tab file ====
cyana CALC_enoe1pt.cya


This file provides information about the chemical shift assignment of each individual atom:
=== eNORA output files ===


    Atom  Residue      Ref  Shift    Dev  Extent  inside  inref
The eNORA algorithm will produce the following output files:
    ...
    N    GLY  57 102.109 102.043  0.066    10.0  100.0  100.0  strong=
    H    GLY  57  8.571  8.570  0.001    10.0  100.0  100.0  strong=
    CA    GLY  57  45.415  45.433  -0.018    10.0  100.0  100.0  strong=
    HA2  GLY  57  4.042
    HA3  GLY  57  3.436
    C    GLY  57 173.621 173.662  -0.041    10.0    89.4    90.0  strong=
    N    LEU  58 120.640 120.649  -0.009    10.0    80.0    80.0  =
    H    LEU  58  7.488  7.492  -0.004    10.0    79.8    80.0  =
    CA    LEU  58  51.943  51.940  0.003    10.0    70.0    70.0  =
    HA    LEU  58  4.995
    CB    LEU  58  45.602  45.568  0.034    10.0    82.7    80.0  strong=
    CG    LEU  58  26.528
    HG    LEU  58  1.515
    CD1  LEU  58  24.745
    C    LEU  58 173.619 174.576  -0.957    10.0    40.1    10.0  ! (C 59)
    ...


* '''Ref:''' Chemical shift value in the reference chemical shift list (ref.prot). It was not used in the calculation.
* '''enoe.upl and enoe.lol:''' Upper limit and lower limit restraint files with tolerances applied.
* '''Shift:''' Consensus chemical shift value from FLYA
* '''enoe.ovw:''' Collated results file.
* '''Dev''' = Ref - Shift
* '''Extent:''' Number of runs in which the atom was assigned by FLYA.
* '''Inside:''' Percentage of chemical shift values from the (10) independent runs of FLYA that agree (within the tolerance) with the consensus value.
* '''inref:''' Percentage of chemical shift values from the (10) independent runs of FLYA that agree (within the tolerance) with the reference value.
* Outcome of the assignment:
** '''strong:''' "strong" assignment, i.e. Inside > 80%.
** '''=:''' Assignment that agrees with reference, i.e. Dev < tolerance.
** '''!:''' Assignment that does not agree with the reference, i.e. Dev > tolerance.
** '''('''''atom name'''''):''' Correct assignment, if within the same residue (no residue number given), or the neighboring residues.


==== The flya.pdf file ====
==== The enoe.upl/lol distance restrains ====


This PDF file provides a graphical representation of the 'flya.tab' file. Each assignment for an atom is represented by a colored rectangle.  
Suggested (default) correction factors for lower and upper distance bounds:
[[Image:flyabackbone.png|thumb|600px|'''flya.pdf''']]
Condition                                      Factor for lower bound              Factor for upper bound
Methyl group                                  3<sup>–1/6</sup> x 0.915 = 0.762                3<sup>–1/6</sup> x 1.085 = 0.903
Degenerate isopropyl group (Val, Leu)          6<sup>–1/6</sup> x 0.915 x 0.95 = 0.645          6<sup>–1/6</sup> x 1.085 x 1.05 = 0.713
Degenerate methylene group                    2<sup>–1/6</sup> x 0.95 = 0.846                  2<sup>–1/6</sup> x 1.05 = 0.935
2-fold degenerate aromatic protons            2<sup>–1/6</sup> = 0.891                        2<sup>–1/6</sup> = 0.891
4-fold degenerate aromatic protons            4<sup>–1/6</sup> = 0.794                        4<sup>–1/6</sup> = 0.794
bi-directional NOE                            1                                    1
uni-directional NOE                            0.8 (default)                        1.2 (default)
Aromatic to non-aromatic NOE
normalized to non-aromatic diagonal peak      0.89 (default)                      1.11 (default)
no stereospecific assignment                  (default calculated)                (default calculated)


* '''Green:''' Assignment by FLYA agrees with the manually determined reference assignment (within tolerance)
==== The enoe.ovw file ====
* '''Red:''' Assignment by FLYA does not agree with the manually determined reference assignment
* '''Blue:''' Assigned by FLYA but no reference available
* '''Black:''' With reference assignment but not assigned by FLYA.  


Respective light colors indicate assignments not classified as strong by the chemical shift consolidation. The row labeled HN/Hα shows for each residue HN on the left and Hα in the center. The N/Cα/C’ row shows for each residue the N, Cα, and C’ assignments from left to right. The rows β-η show the side-chain assignments for the heavy atoms in the center and hydrogen atoms to the left and right. In the case of branched side-chains, the corresponding row is split into an upper part for one branch and a lower part for the other branch.
Collated file that may be generated at any time during the routine and will be populated with the values available at the momentary progress of calculations.  


=== Exercise 3: Analyze the FLYA results ===
* '''ASSIGNMENT(i->j):''' Assignment arranged with the flow of magnetization.
* '''REFFixEXP:''' The experimental sigma of spin x, where x=i,j
* '''REFFxCORR:''' The reff of spin x, where x=i,j
* '''SIGxEXP:''' The experimental sigma of spin x, where x=i,j
* '''SIGxCORR:''' The spin-diffusion corrected experimental sigma of spin x, where x=i,j
* '''SDCx:''' The spin-diffusion correction of spin x, where x=i,j. This value is obtained from the ratio of the spin-diffusion corrected sigma over raw experimental sigma. The spin-diffusion corrected sigma, for which the spin diffusion corrections are applied to the intensity at each mixing time and then fitted, is calculated with the 'enoe reff' command.
* '''SDPx:''' The number of other partner spins involved in spin-diffusion for spin x, where x=i,j
* '''IZEROx:''' The back calculated I(0) value of spin x, where x=i,j
* '''exp_chiNx:''' The goodness of fit of the experimental data, where x=i,j
* '''corr_chiN x:''' The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j


*Analyze your FLYA results using 'less' or a graphical text editor and a pdf viewer.
=== eNORA (using buildup data) ===


*What do you think?
All eNOE related calculations within cyana are carried out using the eNORA modules.


*How does the automated assignment compare to the provided assignment?
NOESY experiment measured at different mixing times (keeping the mixing times as much as possible within the linear regime of NOE buildup) supply very precise distance restraints used for a structure calculation.


*How robust you think are the results?
You will find the relevant macro's in the directory 'enoebup'.


*What could you do to likely improve the result?
==== The init macro ====


'''Hint:''' Use the terminal command 'gs' to view pdf files (control-C to quit gracefully):
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:
  gs flya.pdf
# -------------- avg rho --------------
  [[CYANA Command: atoms set|atoms set]] "*" rho=5.3


== Using Talos to generate torsion angle restraints ==
==== The eNORA CALC macro ====


Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only "strong assignments" to generate these restraints.
The 'CALC_enoe.cya' starts with the following:
# ----------------------------------          eNORA routine        ----------------------------------
# ----------------------------------  basic parameter definitions  ----------------------------------
echo:= on
mixingtimes = '0.02,0.03,0.04,0.05,0.06'
b0field    = 700
rhofile    = 'rhoInApo.rho'
normed      = 0
normspin    = 2
mode        = 3
bname     ='bupplots'
dname      ='decplots'
izname      ='izPlot'
# ----------------------------------        structure input        ----------------------------------
# specify the conformers for calculations
read pdb demo rigid
structure select 1
# ----------------------------------        peak file reading      ----------------------------------
# read in the peak lists
do i 1 5
  read peaks $i.peaks $if(i.eq.1,' ','append')
end do
* reading the XEASY peak lists in the order of increasing mixing time.
   
# ----------------------------------  initializing the routine    ----------------------------------
# initialize the routine, fit experimental decays and buildups
[[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes
# print average experimental auto-relaxation and I(0) values to screen
[[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname
graf $izname.pdf
# supply averaged rho or izero values
if (existfile('$rhofile')) then
  read rho $rhofile
end if


If you do not have TALOS installed get it from [https://www.ibbr.umd.edu/nmrpipe/install.html here]. It is part of the nmrpipe software package.
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user ('[[CYANA Command: enoe diag |enoe diag]]') and saved in memory or can be overwritten by reading a file ('[[CYANA Command: read rho|read rho]]').  


=== Exercise 4: Calculate backbone torsion angle restraints using Talos ===
# plot the diagonal decay's 
[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname
graf $dname.pdf
Additional commands only usefull with buildup data:
* '[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname' and 'graf $dname.pdf' generate a pdf file for the diagonal decays of the experimental data. This is visually inspected to remove diagonal decays that may behave not as expected (experimental artifacts etc.)


'''Hint: ''' Copy the FLYA results into a new folder, since otherwise you will overwrite your original 'flya.prot' file.


Essentially you will need to copy the details directory and the 'flya.prot' file.
# write the auto-relaxation values to file
 
write rhoOut.rho
  cp -r flyabb acoPREP
  cd acoPREP
  #
  rm *.peaks *.out *.job
  [[CYANA Command: enoe cross |enoe cross]]
 
  peaks select "NONORM list=1"
Use a text editor of your choice to create a 'CALC.cya' file with the commands to calculate the talos angle restraints.
write peaks 1_NONORM.peaks names
 
 
TALOS is used to generate torsion angle restraints from the backbone chemical shifts in 'flya.prot'.
# fit experimental buildups
 
[[CYANA Command: enoe sig |enoe sig]] opt=1
  consolidate reference=flya.prot file=flya.tab plot=flya.pdf prot=details/a[0-9][0-9][0-9].prot
 
# ----------------------------------        spin-diffusion          ----------------------------------
This overwrites the original flya.prot with only strong assignments.
 
  [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode
  read prot flya-strong.prot unknown=skip
[[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode
[[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes
# apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma
[[CYANA Command: enoe sig |enoe sig]] opt=2
# calculate reff
[[CYANA Command: enoe reff |enoe reff]] b0field=b0field
# prepare the cyana restraints (scaling, error margins)
[[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0
 
# ----------------------------------        write restraints        ----------------------------------
# delete fixed distances from upl/lol output
distance delete fixed
# write the distance restraints to file
write upl enoe.upl
  write lol enoe.lol
   
   
  talos talos=talos+               
  # ---------------------------------        plotting buildups        --------------------------------
talosaco pred.tab
   
   
  write aco talos.aco
  [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2
graf $bname.pdf


This will call the program TALOS+ and store the resulting torsion angle restraints in the file 'talos.aco'.
Additional commands only usefull with buildup data:
 
* '[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2' and 'graf $bname.pdf' print the buildups to file for inspection.
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the 'CALC.cya' macro from the prompt.
 
 
# ----------------------------------            overview            ----------------------------------
<!---
   
'''Hint: ''' On stift (or kreide): change to a cshell and prepare nmrpipe by typing:
  [[CYANA Command: enoe overview |enoe overview]]
csh
prepare nmrpipe
--->
'''Hint: ''' change to a cshell before running cyana (since talos needs a cshell to run):
csh
 
== Automated NOESY assignment and structure calculation ==
 
We will perform an automated NOE restraint assignment and structure calculation by torsion angle dynamics.
 
The 'flya.prot' file from the automated resonance assignment will be used together with the (unassigned) NOESY peak lists to assign the NOESY peaks and to generate distance restraints. The structure is calculated in cycles, essentially testing the NOE assignment and iteratively refining it, in order to compute the three-dimensional structure of the protein.
 
=== Exercise 5: Run noeassign ===
 
Copy the 'flyabb' directory and give it the name 'noebb', then delete all the files and data we do not need to reduce clutter and have better oversight.
 
cp -r flyabb noebb
  cd noebb
  rm *asn.peaks *exp.peaks *.out *.job
rm -rf details
 
From the directory 'acoPREP' copy the calculated talos restraints ('talos.aco').
   
   
Inside the 'noebb' directory, use a text editor to edit the 'CALC.cya' file for noeassign as outlined.
Start CYANA and execute the 'CALC_enoe.cya' macro from the CYANA prompt as such:


==== The noeassign CALC macro ====
cyana CALC_enoe.cya


peaks:= cnoesy.peaks,nnoesy.peaks,aro.peaks
The program will run and then stop as soon as it finished plotting the diagonal decay's and has written the 'rhoOut.rho' file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.
prot:= flya.prot                 
restraints:= talos.aco                   
tolerance:= 0.040,0.030,0.45           
structures := 100,20                     
steps:= 10000                     
randomseed:= 434726   
                 
noeassign peaks=$peaks prot=$prot autoaco


To speed up the calculation, you can set optionally in 'CALC.cya':
==== Exercise: Compiling the autorelaxation file ====


structures:=50,10
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.
steps=5000
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.


These commands tell the program to calculate, in each cycle, 50 conformers, and to analyze the best 10 of them. 5000 torsion angle dynamics steps will be applied per conformer.
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].
If you do not set these option 100 conformers will be calculate, and the 20 best will be analyzed and kept.  


<!---Where as ????x torsion angle dynamics steps will be applied per conformer. --->
=== eNORA (using generic normalized eNOEs) ===


When you are done preparing the macros as outlined run the calculation.
For larger proteins with lots of overlap on the diagonal, it may be necessary to resort to a more pragmatic way to undertake normalization. If on separates the diagonal into spin types in accordance to their relaxation properties, it is possible to calculate an upper limit intensity for the diagonal per spin type. Excluding out-layers, the upper distance limit will be longer in comparison to the true distance. The resulting distance therefore helps to define the structure but will not lead to erroneous results.


The automated NOE assignment and structure calculation will be performed by running the 'CALC.cya' macro:
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.


  cyana -n 33 CALC.cya
  normalized  = 0


Doing this, basically means each processor will calculate 100/33=3 conformers. If you changed the setup to calculate 50 structures, you would start the calculation with 'cyana -n 25 CALC.cya'. 7 cycles of calculations will be preformed.
Change the normalized variable used in the [[CYANA Command: enoe init |enoe init]] command from 1 to 0. Doing this will ensure that cross peaks without a corresponding diagonal peaks remain in the pool for calculations.


Statistics on the NOE assignment and the structure calculation will be in the file 'Table', which can also be produced with the command 'cyanatable -lp'.
#fit experimental decays
[[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot
graf izplot.pdf


The final structure will be 'final.pdb'. You can visualize it, for example, with the command
Change the opt variable used in the [[CYANA Command: enoe diag |enoe diag]] command from 2 to 3. This will then calculate the statistics of diagonal intensities per spin type and assign an artificial value to missing spins.


  chimera final.pdb
  distance select UNIDIR
distance select "-GENNORM"
distance sort
write upl enoe_UNIDIR.upl
write lol enoe_UNIDIR.lol
distance select BIDIR
distance select "-GENNORM"
distance sort
write upl enoe_BIDIR.upl 
write lol enoe_BIDIR.lol
 
distance select GENNORM
distance sort
write upl enoe_GENNORM.upl


The optimal residue range for superposition can be found with the command
Using the distance select command allows to user to separate distances resulting from eNOEs into UNIDIR (uni directional) and BIDIR (bi directional) and separating generic normalized eNOEs (GENNORM) from the other distances. For UNIDIR and BIDIR distances one writes the upper and lower limits, for GENNORM only the upper distances are kept, since the nature of using upper limits for Izero values results in distance that are too long in comparison to the true distances.


cyana overlay final.pdb
== The TSS approach to spin-diffusion calculations ==


Run noeassign with your 'CALC.cya' macro.
The TSS approach to spin-diffusion calculations is especially useful for calculations involving deuterated samples or samples with special labeling (i.e. methyl labeling, see below):


You can check the statistics (and success of 'noeassign') by running:
The TSS mode is accessed by setting the parameter mode=2 for the 'enoe spindiff' command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).


cyanatable
=== Labeling Schemes ===


== Creating the ligand library file for CYANA ==
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e.


In the next three exercises you will create the ligand library file for CYANA from scratch. Do this carefully and check your result, otherwise your structure calculation will not work as intended.
atoms set "H" protlev=0.97
# labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%
atoms set "QG1 @VAL + QD1 @LEU + QD1 @ILE" protlev=0.0


=== Exercise 6: Drawing the molecule and obtaining the SMILES code ===
== Considerations regarding the obtained eNOE restraints ==


* make a copy of the libex and work in there (libexbb)
=== Mapping calculated eNOE restraints onto a known structure ===
cp -r libex libexbb
cd libexbb


Go to the [http://zinc.docking.org/search/structure ZINC] website.
One can map the calculated restraints, such as distance restraints (upl/lol) onto a known structure (in the example here the modified xray structure). This is an approach to analyze restraints and their influence on the results.


Click on the Structure tab and draw the molecule using the supplied drawing (LIG.png) of the compound as a guide.
Below you find the commands to accomplish this. You see by studying the commands, which files are needed to execute the macro. Therefore, create a new directory ('mkdir') or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.
Copy the SMILES code.


You need an init file:


'''Hint:''' To look at the supplied image file in the terminal, use:
rmsdrange:=8-33
cyanalib
read seq demo.seq


xdg-open LIG.png


=== Exercise 7: Converting the SMILES code to mol2 ===
And the main macro (name it 'CALC_xraymap.cya'):
read upl enoe.upl
read lol enoe.lol
read regula.pdb unknown=warn
weight_vdw=0
overview enoe_xray.ovw


*work in the copy of the libex directory ('cd libexbb')
*If the restraints do not match with the xray structure, does it mean they are wrong?
*If you tried the two options, what is (are) the difference(s)?


There are many options and programs to do this, we outline two:
== Multi-state structure calculation with ensemble-averaged restraints ==




If you can use Avogadro (best):
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:
* The CYANA target function is a measure for the quality of the computed structural ensembles given in terms of the squared violation of the experimental restraints.
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.
* A state is one set of coordinates for all atoms of a molecule. If there are multiple states they fulfill the experimental data on average and not individually.
* Sub-bundles are formed by sorting the states according to structural similarity in the region of interest. There are as many sub-bundles as there are states in a conformer, and each sub-bundle comprises as many conformers as the original structure bundle. This requires for each state to belong to exactly one sub-bundle. The sub-bundle for each structural state is a measure of the precision of the individual structural states similar to the conventional bundle representation. 


For Mac OS download Avogadro from: [https://avogadro.cc/ Avogadro]


Build -- > Insert --> SMILES
=== Calculating a single state structure ===


Paste the SMILES code
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.


Extensions -- > Optimize Geometry
The 'enoe.upl' and 'enoe.lol' files will be used together with the aco based on chemical shifts of the backbone and scalar couplings from backbone, Ha-HB and aromatic residues determined by experiment.


Save as


--> LIG.mol2 (*.mol2)
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.
This would look something like this (we will do it differently):


syntax inputseed=@i=3771
# ------ Structure calculation ------
read upl XXX.upl
read lol XXX.lol
read aco XXX.aco
read cco XXX.cco
anneal_weight_aco := 1.0, 1.0, 0.0, 0.0
anneal_weight_cco := 0.0, 0.5
seed=inputseed
calc_all 100 steps=50000
if (master) then
  cut_cco=1.0
  cut_rdc=3.0
  weight_aco = 0.0
  rmsdrange:=8-33
  overview sstate structures=20 pdb
end if
However, since we end up calculating also multi-state structures later on, it makes sense to setup the single-state calculation exactly the same way as the multi-state calculations, and only edit as few parameters as possible. As soon as you understand the 'PREP.cya' macro below, you will realize why this makes sense.


==== Single state calculation ====


If you have to use chimera:
In the 'sstate' you will find the 'init.cya', 'PREP.cya' and the 'CALC_sstate.cya' macro's.


(If you are on the linux server chimera is installed)
==== The init macro ====


Tools --> Structure Editing  --> Build Structure
In addition to what was described above, the 'init.cya' macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:
Start Structure


--> SMILES string  
cyanalib
if (existfile('bundle.seq')) then
  read seq bundle.seq
  molecules define *
  [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle
else
  read seq demo.seq
end if
rmsdrange:=8-33
swap=0
  expand=1


set the Residue name to LIG (capital letters)
* the distances derived from NOEs involving magnetically or chemically equivalent spins are interpreted as effective distances corresponding to the sum of all cross-relaxation rates between the individual spin pairs (expand=1).
atoms stereo "HA? 10"
atoms stereo "HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38"
atoms stereo "HG? 8 12 14 17 36 37"
atoms stereo "HD2? 18 26 30"
atoms stereo "QG? 22"
atoms stereo "QD? 7"
atoms stereo "HE2? 33"
atoms stereo "HD? 8 14 21 37"
atoms stereo "HG1? 28"
[[CYANA Command: atoms set|atoms set]] "H" protlev=0.97


--> Apply
==== The PREP macro ====
Save your mol2 file as: LIG.mol2


'''Now, there is one issue we have to take care of: The intermolecular NOE assignments have to match the ligand structure assignment, otherwise the intermolecular NOEs will be wrong.'''
The 'PREP.cya' macro prepares the calculated eNOEs for use in multi-state structure calculation. For a single state structure calculation this would really not be necessary, we only run the script to keep the calculations consistent and not accidentally introduce changes other than the multi-state changes. We nevertheless explain the detailed workings of the script here.


Using the text editor of your choice, manually change the "UNL1" in your mol2 file to "LIG".
syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor


Then open the supplied demoLIG.pdb structure in chimera, as well as the created mol2 structure.
* 'nbundle=@1' sets the number of states to 1, for a two state structure calculation this need be set to two.


  chimera demoLIG.pdb LIG.mol2
  #multitensor=.true.
together=.true.
moloffset=100


First check the geometry (especially the rings and the stereochemistry). If it is wrong fix it!
* 'moloffset' sets the offset in residue numbering between the sets of coordinates that compose one conformer.
# ------ Sequence file ------
read seq demo.seq
print "\# Bundle of $nbundle conformers" >bundle.seq
do j 1 nbundle
  do i 1 nr
    if (j.lt.nbundle .and. rnam(i).eq.'PL') break
    print "$rnam(i) ${$rnum(i)+moloffset*(j-1)}" >>
  end do
  if (j.lt.nbundle) print "PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP" >>
end do
print >>.


Using the text editor of your choice, or more conveniently using chimera change the proton names in your mol2 file to match those of the pdb.
* The offset is incorporated in the sequence by a linker between the sets of coordinates that compose one conformer. For a two-state conformer there is one linker, for a three-state conformer there are two linkers. This is necessary because we operate in angular space.
# ------ Make bundle angle restraints ------
read aco demo.aco
write aco bundle.aco
do j 2 nbundle
  atom set * residue=residue+moloffset
  write aco bundle.aco append
end do


'''Hint:'''  Overlay the two ligand structures in chimera.
* this prepares the talos angels with the offset in residue numbering.  


Favorites --> Command Line
# ------ Make bundle coupling constant restraints ------
read demo.seq
read cco demo_backbone.cco
read cco demo_aro.cco append
read cco demo_JHaHb.cco append
 
print "\# Coupling constant restraint file" >bundle.cco
do i 1 ncco
  i1=iccoa(1,i); i2=iccoa(2,i)
  do j 1 nbundle
    m=moloffset*(j-1)
    print "${$rnum(iar(i1))+m} $rnam(iar(i1)) $anam(i1) ${$rnum(iar(i2))+m} $rnam(iar(i2)) $anam(i2) $cco(i) $tolcco(i) 1.0 $karplus(1,i) $karplus(2,i) $karplus(3,i) $if(j.ne.nbundle,'&',' ')"
>>bundle.cco
  end do
end do
print >>.
read seq bundle.seq
read cco bundle.cco
write cco bundle.cco karplus
* this prepares the experimental scalar coupling restraints with the offset in residue numbering.


In the command line enter:


  match #1 #0
  # ------ Make bundle RDC restraints ------
#read bundle.seq
#read rdc demo.rdc
#print "\# RDC restraint file" >bundle.rdc
#do i 1 orientations
#  if (multitensor) then
#    do j 1 nbundle
#      print "${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}" >>
#    end do
#  else
#    print "$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))" >>
#  end if
#end do
#do i 1 nrdc
#  i1=irdca(1,i); i2=irdca(2,i)
#  do j 1 nbundle
#    m=moloffset*(j-1)
#    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)
#    print "${$rnum(iar(i1))+m} $rnam(iar(i1)) $anam(i1) ${$rnum(iar(i2))+m} $rnam(iar(i2)) $anam(i2) $rdc(i) $tolrdc(i) $weirdc(i) $iten $rdcsca(i) $if(j.lt.nbundle,'&',' ')" >>bundle.rdc
#  end do
#end do
#print >>.
#read seq bundle.seq
#read rdc bundle.rdc
#write rdc bundle.rdc


Depending on how the models are loaded you may need to change the #? numbers.
* if experimental RDC's  are available include this section of the code.
To see the model number use the Favorites --> Model Panel.


If chimera complains about "Unequal numbers of atoms chosen for evaluation", delete the pseudo atoms of 'demoLIG.pdb' temporarily for the overlay. In the command line
# ------ Make ambiguous bundle distance restraints ------
  sel: @Q @Q? @Q??
  delete sel
subroutine PURGE
#distance delete "HA 9, HB2 9"
  end
   
* if there are distance restraints you decide to delete the assignment can be included in the PURGE command, to remove them below from the generated upl and lol bundle restraints.


To rename selected atoms (control click) in the command line:
init
  setattr a name HX sel
read upl enoe.upl
PURGE
distance modify info=full
molecules symmetrize
if (nbundle.gt.1) distances set "$moloffset.., $moloffset.." bound=0.0
distances set "*, *" bound=bound*(1.0*nbundle)**(-1.0/6.0)
  write upl bundle.upl


Hovering over atoms will display their names!
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.


=== Exercise 8: Converting the mol2 file to a lib file for CYANA ===
init
read lol enoe.lol
PURGE
distance modify info=full
molecules symmetrize
if (nbundle.gt.1) distances set "$moloffset.., $moloffset.." bound=0.0001
distances set "*, *" bound=bound*(1.0*nbundle)**(-1.0/6.0)
write lol bundle.lol


*work in the copy of the libex directory ('cd libexbb')
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.  
*unpack the tool to convert the mol2 to a *.lib file


  tar zxf cylib-2.0.tgz
  # ------ Make restraints to keep corresponding atoms together ------
if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then
  read seq bundle.seq
  molecules define *
  atom set * vdwgroup=bundle
  atom select "N C*"
  do i 1 na
    if (iamol(i).ne.1) break
    if (asel(i)) then
      distance make "$atom(i)" "$anam(i) ${$rnum(iar(i))+moloffset}" upl=1.2 weight=$togetherweight info=none
    end if
  end do
  distances set "* - N CA C CB, * - N CA C CB" weight=weight*0.1
  molecules symmetrize


run cylib with the options -nc -sc
* this prepares artificial distance restraints to keep the keep the multi-state coordinates close together for the averaging condition. Otherwise molecules very far away would also fulfill the condition, since they have no contribution to the eNOE, they also do not violate it (not a desired outcome).
* 'molecules symmetrize' disables van der Waals forces between the copies of the same molecule within the same calculation


  ./cylib-2.0/cylib -nc -sc LIG.mol2
  distances unique
  write upl together.upl
  end if


this will create the LIG.lib file.
==== The single-state CALC macro ====


The -sc option keeps the angles of the rings fixed. We can do this since they are in this molecule either aromatic or have sp3 conjugated carbons in them, fixing the ring geometry.
The 'CALC_sstate.cya' file for structure calculation is outlined below:
If they had to be flexible, you would need to keep the angeles flexible and supply additional restraints to close the rings.


To test the lib file we need CYANA:
syntax inputseed=@i=3771
if (master) then
  PREP
end if
# ------ Structure calculation ------
read upl bundle.upl
read lol bundle.lol
read aco bundle.aco
read cco bundle.cco
#read rdc bundle.rdc
if (existfile('together.upl')) read upl together.upl append
anneal_weight_rdc := 0.0, 0.5
anneal_weight_aco := 1.0, 1.0, 0.0, 0.0
anneal_weight_cco := 0.0, 0.5
seed=inputseed
calc_all 100 steps=50000


Create a sequence file containing 'LIG 333' and name the file 'LIG.seq'.
* these commands call to start the structure calculation with 100 conformers and to analyze the best 20 of them to keep. 50000 torsion angle dynamics steps are applied per conformer.
 
Start CYANA
  if (master) then
This will read the CYANA library file correctlly but give you the error:
  cut_cco=1.0
 
  cut_rdc=3.0
  *** ERROR: Illegal residue name "LIG".
  weight_aco = 0.0
*** ERROR: Cannot read line 1:
                      LIG    333
 
Because we do not have an init file and have not read the 'LIG.lib' file yet, the program just tries to read the default sequence file in the directory, but the ligand is not yet in the library, so it fails...
 
read lib LIG.lib append
read seq LIG.seq
   
   
anneal
  rmsdrange:=8-33,108-133
  overview bundle structures=20 pdb
   
   
atoms select "* - &DUMMY"
  #read pdb bundle.pdb
  #rmsdrange:=23-26, 31-34,123-126, 131-134
  #overview bundleSec structures=20 pdb # reference=xxx.pdb
   
   
pseudo=1
  #molecules sort "BACKBONE 23-26, 31-34" base=1
write pdb test.pdb selected
  #write sortStates.pdb all
  #SPLIT
end if


the command pseudo=1 ensures that the pseudo atoms will be in the written pdb file, 'atoms select "* - &DUMMY"' followed by 'write *.pdb selected' prevents the dummy atoms of the linker to be written to pdb.


The structure calculation is executed by running the 'CALC_sState.cya' macro:


'''Hint:''' Since you might have to do this a few times, until the library is working and correct, it might be worthwhile to create a 'init.cya' and a 'CALC.cya' macro with the respective commands. This to speed things up and prevent the error output shown above.
  cyana -n 33 CALC_sState.cya


Doing this, basically means each processor will calculate 100/33=3 conformers. If you changed the setup to calculate 50 structures, you would start the calculation with 'cyana -n 25 CALC_sState.cya'.


Carefully analyze the WARNING and ERROR messages if any.  
Carefully analyze the WARNING and ERROR messages if any.  


Then take a look at your lig.pdb in chimera and check that the chemistry and bonds are all as expected (ring closure!)


chimera test.pdb
Statistics on the the structure calculation will be displayed to screen. The final structure is named 'bundle.pdb'.


Again overlay the 'LIG.pdb' with the provided 'demoLIG.pdb'.
=== Calculating Multi-state structures ===


If there are any issues "go back to the drawing board" to fix the issues.
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.
Carefully check the names also of the pseudo atom names, since they are used in intermolecular-NOEs later.


To help find problems, you may use the command:
==== Grouping the coordinates of multi-state calculations ====


write lib LIG.lib names
In the 'CALC_multistate.cya' script, there are the following additional commands:


This will write the library file containing actual atom names rather than numbers.
read pdb bundle.pdb
rmsdrange:=23-26,31-34,123-126,131-134
overview bundleSec structures=20 pdb # reference=xxx.pdb
molecules sort "BACKBONE 23-26,31-34" base=1
write sortStates.pdb all


=== Alternative Exercise 6-8: Converting a pdb file to a lib file for CYANA ===
It is very important here that the 'rmsdrange' is set the same as for the 'molecules sort' command. Otherwise the 'pdb write' command inside the 'SPLIT' macro, has the potential to create confusing results.


In case you were unsuccessful with exercises 6-8 in terms of getting a working ligand library file, do not dispair!
==== The SPLIT macro ====
There is an easy workaround that you may be able to use in the real case as well, converting a pdb file to a library file for CYANA.
We introduced a molecular offset to create a multi-state coordinate set for each conformer, now we want to set this offset back and delete the linker between the states.


Use Avogadro:
moloffset=100
read pdb sortStates.pdb
n=nstruct
write_all split
nbundle=$rnum(nr)/moloffset+1
show nbundle
do i 1 nstruct
  read seq bundle.seq
  read pdb split$i(I3.3).pdb
  do j 1 nbundle
    atoms select 1-80
    write pdb split$i(I3.3)-$j.pdb selected
    atoms set * residue=residue-moloffset
  end do
  read seq demo.seq
  read_all split$i(I3.3)-*.pdb unknown=skip
  write split$i(I3.3).pdb all
  do j 1 nbundle
    remove split$i(I3.3)-$j.pdb
  end do
end do
read seq demo.seq
do i 1 n
  read pdb split$i(I3.3).pdb append
end do
write pdb splitall.pdb all
rmsd


File --> Open
* The final output is the 'splitall.pdb' file.


Open the 5c5aLig.pdb
==== Exercise: Setting up a two-state calculation  ====


Save as
Copy the 'sstate' directory and give it the name 'twostate', then delete all the previous, unnecessary output files to reduce clutter and have better oversight.
Copy the 'CALC_sstate.cya' and rename it 'CALC_multistate.cya'.


LIG.mol2 (*.mol2)
cp -r sstate twostate
cd twostate
mv CALC_sstate.cya CALC_multistate.cya
rm  *.out *.job final* rama*


Rename the Residue to LIG in the LIG.mol2 file.
With a text editor, edit the 'CALC_multistate.cya' macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.


  ./cylib-2.0/cylib -nc -sc LIG.mol2
With a text editor, change the number of states (nbundle=@i=) from one to two in the 'PREP.cya' macro:


Done!
syntax nbundle=@i=2 togetherweight=@r=0.1 multitensor


You can run the tests outlined above, using '''anneal''' etc to test your library file.
When you are done preparing the macros as outlined perform the calculation by running the 'CALC_multistate.cya' macro:


== Calculating the structure of the protein-ligand complex ==
cyana CALC_multistate.cya
 
=== Exercise 9: (Semi-automatic) Intermolecular cross peaks assignment and structure calculation ===
 
Since the molecular system contains protein and ligand, CYANA has to read the 'LIG.lib' file in addition to the regular 'cyana.lib' file.
The sequence file needs to contain the protein and the ligand (and a linker to connect the two).
 
Copy the noebb directory and give it the name noecc, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.
 
cp -r noebb noecc
cd noecc
rm *cycle* *.out *.job final* rama*
 
Update the 'init.cya' file in order to read the ligand library file and the sequence file containing the linker and the ligand.
 
Ad the 'read lib LIG.lib append' following the 'cyanalib' read command but before reading the sequence. 'append' is necessary, otherwise the 'cyana.lib' file will be overwritten by the 'LIG.lib' file.
 
rmsdrange:=15-111,333
cyanalib
   
   
read lib LIG.lib append
Carefully analyze the WARNING and ERROR messages if any.
read seq demoLong.seq


Intermolecular cross peaks we assign by supplying noeassign an intermolecular xeasy peak list with just the ligand resonances assigned.
== Results: analysis ==
The ligand resonance were assigned manually and determined from an additional set of experiments (the semi-automatic part).
Thereby the resonance assignment matches the ligand atom assignment in the library file created in the previous exercise.


The protein side will then be assigned by noeassign.
=== Download and install the molecular viewer Chimera ===
 
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]
Update the your previous 'CALC.cya' macro by adding the intermol-NOEs.peaks to the peaks list and adding the keep=all option to the noeassign command:
 
peaks:= cnoesy.peaks,nnoesy.peaks,aro.peaks,intermol-NOEs.peaks
prot:= flya.prot                 
restraints:= talos.aco                   
tolerance:= 0.040,0.030,0.45           
structures := 100,20                     
steps:= 10000                     
randomseed:= 434726 
write_peaks_names=.true.
assign_noartifact:="** list=intermol-NOEs.peaks"
noeassign peaks=$peaks prot=$prot keep=all selectcombine="* - @LIG" autoaco
 
The command 'assign_noartifact' effectivly disables network anchoring tests for the ligand. Since the list supplied is cleaned and presumed artifact free, we are allowed to do this.
We therby encourage the use of the intermolecular NEOs even if the support by other nearby NOEs is weak.
The command 'write_peaks_names=.true.' ensures that the assigned peak list are written to file with the actual resonance names (this is not xeasy standard).
 
You can run the calculation again, commenting out (#) the 'assign_noartifact' command, and see the effect on the final structure.
 
'selectcombine' calls for testing for errors to be done different:
Intermolecular peaks do not have to compete with intra protein peaks.
 
Run the calculation:
cyana -n 33 CALC.cya
 
== Comparing the calculated NMR structure to an XRAY reference structure ==
 
 
=== Exercise 10: Compare the NMR structure to the Xray structure ===
 
Download (www.rcsb.org) the xray structure with ID: 5c5a
 
Use either a web-browser or the terminal:
 
wget <nowiki>'https://files.rcsb.org/download/5c5a.pdb'</nowiki>
 
Using chimera it is possible to compare two structures, by overlaying and inspecting visually.
 
When you have your xray structure ready, load your calculated nmr structure and the xray structure in chimera.
 
Use to chimera specific commands to overlay the two structures and compare the structures visually.
 
=== Exercise 11: Preparing an xray structure to use within CYANA ===
 
Deposited structures often lack specific features. i.e. Xray structures usually lack proton coordinates.
 
Copy your noecc results to a new directory call regulabb, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.
 
cp -r noecc regulabb
cd regulabb
rm *cycle* *.out *.job
 
After reading the sequence file, the pdb file can be read with the option unknown=warn or unknown=skip, this will then skip the parts of the molecule not specified in the sequence file.


read pdb xxxx.pdb unknown=warn
=== Exercise: Single state structure analysis ===


Other options to read pdb's:
The final structure will be 'final.pdb'. You can visualize it, with chimera:


  read 5c5a.pdb unknown=warn hetatm new
  chimera bundle.pdb


where the option 'hetatm' allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. 'new' will read the sequence from the pdb.
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.
Why?


To write back out pdb's and sequences:
=== Exercise: Two-state structure analysis ===
write pdb XXX.pdb
write seq XXX.seq 


Inspect the pdb using chimera:
The final structure will be 'splitall.pdb'. You can visualize it, with the chimera
Now, there are several issues besides HETATM, that make the comparison to the calculated NMR structure not possible within CYANA before you fix them.
You may use a graphical text editor to fix them. In the end, you need to have a conformer of the complex ready to compare with the calculated NMR structure.


Best would be to practice the use of the 'regularize' command as well. This is however not really necessary in this particular case, since this xray structure contains proton coordinates.
chimera splitall.pdb
Using the regularize command one can get a structure calculated within CYANA that has these features but still is very close to the input structure of your choice.


Copy your 'LIG.lib' file and name it 'NUT.lib', in the 'NUT.lib' file change the residue name from LIG to NUT.
By then loading 'chimera.com' script in the directory, you can individually color the states to cyan and blue.
The 'NUT.lib' file is necessary to read the original xray structure with ligand into CYANA.


Copy the 'demoLong.seq' file and name it 'demoLongEd.seq', in the 'demoLongEd.seq' file delete the linker residues.
<!----
 
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===
Create an 'init.cya' macro with:
cyanalib
read lib LIG.lib append
 
Then create a 'CALC_reg.cya' macro with:
read lib NUT.lib append
read 5c5a.pdb unknown=warn hetatm new
write 5c5a_Ed.seq
write 5c5a_Ed.pdb
#renumber and rename the ligand from 201 333, NUT to LIG
library rename "@NUT" residue=LIG
atoms select @LIG
atoms set residue=333
write 5c5a_renum.seq
write 5c5a_renum.pdb
#sequence with ligand but without linker
read demoLongEd.seq
read 5c5a_renum.pdb rigid unknown=warn
write XrayAChainRenum.pdb
initialize
read seq demoLong.seq
read pdb XrayAChainRenum.pdb unknown=warn
write pdb test.pdb
read pdb test.pdb
regularize steps=20000 link=LL keep
 
Execute the 'CALC_reg.cya' macro in the CYANA shell (or use only one processor, do not distribute the job):
 
cyana CALC_reg.cya
 
=== Exercise 12: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===


Using the INCLAN language of CYANA ([[Writing and using INCLAN macros]],[[Using INCLAN variables]],[[Using INCLAN control statements]]) it is possible to write complex macros that interact with the FORTRAN code of CYANA. Reading internal variables and manipulating them to achieves custom task.
Using the INCLAN language of CYANA ([[Writing and using INCLAN macros]],[[Using INCLAN variables]],[[Using INCLAN control statements]]) it is possible to write complex macros that interact with the FORTRAN code of CYANA. Reading internal variables and manipulating them to achieves custom task.
Line 847: Line 1,045:
  read demoLong.seq
  read demoLong.seq
   
   
  rmsd range=15-111 structure=final.pdb reference=reg_xray.pdb
  rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb
   
   
  atom select "BACKBONE 15-111"
  atom select "BACKBONE 8-33"
  t=rmsdmean
  t=rmsdmean
  j=rindex('333')
  j=rindex('333')
Line 882: Line 1,080:
  end do
  end do
  print "Displacement of the LIG (to ref xray): ${s/n} ($n atoms)"
  print "Displacement of the LIG (to ref xray): ${s/n} ($n atoms)"
--->


== Beyond The Basics: Improving the final structure ==
=== On improving the final structure ===
 
 
=== FLYA options ===
 
There are a variety of commands to modify FLYA runs to accommodate experimental labeling schemes or apply previous assignments etc...
 
'''Modify the chemical shift statistics used for assignment'''
 
Supply user-defined chemical shift statistics instead of standard BMRB statistics from library and
replace the general statistics from 'cyana.lib' (CSTABLE).
 
* average value and stddev from input chemical shift list 'shiftx.prot'
* 'assigncs_sd:=bmrb' to use stddev from BMRB ('cyana.lib') instead of input chemical shift list
* 'assigncs_sdfactor:=0.5' to scale BMRB stddev by given factor
 
shiftassign_statistics:=predicted.prot
 
 
'''Modify the reported statistics'''
 
Groups of atoms for which assignment statistics will be calculated and reported in the 'flya.txt' output file can be defined as:
 
analyzeassign_group := BB: N H CA CB C
 
In this case, the command defines a group called BB (a name that can be chosen freely) comprising the atoms N, H, CA, CB, C.


General questions to answer regarding this task:
*How can you get more eNOEs out of the existing data? Hint: think about normalization.
*Name additional experimental restraints (or inputs) you could use for structure calculation.
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.


The optional parameter 'shiftreference=manREF.prot' specifies reference chemical shift list, used only for comparison in flya.tab, flya.txt, flya.pdf:
== eNORA extensions and options ==


  shiftassign_reference:=manREF.prot
There are a variety of commands to modify eNORA runs.


The same parameter may also be set as part of the flya command:


flya runs=10 assignpeaks=$peaks shiftreference=manREF.prot


=== Averaging of spin-diffusion over multiple conformers ===


'''Modify the expected peak lists'''
After reading the pdb set the 'structure select' command to:


Specific labeling can be handled and peak list-specific atom selections can be applied.
structure select 1-20


To restrict the generation of expected peaks to a subset of atoms, here the backbone atoms:
=== Generating XEASY peak list with expected FRM or two-spin intensities ===
 
Remember to set up a init file:
command select_atoms
  atom select "N H CA CB C"
end
 
 
Input structures may be used to generate expected peaks for through-space experiments:
* specify with parameter 'structure' of the command 'flya'
* if parameter 'structure' is absent, a set of random structures is generated automatically
* if set to blank ('structure='), no random structures are generated (if not needed because only through-bond spectra are used)
 
flya runs=10 assignpeaks=$peaks structure=XXX.pdb
 
Experimental peaks may also be employed as expected peak lists:
* command N15NOESY_expect, reading input peak list N15NOESY_in.peaks
N15NOESY_expect :=N15NOESY_in
 
 
'''Keeping previously determined assignments'''
 
To keep input peak assignments in user peak assignments:
* (partially) assigned input peak list XXX.peaks
* parameter 'keepassigned' for 'loadspectra.cya'
 
loadspectra_keepassigned:=.true.
 
To fix input chemical shift assignments contained in a prot file
 
To do this i.e for backbone atoms extracted from the manREF.prot list:
 
Make a list of only the reference backbone chemical shifts by entering the CYANA commands:
 
read manREF.prot
  atom set "* - H N CA CB C" shift=none
write fix.prot
   
   
The file 'fix.prot' will contain the reference chemical shifts only for the backbone (and CB) atoms H, N, CA, CB, C'. Now you can repeat the assignment calculation by inserting the 'shiftassign_fix:=fix.prot' statement in 'CALC.cya' and choosing only the input peak lists that are relevant for sidechain assignment:
shiftassign_fix:=fix.prot
'''Chemical shift assignment using exclusively NOESY'''
*increased population size with 'shiftassign_population=200'
* see Schmidt et al. J. Biomol. NMR 57, 193-204 (2013)
'''Speeding up FLYA runs'''
Serves the fast automated chemical shift assignment and means the results in general are less accurate since either the populations are smaller, there are less parallel runs or the optimization schedule is modified.
In production runs, better results can be expected (at the expense of longer computation times) if these parameters are not set.
There are three parameters of the assignment algorithm that can be set in order to speed up the calculation.
Fixed number of generations in evolutionary optimization:
shiftassign_population=25
The population size for the genetic algorithm, i.e. how many assignments form one generation (25; chosen smaller than in normal production runs in order to speed up the calculation).
There is also an option to choose the "quick" optimization schedule:
shiftassign_quick=.true.
And last the 'runs' option can be set for flya as we did in the exercise ('flya runs=10').
<!--_
* peak lists for distance restraint generation specified by parameter 'structurepeaks='  (used to pass on from flya to noeasign if done in one go)
--->
=== neoassign options ===
To learn more about noeassign consult the tutorial [[Structure calculation with automated NOESY assignment]]. Other options for neoassign are described here: [[CYANA_Macro:_noeassign]]
=== Exercise 13: Mapping restraints onto a known structure ===
One can map the calculated restraints, such as distance restraints (upl/lol) onto a known structure (in the example here an xray structure). This is another approach to analyze restraints and their influence on the results.
Below you find the commands to accomplish this. You see by studying the commands, which files are needed to execute the macro. Therefore, create a new directory ('mkdir') or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from exercise 11.
Commands preceded by hashtags (#) are commented out, remove the hashtags if you want to use them. If you decide to use the intermo-NOEx-cycle7.peaks file, make sure to comment any commands you no longer need.
You need an init file:
rmsdrange:=15-111,333
  cyanalib
  cyanalib
  read lib LIG.lib append
  read seq demo.seq
# -------------- stereo specific assignment  --------------
  # to supply all atoms as stereo specific, use:
atoms select
atoms stereo
# see the supplied stereo specific assignment
atoms stereo list
# -------------- tauC --------------
[[CYANA Command: atoms set|atoms set]] "*" tauc=4.25


And the main macro (name it 'CALC_xraymap.cya'):
The main CALC.cya file:


  read seq demoLong.seq
  # --------------------------  get the shifts from a XEASY peaks list    ---------------------------
./init
# convert
read 5.peaks
shifts adapt contribution=0.0
shifts renumber
[[CYANA Command: atoms set|atoms set]] "* shift=900.0.." shift=none
write demo.prot
# --------------------------------    basic parameter definitions    --------------------------------
./init
echo:= on
mixingtimes:= 0.02,0.03,0.04,0.05,0.06
b0field    = 700
# ----------------------------------          structure input          -----------------------------------
# specify the conformers for calculations
read pdb demo rigid
structure select 1
# ----------------------------------            peak input            ---------------------------------- 
loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate
# ---------------------------------- run eNORA elements and write peaks ----------------------------------
do n 1 length('mixingtimes')
enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom='NONE'
enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom='NONE'
        # FM
read peaks N15NOESY_exp.peaks
        [[CYANA Command: enoe values|enoe values]] mode=1
write peaks N15NOESY_FM_$n.peaks names
read peaks C13NOESY_exp.peaks
[[CYANA Command: enoe values|enoe values]] mode=1
  write peaks C13NOESY_FM_$n.peaks names
# 2 spin
        read peaks N15NOESY_exp.peaks
[[CYANA Command: enoe values|enoe values]] mode=2
write peaks N15NOESY_2spin_$n.peaks names
read peaks C13NOESY_exp.peaks
[[CYANA Command: enoe values|enoe values]] mode=2
write peaks C13NOESY_2spin_$n.peaks names
end do
read peaks C13NOESY_FM_1.peaks
peaks2dplot dimensions=12
read peaks C13NOESY_FM_1.peaks
read peaks N15NOESY_FM_1.peaks append
shifts initialize
shifts adapt
[[CYANA Command: atoms set|atoms set]] "* shift=990.0.." shift=none
write prot NOESY_1.prot
write peaks NOESY_1.peaks


The following block of commands, takes the assigned intermol.peaks list and calculates distance restraints from the peak intensities:
== Depositing multi-states structures to a PDB data base ==
#peaks:=intermol-NOEs-cycle7.peaks
  #calibration peaks=$peaks
#peaks calibrate simple
#write upl intermol.upl


The following block of commands, reads the 'final.upl' list (in this case of neoassign) and selects the intermolecular NOEs to LIG and writes them to file:
PDB data bases require a specific format to deposit structures for publication. Below you find a CYANA script that will allow you to transform a multi-state structure into a publishable format.
read upl final.upl
The format distinguishes the states by using a chain letter, such as A and B for a two-states structure. Populations are specified in this format as occupancy (corresponding to the Xray structure format).
distance select "*, @LIG" info=full
write intermol.upl


  read intermol.upl unknown=warn
  read seq demo.seq
read pdb demoState1.pdb
read pdb demoState2.pdb append
atoms select 11-16,21-26,31-34
write pdb append.pdb all
read pdb append.pdb rigid
structure select 1-20
[[CYANA Command: atoms set|atoms set]] * chain=A
write_all splitA
structure select 21-40
[[CYANA Command: atoms set|atoms set]] * chain=B
write_all splitB
remove splitAB.pdb
do i 1 nstruct
  j=i+20
  system "cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb >> splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb"
end do
read seq demoAB.seq
read pdb splitAB.pdb
write pdb splitAB.pdb all ter
read pdb splitAB.pdb
deposit pdb=demoAB.pdb
   
   
  #read upl lig.upl append
  read bundle.seq
  #read lol lig.lol
read bundle.lol
read bundle.upl
read bundle.aco
  read bundle.cco
   
   
  read regula.pdb unknown=warn
  [[CYANA Command: atoms set|atoms set]] "* 101-199" chain=B #residue=residue-100
[[CYANA Command: atoms set|atoms set]] "* 1-99" chain=A
[[CYANA Command: atoms set|atoms set]] "* :B101-B199" residue=residue-100
write bundleAB.lol
write bundleAB.upl
write bundleAB.aco
write bundleAB.cco karplus
   
   
  weight_vdw=0
  read seq demoAB.seq
  overview intermol_xray.ovw
  molecules define A6-A39 B6-B39
 
[[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle
*If the restraints do not match with the xray structure, does it mean they are wrong?
rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34
*If you tried the two options, what is (are) the difference(s)?
*Did you look at the LIG.upl/lol files in the demo_data folder, what are they? What type of NMR experiments are there to obtain them?
 
=== Exercise 14: Work on improving the final structure ===
 
Using what you have learned so far, employing some of the options of FLYA and noeassign, consider if it is possible to improve the resolution of the final structure.
 
 
General questions to answer regarding this task:
*Name additional experimental restraints (or inputs) you could use for structure calculation.
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.
 
 
<!---
For a structure calculation starting from given experimental restraints use the commands below:
 
The 'init.cya' macro:
 
rmsdrange:=15-111,333
cyanalib
read lib LIG.lib append
 
The 'CALC.cya' macro:
read seq demoLong.seq
   
   
  read aco talos.aco
  read pdb demoAB.pdb
  read upl final.upl
read bundleAB.lol
read bundleAB.upl
read bundleAB.aco
  read bundleAB.cco
   
   
  #read upl lig.upl append
  overview
#read lol lig.lol
   
   
  randomseed:= 434726
  read seq demoAB.seq
  calc_all structures=100 command=anneal steps=10000 
read pdb demoAB.pdb
  overview calc.ovw structures=20 pdb
molecules define A5-A39 B5-B39
--->
[[CYANA Command: atoms set|atoms set]] "* :A*" occupancy=0.5
  [[CYANA Command: atoms set|atoms set]] "* :B*" occupancy=0.5
  write demoOcc.pdb multistate all details bfactor=0.00

Latest revision as of 16:11, 18 March 2021

In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.

To this end we will first run the modules of eNORA and then use the obtained eNOEs to calculate a single state and a two-states structure model using automated sorting to group the states. Along the way you will see some additional CYANA skills useful for other purposes as well.

The eNORA module offers in principle two methods to calculate spin diffusion, FRM and TSS. FRM is the recommended way to do these calculations and we will set a main focus on that method, we will however in one section explain the principles at play for TSS and how to set it up.

CYANA setup

Obtaining and installing the CYANA demo version and data

Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):

  1. Go to your home directory (or data directory).
  2. Get the demo data from the server.
  3. Unpack the demo data for the practical.
  4. Get the demo version of CYANA.
  5. Unpack CYANA.
  6. Setup the CYANA environment variables.
  7. Change into the newly created directory 'eNORA'.
  8. Copy the demo_data directory to 'enoe'.
  9. Change into the subdirectory 'enoe'.
  10. Test whether CYANA can be started by typing its name, 'cyana'.
  11. Exit from CYANA by typing 'q' or 'quit'.

To unpack the demo data:

tar zxf demo_data.tar.gz 

To unpack CYANA demo version:

tar zxf Cyana-3.98.9_Demo.tgz
cd cyana-3.98.9/
./setup

Change into enoe1pt demo directory:

cd enoe1pt


Try to run CYANA by entering 'cyana' at the command prompt of your terminal (q to quit cyana):

cyana
___________________________________________________________________

CYANA 3.98 (mac-intel)

Copyright (c) 2002-17 Peter Guentert. All rights reserved.
___________________________________________________________________

    Demo license valid for specific sequences until 2018-12-31
cyana> q

If all worked, you are ready to go in terms of running the CYANA routine!

Execution scripts or "macros" in CYANA

For more complex task within CYANA, rather than to enter the execution commands line by line at the CYANA prompt, the necessary commands are collected in a file named '*.cya'. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.

Hint: For comprehensive information on the CYANA commands etc. consult the CYANA 3.0 Reference Manual.

Preparing input data

Structure input for spin-diffusion calculations

Preparing an xray structure to use within CYANA

Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands. Using the regularize command one can get a structure recalculated within CYANA that has these issues fixed but is still very close to the input structure.

In the data directory you find the 'regulabb' directory and the 'CALC_reg.cya' macro and an 'init.cya' macro.

The initialization macro has the fixed name 'init.cya' and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing 'init'. It contains normally at least two commands, one to read the library and one to read the sequence. However, for now there is only one command, the one to read the library.

cyanalib

The command 'cyanalib' reads the standard CYANA library.

After reading the library file, one normally reads a sequence file before reading pdb file or a peak list.

Inspection of the 'CALC_reg.cya':

read 1PIN.pdb unknown=warn hetatm new
write 1PIN.seq 
write 1PIN_2.pdb

Where the option 'hetatm' allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter 'new' directs CYANA to read the sequence from the pdb.

We require two mutations to the sequence (S18N and W34F), furthermore we do not have a ligand and the expressed protein for NMR is truncated. Therefore we use cyana to truncate the Xray structure and build in the mutations. We read the structure again, but this time provide a sequence, containing the two mutations and use the options unknown=warn or unknown=skip to skip the parts of the Xray structure not specified in the sequence file and later reconstruct those during regularization:

read demo.seq
read 1PIN_2.pdb rigid unknown=warn
write 1PIN_ed.pdb

./init
read pdb 1PIN_ed.pdb
regularize steps=20000 link=LL keep

Download the Xray structure used for this exercise:

wget 'https://files.rcsb.org/view/1PIN.pdb' 

or for mac os x:

curl https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb 

Inspect the pdb using chimera: There are several issues with the Xray structure, besides HETATM, that we are handling within CYANA before using the structure.

Execute the 'CALC_reg.cya' macro:

cyana CALC_reg.cya

The resulting structure is 'regula.pdb'.

Calculating a structure from an experimental peak list

In the data directory you find the 'noecalib' directory.

The 'CALC_noecalib.cya' contains the following commands:

peaks:=5.peaks
calibration peaks=$peaks
peaks calibrate simple
write upl noesimple.upl

The following block of commands, reads the restraints 'noesimple.upl', an angle file called 'demo.aco', calculates a structure:

read upl noesimple.upl     
read aco talos.aco			 
calc_all 100 steps=50000		        

overview demo.ovw structures=20 pdb	

The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the 'demo.pdb'.

Estimating spin-diffusion

Before recording NOESY spectra, it makes sense to estimate the ideal mixing time (or for a NOESY series, the mixing times), where the buildup is still in the linear regime and spin diffusion not prohibitively strong. CYANA has features built in that accomplish this task conveniently.

In the directory 'spinDiff' you find the macro 'CALC_spinDiff.cya':

echo:= on
mixingtimes = '0.02,0.03,0.04,0.05,0.06'
b0field     = 700
mode        = 3

# ----------------------------------         structure input        ---------------------------------- 

# specify the conformers for calculations
read pdb demo rigid
structure select 1
  
# ----------------------------------        spin-diffusion          ----------------------------------

enoe spindiff b0field=b0field time=$mixingtimes mode=mode
enoe twospin b0field=b0field time=$mixingtimes mode=mode
enoe spdcorr opt=1 time=$mixingtimes

It does the following:

  • reading the structure and use the first conformer for spin diffusion calculations.
  • 'enoe spindiff' the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied.
  • 'enoe twospin' direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied.
  • 'enoe spdcorr' calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.

Recording NOESY experiments with 13C/15N simultaneous evolution

Bi-directional eNOEs are the most accurate eNOEs with in general no tolerance applied. To obtain these and fulfill the normalization requirements, it is prudent to record combined 13C/14N spectra where the diagonals of 13C bound and 15N bound protons are available in the same spectra.

Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454

The pulse sequence are found here: http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc


Pulseseq.jpg

Preparing experimental peak lists

Peak lists in XEASY format are prepared by automatic peak picking with a visualization program such as CcpNmr Analysis, NMRdraw or NMRview and saved as XXX.peaks, where XXX denotes the name of the xeasy peak list file. Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format.

# Number of dimensions 3
#FORMAT xeasy3D
#INAME 1 H
#INAME 2 HN
#INAME 3 N
#SPECTRUM N15NOESY H HN N
   17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5
   89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6
   89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6

The first line specifies the number of dimensions (3 in this case). The '#SPECTRUM' (no space between characters) lines gives the experiment type (N15NOESY, which refers to the corresponding experiment definition in the CYANA library), followed by an identifier for each dimension of the peak list (H HN N) that specifies which chemical shift is stored in the corresponding dimension of the peak list. The experiment type and identifiers must correspond to an experiment definition in the general CYANA library (see below) in most uses of the definition, here however we cheat slightly because for eNOE calculations we record our NOESY spectra with simultaneous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).

After the '#SPECTRUM' line follows one line for every peak. For example, the first peak in the 'HNCA.peaks' list has

  • Peak number 17086
  • H chemical shift 4.098 ppm
  • ("HN") chemical shift 4.099 ppm (in this case 13C bound)
  • Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)

The other data are relevant entry for the eNOE modules is the peak volume or intensity (6.990943E+08).

SPECTRUM definitions in the CYANA library

When you start CYANA, the program reads the library and displays the full path name of the library file. You can open the standard library file to inspect, for example, the NMR experiment definitions . For instance, the definition for the N15NOESY spectrum (search for 'N15NOESY' in the library file 'cyana.lib') is

SPECTRUM N15NOESY H HN N
 0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*
 0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*
 0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*
 0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*
 0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*

The first line corresponds to the '#SPECTRUM' line in the peak list. It specifies the experiment name and identifies the atoms that are detected in each dimension of the spectrum. The number of identifiers defines the dimensionality of the experiment (3 in case of N15NOESY).

Each of the following lines defines a (formal) magnetization transfer pathway that gives rise to an expected peak. in the case of N15NOESY there are five lines, corresponding to the through space magnetization transfer by dipol-dipol mechanism. The peak definition starts with the probability to observe the peak (0.900), followed by a series of atom types, e.g. H_AMI for amide proton etc. The atoms whose chemical shifts appear in the spectrum are identified by their labels followed by ':', e.g. for N15NOESY 'H:', 'HN:', and 'N:'. If you were to use the CYANA functions to simulate peaks, expected peaks are generated for each molecular fragment in which these atom types occur.

You may have realized that our peak list contains peaks that are 13C bound, therefore the spectrum definition is wrong, since we are only reading the peak lists and not generating any, this is not a problem.

From nmrDraw to XEASY

In the 'nmrDrawX' directory you find the 'nmrDrawX.cya' macro:

# read nmrDraw tab file
read tab demo.tab

# sort the peaks
peaks sort

# write out peak lists
do i 1 npkl
  peaks select "** list=${i}"
  write peaks $i.peaks names
end do

It does the following:

  • Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * read tab).
  • Sorting of the peaks in each peaks list per mixing time.
  • Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.

Using Talos to generate torsion angle restraints

Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only "strong assignments" to generate these restraints.

If you do not have TALOS installed get it from here. It is part of the nmrpipe software package.

In the 'acoPREP' directory, inspect the 'CALC_talos.cya' file with the commands to calculate the talos angle restraints:

read 5.peaks
shifts initialize
shifts adapt
atoms set "* shift=990.0.." shift=none
write demo.prot

read prot demo.prot unknown=skip

talos talos=talos+                
talosaco pred.tab

write aco talos.aco

This will call the program TALOS+ and store the resulting torsion angle restraints in the file 'talos.aco'.

Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the 'CALC_talos.cya' macro from the prompt.


Hint: change to a cshell before running cyana (since talos needs a cshell to run):

csh

eNOE calculations

All eNOE related calculations within cyana are carried out using the eNORA modules.

For best results, NOESY experiments are measured at different mixing times (keeping the mixing times as much as possible within the linear regime of NOE buildup). However one can obtain very good results from a single mixing time. The advantage of a buildup series lies manly in the ability to see NOEs that do not behave as expected, in order to exclude them from use in structure calculation.

eNORA (single mixing time)

In the 'enoe1pt' directory you find the relevant 'init.cya' and 'CALC_enoe1pt.cya' macro's.

The init macro

The initialization macro file has the fixed name 'init.cya' and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing 'init'. It contains normally at least two commands that read the CYANA library and the protein sequence:

rmsdrange:=8-33
cyanalib
read seq demo.seq

The first line sets the appropriate rmsdrange, and the command 'cyanalib' reads the standard CYANA library. The next command reads the protein sequence.

The protein sequence is stored in three-letter code in the file 'demo.seq'.

Stereo-specificity of dia-stereocenters
atoms stereo "HA? 10"
atoms stereo "HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38"
atoms stereo "HG? 8 12 14 17 36 37"
atoms stereo "HD2? 18 26 30"
atoms stereo "QG? 22"
atoms stereo "QD? 7"
atoms stereo "HE2? 33"
atoms stereo "HD? 8 14 21 37"
atoms stereo "HG1? 28"

However, one may do the following to supply all atoms as stereo specific:

atoms select
atoms stereo

or to supply all atoms as non stereo specific, use:

atoms select
atoms stereo delete

To get a feedback of the supplied stereo specific assignment add to your 'init.cya' the command:

atoms stereo list
D20 exchange

With 3% D2O in the nmr buffer for exchange of backbone amide atoms:

atoms set "H" protlev=0.97
TauC setting

Individual correlation times may be set per atom, the overall tumbling time is set as:

atoms set "*" tauc=4.25

The eNORA CALC macro

Below you find the 'CALC.cya' script. You will find comments for the commands options, where we found it appropriate.

The 'CALC_enoe1pt.cya':

# ----------------------------------          eNORA routine         ---------------------------------- 
# ----------------------------------   basic parameter definitions  ---------------------------------- 

echo:= on
mixingtimes = 0.06
b0field     = 700
maxdistance = 6.5
normed      = 0
normspin    = 2
mode        = 3

  • The parameter definitions, their function is explained later with respect to the functions that use them.
# ----------------------------------         structure input        ---------------------------------- 
 
# specify the conformers for calculations
read pdb demo rigid
structure select 1

  • The structure input and which conformers to use for spin-diffusion calculations. If multiple conformers are used to average the spin-diffusion values, the command 'structure select' may be used to select multiple conformers of the pdb.
# ----------------------------------        peak file reading       ----------------------------------

# read in the peak lists
read peaks 5.peaks
  
# ----------------------------------   initializing the routine     ----------------------------------
# initialize the routine, fit experimental decays and buildups
enoe init normalize=normspin normed=normed time=$mixingtimes

  • 'enoe init' orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones.
# fit experimental decays
enoe diag opt=1

# fit experimental buildups
enoe cross
enoe sig opt=1
 
# ----------------------------------        spin-diffusion          ----------------------------------

# calculate the spin-diffusion correction
enoe spindiff b0field=b0field time=$mixingtimes mode=$mode
enoe twospin  b0field=b0field time=$mixingtimes mode=$mode
enoe spdcorr  opt=0 time=$mixingtimes

  • 'enoe spindiff' calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).
# ----------------------------------     apply spin-diffusion       ---------------------------------- 

# apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma
enoe sig opt=2

# calculate reff
enoe reff b0field=b0field

# prepare the cyana restraints (scaling, error margins)
enoe restraint errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 

  • 'enoe restraint' applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).
# ----------------------------------        write restraints        ----------------------------------

# delete fixed distances from upl/lol output
distance delete fixed

# write the distance restraints to file
write upl enoe.upl
write lol enoe.lol

  • finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant ('distance delete fixed').
# ----------------------------------            overview            ----------------------------------

enoe overview


Run the eNOE calculation such as:

cyana CALC_enoe1pt.cya

eNORA output files

The eNORA algorithm will produce the following output files:

  • enoe.upl and enoe.lol: Upper limit and lower limit restraint files with tolerances applied.
  • enoe.ovw: Collated results file.

The enoe.upl/lol distance restrains

Suggested (default) correction factors for lower and upper distance bounds:

Condition                                      Factor for lower bound               Factor for upper bound 
Methyl group                                   3–1/6 x 0.915 = 0.762                 3–1/6 x 1.085 = 0.903
Degenerate isopropyl group (Val, Leu)          6–1/6 x 0.915 x 0.95 = 0.645          6–1/6 x 1.085 x 1.05 = 0.713
Degenerate methylene group                     2–1/6 x 0.95 = 0.846                  2–1/6 x 1.05 = 0.935
2-fold degenerate aromatic protons             2–1/6 = 0.891                         2–1/6 = 0.891
4-fold degenerate aromatic protons             4–1/6 = 0.794                         4–1/6 = 0.794
bi-directional NOE                             1                                    1
uni-directional NOE                            0.8 (default)                        1.2 (default)

Aromatic to non-aromatic NOE 
normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)

no stereospecific assignment                   (default calculated)                 (default calculated)

The enoe.ovw file

Collated file that may be generated at any time during the routine and will be populated with the values available at the momentary progress of calculations.

  • ASSIGNMENT(i->j): Assignment arranged with the flow of magnetization.
  • REFFixEXP: The experimental sigma of spin x, where x=i,j
  • REFFxCORR: The reff of spin x, where x=i,j
  • SIGxEXP: The experimental sigma of spin x, where x=i,j
  • SIGxCORR: The spin-diffusion corrected experimental sigma of spin x, where x=i,j
  • SDCx: The spin-diffusion correction of spin x, where x=i,j. This value is obtained from the ratio of the spin-diffusion corrected sigma over raw experimental sigma. The spin-diffusion corrected sigma, for which the spin diffusion corrections are applied to the intensity at each mixing time and then fitted, is calculated with the 'enoe reff' command.
  • SDPx: The number of other partner spins involved in spin-diffusion for spin x, where x=i,j
  • IZEROx: The back calculated I(0) value of spin x, where x=i,j
  • exp_chiNx: The goodness of fit of the experimental data, where x=i,j
  • corr_chiN x: The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j

eNORA (using buildup data)

All eNOE related calculations within cyana are carried out using the eNORA modules.

NOESY experiment measured at different mixing times (keeping the mixing times as much as possible within the linear regime of NOE buildup) supply very precise distance restraints used for a structure calculation.

You will find the relevant macro's in the directory 'enoebup'.

The init macro

The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:

# -------------- avg rho --------------
atoms set "*" rho=5.3

The eNORA CALC macro

The 'CALC_enoe.cya' starts with the following:

# ----------------------------------          eNORA routine         ---------------------------------- 
# ----------------------------------   basic parameter definitions  ---------------------------------- 

echo:= on
mixingtimes = '0.02,0.03,0.04,0.05,0.06'
b0field     = 700
rhofile     = 'rhoInApo.rho'
normed      = 0
normspin    = 2
mode        = 3
bname 	    ='bupplots'
dname       ='decplots'
izname      ='izPlot'

# ----------------------------------         structure input        ---------------------------------- 

# specify the conformers for calculations
read pdb demo rigid
structure select 1

# ----------------------------------        peak file reading       ----------------------------------

# read in the peak lists
do i 1 5
  read peaks $i.peaks $if(i.eq.1,' ','append')
end do
  • reading the XEASY peak lists in the order of increasing mixing time.
# ----------------------------------   initializing the routine     ----------------------------------
# initialize the routine, fit experimental decays and buildups
enoe init normalize=normspin normed=normed time=$mixingtimes

# print average experimental auto-relaxation and I(0) values to screen
enoe diag opt=2 plot=$izname
graf $izname.pdf

# supply averaged rho or izero values
if (existfile('$rhofile')) then
  read rho $rhofile
end if
  • Autorelaxation values and/or Izero values are calculated depending on the option set by the user ('enoe diag') and saved in memory or can be overwritten by reading a file ('read rho').
# plot the diagonal decay's  
enoe plotdec plot=$dname
graf $dname.pdf 

Additional commands only usefull with buildup data:

  • 'enoe plotdec plot=$dname' and 'graf $dname.pdf' generate a pdf file for the diagonal decays of the experimental data. This is visually inspected to remove diagonal decays that may behave not as expected (experimental artifacts etc.)


# write the auto-relaxation values to file
write rhoOut.rho

#
enoe cross
peaks select "NONORM list=1"
write peaks 1_NONORM.peaks names
 
# fit experimental buildups
enoe sig opt=1

# ----------------------------------        spin-diffusion          ----------------------------------

enoe spindiff b0field=b0field time=$mixingtimes mode=$mode
enoe twospin b0field=b0field time=$mixingtimes mode=$mode
enoe spdcorr opt=0 time=$mixingtimes

# apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma
enoe sig opt=2

# calculate reff
enoe reff b0field=b0field

# prepare the cyana restraints (scaling, error margins)
enoe restraint errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0
 
# ----------------------------------        write restraints        ----------------------------------

# delete fixed distances from upl/lol output
distance delete fixed

# write the distance restraints to file
write upl enoe.upl
write lol enoe.lol

# ---------------------------------         plotting buildups         --------------------------------

enoe plotbup plot=$bname opt=2
graf $bname.pdf

Additional commands only usefull with buildup data:

  • 'enoe plotbup plot=$bname opt=2' and 'graf $bname.pdf' print the buildups to file for inspection.
# ----------------------------------            overview            ----------------------------------

enoe overview 

Start CYANA and execute the 'CALC_enoe.cya' macro from the CYANA prompt as such:

cyana CALC_enoe.cya

The program will run and then stop as soon as it finished plotting the diagonal decay's and has written the 'rhoOut.rho' file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.

Exercise: Compiling the autorelaxation file

Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality. Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.

If your are compiling the rhoIn.rho file manually see * auto-relaxation and I(0) values.

eNORA (using generic normalized eNOEs)

For larger proteins with lots of overlap on the diagonal, it may be necessary to resort to a more pragmatic way to undertake normalization. If on separates the diagonal into spin types in accordance to their relaxation properties, it is possible to calculate an upper limit intensity for the diagonal per spin type. Excluding out-layers, the upper distance limit will be longer in comparison to the true distance. The resulting distance therefore helps to define the structure but will not lead to erroneous results.

In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.

normalized  = 0

Change the normalized variable used in the enoe init command from 1 to 0. Doing this will ensure that cross peaks without a corresponding diagonal peaks remain in the pool for calculations.

#fit experimental decays
enoe diag opt=3 plot=izplot
graf izplot.pdf

Change the opt variable used in the enoe diag command from 2 to 3. This will then calculate the statistics of diagonal intensities per spin type and assign an artificial value to missing spins.

distance select UNIDIR 
distance select "-GENNORM"
distance sort
write upl enoe_UNIDIR.upl
write lol enoe_UNIDIR.lol

distance select BIDIR 
distance select "-GENNORM"
distance sort
write upl enoe_BIDIR.upl  
write lol enoe_BIDIR.lol 
 
distance select GENNORM
distance sort
write upl enoe_GENNORM.upl

Using the distance select command allows to user to separate distances resulting from eNOEs into UNIDIR (uni directional) and BIDIR (bi directional) and separating generic normalized eNOEs (GENNORM) from the other distances. For UNIDIR and BIDIR distances one writes the upper and lower limits, for GENNORM only the upper distances are kept, since the nature of using upper limits for Izero values results in distance that are too long in comparison to the true distances.

The TSS approach to spin-diffusion calculations

The TSS approach to spin-diffusion calculations is especially useful for calculations involving deuterated samples or samples with special labeling (i.e. methyl labeling, see below):

The TSS mode is accessed by setting the parameter mode=2 for the 'enoe spindiff' command (see * enoe spindiff).

Labeling Schemes

Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e.

atoms set "H" protlev=0.97
# labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%
atoms set "QG1 @VAL + QD1 @LEU + QD1 @ILE" protlev=0.0

Considerations regarding the obtained eNOE restraints

Mapping calculated eNOE restraints onto a known structure

One can map the calculated restraints, such as distance restraints (upl/lol) onto a known structure (in the example here the modified xray structure). This is an approach to analyze restraints and their influence on the results.

Below you find the commands to accomplish this. You see by studying the commands, which files are needed to execute the macro. Therefore, create a new directory ('mkdir') or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.

You need an init file:

rmsdrange:=8-33
cyanalib
read seq demo.seq


And the main macro (name it 'CALC_xraymap.cya'):

read upl enoe.upl
read lol enoe.lol

read regula.pdb unknown=warn

weight_vdw=0
overview enoe_xray.ovw
  • If the restraints do not match with the xray structure, does it mean they are wrong?
  • If you tried the two options, what is (are) the difference(s)?

Multi-state structure calculation with ensemble-averaged restraints

To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:

  • The CYANA target function is a measure for the quality of the computed structural ensembles given in terms of the squared violation of the experimental restraints.
  • A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.
  • A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.
  • A state is one set of coordinates for all atoms of a molecule. If there are multiple states they fulfill the experimental data on average and not individually.
  • Sub-bundles are formed by sorting the states according to structural similarity in the region of interest. There are as many sub-bundles as there are states in a conformer, and each sub-bundle comprises as many conformers as the original structure bundle. This requires for each state to belong to exactly one sub-bundle. The sub-bundle for each structural state is a measure of the precision of the individual structural states similar to the conventional bundle representation. 


Calculating a single state structure

We will perform calculations based on eNOEs by using torsion angle dynamics in order to compute the three-dimensional structure of the protein.

The 'enoe.upl' and 'enoe.lol' files will be used together with the aco based on chemical shifts of the backbone and scalar couplings from backbone, Ha-HB and aromatic residues determined by experiment.


The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input. This would look something like this (we will do it differently):

syntax inputseed=@i=3771

# ------ Structure calculation ------
read upl XXX.upl
read lol XXX.lol
read aco XXX.aco
read cco XXX.cco

anneal_weight_aco := 1.0, 1.0, 0.0, 0.0
anneal_weight_cco := 0.0, 0.5

seed=inputseed
calc_all 100 steps=50000

if (master) then
  cut_cco=1.0
  cut_rdc=3.0
  weight_aco = 0.0

  rmsdrange:=8-33
  overview sstate structures=20 pdb
end if

However, since we end up calculating also multi-state structures later on, it makes sense to setup the single-state calculation exactly the same way as the multi-state calculations, and only edit as few parameters as possible. As soon as you understand the 'PREP.cya' macro below, you will realize why this makes sense.

Single state calculation

In the 'sstate' you will find the 'init.cya', 'PREP.cya' and the 'CALC_sstate.cya' macro's.

The init macro

In addition to what was described above, the 'init.cya' macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:

cyanalib
if (existfile('bundle.seq')) then
  read seq bundle.seq
  molecules define *
  atoms set * vdwgroup=bundle
else
  read seq demo.seq
end if
rmsdrange:=8-33

swap=0
expand=1
  • the distances derived from NOEs involving magnetically or chemically equivalent spins are interpreted as effective distances corresponding to the sum of all cross-relaxation rates between the individual spin pairs (expand=1).
atoms stereo "HA? 10"
atoms stereo "HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38"
atoms stereo "HG? 8 12 14 17 36 37"
atoms stereo "HD2? 18 26 30"
atoms stereo "QG? 22"
atoms stereo "QD? 7"
atoms stereo "HE2? 33"
atoms stereo "HD? 8 14 21 37"
atoms stereo "HG1? 28"

atoms set "H" protlev=0.97

The PREP macro

The 'PREP.cya' macro prepares the calculated eNOEs for use in multi-state structure calculation. For a single state structure calculation this would really not be necessary, we only run the script to keep the calculations consistent and not accidentally introduce changes other than the multi-state changes. We nevertheless explain the detailed workings of the script here.

syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor
  • 'nbundle=@1' sets the number of states to 1, for a two state structure calculation this need be set to two.
#multitensor=.true.
together=.true.
moloffset=100
  • 'moloffset' sets the offset in residue numbering between the sets of coordinates that compose one conformer.
# ------ Sequence file ------

read seq demo.seq
print "\# Bundle of $nbundle conformers" >bundle.seq
do j 1 nbundle
  do i 1 nr
    if (j.lt.nbundle .and. rnam(i).eq.'PL') break
    print "$rnam(i) ${$rnum(i)+moloffset*(j-1)}" >>
  end do
  if (j.lt.nbundle) print "PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP" >>
end do
print >>.
  • The offset is incorporated in the sequence by a linker between the sets of coordinates that compose one conformer. For a two-state conformer there is one linker, for a three-state conformer there are two linkers. This is necessary because we operate in angular space.
# ------ Make bundle angle restraints ------

read aco demo.aco
write aco bundle.aco
do j 2 nbundle
  atom set * residue=residue+moloffset
  write aco bundle.aco append
end do
  • this prepares the talos angels with the offset in residue numbering.
# ------ Make bundle coupling constant restraints ------

read demo.seq
read cco demo_backbone.cco
read cco demo_aro.cco append
read cco demo_JHaHb.cco append
 
print "\# Coupling constant restraint file" >bundle.cco
do i 1 ncco
  i1=iccoa(1,i); i2=iccoa(2,i)
  do j 1 nbundle
    m=moloffset*(j-1)
    print "${$rnum(iar(i1))+m} $rnam(iar(i1)) $anam(i1) ${$rnum(iar(i2))+m} $rnam(iar(i2)) $anam(i2) $cco(i) $tolcco(i) 1.0 $karplus(1,i) $karplus(2,i) $karplus(3,i) $if(j.ne.nbundle,'&',' ')" 
>>bundle.cco
  end do
end do 
print >>.
read seq bundle.seq
read cco bundle.cco 
write cco bundle.cco karplus

  • this prepares the experimental scalar coupling restraints with the offset in residue numbering.


# ------ Make bundle RDC restraints ------

#read bundle.seq
#read rdc demo.rdc
#print "\# RDC restraint file" >bundle.rdc
#do i 1 orientations
#  if (multitensor) then
#    do j 1 nbundle
#      print "${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}" >>
#    end do
#  else
#    print "$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))" >>
#  end if
#end do
#do i 1 nrdc
#  i1=irdca(1,i); i2=irdca(2,i)
#  do j 1 nbundle
#    m=moloffset*(j-1)
#    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)
#    print "${$rnum(iar(i1))+m} $rnam(iar(i1)) $anam(i1) ${$rnum(iar(i2))+m} $rnam(iar(i2)) $anam(i2) $rdc(i) $tolrdc(i) $weirdc(i) $iten $rdcsca(i) $if(j.lt.nbundle,'&',' ')" >>bundle.rdc
#  end do
#end do
#print >>.
#read seq bundle.seq
#read rdc bundle.rdc
#write rdc bundle.rdc
  • if experimental RDC's are available include this section of the code.
# ------ Make ambiguous bundle distance restraints ------

subroutine PURGE	
	#distance delete "HA 9, HB2 9"
end

  • if there are distance restraints you decide to delete the assignment can be included in the PURGE command, to remove them below from the generated upl and lol bundle restraints.
init

read upl enoe.upl

PURGE
distance modify info=full
molecules symmetrize
if (nbundle.gt.1) distances set "$moloffset.., $moloffset.." bound=0.0
distances set "*, *" bound=bound*(1.0*nbundle)**(-1.0/6.0)
write upl bundle.upl
  • this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.
init

read lol enoe.lol

PURGE
distance modify info=full
molecules symmetrize
if (nbundle.gt.1) distances set "$moloffset.., $moloffset.." bound=0.0001
distances set "*, *" bound=bound*(1.0*nbundle)**(-1.0/6.0)
write lol bundle.lol
  • this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.
# ------ Make restraints to keep corresponding atoms together ------

if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then
  read seq bundle.seq
  molecules define *
  atom set * vdwgroup=bundle
  atom select "N C*"
  do i 1 na
    if (iamol(i).ne.1) break
    if (asel(i)) then
      distance make "$atom(i)" "$anam(i) ${$rnum(iar(i))+moloffset}" upl=1.2 weight=$togetherweight info=none
    end if
  end do
  distances set "* - N CA C CB, * - N CA C CB" weight=weight*0.1
  molecules symmetrize
  • this prepares artificial distance restraints to keep the keep the multi-state coordinates close together for the averaging condition. Otherwise molecules very far away would also fulfill the condition, since they have no contribution to the eNOE, they also do not violate it (not a desired outcome).
  • 'molecules symmetrize' disables van der Waals forces between the copies of the same molecule within the same calculation
  distances unique
  write upl together.upl
end if

The single-state CALC macro

The 'CALC_sstate.cya' file for structure calculation is outlined below:

syntax inputseed=@i=3771

if (master) then
  PREP
end if

# ------ Structure calculation ------
read upl bundle.upl
read lol bundle.lol
read aco bundle.aco
read cco bundle.cco
#read rdc bundle.rdc
if (existfile('together.upl')) read upl together.upl append

anneal_weight_rdc := 0.0, 0.5
anneal_weight_aco := 1.0, 1.0, 0.0, 0.0
anneal_weight_cco := 0.0, 0.5

seed=inputseed
calc_all 100 steps=50000
  • these commands call to start the structure calculation with 100 conformers and to analyze the best 20 of them to keep. 50000 torsion angle dynamics steps are applied per conformer.
if (master) then
  cut_cco=1.0
  cut_rdc=3.0
  weight_aco = 0.0

  rmsdrange:=8-33,108-133
  overview bundle structures=20 pdb

  #read pdb bundle.pdb
  #rmsdrange:=23-26, 31-34,123-126, 131-134
  #overview bundleSec structures=20 pdb # reference=xxx.pdb

  #molecules sort "BACKBONE 23-26, 31-34" base=1
  #write sortStates.pdb all
  #SPLIT
end if


The structure calculation is executed by running the 'CALC_sState.cya' macro:

cyana -n 33 CALC_sState.cya

Doing this, basically means each processor will calculate 100/33=3 conformers. If you changed the setup to calculate 50 structures, you would start the calculation with 'cyana -n 25 CALC_sState.cya'.

Carefully analyze the WARNING and ERROR messages if any.


Statistics on the the structure calculation will be displayed to screen. The final structure is named 'bundle.pdb'.

Calculating Multi-state structures

The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.

Grouping the coordinates of multi-state calculations

In the 'CALC_multistate.cya' script, there are the following additional commands:

read pdb bundle.pdb
rmsdrange:=23-26,31-34,123-126,131-134
overview bundleSec structures=20 pdb # reference=xxx.pdb

molecules sort "BACKBONE 23-26,31-34" base=1
write sortStates.pdb all

It is very important here that the 'rmsdrange' is set the same as for the 'molecules sort' command. Otherwise the 'pdb write' command inside the 'SPLIT' macro, has the potential to create confusing results.

The SPLIT macro

We introduced a molecular offset to create a multi-state coordinate set for each conformer, now we want to set this offset back and delete the linker between the states.

moloffset=100

read pdb sortStates.pdb
n=nstruct
write_all split

nbundle=$rnum(nr)/moloffset+1
show nbundle

do i 1 nstruct
  read seq bundle.seq
  read pdb split$i(I3.3).pdb
  do j 1 nbundle
    atoms select 1-80
    write pdb split$i(I3.3)-$j.pdb selected
    atoms set * residue=residue-moloffset
  end do
  read seq demo.seq
  read_all split$i(I3.3)-*.pdb unknown=skip
  write split$i(I3.3).pdb all
  do j 1 nbundle
    remove split$i(I3.3)-$j.pdb
  end do
end do

read seq demo.seq
do i 1 n
  read pdb split$i(I3.3).pdb append
end do
write pdb splitall.pdb all
rmsd
  • The final output is the 'splitall.pdb' file.

Exercise: Setting up a two-state calculation

Copy the 'sstate' directory and give it the name 'twostate', then delete all the previous, unnecessary output files to reduce clutter and have better oversight. Copy the 'CALC_sstate.cya' and rename it 'CALC_multistate.cya'.

cp -r sstate twostate
cd twostate 
mv CALC_sstate.cya CALC_multistate.cya
rm  *.out *.job final* rama*

With a text editor, edit the 'CALC_multistate.cya' macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.

With a text editor, change the number of states (nbundle=@i=) from one to two in the 'PREP.cya' macro:

syntax nbundle=@i=2 togetherweight=@r=0.1 multitensor

When you are done preparing the macros as outlined perform the calculation by running the 'CALC_multistate.cya' macro:

cyana CALC_multistate.cya

Carefully analyze the WARNING and ERROR messages if any.

Results: analysis

Download and install the molecular viewer Chimera

  1. Download Chimera (to your personal laptop) from: Chimera

Exercise: Single state structure analysis

The final structure will be 'final.pdb'. You can visualize it, with chimera:

chimera bundle.pdb

Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle. Why?

Exercise: Two-state structure analysis

The final structure will be 'splitall.pdb'. You can visualize it, with the chimera

chimera splitall.pdb

By then loading 'chimera.com' script in the directory, you can individually color the states to cyan and blue.


On improving the final structure

General questions to answer regarding this task:

  • How can you get more eNOEs out of the existing data? Hint: think about normalization.
  • Name additional experimental restraints (or inputs) you could use for structure calculation.
  • Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.

eNORA extensions and options

There are a variety of commands to modify eNORA runs.


Averaging of spin-diffusion over multiple conformers

After reading the pdb set the 'structure select' command to:

structure select 1-20

Generating XEASY peak list with expected FRM or two-spin intensities

Remember to set up a init file:

cyanalib
read seq demo.seq

# -------------- stereo specific assignment  --------------

 # to supply all atoms as stereo specific, use: 
atoms select
atoms stereo

# see the supplied stereo specific assignment
atoms stereo list

# -------------- tauC --------------

atoms set "*" tauc=4.25

The main CALC.cya file:

# --------------------------   get the shifts from a XEASY peaks list    ---------------------------

./init

# convert
read 5.peaks
shifts adapt contribution=0.0
shifts renumber
atoms set "* shift=900.0.." shift=none
write demo.prot

# --------------------------------    basic parameter definitions    --------------------------------
./init
echo:= on
mixingtimes:= 0.02,0.03,0.04,0.05,0.06
b0field     = 700

# ----------------------------------          structure input           ----------------------------------- 

# specify the conformers for calculations
read pdb demo rigid
structure select 1

# ----------------------------------             peak input             ----------------------------------  

loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate

# ---------------------------------- run eNORA elements and write peaks ----------------------------------

do n 1 length('mixingtimes')
	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom='NONE'
	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom='NONE'
        # FM
	read peaks N15NOESY_exp.peaks
        enoe values mode=1
	write peaks N15NOESY_FM_$n.peaks names
	read peaks C13NOESY_exp.peaks
	enoe values mode=1
 	write peaks C13NOESY_FM_$n.peaks names
	# 2 spin
        read peaks N15NOESY_exp.peaks
	enoe values mode=2
	write peaks N15NOESY_2spin_$n.peaks names
	read peaks C13NOESY_exp.peaks
	enoe values mode=2
	write peaks C13NOESY_2spin_$n.peaks names
end do


read peaks C13NOESY_FM_1.peaks
peaks2dplot dimensions=12

read peaks C13NOESY_FM_1.peaks
read peaks N15NOESY_FM_1.peaks append

shifts initialize
shifts adapt
atoms set "* shift=990.0.." shift=none
write prot NOESY_1.prot
write peaks NOESY_1.peaks

Depositing multi-states structures to a PDB data base

PDB data bases require a specific format to deposit structures for publication. Below you find a CYANA script that will allow you to transform a multi-state structure into a publishable format. The format distinguishes the states by using a chain letter, such as A and B for a two-states structure. Populations are specified in this format as occupancy (corresponding to the Xray structure format).

read seq demo.seq
read pdb demoState1.pdb 
read pdb demoState2.pdb append 
atoms select 11-16,21-26,31-34
write pdb append.pdb all

read pdb append.pdb rigid
structure select 1-20
atoms set * chain=A
write_all splitA

structure select 21-40
atoms set * chain=B
write_all splitB

remove splitAB.pdb
do i 1 nstruct
  j=i+20
  system "cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb >> splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb"
end do

read seq demoAB.seq
read pdb splitAB.pdb
write pdb splitAB.pdb all ter
read pdb splitAB.pdb
deposit pdb=demoAB.pdb

read bundle.seq
read bundle.lol
read bundle.upl
read bundle.aco
read bundle.cco

atoms set "* 101-199" chain=B #residue=residue-100
atoms set "* 1-99" chain=A
atoms set "* :B101-B199" residue=residue-100
write bundleAB.lol
write bundleAB.upl
write bundleAB.aco
write bundleAB.cco karplus

read seq demoAB.seq
molecules define A6-A39 B6-B39
atoms set * vdwgroup=bundle
rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34

read pdb demoAB.pdb
read bundleAB.lol
read bundleAB.upl
read bundleAB.aco
read bundleAB.cco

overview

read seq demoAB.seq
read pdb demoAB.pdb
molecules define A5-A39 B5-B39
atoms set "* :A*" occupancy=0.5
atoms set "* :B*" occupancy=0.5
write demoOcc.pdb multistate all details bfactor=0.00