<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://cyana.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dean</id>
	<title>CYANA Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://cyana.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dean"/>
	<link rel="alternate" type="text/html" href="https://cyana.org/wiki/Special:Contributions/Dean"/>
	<updated>2026-04-19T18:02:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9806</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9806"/>
		<updated>2021-03-18T14:11:22Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Exercise: Setting up a two-state calculation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE modules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=2 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_multistate.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
         # FM&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
         read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9805</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9805"/>
		<updated>2021-03-18T14:10:48Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Exercise: Setting up a two-state calculation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE modules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=2 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
         # FM&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
         read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9804</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9804"/>
		<updated>2021-03-18T14:09:27Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Calculating a single state structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE modules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
         # FM&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
         read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9803</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9803"/>
		<updated>2021-03-18T13:12:28Z</updated>

		<summary type="html">&lt;p&gt;Dean: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE modules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
         # FM&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
         read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9796</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9796"/>
		<updated>2020-08-06T10:06:57Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* The eNORA CALC macro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
         # FM&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
         read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9795</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9795"/>
		<updated>2020-08-06T10:06:03Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* The eNORA CALC macro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sig]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
         # FM&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
         read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9789</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9789"/>
		<updated>2020-02-19T15:50:39Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
         # FM&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
         read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9788</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9788"/>
		<updated>2020-02-19T15:48:39Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         # FM&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_enoe_values&amp;diff=9787</id>
		<title>CYANA Command: enoe values</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_enoe_values&amp;diff=9787"/>
		<updated>2020-02-19T13:28:44Z</updated>

		<summary type="html">&lt;p&gt;Dean: Created page with &amp;quot;back to complete commands list  == Parameters ==  ; mode =&amp;#039;&amp;#039;integer&amp;#039;&amp;#039;: (default: &amp;#039;&amp;#039;1&amp;#039;&amp;#039;)  == Description ==  This command allows the user to select from FM b...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CYANA Commands|back to complete commands list]]&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; mode =&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This command allows the user to select from FM buildup (mode=1) or two spin (mode=2), corrected experimental buildups (mode=3), corrected experimental sigma&#039;s (mode=4) or experimental sigma&#039;s (mode=5) and is used in combination with the write peaks command. As input the module requires that the user ran the [[CYANA Command: enoe spindiff|enoe spindiff]] and [[CYANA Command: enoe twospin|enoe twospin]] modules.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9786</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9786"/>
		<updated>2020-02-19T13:28:28Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         # FM&lt;br /&gt;
         [[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9785</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9785"/>
		<updated>2020-02-19T13:27:59Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         # FM&lt;br /&gt;
         [[CYANA Command: atoms values|atoms values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe values|enoe values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9784</id>
		<title>CYANA Command: atoms values</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9784"/>
		<updated>2020-02-19T13:26:52Z</updated>

		<summary type="html">&lt;p&gt;Dean: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9783</id>
		<title>CYANA Command: atoms values</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9783"/>
		<updated>2020-02-19T13:24:18Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CYANA Commands|back to complete commands list]]&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; mode =&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This command allows the user to select from FM buildup (mode=1) or two spin (mode=2), corrected experimental buildups (mode=3), corrected experimental sigma&#039;s (mode=4) or experimental sigma&#039;s (mode=5) and is used in combination with the write peaks command. As input the module requires that the user ran the [[CYANA Command: enoe spindiff|enoe spindiff]] and [[CYANA Command: enoe twospin|enoe twospin]] modules.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9782</id>
		<title>CYANA Command: atoms values</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9782"/>
		<updated>2020-02-19T13:24:01Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CYANA Commands|back to complete commands list]]&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; mode =&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This command allows the user to select from FM buildup (mode=1) or two spin (mode=2), corrected experimental buildups (mode=3), corrected experimental sigma&#039;s (mode=4) or experimental sigma&#039;s (mode=5) and is used in combination with the write peaks command. As input the module requires that the user ran the  * [[CYANA Command: enoe spindiff|enoe spindiff]] and * [[CYANA Command: enoe twospin|enoe twospin]] modules.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9781</id>
		<title>CYANA Command: atoms values</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9781"/>
		<updated>2020-02-19T13:22:25Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CYANA Commands|back to complete commands list]]&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; mode =&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This command allows the user to select from FM buildup (mode=1) or two spin (mode=2), corrected experimental buildups (mode=3), corrected experimental sigma&#039;s (mode=4) or experimental sigma&#039;s (mode=5) and is used in combination with the write peaks command. As input the module requires that the user ran the enoe spindiff and enoe twospin modules.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9780</id>
		<title>CYANA Command: atoms values</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_values&amp;diff=9780"/>
		<updated>2020-02-19T13:20:40Z</updated>

		<summary type="html">&lt;p&gt;Dean: Created page with &amp;quot;back to complete commands list  == Parameters ==  ; mode =&amp;#039;&amp;#039;integer&amp;#039;&amp;#039;: (default: &amp;#039;&amp;#039;1&amp;#039;&amp;#039;)  == Description ==  This command allows the user to select from FM b...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CYANA Commands|back to complete commands list]]&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; mode =&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This command allows the user to select from FM buildup (mode=1) or two spin (mode=2) or corrected experimental buildups (mode=3) and is used in combination with the write peaks command. As input the module requires that the user ran the enoe spindiff and enoe twospin modules.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9779</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9779"/>
		<updated>2020-02-19T13:14:08Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         # FM&lt;br /&gt;
         [[CYANA Command: atoms values|atoms values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: atoms values|atoms values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: atoms values|atoms values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: atoms values|atoms values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9778</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9778"/>
		<updated>2020-02-19T13:13:48Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         # FM&lt;br /&gt;
        [[CYANA Command: atoms values|atoms values]] mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: atoms values|atoms values]] mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: atoms values|atoms values]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: atoms values|atoms values]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9777</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9777"/>
		<updated>2020-02-19T13:11:00Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
         # FM&lt;br /&gt;
 	enoe values mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	enoe values mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	enoe values mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	enoe values mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9776</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9776"/>
		<updated>2020-02-19T12:10:18Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	&lt;br /&gt;
 	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
        # FM&lt;br /&gt;
 	enoe values mode=1&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	enoe values mode=1&lt;br /&gt;
  	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	enoe values mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	enoe values mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9775</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9775"/>
		<updated>2020-02-19T12:08:09Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
	&lt;br /&gt;
	enoe spindiff b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
	enoe twospin b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
	read peaks N15NOESY_exp.peaks&lt;br /&gt;
        # FM&lt;br /&gt;
	enoe values mode=1&lt;br /&gt;
	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
	read peaks C13NOESY_exp.peaks&lt;br /&gt;
	enoe values mode=1&lt;br /&gt;
	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
&lt;br /&gt;
	# 2 spin&lt;br /&gt;
	enoe values mode=2&lt;br /&gt;
	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
	read peaks C13NOESY_exp.peaks&lt;br /&gt;
	enoe values mode=2&lt;br /&gt;
	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_enoe_spindiff&amp;diff=9774</id>
		<title>CYANA Command: enoe spindiff</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_enoe_spindiff&amp;diff=9774"/>
		<updated>2020-02-19T11:51:40Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CYANA Commands|back to complete commands list]]&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; mode =&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
; b0field =&#039;&#039;real&#039;&#039;: (required)&lt;br /&gt;
; time =&#039;&#039;real&#039;&#039;, coma separated list: (required)&lt;br /&gt;
; maxdist =&#039;&#039;real&#039;&#039;: (default: &#039;&#039;6.5A&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
; rmode =&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
; labilatom=&#039;&#039;[[atom selection]]&#039;&#039;:(default: &amp;quot;HE @ARG + HD2 @ASP + HG @CYS + HE2 @GLU + HE2 @HIS + HG @SER + HG1 @THR + HH @TYR&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This command performs the spin diffusion calculations within the eNORA routine (with mode=1 or 2, see below) or performs an independent (mode=3) full relaxation matrix (FRM) calculation to be used for purposes other than spin diffusion calculations within the eNORA routine (see below).&lt;br /&gt;
&lt;br /&gt;
There are two different approaches to determine spin-diffusion contributions to cross-peak buildups, both of which require PDB coordinates of a previously determined structure (a conventional NMR structure or an X-ray structure). Usually the lowest energy model of structure bundles is used for spin-diffusion calculation; however, averaging of spin-diffusion over individual conformers is possible, depending on how many structures were selected, see * [[CYANA Command: structures select|structures select]].&lt;br /&gt;
&lt;br /&gt;
The parameter &#039;&#039;&#039;mode&#039;&#039;&#039; is used to select the spin diffusion correction method (FRM: mode=1, TSS: mode=2).&lt;br /&gt;
For the full relaxation matrix approach to spin-diffusion approximation we use the multi-spin Solomon equation to express the mixing time-dependence of the NOESY intensities. In the FRM approach, the buildup intensities containing spin-diffusion are calculated for all spins within the spheres centered at spins i and j (Orts et al. 2012).&lt;br /&gt;
&lt;br /&gt;
The parameter &#039;&#039;&#039;mode&#039;&#039;&#039; set to perform an independent FRM calculation (FRM: mode=3) calculates NOE intensities for a single mixing time specified, for purposes other than spin diffusion calculations, i.e. to write out a peak list with intensities obtained from FMR calculations, see *[[CYANA Command: enoe vaslues|enoe values]]. &lt;br /&gt;
&lt;br /&gt;
With the three-spin system (TSS, mode=2) approach, we follow a strategy in which spin-diffusion contributions are obtained from the summed contributions of the exact solutions of three-spin systems ijk (Vögeli et al. 2010) for all neighboring spins k within the cross section of the spheres centered at spin i and j. Importantly, scaling the contribution to spin-diffusion from spin k by its protonation level allows the setting of individual, spin specific deuteration levels in sample specific manner corresponding i.e. to methyl-group specific labeling schemes, see *[[CYANA Command: atoms set|atoms set]].&lt;br /&gt;
&lt;br /&gt;
The parameter &#039;&#039;&#039;b0field&#039;&#039;&#039; is the field strength [MHz]. &lt;br /&gt;
The parameter &#039;&#039;&#039;tauc&#039;&#039;&#039; is the overall correlation time [ns]. &lt;br /&gt;
The parameter &#039;&#039;&#039;time&#039;&#039;&#039; is the mixing time [s], usually given as a coma separated vector with mixing time&#039;s sorted in ascending order, i.e. time=0.02,0.03,0.04,0.05. &lt;br /&gt;
&lt;br /&gt;
The parameter &#039;&#039;&#039;maxdist&#039;&#039;&#039; is the size of the spheres centered at spin i and j.&lt;br /&gt;
The parameter &#039;&#039;&#039;labil&#039;&#039;&#039; is to specify atoms considered labil (do not contribute to spin diffusion and will be excluded from pathways).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The parameter &#039;&#039;&#039;rmode&#039;&#039;&#039; is used to specify if experimental or simulated auto-relaxation (rho) values are used (only TSS approach).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The parameter info=full or info=debug may be used to print the simulated buildup values to screen.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9773</id>
		<title>CYANA Commands</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9773"/>
		<updated>2020-02-19T11:45:53Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* E */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
== CYANA Commands ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4&amp;quot;&amp;gt;&lt;br /&gt;
=== A ===&lt;br /&gt;
* [[CYANA Command: angles count|angles count]]&lt;br /&gt;
* [[CYANA Command: angles delete|angles delete]]&lt;br /&gt;
* [[CYANA Command: angles flip|angles flip]]&lt;br /&gt;
* [[CYANA Command: angles ramachandran|angles ramachandran]]&lt;br /&gt;
* [[CYANA Command: angles select|angles select]]&lt;br /&gt;
* [[CYANA Command: angles set|angles set]]&lt;br /&gt;
* [[CYANA Command: angles split|angles split]]&lt;br /&gt;
* [[CYANA Command: angstat clear|angstat clear]]&lt;br /&gt;
* [[CYANA Command: angstat list|angstat list]]&lt;br /&gt;
* [[CYANA Command: angstat make|angstat make]]&lt;br /&gt;
* [[CYANA Macro: anneal|anneal]] (macro)&lt;br /&gt;
* [[CYANA Command: assign|assign]]&lt;br /&gt;
* [[CYANA Command: atoms attach|atoms attach]]&lt;br /&gt;
* [[CYANA Command: atoms calibrate|atoms calibrate]]&lt;br /&gt;
* [[CYANA Command: atoms count|atoms count]]&lt;br /&gt;
* [[CYANA Command: atoms glomsa|atoms glomsa]]&lt;br /&gt;
* [[CYANA Command: atoms list|atoms list]]&lt;br /&gt;
* [[CYANA Command: atoms observable|atoms observable]]&lt;br /&gt;
* [[CYANA Command: atoms select|atoms select]]&lt;br /&gt;
* [[CYANA Command: atoms set|atoms set]]&lt;br /&gt;
* [[CYANA Command: atoms shifts|atoms shifts]]&lt;br /&gt;
* [[CYANA Command: atoms stereo|atoms stereo]]&lt;br /&gt;
* [[CYANA Command: atoms swap|atoms swap]]&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
* [[CYANA Macro: calc_all|calc_all]] (macro)&lt;br /&gt;
* [[CYANA Macro: caliba|caliba]] (macro)&lt;br /&gt;
* [[CYANA Command: calibrate|calibrate]]&lt;br /&gt;
* [[CYANA Macro: calibration|calibration]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftaco|cashiftaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftplot|cashiftplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: cisprocheck|cisprocheck]] (macro)&lt;br /&gt;
* [[CYANA Macro: coco|coco]] (macro)&lt;br /&gt;
* [[CYANA Command: couplings count|couplings count]]&lt;br /&gt;
* [[CYANA Command: couplings delete|couplings delete]]&lt;br /&gt;
* [[CYANA Command: couplings make|couplings make]]&lt;br /&gt;
* [[CYANA Command: couplings select|couplings select]]&lt;br /&gt;
* [[CYANA Command: couplings set|couplings set]]&lt;br /&gt;
* [[CYANA Macro: cyscheck|cyscheck]] (macro)&lt;br /&gt;
=== D ===&lt;br /&gt;
* [[CYANA Macro: dcostat|dcostat]] (macro)&lt;br /&gt;
* [[CYANA Macro: dcotab|dcotab]] (macro)&lt;br /&gt;
* [[CYANA Macro: deposit|deposit]] (macro)&lt;br /&gt;
* [[CYANA Macro: dinucleotide|dinucleotide]] (macro)&lt;br /&gt;
* [[CYANA Command: distances calculate|distances calculate]]&lt;br /&gt;
* [[CYANA Command: distances check|distances check]]&lt;br /&gt;
* [[CYANA Command: distances combine|distances combine]]&lt;br /&gt;
* [[CYANA Command: distances compare|distances compare]]&lt;br /&gt;
* [[CYANA Command: distances correct|distances correct]]&lt;br /&gt;
* [[CYANA Command: distances count|distances count]]&lt;br /&gt;
* [[CYANA Command: distances delete|distances delete]]&lt;br /&gt;
* [[CYANA Command: distances expand|distances expand]]&lt;br /&gt;
* [[CYANA Command: distances falsify|distances falsify]]&lt;br /&gt;
* [[CYANA Command: distances hbond|distances hbond]]&lt;br /&gt;
* [[CYANA Command: distances make|distances make]]&lt;br /&gt;
* [[CYANA Command: distances modify|distances modify]]&lt;br /&gt;
* [[CYANA Command: distances multiple|distances multiple]]&lt;br /&gt;
* [[CYANA Command: distances select|distances select]]&lt;br /&gt;
* [[CYANA Command: distances set|distances set]]&lt;br /&gt;
* [[CYANA Command: distances short|distances short]]&lt;br /&gt;
* [[CYANA Command: distances split|distances split]]&lt;br /&gt;
* [[CYANA Command: distances stat|distances stat]]&lt;br /&gt;
* [[CYANA Command: distances stereoexpand|distances stereoexpand]]&lt;br /&gt;
* [[CYANA Command: distances unique|distances unique]]&lt;br /&gt;
* [[CYANA Command: distances vdw|distances vdw]]&lt;br /&gt;
=== E ===&lt;br /&gt;
* [[CYANA Command: enoe init |enoe init]]&lt;br /&gt;
* [[CYANA Command: enoe diag |enoe diag]]&lt;br /&gt;
* [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
* [[CYANA Command: enoe sig |enoe sigma]]&lt;br /&gt;
* [[CYANA Command: enoe reff |enoe reff]]&lt;br /&gt;
* [[CYANA Command: enoe restraint |enoe restraint]]&lt;br /&gt;
* [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
* [[CYANA Command: enoe spdcorr |enoe spdcorr]]&lt;br /&gt;
* [[CYANA Command: enoe twospin |enoe twospin]]&lt;br /&gt;
* [[CYANA Command: enoe plotbup |enoe plotbup]]&lt;br /&gt;
* [[CYANA Command: enoe plotdec |enoe plotdec]]&lt;br /&gt;
* [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
* [[CYANA Command: enoe values |enoe values]]&lt;br /&gt;
&lt;br /&gt;
=== F ===&lt;br /&gt;
* [[CYANA Macro: flip|flip]] (macro)&lt;br /&gt;
* [[CYANA Macro: forall|forall]] (macro)&lt;br /&gt;
=== G ===&lt;br /&gt;
* [[CYANA Macro: garant|garant]] (macro)&lt;br /&gt;
* [[CYANA Command: gradient|gradient]]&lt;br /&gt;
* [[CYANA Macro: graf|graf]] (macro)&lt;br /&gt;
* [[CYANA Command: grid aco|grid aco]]&lt;br /&gt;
* [[CYANA Command: grid correlate|grid correlate]]&lt;br /&gt;
* [[CYANA Command: grid fragment|grid fragment]]&lt;br /&gt;
* [[CYANA Command: grid memory|grid memory]]&lt;br /&gt;
* [[CYANA Macro: gridplot|gridplot]] (macro)&lt;br /&gt;
* [[CYANA Command: grid search|grid search]]&lt;br /&gt;
* [[CYANA Command: grid swap|grid swap]]&lt;br /&gt;
=== H ===&lt;br /&gt;
* [[CYANA Macro: habas|habas]] (macro)&lt;br /&gt;
* [[CYANA Macro: hbond|hbond]] (macro)&lt;br /&gt;
=== I ===&lt;br /&gt;
* [[CYANA Macro: init|init]] (macro)&lt;br /&gt;
* [[CYANA Macro: initsafe|initsafe]] (macro)&lt;br /&gt;
=== K ===&lt;br /&gt;
* [[CYANA Macro: karplus|karplus]] (macro)&lt;br /&gt;
* [[CYANA Macro: kringle|kringle]] (macro)&lt;br /&gt;
=== L ===&lt;br /&gt;
* [[CYANA Command: library check|library check]]&lt;br /&gt;
* [[CYANA Command: library mirror|library mirror]]&lt;br /&gt;
* [[CYANA Command: library new|library new]]&lt;br /&gt;
* [[CYANA Command: library remove|library remove]]&lt;br /&gt;
* [[CYANA Command: library rename|library rename]]&lt;br /&gt;
* [[CYANA Command: library replace|library replace]]&lt;br /&gt;
* [[CYANA Macro: longrangeplot|longrangeplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: loop|loop]] (macro)&lt;br /&gt;
=== M ===&lt;br /&gt;
* [[CYANA Macro: makeaco|makeaco]] (macro)&lt;br /&gt;
* [[CYANA Command: md|md]]&lt;br /&gt;
* [[CYANA Command: minimize|minimize]]&lt;br /&gt;
* [[CYANA Command: molecules define|molecules define]]&lt;br /&gt;
* [[CYANA Command: molecules identity|molecules identity]]&lt;br /&gt;
* [[CYANA Command: molecules symdist|molecules symdist]]&lt;br /&gt;
=== N ===&lt;br /&gt;
* [[CYANA Macro: noeassign|noeassign]] (macro)&lt;br /&gt;
=== O ===&lt;br /&gt;
* [[CYANA Macro: onelettercode|onelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: opalprefine|opalprefine]] (macro)&lt;br /&gt;
* [[CYANA Macro: overlay|overlay]] (macro)&lt;br /&gt;
* [[CYANA Macro: overview|overview]] (macro)&lt;br /&gt;
=== P ===&lt;br /&gt;
* [[CYANA Command: pcs axial|pcs axial]]&lt;br /&gt;
* [[CYANA Command: pcs count|pcs count]]&lt;br /&gt;
* [[CYANA Command: pcs delete|pcs delete]]&lt;br /&gt;
* [[CYANA Command: pcs list|pcs list]]&lt;br /&gt;
* [[CYANA Command: pcs make|pcs make]]&lt;br /&gt;
* [[CYANA Command: pcs rhombic|pcs rhombic]]&lt;br /&gt;
* [[CYANA Command: pcs select|pcs select]]&lt;br /&gt;
* [[CYANA Command: pcs set|pcs set]]&lt;br /&gt;
* [[CYANA Macro: peakcheck|peakcheck]] (macro)&lt;br /&gt;
* [[CYANA Command: peaks backcal|peaks backcal]]&lt;br /&gt;
* [[CYANA Command: peaks calibrate|peaks calibrate]]&lt;br /&gt;
* [[CYANA Command: peaks count|peaks count]]&lt;br /&gt;
* [[CYANA Command: peaks create|peaks create]]&lt;br /&gt;
* [[CYANA Command: peaks delete|peaks delete]]&lt;br /&gt;
* [[CYANA Command: peaks deviations|peaks deviations]]&lt;br /&gt;
* [[CYANA Command: peaks distance|peaks distance]]&lt;br /&gt;
* [[CYANA Command: peaks filter|peaks filter]]&lt;br /&gt;
* [[CYANA Command: peaks fit|peaks fit]]&lt;br /&gt;
* [[CYANA Command: peaks protonize|peaks protonize]]&lt;br /&gt;
* [[CYANA Command: peaks select|peaks select]]&lt;br /&gt;
* [[CYANA Command: peaks set|peaks set]]&lt;br /&gt;
* [[CYANA Command: peaks simplecal|peaks simplecal]]&lt;br /&gt;
* [[CYANA Command: peaks split|peaks split]]&lt;br /&gt;
* [[CYANA Command: peaks unassign|peaks unassign]]&lt;br /&gt;
* [[CYANA Command: peaks unique|peaks unique]]&lt;br /&gt;
* [[CYANA Macro: prolinebond|prolinebond]] (macro)&lt;br /&gt;
=== R ===&lt;br /&gt;
* [[CYANA Macro: ramaaco|ramaaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: ramaplot|ramaplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: random_all|random_all]] (macro)&lt;br /&gt;
* [[CYANA Command: randomize|randomize]]&lt;br /&gt;
* [[CYANA Command: rdc count|rdc count]]&lt;br /&gt;
* [[CYANA Command: rdc delete|rdc delete]]&lt;br /&gt;
* [[CYANA Command: rdc distance|rdc distance]]&lt;br /&gt;
* [[CYANA Macro: rdcdistances|rdcdistances]] (macro)&lt;br /&gt;
* [[CYANA Command: rdc fittensor|rdc fittensor]]&lt;br /&gt;
* [[CYANA Command: rdc list|rdc list]]&lt;br /&gt;
* [[CYANA Command: rdc make|rdc make]]&lt;br /&gt;
* [[CYANA Command: rdc select|rdc select]]&lt;br /&gt;
* [[CYANA Command: rdc set|rdc set]]&lt;br /&gt;
* [[CYANA Command: rdc tensor|rdc tensor]]&lt;br /&gt;
* [[CYANA Command: read aco|read aco]]&lt;br /&gt;
* [[CYANA Macro: read_all|read_all]] (macro)&lt;br /&gt;
* [[CYANA Command: read ang|read ang]]&lt;br /&gt;
* [[CYANA Command: read bmrb|read bmrb]]&lt;br /&gt;
* [[CYANA Command: read cco|read cco]]&lt;br /&gt;
* [[CYANA Command: read cor|read cor]]&lt;br /&gt;
* [[CYANA Macro: readdata|readdata]] (macro)&lt;br /&gt;
* [[CYANA Command: read lib|read lib]]&lt;br /&gt;
* [[CYANA Command: read lol|read lol]]&lt;br /&gt;
* [[CYANA Command: read nmrview|read nmrview]]&lt;br /&gt;
* [[CYANA Command: read pcs|read pcs]]&lt;br /&gt;
* [[CYANA Command: read pdb|read pdb]]&lt;br /&gt;
* [[CYANA Command: read peaks|read peaks]]&lt;br /&gt;
* [[CYANA Command: read prot|read prot]]&lt;br /&gt;
* [[CYANA Command: read rdc|read rdc]]&lt;br /&gt;
* [[CYANA Command: read rho|read rho]]&lt;br /&gt;
* [[CYANA Command: read tab|read tab]]&lt;br /&gt;
* [[CYANA Command: read upl|read upl]]&lt;br /&gt;
* [[CYANA Command: read xpk|read xpk]]&lt;br /&gt;
* [[CYANA Command: read xplor|read xplor]]&lt;br /&gt;
* [[CYANA Macro: redac|redac]] (macro)&lt;br /&gt;
* [[CYANA Macro: renumber|renumber]] (macro)&lt;br /&gt;
* [[CYANA Macro: rmsd|rmsd]] (macro)&lt;br /&gt;
* [[CYANA Macro: rotameraco|rotameraco]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== S ===&lt;br /&gt;
* [[CYANA Macro: savestereo|savestereo]] (macro)&lt;br /&gt;
* [[CYANA Macro: seqplot|seqplot]] (macro)&lt;br /&gt;
* [[CYANA Command: shifts adapt|shifts adapt]]&lt;br /&gt;
* [[CYANA Command: shifts assign|shifts assign]]&lt;br /&gt;
* [[CYANA Command: shifts check|shifts check]]&lt;br /&gt;
* [[CYANA Command: shifts collapse|shifts collapse]]&lt;br /&gt;
* [[CYANA Command: shifts consolidate|shifts consolidate]]&lt;br /&gt;
* [[CYANA Command: shifts converge|shifts converge]]&lt;br /&gt;
* [[CYANA Command: shifts d2o|shifts d2o]]&lt;br /&gt;
* [[CYANA Command: shifts incomplete|shifts incomplete]]&lt;br /&gt;
* [[CYANA Command: shifts initialize|shifts initialize]]&lt;br /&gt;
* [[CYANA Command: shifts missing|shifts missing]]&lt;br /&gt;
* [[CYANA Command: shifts randomcoil|shifts randomcoil]]&lt;br /&gt;
* [[CYANA Command: shifts renumber|shifts renumber]]&lt;br /&gt;
* [[CYANA Command: shifts unusual|shifts unusual]]&lt;br /&gt;
* [[CYANA Macro: ssbond|ssbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: stereoassign|stereoassign]] (macro)&lt;br /&gt;
* [[CYANA Macro: structcalc|structcalc]] (macro)&lt;br /&gt;
* [[CYANA Command: structures clear|structures clear]]&lt;br /&gt;
* [[CYANA Command: structures copy|structures copy]]&lt;br /&gt;
* [[CYANA Command: structures hbonds|structures hbonds]]&lt;br /&gt;
* [[CYANA Command: structures insert|structures insert]]&lt;br /&gt;
* [[CYANA Command: structures list|structures list]]&lt;br /&gt;
* [[CYANA Command: structures mean|structures mean]]&lt;br /&gt;
* [[CYANA Command: structures overlay|structures overlay]]&lt;br /&gt;
* [[CYANA Command: structures secondary|structures secondary]]&lt;br /&gt;
* [[CYANA Command: structures select|structures select]]&lt;br /&gt;
* [[CYANA Command: structures sort|structures sort]]&lt;br /&gt;
* [[CYANA Command: structures swap|structures swap]]&lt;br /&gt;
* [[CYANA Command: structures violate|structures violate]]&lt;br /&gt;
* [[CYANA Macro: sugarbond|sugarbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: sugarring|sugarring]] (macro)&lt;br /&gt;
* [[CYANA Macro: syscheck|syscheck]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== T ===&lt;br /&gt;
* [[CYANA Macro: talos|talos]] (macro)&lt;br /&gt;
* [[CYANA Macro: talosaco|talosaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: taloslist|taloslist]] (macro)&lt;br /&gt;
* [[CYANA Macro: threelettercode|threelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: translate|translate]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== V ===&lt;br /&gt;
* [[CYANA Macro: vtfmin|vtfmin]] (macro)&lt;br /&gt;
=== W ===&lt;br /&gt;
* [[CYANA Macro: watsoncrick|watsoncrick]] (macro)&lt;br /&gt;
* [[CYANA Command: write aco|write aco]]&lt;br /&gt;
* [[CYANA Macro: write_all|write_all]] (macro)&lt;br /&gt;
* [[CYANA Command: write ang|write ang]]&lt;br /&gt;
* [[CYANA Command: write assign|write assign]]&lt;br /&gt;
* [[CYANA Command: write bmrb|write bmrb]]&lt;br /&gt;
* [[CYANA Command: write cco|write cco]]&lt;br /&gt;
* [[CYANA Command: write cor|write cor]]&lt;br /&gt;
* [[CYANA Command: write lib|write lib]]&lt;br /&gt;
* [[CYANA Command: write lol|write lol]]&lt;br /&gt;
* [[CYANA Command: write pcs|write pcs]]&lt;br /&gt;
* [[CYANA Command: write pdb|write pdb]]&lt;br /&gt;
* [[CYANA Command: write peaks|write peaks]]&lt;br /&gt;
* [[CYANA Command: write prot|write prot]]&lt;br /&gt;
* [[CYANA Command: write rdc|write rdc]]&lt;br /&gt;
* [[CYANA Command: write rho|write rho]]&lt;br /&gt;
* [[CYANA Command: write seq|write seq]]&lt;br /&gt;
* [[CYANA Command: write sparky|write sparky]]&lt;br /&gt;
* [[CYANA Command: write upl|write upl]]&lt;br /&gt;
* [[CYANA Command: write xpk|write xpk]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9772</id>
		<title>CYANA Commands</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9772"/>
		<updated>2020-02-19T11:45:06Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* E */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
== CYANA Commands ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4&amp;quot;&amp;gt;&lt;br /&gt;
=== A ===&lt;br /&gt;
* [[CYANA Command: angles count|angles count]]&lt;br /&gt;
* [[CYANA Command: angles delete|angles delete]]&lt;br /&gt;
* [[CYANA Command: angles flip|angles flip]]&lt;br /&gt;
* [[CYANA Command: angles ramachandran|angles ramachandran]]&lt;br /&gt;
* [[CYANA Command: angles select|angles select]]&lt;br /&gt;
* [[CYANA Command: angles set|angles set]]&lt;br /&gt;
* [[CYANA Command: angles split|angles split]]&lt;br /&gt;
* [[CYANA Command: angstat clear|angstat clear]]&lt;br /&gt;
* [[CYANA Command: angstat list|angstat list]]&lt;br /&gt;
* [[CYANA Command: angstat make|angstat make]]&lt;br /&gt;
* [[CYANA Macro: anneal|anneal]] (macro)&lt;br /&gt;
* [[CYANA Command: assign|assign]]&lt;br /&gt;
* [[CYANA Command: atoms attach|atoms attach]]&lt;br /&gt;
* [[CYANA Command: atoms calibrate|atoms calibrate]]&lt;br /&gt;
* [[CYANA Command: atoms count|atoms count]]&lt;br /&gt;
* [[CYANA Command: atoms glomsa|atoms glomsa]]&lt;br /&gt;
* [[CYANA Command: atoms list|atoms list]]&lt;br /&gt;
* [[CYANA Command: atoms observable|atoms observable]]&lt;br /&gt;
* [[CYANA Command: atoms select|atoms select]]&lt;br /&gt;
* [[CYANA Command: atoms set|atoms set]]&lt;br /&gt;
* [[CYANA Command: atoms shifts|atoms shifts]]&lt;br /&gt;
* [[CYANA Command: atoms stereo|atoms stereo]]&lt;br /&gt;
* [[CYANA Command: atoms swap|atoms swap]]&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
* [[CYANA Macro: calc_all|calc_all]] (macro)&lt;br /&gt;
* [[CYANA Macro: caliba|caliba]] (macro)&lt;br /&gt;
* [[CYANA Command: calibrate|calibrate]]&lt;br /&gt;
* [[CYANA Macro: calibration|calibration]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftaco|cashiftaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftplot|cashiftplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: cisprocheck|cisprocheck]] (macro)&lt;br /&gt;
* [[CYANA Macro: coco|coco]] (macro)&lt;br /&gt;
* [[CYANA Command: couplings count|couplings count]]&lt;br /&gt;
* [[CYANA Command: couplings delete|couplings delete]]&lt;br /&gt;
* [[CYANA Command: couplings make|couplings make]]&lt;br /&gt;
* [[CYANA Command: couplings select|couplings select]]&lt;br /&gt;
* [[CYANA Command: couplings set|couplings set]]&lt;br /&gt;
* [[CYANA Macro: cyscheck|cyscheck]] (macro)&lt;br /&gt;
=== D ===&lt;br /&gt;
* [[CYANA Macro: dcostat|dcostat]] (macro)&lt;br /&gt;
* [[CYANA Macro: dcotab|dcotab]] (macro)&lt;br /&gt;
* [[CYANA Macro: deposit|deposit]] (macro)&lt;br /&gt;
* [[CYANA Macro: dinucleotide|dinucleotide]] (macro)&lt;br /&gt;
* [[CYANA Command: distances calculate|distances calculate]]&lt;br /&gt;
* [[CYANA Command: distances check|distances check]]&lt;br /&gt;
* [[CYANA Command: distances combine|distances combine]]&lt;br /&gt;
* [[CYANA Command: distances compare|distances compare]]&lt;br /&gt;
* [[CYANA Command: distances correct|distances correct]]&lt;br /&gt;
* [[CYANA Command: distances count|distances count]]&lt;br /&gt;
* [[CYANA Command: distances delete|distances delete]]&lt;br /&gt;
* [[CYANA Command: distances expand|distances expand]]&lt;br /&gt;
* [[CYANA Command: distances falsify|distances falsify]]&lt;br /&gt;
* [[CYANA Command: distances hbond|distances hbond]]&lt;br /&gt;
* [[CYANA Command: distances make|distances make]]&lt;br /&gt;
* [[CYANA Command: distances modify|distances modify]]&lt;br /&gt;
* [[CYANA Command: distances multiple|distances multiple]]&lt;br /&gt;
* [[CYANA Command: distances select|distances select]]&lt;br /&gt;
* [[CYANA Command: distances set|distances set]]&lt;br /&gt;
* [[CYANA Command: distances short|distances short]]&lt;br /&gt;
* [[CYANA Command: distances split|distances split]]&lt;br /&gt;
* [[CYANA Command: distances stat|distances stat]]&lt;br /&gt;
* [[CYANA Command: distances stereoexpand|distances stereoexpand]]&lt;br /&gt;
* [[CYANA Command: distances unique|distances unique]]&lt;br /&gt;
* [[CYANA Command: distances vdw|distances vdw]]&lt;br /&gt;
=== E ===&lt;br /&gt;
* [[CYANA Command: enoe init |enoe init]]&lt;br /&gt;
* [[CYANA Command: enoe diag |enoe diag]]&lt;br /&gt;
* [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
* [[CYANA Command: enoe sig |enoe sigma]]&lt;br /&gt;
* [[CYANA Command: enoe reff |enoe reff]]&lt;br /&gt;
* [[CYANA Command: enoe restraint |enoe restraint]]&lt;br /&gt;
* [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
* [[CYANA Command: enoe spdcorr |enoe spdcorr]]&lt;br /&gt;
* [[CYANA Command: enoe twospin |enoe twospin]]&lt;br /&gt;
* [[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
* [[CYANA Command: enoe plotbup |enoe plotbup]]&lt;br /&gt;
* [[CYANA Command: enoe plotdec |enoe plotdec]]&lt;br /&gt;
* [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
* [[CYANA Command: enoe values |enoe values]]&lt;br /&gt;
&lt;br /&gt;
=== F ===&lt;br /&gt;
* [[CYANA Macro: flip|flip]] (macro)&lt;br /&gt;
* [[CYANA Macro: forall|forall]] (macro)&lt;br /&gt;
=== G ===&lt;br /&gt;
* [[CYANA Macro: garant|garant]] (macro)&lt;br /&gt;
* [[CYANA Command: gradient|gradient]]&lt;br /&gt;
* [[CYANA Macro: graf|graf]] (macro)&lt;br /&gt;
* [[CYANA Command: grid aco|grid aco]]&lt;br /&gt;
* [[CYANA Command: grid correlate|grid correlate]]&lt;br /&gt;
* [[CYANA Command: grid fragment|grid fragment]]&lt;br /&gt;
* [[CYANA Command: grid memory|grid memory]]&lt;br /&gt;
* [[CYANA Macro: gridplot|gridplot]] (macro)&lt;br /&gt;
* [[CYANA Command: grid search|grid search]]&lt;br /&gt;
* [[CYANA Command: grid swap|grid swap]]&lt;br /&gt;
=== H ===&lt;br /&gt;
* [[CYANA Macro: habas|habas]] (macro)&lt;br /&gt;
* [[CYANA Macro: hbond|hbond]] (macro)&lt;br /&gt;
=== I ===&lt;br /&gt;
* [[CYANA Macro: init|init]] (macro)&lt;br /&gt;
* [[CYANA Macro: initsafe|initsafe]] (macro)&lt;br /&gt;
=== K ===&lt;br /&gt;
* [[CYANA Macro: karplus|karplus]] (macro)&lt;br /&gt;
* [[CYANA Macro: kringle|kringle]] (macro)&lt;br /&gt;
=== L ===&lt;br /&gt;
* [[CYANA Command: library check|library check]]&lt;br /&gt;
* [[CYANA Command: library mirror|library mirror]]&lt;br /&gt;
* [[CYANA Command: library new|library new]]&lt;br /&gt;
* [[CYANA Command: library remove|library remove]]&lt;br /&gt;
* [[CYANA Command: library rename|library rename]]&lt;br /&gt;
* [[CYANA Command: library replace|library replace]]&lt;br /&gt;
* [[CYANA Macro: longrangeplot|longrangeplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: loop|loop]] (macro)&lt;br /&gt;
=== M ===&lt;br /&gt;
* [[CYANA Macro: makeaco|makeaco]] (macro)&lt;br /&gt;
* [[CYANA Command: md|md]]&lt;br /&gt;
* [[CYANA Command: minimize|minimize]]&lt;br /&gt;
* [[CYANA Command: molecules define|molecules define]]&lt;br /&gt;
* [[CYANA Command: molecules identity|molecules identity]]&lt;br /&gt;
* [[CYANA Command: molecules symdist|molecules symdist]]&lt;br /&gt;
=== N ===&lt;br /&gt;
* [[CYANA Macro: noeassign|noeassign]] (macro)&lt;br /&gt;
=== O ===&lt;br /&gt;
* [[CYANA Macro: onelettercode|onelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: opalprefine|opalprefine]] (macro)&lt;br /&gt;
* [[CYANA Macro: overlay|overlay]] (macro)&lt;br /&gt;
* [[CYANA Macro: overview|overview]] (macro)&lt;br /&gt;
=== P ===&lt;br /&gt;
* [[CYANA Command: pcs axial|pcs axial]]&lt;br /&gt;
* [[CYANA Command: pcs count|pcs count]]&lt;br /&gt;
* [[CYANA Command: pcs delete|pcs delete]]&lt;br /&gt;
* [[CYANA Command: pcs list|pcs list]]&lt;br /&gt;
* [[CYANA Command: pcs make|pcs make]]&lt;br /&gt;
* [[CYANA Command: pcs rhombic|pcs rhombic]]&lt;br /&gt;
* [[CYANA Command: pcs select|pcs select]]&lt;br /&gt;
* [[CYANA Command: pcs set|pcs set]]&lt;br /&gt;
* [[CYANA Macro: peakcheck|peakcheck]] (macro)&lt;br /&gt;
* [[CYANA Command: peaks backcal|peaks backcal]]&lt;br /&gt;
* [[CYANA Command: peaks calibrate|peaks calibrate]]&lt;br /&gt;
* [[CYANA Command: peaks count|peaks count]]&lt;br /&gt;
* [[CYANA Command: peaks create|peaks create]]&lt;br /&gt;
* [[CYANA Command: peaks delete|peaks delete]]&lt;br /&gt;
* [[CYANA Command: peaks deviations|peaks deviations]]&lt;br /&gt;
* [[CYANA Command: peaks distance|peaks distance]]&lt;br /&gt;
* [[CYANA Command: peaks filter|peaks filter]]&lt;br /&gt;
* [[CYANA Command: peaks fit|peaks fit]]&lt;br /&gt;
* [[CYANA Command: peaks protonize|peaks protonize]]&lt;br /&gt;
* [[CYANA Command: peaks select|peaks select]]&lt;br /&gt;
* [[CYANA Command: peaks set|peaks set]]&lt;br /&gt;
* [[CYANA Command: peaks simplecal|peaks simplecal]]&lt;br /&gt;
* [[CYANA Command: peaks split|peaks split]]&lt;br /&gt;
* [[CYANA Command: peaks unassign|peaks unassign]]&lt;br /&gt;
* [[CYANA Command: peaks unique|peaks unique]]&lt;br /&gt;
* [[CYANA Macro: prolinebond|prolinebond]] (macro)&lt;br /&gt;
=== R ===&lt;br /&gt;
* [[CYANA Macro: ramaaco|ramaaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: ramaplot|ramaplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: random_all|random_all]] (macro)&lt;br /&gt;
* [[CYANA Command: randomize|randomize]]&lt;br /&gt;
* [[CYANA Command: rdc count|rdc count]]&lt;br /&gt;
* [[CYANA Command: rdc delete|rdc delete]]&lt;br /&gt;
* [[CYANA Command: rdc distance|rdc distance]]&lt;br /&gt;
* [[CYANA Macro: rdcdistances|rdcdistances]] (macro)&lt;br /&gt;
* [[CYANA Command: rdc fittensor|rdc fittensor]]&lt;br /&gt;
* [[CYANA Command: rdc list|rdc list]]&lt;br /&gt;
* [[CYANA Command: rdc make|rdc make]]&lt;br /&gt;
* [[CYANA Command: rdc select|rdc select]]&lt;br /&gt;
* [[CYANA Command: rdc set|rdc set]]&lt;br /&gt;
* [[CYANA Command: rdc tensor|rdc tensor]]&lt;br /&gt;
* [[CYANA Command: read aco|read aco]]&lt;br /&gt;
* [[CYANA Macro: read_all|read_all]] (macro)&lt;br /&gt;
* [[CYANA Command: read ang|read ang]]&lt;br /&gt;
* [[CYANA Command: read bmrb|read bmrb]]&lt;br /&gt;
* [[CYANA Command: read cco|read cco]]&lt;br /&gt;
* [[CYANA Command: read cor|read cor]]&lt;br /&gt;
* [[CYANA Macro: readdata|readdata]] (macro)&lt;br /&gt;
* [[CYANA Command: read lib|read lib]]&lt;br /&gt;
* [[CYANA Command: read lol|read lol]]&lt;br /&gt;
* [[CYANA Command: read nmrview|read nmrview]]&lt;br /&gt;
* [[CYANA Command: read pcs|read pcs]]&lt;br /&gt;
* [[CYANA Command: read pdb|read pdb]]&lt;br /&gt;
* [[CYANA Command: read peaks|read peaks]]&lt;br /&gt;
* [[CYANA Command: read prot|read prot]]&lt;br /&gt;
* [[CYANA Command: read rdc|read rdc]]&lt;br /&gt;
* [[CYANA Command: read rho|read rho]]&lt;br /&gt;
* [[CYANA Command: read tab|read tab]]&lt;br /&gt;
* [[CYANA Command: read upl|read upl]]&lt;br /&gt;
* [[CYANA Command: read xpk|read xpk]]&lt;br /&gt;
* [[CYANA Command: read xplor|read xplor]]&lt;br /&gt;
* [[CYANA Macro: redac|redac]] (macro)&lt;br /&gt;
* [[CYANA Macro: renumber|renumber]] (macro)&lt;br /&gt;
* [[CYANA Macro: rmsd|rmsd]] (macro)&lt;br /&gt;
* [[CYANA Macro: rotameraco|rotameraco]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== S ===&lt;br /&gt;
* [[CYANA Macro: savestereo|savestereo]] (macro)&lt;br /&gt;
* [[CYANA Macro: seqplot|seqplot]] (macro)&lt;br /&gt;
* [[CYANA Command: shifts adapt|shifts adapt]]&lt;br /&gt;
* [[CYANA Command: shifts assign|shifts assign]]&lt;br /&gt;
* [[CYANA Command: shifts check|shifts check]]&lt;br /&gt;
* [[CYANA Command: shifts collapse|shifts collapse]]&lt;br /&gt;
* [[CYANA Command: shifts consolidate|shifts consolidate]]&lt;br /&gt;
* [[CYANA Command: shifts converge|shifts converge]]&lt;br /&gt;
* [[CYANA Command: shifts d2o|shifts d2o]]&lt;br /&gt;
* [[CYANA Command: shifts incomplete|shifts incomplete]]&lt;br /&gt;
* [[CYANA Command: shifts initialize|shifts initialize]]&lt;br /&gt;
* [[CYANA Command: shifts missing|shifts missing]]&lt;br /&gt;
* [[CYANA Command: shifts randomcoil|shifts randomcoil]]&lt;br /&gt;
* [[CYANA Command: shifts renumber|shifts renumber]]&lt;br /&gt;
* [[CYANA Command: shifts unusual|shifts unusual]]&lt;br /&gt;
* [[CYANA Macro: ssbond|ssbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: stereoassign|stereoassign]] (macro)&lt;br /&gt;
* [[CYANA Macro: structcalc|structcalc]] (macro)&lt;br /&gt;
* [[CYANA Command: structures clear|structures clear]]&lt;br /&gt;
* [[CYANA Command: structures copy|structures copy]]&lt;br /&gt;
* [[CYANA Command: structures hbonds|structures hbonds]]&lt;br /&gt;
* [[CYANA Command: structures insert|structures insert]]&lt;br /&gt;
* [[CYANA Command: structures list|structures list]]&lt;br /&gt;
* [[CYANA Command: structures mean|structures mean]]&lt;br /&gt;
* [[CYANA Command: structures overlay|structures overlay]]&lt;br /&gt;
* [[CYANA Command: structures secondary|structures secondary]]&lt;br /&gt;
* [[CYANA Command: structures select|structures select]]&lt;br /&gt;
* [[CYANA Command: structures sort|structures sort]]&lt;br /&gt;
* [[CYANA Command: structures swap|structures swap]]&lt;br /&gt;
* [[CYANA Command: structures violate|structures violate]]&lt;br /&gt;
* [[CYANA Macro: sugarbond|sugarbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: sugarring|sugarring]] (macro)&lt;br /&gt;
* [[CYANA Macro: syscheck|syscheck]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== T ===&lt;br /&gt;
* [[CYANA Macro: talos|talos]] (macro)&lt;br /&gt;
* [[CYANA Macro: talosaco|talosaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: taloslist|taloslist]] (macro)&lt;br /&gt;
* [[CYANA Macro: threelettercode|threelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: translate|translate]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== V ===&lt;br /&gt;
* [[CYANA Macro: vtfmin|vtfmin]] (macro)&lt;br /&gt;
=== W ===&lt;br /&gt;
* [[CYANA Macro: watsoncrick|watsoncrick]] (macro)&lt;br /&gt;
* [[CYANA Command: write aco|write aco]]&lt;br /&gt;
* [[CYANA Macro: write_all|write_all]] (macro)&lt;br /&gt;
* [[CYANA Command: write ang|write ang]]&lt;br /&gt;
* [[CYANA Command: write assign|write assign]]&lt;br /&gt;
* [[CYANA Command: write bmrb|write bmrb]]&lt;br /&gt;
* [[CYANA Command: write cco|write cco]]&lt;br /&gt;
* [[CYANA Command: write cor|write cor]]&lt;br /&gt;
* [[CYANA Command: write lib|write lib]]&lt;br /&gt;
* [[CYANA Command: write lol|write lol]]&lt;br /&gt;
* [[CYANA Command: write pcs|write pcs]]&lt;br /&gt;
* [[CYANA Command: write pdb|write pdb]]&lt;br /&gt;
* [[CYANA Command: write peaks|write peaks]]&lt;br /&gt;
* [[CYANA Command: write prot|write prot]]&lt;br /&gt;
* [[CYANA Command: write rdc|write rdc]]&lt;br /&gt;
* [[CYANA Command: write rho|write rho]]&lt;br /&gt;
* [[CYANA Command: write seq|write seq]]&lt;br /&gt;
* [[CYANA Command: write sparky|write sparky]]&lt;br /&gt;
* [[CYANA Command: write upl|write upl]]&lt;br /&gt;
* [[CYANA Command: write xpk|write xpk]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9771</id>
		<title>CYANA Commands</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9771"/>
		<updated>2020-02-19T11:29:37Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* E */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
== CYANA Commands ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4&amp;quot;&amp;gt;&lt;br /&gt;
=== A ===&lt;br /&gt;
* [[CYANA Command: angles count|angles count]]&lt;br /&gt;
* [[CYANA Command: angles delete|angles delete]]&lt;br /&gt;
* [[CYANA Command: angles flip|angles flip]]&lt;br /&gt;
* [[CYANA Command: angles ramachandran|angles ramachandran]]&lt;br /&gt;
* [[CYANA Command: angles select|angles select]]&lt;br /&gt;
* [[CYANA Command: angles set|angles set]]&lt;br /&gt;
* [[CYANA Command: angles split|angles split]]&lt;br /&gt;
* [[CYANA Command: angstat clear|angstat clear]]&lt;br /&gt;
* [[CYANA Command: angstat list|angstat list]]&lt;br /&gt;
* [[CYANA Command: angstat make|angstat make]]&lt;br /&gt;
* [[CYANA Macro: anneal|anneal]] (macro)&lt;br /&gt;
* [[CYANA Command: assign|assign]]&lt;br /&gt;
* [[CYANA Command: atoms attach|atoms attach]]&lt;br /&gt;
* [[CYANA Command: atoms calibrate|atoms calibrate]]&lt;br /&gt;
* [[CYANA Command: atoms count|atoms count]]&lt;br /&gt;
* [[CYANA Command: atoms glomsa|atoms glomsa]]&lt;br /&gt;
* [[CYANA Command: atoms list|atoms list]]&lt;br /&gt;
* [[CYANA Command: atoms observable|atoms observable]]&lt;br /&gt;
* [[CYANA Command: atoms select|atoms select]]&lt;br /&gt;
* [[CYANA Command: atoms set|atoms set]]&lt;br /&gt;
* [[CYANA Command: atoms shifts|atoms shifts]]&lt;br /&gt;
* [[CYANA Command: atoms stereo|atoms stereo]]&lt;br /&gt;
* [[CYANA Command: atoms swap|atoms swap]]&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
* [[CYANA Macro: calc_all|calc_all]] (macro)&lt;br /&gt;
* [[CYANA Macro: caliba|caliba]] (macro)&lt;br /&gt;
* [[CYANA Command: calibrate|calibrate]]&lt;br /&gt;
* [[CYANA Macro: calibration|calibration]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftaco|cashiftaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftplot|cashiftplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: cisprocheck|cisprocheck]] (macro)&lt;br /&gt;
* [[CYANA Macro: coco|coco]] (macro)&lt;br /&gt;
* [[CYANA Command: couplings count|couplings count]]&lt;br /&gt;
* [[CYANA Command: couplings delete|couplings delete]]&lt;br /&gt;
* [[CYANA Command: couplings make|couplings make]]&lt;br /&gt;
* [[CYANA Command: couplings select|couplings select]]&lt;br /&gt;
* [[CYANA Command: couplings set|couplings set]]&lt;br /&gt;
* [[CYANA Macro: cyscheck|cyscheck]] (macro)&lt;br /&gt;
=== D ===&lt;br /&gt;
* [[CYANA Macro: dcostat|dcostat]] (macro)&lt;br /&gt;
* [[CYANA Macro: dcotab|dcotab]] (macro)&lt;br /&gt;
* [[CYANA Macro: deposit|deposit]] (macro)&lt;br /&gt;
* [[CYANA Macro: dinucleotide|dinucleotide]] (macro)&lt;br /&gt;
* [[CYANA Command: distances calculate|distances calculate]]&lt;br /&gt;
* [[CYANA Command: distances check|distances check]]&lt;br /&gt;
* [[CYANA Command: distances combine|distances combine]]&lt;br /&gt;
* [[CYANA Command: distances compare|distances compare]]&lt;br /&gt;
* [[CYANA Command: distances correct|distances correct]]&lt;br /&gt;
* [[CYANA Command: distances count|distances count]]&lt;br /&gt;
* [[CYANA Command: distances delete|distances delete]]&lt;br /&gt;
* [[CYANA Command: distances expand|distances expand]]&lt;br /&gt;
* [[CYANA Command: distances falsify|distances falsify]]&lt;br /&gt;
* [[CYANA Command: distances hbond|distances hbond]]&lt;br /&gt;
* [[CYANA Command: distances make|distances make]]&lt;br /&gt;
* [[CYANA Command: distances modify|distances modify]]&lt;br /&gt;
* [[CYANA Command: distances multiple|distances multiple]]&lt;br /&gt;
* [[CYANA Command: distances select|distances select]]&lt;br /&gt;
* [[CYANA Command: distances set|distances set]]&lt;br /&gt;
* [[CYANA Command: distances short|distances short]]&lt;br /&gt;
* [[CYANA Command: distances split|distances split]]&lt;br /&gt;
* [[CYANA Command: distances stat|distances stat]]&lt;br /&gt;
* [[CYANA Command: distances stereoexpand|distances stereoexpand]]&lt;br /&gt;
* [[CYANA Command: distances unique|distances unique]]&lt;br /&gt;
* [[CYANA Command: distances vdw|distances vdw]]&lt;br /&gt;
=== E ===&lt;br /&gt;
* [[CYANA Command: enoe init |enoe init]]&lt;br /&gt;
* [[CYANA Command: enoe diag |enoe diag]]&lt;br /&gt;
* [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
* [[CYANA Command: enoe sig |enoe sigma]]&lt;br /&gt;
* [[CYANA Command: enoe reff |enoe reff]]&lt;br /&gt;
* [[CYANA Command: enoe restraint |enoe restraint]]&lt;br /&gt;
* [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
* [[CYANA Command: enoe spdcorr |enoe spdcorr]]&lt;br /&gt;
* [[CYANA Command: enoe twospin |enoe twospin]]&lt;br /&gt;
* [[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
* [[CYANA Command: enoe plotbup |enoe plotbup]]&lt;br /&gt;
* [[CYANA Command: enoe plotdec |enoe plotdec]]&lt;br /&gt;
* [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
&lt;br /&gt;
=== F ===&lt;br /&gt;
* [[CYANA Macro: flip|flip]] (macro)&lt;br /&gt;
* [[CYANA Macro: forall|forall]] (macro)&lt;br /&gt;
=== G ===&lt;br /&gt;
* [[CYANA Macro: garant|garant]] (macro)&lt;br /&gt;
* [[CYANA Command: gradient|gradient]]&lt;br /&gt;
* [[CYANA Macro: graf|graf]] (macro)&lt;br /&gt;
* [[CYANA Command: grid aco|grid aco]]&lt;br /&gt;
* [[CYANA Command: grid correlate|grid correlate]]&lt;br /&gt;
* [[CYANA Command: grid fragment|grid fragment]]&lt;br /&gt;
* [[CYANA Command: grid memory|grid memory]]&lt;br /&gt;
* [[CYANA Macro: gridplot|gridplot]] (macro)&lt;br /&gt;
* [[CYANA Command: grid search|grid search]]&lt;br /&gt;
* [[CYANA Command: grid swap|grid swap]]&lt;br /&gt;
=== H ===&lt;br /&gt;
* [[CYANA Macro: habas|habas]] (macro)&lt;br /&gt;
* [[CYANA Macro: hbond|hbond]] (macro)&lt;br /&gt;
=== I ===&lt;br /&gt;
* [[CYANA Macro: init|init]] (macro)&lt;br /&gt;
* [[CYANA Macro: initsafe|initsafe]] (macro)&lt;br /&gt;
=== K ===&lt;br /&gt;
* [[CYANA Macro: karplus|karplus]] (macro)&lt;br /&gt;
* [[CYANA Macro: kringle|kringle]] (macro)&lt;br /&gt;
=== L ===&lt;br /&gt;
* [[CYANA Command: library check|library check]]&lt;br /&gt;
* [[CYANA Command: library mirror|library mirror]]&lt;br /&gt;
* [[CYANA Command: library new|library new]]&lt;br /&gt;
* [[CYANA Command: library remove|library remove]]&lt;br /&gt;
* [[CYANA Command: library rename|library rename]]&lt;br /&gt;
* [[CYANA Command: library replace|library replace]]&lt;br /&gt;
* [[CYANA Macro: longrangeplot|longrangeplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: loop|loop]] (macro)&lt;br /&gt;
=== M ===&lt;br /&gt;
* [[CYANA Macro: makeaco|makeaco]] (macro)&lt;br /&gt;
* [[CYANA Command: md|md]]&lt;br /&gt;
* [[CYANA Command: minimize|minimize]]&lt;br /&gt;
* [[CYANA Command: molecules define|molecules define]]&lt;br /&gt;
* [[CYANA Command: molecules identity|molecules identity]]&lt;br /&gt;
* [[CYANA Command: molecules symdist|molecules symdist]]&lt;br /&gt;
=== N ===&lt;br /&gt;
* [[CYANA Macro: noeassign|noeassign]] (macro)&lt;br /&gt;
=== O ===&lt;br /&gt;
* [[CYANA Macro: onelettercode|onelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: opalprefine|opalprefine]] (macro)&lt;br /&gt;
* [[CYANA Macro: overlay|overlay]] (macro)&lt;br /&gt;
* [[CYANA Macro: overview|overview]] (macro)&lt;br /&gt;
=== P ===&lt;br /&gt;
* [[CYANA Command: pcs axial|pcs axial]]&lt;br /&gt;
* [[CYANA Command: pcs count|pcs count]]&lt;br /&gt;
* [[CYANA Command: pcs delete|pcs delete]]&lt;br /&gt;
* [[CYANA Command: pcs list|pcs list]]&lt;br /&gt;
* [[CYANA Command: pcs make|pcs make]]&lt;br /&gt;
* [[CYANA Command: pcs rhombic|pcs rhombic]]&lt;br /&gt;
* [[CYANA Command: pcs select|pcs select]]&lt;br /&gt;
* [[CYANA Command: pcs set|pcs set]]&lt;br /&gt;
* [[CYANA Macro: peakcheck|peakcheck]] (macro)&lt;br /&gt;
* [[CYANA Command: peaks backcal|peaks backcal]]&lt;br /&gt;
* [[CYANA Command: peaks calibrate|peaks calibrate]]&lt;br /&gt;
* [[CYANA Command: peaks count|peaks count]]&lt;br /&gt;
* [[CYANA Command: peaks create|peaks create]]&lt;br /&gt;
* [[CYANA Command: peaks delete|peaks delete]]&lt;br /&gt;
* [[CYANA Command: peaks deviations|peaks deviations]]&lt;br /&gt;
* [[CYANA Command: peaks distance|peaks distance]]&lt;br /&gt;
* [[CYANA Command: peaks filter|peaks filter]]&lt;br /&gt;
* [[CYANA Command: peaks fit|peaks fit]]&lt;br /&gt;
* [[CYANA Command: peaks protonize|peaks protonize]]&lt;br /&gt;
* [[CYANA Command: peaks select|peaks select]]&lt;br /&gt;
* [[CYANA Command: peaks set|peaks set]]&lt;br /&gt;
* [[CYANA Command: peaks simplecal|peaks simplecal]]&lt;br /&gt;
* [[CYANA Command: peaks split|peaks split]]&lt;br /&gt;
* [[CYANA Command: peaks unassign|peaks unassign]]&lt;br /&gt;
* [[CYANA Command: peaks unique|peaks unique]]&lt;br /&gt;
* [[CYANA Macro: prolinebond|prolinebond]] (macro)&lt;br /&gt;
=== R ===&lt;br /&gt;
* [[CYANA Macro: ramaaco|ramaaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: ramaplot|ramaplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: random_all|random_all]] (macro)&lt;br /&gt;
* [[CYANA Command: randomize|randomize]]&lt;br /&gt;
* [[CYANA Command: rdc count|rdc count]]&lt;br /&gt;
* [[CYANA Command: rdc delete|rdc delete]]&lt;br /&gt;
* [[CYANA Command: rdc distance|rdc distance]]&lt;br /&gt;
* [[CYANA Macro: rdcdistances|rdcdistances]] (macro)&lt;br /&gt;
* [[CYANA Command: rdc fittensor|rdc fittensor]]&lt;br /&gt;
* [[CYANA Command: rdc list|rdc list]]&lt;br /&gt;
* [[CYANA Command: rdc make|rdc make]]&lt;br /&gt;
* [[CYANA Command: rdc select|rdc select]]&lt;br /&gt;
* [[CYANA Command: rdc set|rdc set]]&lt;br /&gt;
* [[CYANA Command: rdc tensor|rdc tensor]]&lt;br /&gt;
* [[CYANA Command: read aco|read aco]]&lt;br /&gt;
* [[CYANA Macro: read_all|read_all]] (macro)&lt;br /&gt;
* [[CYANA Command: read ang|read ang]]&lt;br /&gt;
* [[CYANA Command: read bmrb|read bmrb]]&lt;br /&gt;
* [[CYANA Command: read cco|read cco]]&lt;br /&gt;
* [[CYANA Command: read cor|read cor]]&lt;br /&gt;
* [[CYANA Macro: readdata|readdata]] (macro)&lt;br /&gt;
* [[CYANA Command: read lib|read lib]]&lt;br /&gt;
* [[CYANA Command: read lol|read lol]]&lt;br /&gt;
* [[CYANA Command: read nmrview|read nmrview]]&lt;br /&gt;
* [[CYANA Command: read pcs|read pcs]]&lt;br /&gt;
* [[CYANA Command: read pdb|read pdb]]&lt;br /&gt;
* [[CYANA Command: read peaks|read peaks]]&lt;br /&gt;
* [[CYANA Command: read prot|read prot]]&lt;br /&gt;
* [[CYANA Command: read rdc|read rdc]]&lt;br /&gt;
* [[CYANA Command: read rho|read rho]]&lt;br /&gt;
* [[CYANA Command: read tab|read tab]]&lt;br /&gt;
* [[CYANA Command: read upl|read upl]]&lt;br /&gt;
* [[CYANA Command: read xpk|read xpk]]&lt;br /&gt;
* [[CYANA Command: read xplor|read xplor]]&lt;br /&gt;
* [[CYANA Macro: redac|redac]] (macro)&lt;br /&gt;
* [[CYANA Macro: renumber|renumber]] (macro)&lt;br /&gt;
* [[CYANA Macro: rmsd|rmsd]] (macro)&lt;br /&gt;
* [[CYANA Macro: rotameraco|rotameraco]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== S ===&lt;br /&gt;
* [[CYANA Macro: savestereo|savestereo]] (macro)&lt;br /&gt;
* [[CYANA Macro: seqplot|seqplot]] (macro)&lt;br /&gt;
* [[CYANA Command: shifts adapt|shifts adapt]]&lt;br /&gt;
* [[CYANA Command: shifts assign|shifts assign]]&lt;br /&gt;
* [[CYANA Command: shifts check|shifts check]]&lt;br /&gt;
* [[CYANA Command: shifts collapse|shifts collapse]]&lt;br /&gt;
* [[CYANA Command: shifts consolidate|shifts consolidate]]&lt;br /&gt;
* [[CYANA Command: shifts converge|shifts converge]]&lt;br /&gt;
* [[CYANA Command: shifts d2o|shifts d2o]]&lt;br /&gt;
* [[CYANA Command: shifts incomplete|shifts incomplete]]&lt;br /&gt;
* [[CYANA Command: shifts initialize|shifts initialize]]&lt;br /&gt;
* [[CYANA Command: shifts missing|shifts missing]]&lt;br /&gt;
* [[CYANA Command: shifts randomcoil|shifts randomcoil]]&lt;br /&gt;
* [[CYANA Command: shifts renumber|shifts renumber]]&lt;br /&gt;
* [[CYANA Command: shifts unusual|shifts unusual]]&lt;br /&gt;
* [[CYANA Macro: ssbond|ssbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: stereoassign|stereoassign]] (macro)&lt;br /&gt;
* [[CYANA Macro: structcalc|structcalc]] (macro)&lt;br /&gt;
* [[CYANA Command: structures clear|structures clear]]&lt;br /&gt;
* [[CYANA Command: structures copy|structures copy]]&lt;br /&gt;
* [[CYANA Command: structures hbonds|structures hbonds]]&lt;br /&gt;
* [[CYANA Command: structures insert|structures insert]]&lt;br /&gt;
* [[CYANA Command: structures list|structures list]]&lt;br /&gt;
* [[CYANA Command: structures mean|structures mean]]&lt;br /&gt;
* [[CYANA Command: structures overlay|structures overlay]]&lt;br /&gt;
* [[CYANA Command: structures secondary|structures secondary]]&lt;br /&gt;
* [[CYANA Command: structures select|structures select]]&lt;br /&gt;
* [[CYANA Command: structures sort|structures sort]]&lt;br /&gt;
* [[CYANA Command: structures swap|structures swap]]&lt;br /&gt;
* [[CYANA Command: structures violate|structures violate]]&lt;br /&gt;
* [[CYANA Macro: sugarbond|sugarbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: sugarring|sugarring]] (macro)&lt;br /&gt;
* [[CYANA Macro: syscheck|syscheck]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== T ===&lt;br /&gt;
* [[CYANA Macro: talos|talos]] (macro)&lt;br /&gt;
* [[CYANA Macro: talosaco|talosaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: taloslist|taloslist]] (macro)&lt;br /&gt;
* [[CYANA Macro: threelettercode|threelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: translate|translate]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== V ===&lt;br /&gt;
* [[CYANA Macro: vtfmin|vtfmin]] (macro)&lt;br /&gt;
=== W ===&lt;br /&gt;
* [[CYANA Macro: watsoncrick|watsoncrick]] (macro)&lt;br /&gt;
* [[CYANA Command: write aco|write aco]]&lt;br /&gt;
* [[CYANA Macro: write_all|write_all]] (macro)&lt;br /&gt;
* [[CYANA Command: write ang|write ang]]&lt;br /&gt;
* [[CYANA Command: write assign|write assign]]&lt;br /&gt;
* [[CYANA Command: write bmrb|write bmrb]]&lt;br /&gt;
* [[CYANA Command: write cco|write cco]]&lt;br /&gt;
* [[CYANA Command: write cor|write cor]]&lt;br /&gt;
* [[CYANA Command: write lib|write lib]]&lt;br /&gt;
* [[CYANA Command: write lol|write lol]]&lt;br /&gt;
* [[CYANA Command: write pcs|write pcs]]&lt;br /&gt;
* [[CYANA Command: write pdb|write pdb]]&lt;br /&gt;
* [[CYANA Command: write peaks|write peaks]]&lt;br /&gt;
* [[CYANA Command: write prot|write prot]]&lt;br /&gt;
* [[CYANA Command: write rdc|write rdc]]&lt;br /&gt;
* [[CYANA Command: write rho|write rho]]&lt;br /&gt;
* [[CYANA Command: write seq|write seq]]&lt;br /&gt;
* [[CYANA Command: write sparky|write sparky]]&lt;br /&gt;
* [[CYANA Command: write upl|write upl]]&lt;br /&gt;
* [[CYANA Command: write xpk|write xpk]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9768</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9768"/>
		<updated>2019-11-20T15:44:11Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;rho=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;tauc=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;occupancy=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev :Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;rho :Used to set the rho parameter of selected atoms for eNOE calculations. &lt;br /&gt;
:;tauc :Used to set the tauc parameter of selected atoms for eNOE calculations.&lt;br /&gt;
:;occupancy : Used to set the occupancy parameter of selected atoms for writing multi-state structure files.&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9767</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9767"/>
		<updated>2019-11-20T15:43:44Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;rho=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;tauc=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;occupancy=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev :Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;rho :Used to set the rho parameter of selected atoms for eNOE calculations. &lt;br /&gt;
:;tauc :Used to set the tauc parameter of selected atoms for eNOE calculations.&lt;br /&gt;
;:occupancy : Used to set the occupancy parameter of selected atoms for writing multi-state structure files.&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9766</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9766"/>
		<updated>2019-11-20T15:42:31Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;rho=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;tauc=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;occupancy=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev :Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;rho :Used to set the rho parameter of selected atoms for eNOE calculations. &lt;br /&gt;
:;tauc :Used to set the tauc parameter of selected atoms for eNOE calculations.&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9765</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9765"/>
		<updated>2019-11-20T15:41:48Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Depositing multi-states structures to a PDB data base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9764</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9764"/>
		<updated>2019-11-20T15:40:30Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9763</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9763"/>
		<updated>2019-11-20T15:39:41Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9762</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9762"/>
		<updated>2019-11-20T15:39:13Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Generating XEASY peak list with expected FRM or two-spin intensities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9761</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9761"/>
		<updated>2019-11-20T15:37:56Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* The init macro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   [[CYANA Command: atoms set|atoms set]] * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9760</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9760"/>
		<updated>2019-11-20T15:28:17Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* The init macro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9759</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9759"/>
		<updated>2019-11-20T15:27:54Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* TauC setting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9758</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9758"/>
		<updated>2019-11-20T15:27:41Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* D20 exchange */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9757</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9757"/>
		<updated>2019-11-20T15:27:04Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Using Talos to generate torsion angle restraints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 [[CYANA Command: atoms set|atoms set]] &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9756</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9756"/>
		<updated>2019-11-20T15:23:14Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;rho=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;tauc=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev :Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;rho :Used to set the rho parameter of selected atoms for eNOE calculations. &lt;br /&gt;
:;tauc :Used to set the tauc parameter of selected atoms for eNOE calculations.&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9755</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9755"/>
		<updated>2019-11-20T15:22:38Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;rho=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;tauc=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev :Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;rho :Used to set the rho parameter of selected atoms for eNOE calculations. &lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9754</id>
		<title>CYANA Commands</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Commands&amp;diff=9754"/>
		<updated>2019-11-20T15:20:25Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* A */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
== CYANA Commands ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4;-moz-column-count:4;-webkit-column-count:4&amp;quot;&amp;gt;&lt;br /&gt;
=== A ===&lt;br /&gt;
* [[CYANA Command: angles count|angles count]]&lt;br /&gt;
* [[CYANA Command: angles delete|angles delete]]&lt;br /&gt;
* [[CYANA Command: angles flip|angles flip]]&lt;br /&gt;
* [[CYANA Command: angles ramachandran|angles ramachandran]]&lt;br /&gt;
* [[CYANA Command: angles select|angles select]]&lt;br /&gt;
* [[CYANA Command: angles set|angles set]]&lt;br /&gt;
* [[CYANA Command: angles split|angles split]]&lt;br /&gt;
* [[CYANA Command: angstat clear|angstat clear]]&lt;br /&gt;
* [[CYANA Command: angstat list|angstat list]]&lt;br /&gt;
* [[CYANA Command: angstat make|angstat make]]&lt;br /&gt;
* [[CYANA Macro: anneal|anneal]] (macro)&lt;br /&gt;
* [[CYANA Command: assign|assign]]&lt;br /&gt;
* [[CYANA Command: atoms attach|atoms attach]]&lt;br /&gt;
* [[CYANA Command: atoms calibrate|atoms calibrate]]&lt;br /&gt;
* [[CYANA Command: atoms count|atoms count]]&lt;br /&gt;
* [[CYANA Command: atoms glomsa|atoms glomsa]]&lt;br /&gt;
* [[CYANA Command: atoms list|atoms list]]&lt;br /&gt;
* [[CYANA Command: atoms observable|atoms observable]]&lt;br /&gt;
* [[CYANA Command: atoms select|atoms select]]&lt;br /&gt;
* [[CYANA Command: atoms set|atoms set]]&lt;br /&gt;
* [[CYANA Command: atoms shifts|atoms shifts]]&lt;br /&gt;
* [[CYANA Command: atoms stereo|atoms stereo]]&lt;br /&gt;
* [[CYANA Command: atoms swap|atoms swap]]&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
* [[CYANA Macro: calc_all|calc_all]] (macro)&lt;br /&gt;
* [[CYANA Macro: caliba|caliba]] (macro)&lt;br /&gt;
* [[CYANA Command: calibrate|calibrate]]&lt;br /&gt;
* [[CYANA Macro: calibration|calibration]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftaco|cashiftaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: cashiftplot|cashiftplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: cisprocheck|cisprocheck]] (macro)&lt;br /&gt;
* [[CYANA Macro: coco|coco]] (macro)&lt;br /&gt;
* [[CYANA Command: couplings count|couplings count]]&lt;br /&gt;
* [[CYANA Command: couplings delete|couplings delete]]&lt;br /&gt;
* [[CYANA Command: couplings make|couplings make]]&lt;br /&gt;
* [[CYANA Command: couplings select|couplings select]]&lt;br /&gt;
* [[CYANA Command: couplings set|couplings set]]&lt;br /&gt;
* [[CYANA Macro: cyscheck|cyscheck]] (macro)&lt;br /&gt;
=== D ===&lt;br /&gt;
* [[CYANA Macro: dcostat|dcostat]] (macro)&lt;br /&gt;
* [[CYANA Macro: dcotab|dcotab]] (macro)&lt;br /&gt;
* [[CYANA Macro: deposit|deposit]] (macro)&lt;br /&gt;
* [[CYANA Macro: dinucleotide|dinucleotide]] (macro)&lt;br /&gt;
* [[CYANA Command: distances calculate|distances calculate]]&lt;br /&gt;
* [[CYANA Command: distances check|distances check]]&lt;br /&gt;
* [[CYANA Command: distances combine|distances combine]]&lt;br /&gt;
* [[CYANA Command: distances compare|distances compare]]&lt;br /&gt;
* [[CYANA Command: distances correct|distances correct]]&lt;br /&gt;
* [[CYANA Command: distances count|distances count]]&lt;br /&gt;
* [[CYANA Command: distances delete|distances delete]]&lt;br /&gt;
* [[CYANA Command: distances expand|distances expand]]&lt;br /&gt;
* [[CYANA Command: distances falsify|distances falsify]]&lt;br /&gt;
* [[CYANA Command: distances hbond|distances hbond]]&lt;br /&gt;
* [[CYANA Command: distances make|distances make]]&lt;br /&gt;
* [[CYANA Command: distances modify|distances modify]]&lt;br /&gt;
* [[CYANA Command: distances multiple|distances multiple]]&lt;br /&gt;
* [[CYANA Command: distances select|distances select]]&lt;br /&gt;
* [[CYANA Command: distances set|distances set]]&lt;br /&gt;
* [[CYANA Command: distances short|distances short]]&lt;br /&gt;
* [[CYANA Command: distances split|distances split]]&lt;br /&gt;
* [[CYANA Command: distances stat|distances stat]]&lt;br /&gt;
* [[CYANA Command: distances stereoexpand|distances stereoexpand]]&lt;br /&gt;
* [[CYANA Command: distances unique|distances unique]]&lt;br /&gt;
* [[CYANA Command: distances vdw|distances vdw]]&lt;br /&gt;
=== E ===&lt;br /&gt;
* [[CYANA Command: enoe avgExpVal |enoe avgExpVal]]&lt;br /&gt;
* [[CYANA Command: enoe init |enoe init]]&lt;br /&gt;
* [[CYANA Command: enoe diag |enoe diag]]&lt;br /&gt;
* [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
* [[CYANA Command: enoe sig |enoe sigma]]&lt;br /&gt;
* [[CYANA Command: enoe reff |enoe reff]]&lt;br /&gt;
* [[CYANA Command: enoe restraint |enoe restraint]]&lt;br /&gt;
* [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
* [[CYANA Command: enoe spdcorr |enoe spdcorr]]&lt;br /&gt;
* [[CYANA Command: enoe twospin |enoe twospin]]&lt;br /&gt;
* [[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
* [[CYANA Command: enoe plotbup |enoe plotbup]]&lt;br /&gt;
* [[CYANA Command: enoe plotdec |enoe plotdec]]&lt;br /&gt;
* [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
=== F ===&lt;br /&gt;
* [[CYANA Macro: flip|flip]] (macro)&lt;br /&gt;
* [[CYANA Macro: forall|forall]] (macro)&lt;br /&gt;
=== G ===&lt;br /&gt;
* [[CYANA Macro: garant|garant]] (macro)&lt;br /&gt;
* [[CYANA Command: gradient|gradient]]&lt;br /&gt;
* [[CYANA Macro: graf|graf]] (macro)&lt;br /&gt;
* [[CYANA Command: grid aco|grid aco]]&lt;br /&gt;
* [[CYANA Command: grid correlate|grid correlate]]&lt;br /&gt;
* [[CYANA Command: grid fragment|grid fragment]]&lt;br /&gt;
* [[CYANA Command: grid memory|grid memory]]&lt;br /&gt;
* [[CYANA Macro: gridplot|gridplot]] (macro)&lt;br /&gt;
* [[CYANA Command: grid search|grid search]]&lt;br /&gt;
* [[CYANA Command: grid swap|grid swap]]&lt;br /&gt;
=== H ===&lt;br /&gt;
* [[CYANA Macro: habas|habas]] (macro)&lt;br /&gt;
* [[CYANA Macro: hbond|hbond]] (macro)&lt;br /&gt;
=== I ===&lt;br /&gt;
* [[CYANA Macro: init|init]] (macro)&lt;br /&gt;
* [[CYANA Macro: initsafe|initsafe]] (macro)&lt;br /&gt;
=== K ===&lt;br /&gt;
* [[CYANA Macro: karplus|karplus]] (macro)&lt;br /&gt;
* [[CYANA Macro: kringle|kringle]] (macro)&lt;br /&gt;
=== L ===&lt;br /&gt;
* [[CYANA Command: library check|library check]]&lt;br /&gt;
* [[CYANA Command: library mirror|library mirror]]&lt;br /&gt;
* [[CYANA Command: library new|library new]]&lt;br /&gt;
* [[CYANA Command: library remove|library remove]]&lt;br /&gt;
* [[CYANA Command: library rename|library rename]]&lt;br /&gt;
* [[CYANA Command: library replace|library replace]]&lt;br /&gt;
* [[CYANA Macro: longrangeplot|longrangeplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: loop|loop]] (macro)&lt;br /&gt;
=== M ===&lt;br /&gt;
* [[CYANA Macro: makeaco|makeaco]] (macro)&lt;br /&gt;
* [[CYANA Command: md|md]]&lt;br /&gt;
* [[CYANA Command: minimize|minimize]]&lt;br /&gt;
* [[CYANA Command: molecules define|molecules define]]&lt;br /&gt;
* [[CYANA Command: molecules identity|molecules identity]]&lt;br /&gt;
* [[CYANA Command: molecules symdist|molecules symdist]]&lt;br /&gt;
=== N ===&lt;br /&gt;
* [[CYANA Macro: noeassign|noeassign]] (macro)&lt;br /&gt;
=== O ===&lt;br /&gt;
* [[CYANA Macro: onelettercode|onelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: opalprefine|opalprefine]] (macro)&lt;br /&gt;
* [[CYANA Macro: overlay|overlay]] (macro)&lt;br /&gt;
* [[CYANA Macro: overview|overview]] (macro)&lt;br /&gt;
=== P ===&lt;br /&gt;
* [[CYANA Command: pcs axial|pcs axial]]&lt;br /&gt;
* [[CYANA Command: pcs count|pcs count]]&lt;br /&gt;
* [[CYANA Command: pcs delete|pcs delete]]&lt;br /&gt;
* [[CYANA Command: pcs list|pcs list]]&lt;br /&gt;
* [[CYANA Command: pcs make|pcs make]]&lt;br /&gt;
* [[CYANA Command: pcs rhombic|pcs rhombic]]&lt;br /&gt;
* [[CYANA Command: pcs select|pcs select]]&lt;br /&gt;
* [[CYANA Command: pcs set|pcs set]]&lt;br /&gt;
* [[CYANA Macro: peakcheck|peakcheck]] (macro)&lt;br /&gt;
* [[CYANA Command: peaks backcal|peaks backcal]]&lt;br /&gt;
* [[CYANA Command: peaks calibrate|peaks calibrate]]&lt;br /&gt;
* [[CYANA Command: peaks count|peaks count]]&lt;br /&gt;
* [[CYANA Command: peaks create|peaks create]]&lt;br /&gt;
* [[CYANA Command: peaks delete|peaks delete]]&lt;br /&gt;
* [[CYANA Command: peaks deviations|peaks deviations]]&lt;br /&gt;
* [[CYANA Command: peaks distance|peaks distance]]&lt;br /&gt;
* [[CYANA Command: peaks filter|peaks filter]]&lt;br /&gt;
* [[CYANA Command: peaks fit|peaks fit]]&lt;br /&gt;
* [[CYANA Command: peaks protonize|peaks protonize]]&lt;br /&gt;
* [[CYANA Command: peaks select|peaks select]]&lt;br /&gt;
* [[CYANA Command: peaks set|peaks set]]&lt;br /&gt;
* [[CYANA Command: peaks simplecal|peaks simplecal]]&lt;br /&gt;
* [[CYANA Command: peaks split|peaks split]]&lt;br /&gt;
* [[CYANA Command: peaks unassign|peaks unassign]]&lt;br /&gt;
* [[CYANA Command: peaks unique|peaks unique]]&lt;br /&gt;
* [[CYANA Macro: prolinebond|prolinebond]] (macro)&lt;br /&gt;
=== R ===&lt;br /&gt;
* [[CYANA Macro: ramaaco|ramaaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: ramaplot|ramaplot]] (macro)&lt;br /&gt;
* [[CYANA Macro: random_all|random_all]] (macro)&lt;br /&gt;
* [[CYANA Command: randomize|randomize]]&lt;br /&gt;
* [[CYANA Command: rdc count|rdc count]]&lt;br /&gt;
* [[CYANA Command: rdc delete|rdc delete]]&lt;br /&gt;
* [[CYANA Command: rdc distance|rdc distance]]&lt;br /&gt;
* [[CYANA Macro: rdcdistances|rdcdistances]] (macro)&lt;br /&gt;
* [[CYANA Command: rdc fittensor|rdc fittensor]]&lt;br /&gt;
* [[CYANA Command: rdc list|rdc list]]&lt;br /&gt;
* [[CYANA Command: rdc make|rdc make]]&lt;br /&gt;
* [[CYANA Command: rdc select|rdc select]]&lt;br /&gt;
* [[CYANA Command: rdc set|rdc set]]&lt;br /&gt;
* [[CYANA Command: rdc tensor|rdc tensor]]&lt;br /&gt;
* [[CYANA Command: read aco|read aco]]&lt;br /&gt;
* [[CYANA Macro: read_all|read_all]] (macro)&lt;br /&gt;
* [[CYANA Command: read ang|read ang]]&lt;br /&gt;
* [[CYANA Command: read bmrb|read bmrb]]&lt;br /&gt;
* [[CYANA Command: read cco|read cco]]&lt;br /&gt;
* [[CYANA Command: read cor|read cor]]&lt;br /&gt;
* [[CYANA Macro: readdata|readdata]] (macro)&lt;br /&gt;
* [[CYANA Command: read lib|read lib]]&lt;br /&gt;
* [[CYANA Command: read lol|read lol]]&lt;br /&gt;
* [[CYANA Command: read nmrview|read nmrview]]&lt;br /&gt;
* [[CYANA Command: read pcs|read pcs]]&lt;br /&gt;
* [[CYANA Command: read pdb|read pdb]]&lt;br /&gt;
* [[CYANA Command: read peaks|read peaks]]&lt;br /&gt;
* [[CYANA Command: read prot|read prot]]&lt;br /&gt;
* [[CYANA Command: read rdc|read rdc]]&lt;br /&gt;
* [[CYANA Command: read rho|read rho]]&lt;br /&gt;
* [[CYANA Command: read tab|read tab]]&lt;br /&gt;
* [[CYANA Command: read upl|read upl]]&lt;br /&gt;
* [[CYANA Command: read xpk|read xpk]]&lt;br /&gt;
* [[CYANA Command: read xplor|read xplor]]&lt;br /&gt;
* [[CYANA Macro: redac|redac]] (macro)&lt;br /&gt;
* [[CYANA Macro: renumber|renumber]] (macro)&lt;br /&gt;
* [[CYANA Macro: rmsd|rmsd]] (macro)&lt;br /&gt;
* [[CYANA Macro: rotameraco|rotameraco]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== S ===&lt;br /&gt;
* [[CYANA Macro: savestereo|savestereo]] (macro)&lt;br /&gt;
* [[CYANA Macro: seqplot|seqplot]] (macro)&lt;br /&gt;
* [[CYANA Command: shifts adapt|shifts adapt]]&lt;br /&gt;
* [[CYANA Command: shifts assign|shifts assign]]&lt;br /&gt;
* [[CYANA Command: shifts check|shifts check]]&lt;br /&gt;
* [[CYANA Command: shifts collapse|shifts collapse]]&lt;br /&gt;
* [[CYANA Command: shifts consolidate|shifts consolidate]]&lt;br /&gt;
* [[CYANA Command: shifts converge|shifts converge]]&lt;br /&gt;
* [[CYANA Command: shifts d2o|shifts d2o]]&lt;br /&gt;
* [[CYANA Command: shifts incomplete|shifts incomplete]]&lt;br /&gt;
* [[CYANA Command: shifts initialize|shifts initialize]]&lt;br /&gt;
* [[CYANA Command: shifts missing|shifts missing]]&lt;br /&gt;
* [[CYANA Command: shifts randomcoil|shifts randomcoil]]&lt;br /&gt;
* [[CYANA Command: shifts renumber|shifts renumber]]&lt;br /&gt;
* [[CYANA Command: shifts unusual|shifts unusual]]&lt;br /&gt;
* [[CYANA Macro: ssbond|ssbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: stereoassign|stereoassign]] (macro)&lt;br /&gt;
* [[CYANA Macro: structcalc|structcalc]] (macro)&lt;br /&gt;
* [[CYANA Command: structures clear|structures clear]]&lt;br /&gt;
* [[CYANA Command: structures copy|structures copy]]&lt;br /&gt;
* [[CYANA Command: structures hbonds|structures hbonds]]&lt;br /&gt;
* [[CYANA Command: structures insert|structures insert]]&lt;br /&gt;
* [[CYANA Command: structures list|structures list]]&lt;br /&gt;
* [[CYANA Command: structures mean|structures mean]]&lt;br /&gt;
* [[CYANA Command: structures overlay|structures overlay]]&lt;br /&gt;
* [[CYANA Command: structures secondary|structures secondary]]&lt;br /&gt;
* [[CYANA Command: structures select|structures select]]&lt;br /&gt;
* [[CYANA Command: structures sort|structures sort]]&lt;br /&gt;
* [[CYANA Command: structures swap|structures swap]]&lt;br /&gt;
* [[CYANA Command: structures violate|structures violate]]&lt;br /&gt;
* [[CYANA Macro: sugarbond|sugarbond]] (macro)&lt;br /&gt;
* [[CYANA Macro: sugarring|sugarring]] (macro)&lt;br /&gt;
* [[CYANA Macro: syscheck|syscheck]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== T ===&lt;br /&gt;
* [[CYANA Macro: talos|talos]] (macro)&lt;br /&gt;
* [[CYANA Macro: talosaco|talosaco]] (macro)&lt;br /&gt;
* [[CYANA Macro: taloslist|taloslist]] (macro)&lt;br /&gt;
* [[CYANA Macro: threelettercode|threelettercode]] (macro)&lt;br /&gt;
* [[CYANA Macro: translate|translate]] (macro)&lt;br /&gt;
&lt;br /&gt;
=== V ===&lt;br /&gt;
* [[CYANA Macro: vtfmin|vtfmin]] (macro)&lt;br /&gt;
=== W ===&lt;br /&gt;
* [[CYANA Macro: watsoncrick|watsoncrick]] (macro)&lt;br /&gt;
* [[CYANA Command: write aco|write aco]]&lt;br /&gt;
* [[CYANA Macro: write_all|write_all]] (macro)&lt;br /&gt;
* [[CYANA Command: write ang|write ang]]&lt;br /&gt;
* [[CYANA Command: write assign|write assign]]&lt;br /&gt;
* [[CYANA Command: write bmrb|write bmrb]]&lt;br /&gt;
* [[CYANA Command: write cco|write cco]]&lt;br /&gt;
* [[CYANA Command: write cor|write cor]]&lt;br /&gt;
* [[CYANA Command: write lib|write lib]]&lt;br /&gt;
* [[CYANA Command: write lol|write lol]]&lt;br /&gt;
* [[CYANA Command: write pcs|write pcs]]&lt;br /&gt;
* [[CYANA Command: write pdb|write pdb]]&lt;br /&gt;
* [[CYANA Command: write peaks|write peaks]]&lt;br /&gt;
* [[CYANA Command: write prot|write prot]]&lt;br /&gt;
* [[CYANA Command: write rdc|write rdc]]&lt;br /&gt;
* [[CYANA Command: write rho|write rho]]&lt;br /&gt;
* [[CYANA Command: write seq|write seq]]&lt;br /&gt;
* [[CYANA Command: write sparky|write sparky]]&lt;br /&gt;
* [[CYANA Command: write upl|write upl]]&lt;br /&gt;
* [[CYANA Command: write xpk|write xpk]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9753</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9753"/>
		<updated>2019-11-20T15:19:37Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;rho=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev :Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;rho :Used to set the rho parameter of selected atoms for eNOE calculations. &lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9752</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9752"/>
		<updated>2019-11-20T15:18:38Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
;rho=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev:Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9751</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9751"/>
		<updated>2019-11-20T15:16:42Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;protlev:Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9750</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9750"/>
		<updated>2019-11-20T15:16:24Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
::;protlev:Used to set the protlev parameter of selected atoms for eNOE calculations. The &#039;&#039;&#039;protlev&#039;&#039;&#039; parameter is be used to account for D2O exchange of amide atoms in solution, i.e. protlev=0.97 for D2O exchange in a buffer solution containing 3% D2O. For spin diffusion calculations using the TSS approach, the protlev parameter is used to account for versatile labeling patterns, such as used in methyl labeling, see * [[CYANA Command: enoe spindiff |enoe spindiff]]&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9749</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9749"/>
		<updated>2019-11-20T15:15:08Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9748</id>
		<title>CYANA Command: atoms set</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_atoms_set&amp;diff=9748"/>
		<updated>2019-11-20T15:14:36Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; selection=&#039;&#039;[[atom selection]]&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; mass=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; radius=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; shift=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; calibration=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; tolerance=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; residue=&#039;&#039;string&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; random=&#039;&#039;real&#039;&#039;: (default: 1.0)&lt;br /&gt;
; protlev=&#039;&#039;real&#039;&#039;: (default: &#039;&#039;none&#039;&#039;)&lt;br /&gt;
; undefined                      &lt;br /&gt;
; all&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Sets properties of the selected atoms. By default, the selection made in the most recent [[CYANA Commands: atoms select|&#039;&#039;&#039;atoms select&#039;&#039;&#039;]] command is used, or all atoms if no selection has been made so far.&lt;br /&gt;
Properties that can be set:&lt;br /&gt;
&lt;br /&gt;
:; mass :Atomic mass for torsion angle dynamics. If the &#039;&#039;mass&#039;&#039; value is a positive real number, the mass of all selected atoms is set to &#039;&#039;mass&#039;&#039;. In this case all inertia tensors are calculated from the masses and positions of their constituting atoms. If the special value &#039;&#039;&#039;mass=cluster&#039;&#039;&#039; is set, then the inertia tensors of all rigid units are set as if the rigid units were spheres of radius 5 Å with mass &#039;&#039;m&#039;&#039;, where &#039;&#039;m&#039;&#039; is the sum of the atomic masses within the rigid unit. Inertia tensors are initialized in this way when the program starts. Atomic masses are initialized to unity.&lt;br /&gt;
:;radius :Repulsive core radius in Å. The standard repulsive core radii are set in the ATOMTYPES section of the residue library.&lt;br /&gt;
:;shift :Chemical shift (in ppm).&lt;br /&gt;
:;calibration :Constant to derive distance bounds from peak volumes.&lt;br /&gt;
:;tolerance :Chemical shift uncertainty (in ppm).&lt;br /&gt;
:;residue :External residue number. The external residue number is changed for all residues for which at least one atom is selected.&lt;br /&gt;
:;undefined :The coordinates of the selected atoms in the current structure are set as “undefined”, as if they would not have been read from an input coordinate file. With the additional option &#039;&#039;&#039;all&#039;&#039;&#039;, the coordinates of the selected atoms are set as “undefined” also in all selected structures.  &lt;br /&gt;
&lt;br /&gt;
Optionally, the command can be applied only to a &#039;&#039;random&#039;&#039; fraction of all selected atoms.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=CYANA_Command:_enoe_diag&amp;diff=9747</id>
		<title>CYANA Command: enoe diag</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=CYANA_Command:_enoe_diag&amp;diff=9747"/>
		<updated>2019-11-20T15:10:55Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CYANA Commands|back to complete commands list]]&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
; opt=&#039;&#039;integer&#039;&#039;: (default: &#039;&#039;1&#039;&#039;)&lt;br /&gt;
; plot =&#039;&#039;string&#039;&#039;: (default: &#039;&#039;izPlot&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This command fits the diagonal decays to obtain the auto-relaxation (rho) values  and back-predicted diagonal intensities, I(0) values. &lt;br /&gt;
&lt;br /&gt;
The parameter &#039;&#039;&#039;opt&#039;&#039;&#039; specifies if the spin type specific median and standard deviation of auto-relaxation (opt=2) values and back-predicted diagonal intensities, I(0) values (opt=3) are calculated. With the back-predicted diagonal intensities there is a pdf file generated containing plots of the fitted intensities divided according to classes with the mean (green line) and std deviation (red line). With the default setting (opt=1), no auto-relaxation values and  back-predicted diagonal intensities, I(0) values are calculated, instead the user may read a file or set the value(s) using the atom set command.&lt;br /&gt;
&lt;br /&gt;
In the case of single mixing time measurements, the auo-relaxation value are omitted and the back-predicted diagonal intensities, I(0) values are replaced by the diagonal intensities values measured at the specific mixing time.&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9746</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9746"/>
		<updated>2019-10-31T11:22:00Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Depositing multi-states structures to a PDB data base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9745</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9745"/>
		<updated>2019-10-31T11:21:02Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Depositing multi-states structures to a PDB data base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
The format distinguishes the states by using a chain letter, such as A and B for a two state structure. Populations can be given specified in this format as occupancy (corresponding to the Xray structure format).&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
	<entry>
		<id>https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9744</id>
		<title>ENORA and multi-state structure calculations</title>
		<link rel="alternate" type="text/html" href="https://cyana.org/w/index.php?title=ENORA_and_multi-state_structure_calculations&amp;diff=9744"/>
		<updated>2019-10-31T11:16:01Z</updated>

		<summary type="html">&lt;p&gt;Dean: /* Depositing multi-states structures to a PDB data base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will provide you with guided examples for calculating eNOEs and multi-state structure calculations.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== CYANA setup  ==&lt;br /&gt;
&lt;br /&gt;
==== Obtaining and installing the CYANA demo version and data ====&lt;br /&gt;
&lt;br /&gt;
Please follow the following steps carefully (exact Linux commands are given below; you may copy them to a terminal):&lt;br /&gt;
&lt;br /&gt;
# Go to your home directory (or data directory).&lt;br /&gt;
# Get the [[Media:demo_data.tgz‎|demo data]] from the server.&lt;br /&gt;
# Unpack the demo data for the practical.&lt;br /&gt;
# Get the demo version of CYANA.&lt;br /&gt;
# Unpack CYANA.&lt;br /&gt;
# Setup the CYANA environment variables.&lt;br /&gt;
# Change into the newly created directory &#039;eNORA&#039;.&lt;br /&gt;
# Copy the demo_data directory to &#039;enoe&#039;.&lt;br /&gt;
# Change into the subdirectory &#039;enoe&#039;.&lt;br /&gt;
# Test whether CYANA can be started by typing its name, &#039;cyana&#039;.&lt;br /&gt;
# Exit from CYANA by typing &#039;q&#039; or &#039;quit&#039;.&lt;br /&gt;
&lt;br /&gt;
To unpack the demo data:&lt;br /&gt;
 tar zxf demo_data.tar.gz &lt;br /&gt;
&lt;br /&gt;
To unpack CYANA demo version:&lt;br /&gt;
 tar zxf Cyana-3.98.9_Demo.tgz&lt;br /&gt;
 cd cyana-3.98.9/&lt;br /&gt;
 ./setup&lt;br /&gt;
&lt;br /&gt;
Change into enoe1pt demo directory:  &lt;br /&gt;
 cd enoe1pt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try to run CYANA by entering &#039;cyana&#039; at the command prompt of your terminal (q to quit cyana):&lt;br /&gt;
&lt;br /&gt;
 cyana&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
 CYANA 3.98 (mac-intel)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2002-17 Peter Guentert. All rights reserved.&lt;br /&gt;
 ___________________________________________________________________&lt;br /&gt;
 &lt;br /&gt;
     Demo license valid for specific sequences until 2018-12-31&lt;br /&gt;
 cyana&amp;gt; q&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If all worked, you are ready to go in terms of running the CYANA routine!&lt;br /&gt;
&lt;br /&gt;
==== Execution scripts or &amp;quot;macros&amp;quot; in CYANA ====&lt;br /&gt;
&lt;br /&gt;
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 &#039;*.cya&#039;. Collecting the commands in macros has the added advantage, that the macros serve as a record allowing to reconstruct previous calculations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint:&#039;&#039;&#039; For comprehensive information on the CYANA commands etc. consult the [[CYANA 3.0 Reference Manual]].&lt;br /&gt;
&lt;br /&gt;
== Preparing input data ==&lt;br /&gt;
&lt;br /&gt;
=== Structure input for spin-diffusion calculations ===&lt;br /&gt;
&lt;br /&gt;
==== Preparing an xray structure to use within CYANA ====&lt;br /&gt;
&lt;br /&gt;
Deposited structures many times lack specific features, i.e. Xray structures often lack proton coordinates or contain sequence mutations and ligands.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;regulabb&#039; directory and the &#039;CALC_reg.cya&#039; macro and an &#039;init.cya&#039; macro.&lt;br /&gt;
&lt;br /&gt;
The initialization macro has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands, one to read the library and one to read the sequence.&lt;br /&gt;
However, for now there is only one command, the one to read the library.&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
The command &#039;cyanalib&#039; reads the standard CYANA library. &lt;br /&gt;
&lt;br /&gt;
After reading the library file, one normally reads a sequence file before reading pdb file or a peak list. &lt;br /&gt;
&lt;br /&gt;
Inspection of the &#039;CALC_reg.cya&#039;:&lt;br /&gt;
 read 1PIN.pdb unknown=warn hetatm new&lt;br /&gt;
 write 1PIN.seq &lt;br /&gt;
 write 1PIN_2.pdb&lt;br /&gt;
&lt;br /&gt;
Where the option &#039;hetatm&#039; allows for reading of coordinate labeled HETATM, rather than ATOM in the pdb. The parameter &#039;new&#039; directs CYANA to read the sequence from the pdb.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
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: &lt;br /&gt;
&lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read 1PIN_2.pdb rigid unknown=warn&lt;br /&gt;
 write 1PIN_ed.pdb&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 read pdb 1PIN_ed.pdb&lt;br /&gt;
 regularize steps=20000 link=LL keep&lt;br /&gt;
&lt;br /&gt;
Download the Xray structure used for this exercise:&lt;br /&gt;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;&#039;https://files.rcsb.org/view/1PIN.pdb&#039; &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or for mac os x:&lt;br /&gt;
 &lt;br /&gt;
 curl &amp;lt;nowiki&amp;gt;https://files.rcsb.org/view/1PIN.pdb -o 1PIN.pdb &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Execute the &#039;CALC_reg.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_reg.cya&lt;br /&gt;
The resulting structure is &#039;regula.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Calculating a structure from an experimental peak list ====&lt;br /&gt;
&lt;br /&gt;
In the data directory you find the &#039;noecalib&#039; directory.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_noecalib.cya&#039; contains the following commands:&lt;br /&gt;
&lt;br /&gt;
 peaks:=5.peaks&lt;br /&gt;
 calibration peaks=$peaks&lt;br /&gt;
 peaks calibrate simple&lt;br /&gt;
 write upl noesimple.upl&lt;br /&gt;
&lt;br /&gt;
The following block of commands, reads the restraints &#039;noesimple.upl&#039;, an angle file called &#039;demo.aco&#039;, calculates a structure:&lt;br /&gt;
 read upl noesimple.upl     &lt;br /&gt;
 read aco talos.aco			 &lt;br /&gt;
 calc_all 100 steps=50000		        &lt;br /&gt;
 &lt;br /&gt;
 overview demo.ovw structures=20 pdb	&lt;br /&gt;
&lt;br /&gt;
The statistics are in demo.ovw file and the 20 conformers with the lowest target function in the &#039;demo.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Estimating spin-diffusion  ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the directory &#039;spinDiff&#039; you find the macro &#039;CALC_spinDiff.cya&#039;: &lt;br /&gt;
&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=1 time=$mixingtimes&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* reading the structure and use the first conformer for spin diffusion calculations.&lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; the full-buildup (including spin-diffusion) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe twospin |enoe twospin]]&#039; direct transfer (two spin, excluding spin-diffusion)) is calculated for the five mixing times supplied. &lt;br /&gt;
* &#039;[[CYANA Command: enoe spdcorr |enoe spdcorr]]&#039; calculates the spin diffusion correction for each mixing time specified from the ratio of two-spin versus full-buildup.&lt;br /&gt;
&lt;br /&gt;
=== Recording NOESY experiments with 13C/15N simultaneous evolution ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Vögeli B, Günter P, Riek R (2013) Multiple-state Ensemble Structure Determination from eNOE Spectroscopy. Mol Phys 111:437-454&lt;br /&gt;
&lt;br /&gt;
The pulse sequence are found here:&lt;br /&gt;
http://n.ethz.ch/~bvoegeli/PulseSequences/CNnoesyhsqc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:pulseseq.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Preparing experimental peak lists ===&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;XXX&#039;&#039;.peaks, where &#039;&#039;XXX&#039;&#039; denotes the name of the xeasy peak list file.&lt;br /&gt;
Since NMRdraw peak lists are of different file type, cyana provides the command read tab to convert the files to XEASY format. &lt;br /&gt;
&lt;br /&gt;
 # Number of dimensions 3&lt;br /&gt;
 #FORMAT xeasy3D&lt;br /&gt;
 #INAME 1 H&lt;br /&gt;
 #INAME 2 HN&lt;br /&gt;
 #INAME 3 N&lt;br /&gt;
 #SPECTRUM N15NOESY H HN N  ??? change to 13C, processed as 13C!!!!&lt;br /&gt;
    17086    4.098    4.099   57.441 1 U   6.990943E+08  0.000000E+00 e 0  HA.5      HA.5      CA.5&lt;br /&gt;
    89532    4.355    1.829   33.507 1 U   1.720779E+06  0.000000E+00 e 0  HA.6      HB2.6     CB.6&lt;br /&gt;
    89544    4.353    1.757   33.513 1 U   2.939628E+06  0.000000E+00 e 0  HA.6      HB3.6     CB.6&lt;br /&gt;
&lt;br /&gt;
The first line specifies the number of dimensions (3 in this case). The &#039;#SPECTRUM&#039; (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 simultanous evolution of 13C and 15N dimensions, since we require 15N and 13C bound spins within the same spectrum for purposes of normalization (see...).&lt;br /&gt;
&lt;br /&gt;
After the &#039;#SPECTRUM&#039; line follows one line for every peak. For example, the first peak in the &#039;HNCA.peaks&#039; list has&lt;br /&gt;
&lt;br /&gt;
* Peak number 17086&lt;br /&gt;
* H chemical shift 4.098 ppm&lt;br /&gt;
* (&amp;quot;HN&amp;quot;) chemical shift 4.099 ppm (in this case 13C bound)&lt;br /&gt;
* Heavy atom chemical shift 57.441 ppm (in this case 13C labeled)&lt;br /&gt;
&lt;br /&gt;
The other data are relevant entry for the eNOE mudules is the peak volume or intensity (6.990943E+08).&lt;br /&gt;
&lt;br /&gt;
==== SPECTRUM definitions in the CYANA library ====&lt;br /&gt;
&lt;br /&gt;
When you start CYANA, the program reads the library and &#039;&#039;&#039;displays the full path name of the library file&#039;&#039;&#039;. 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 &#039;N15NOESY&#039; in the library file &#039;cyana.lib&#039;) is&lt;br /&gt;
&lt;br /&gt;
 SPECTRUM N15NOESY H HN N&lt;br /&gt;
  0.900 N:N_AM* HN:H_AMI ~4.0 H:H_*&lt;br /&gt;
  0.800 N:N_AM* HN:H_AMI ~4.5 H:H_*&lt;br /&gt;
  0.700 N:N_AM* HN:H_AMI ~5.0 H:H_*&lt;br /&gt;
  0.600 N:N_AM* HN:H_AMI ~5.5 H:H_*&lt;br /&gt;
  0.500 N:N_AM* HN:H_AMI ~6.0 H:H_*&lt;br /&gt;
&lt;br /&gt;
The first line corresponds to the &#039;#SPECTRUM&#039; 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).&lt;br /&gt;
&lt;br /&gt;
Each line below 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 &#039;:&#039;, e.g. for N15NOESY &#039;H:&#039;, &#039;HN:&#039;, and &#039;N:&#039;. 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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== From nmrDraw to XEASY ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;nmrDrawX&#039; directory you find the &#039;nmrDrawX.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 # read nmrDraw tab file&lt;br /&gt;
 read tab demo.tab&lt;br /&gt;
 &lt;br /&gt;
 # sort the peaks&lt;br /&gt;
 peaks sort&lt;br /&gt;
 &lt;br /&gt;
 # write out peak lists&lt;br /&gt;
 do i 1 npkl&lt;br /&gt;
   peaks select &amp;quot;** list=${i}&amp;quot;&lt;br /&gt;
   write peaks $i.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
It does the following:&lt;br /&gt;
* Conversion of the nmrDraw peak file to XEASY format with the atom assignments in the file (see * [[CYANA Command: read tab|read tab]]).&lt;br /&gt;
* Sorting of the peaks in each peaks list per mixing time.&lt;br /&gt;
* Writing out the peaks in XEASY format with atom names contained in the file, one peak list for each mixing time.&lt;br /&gt;
&lt;br /&gt;
=== Using Talos to generate torsion angle restraints ===&lt;br /&gt;
&lt;br /&gt;
Torsion angle restraints from the backbone chemical shifts help restrict angular conformation space. We wish to use only &amp;quot;strong assignments&amp;quot; to generate these restraints.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In the &#039;acoPREP&#039; directory, inspect the &#039;CALC_talos.cya&#039; file with the commands to calculate the talos angle restraints:&lt;br /&gt;
&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 read prot demo.prot unknown=skip&lt;br /&gt;
 &lt;br /&gt;
 talos talos=talos+                &lt;br /&gt;
 talosaco pred.tab&lt;br /&gt;
 &lt;br /&gt;
 write aco talos.aco&lt;br /&gt;
&lt;br /&gt;
This will call the program TALOS+ and store the resulting torsion angle restraints in the file &#039;talos.aco&#039;.&lt;br /&gt;
&lt;br /&gt;
Since this is not a calculation suited for the MPI scheduler, start CYANA first, then call the &#039;CALC_talos.cya&#039; macro from the prompt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hint: &#039;&#039;&#039; change to a cshell before running cyana (since talos needs a cshell to run): &lt;br /&gt;
 csh&lt;br /&gt;
&lt;br /&gt;
== eNOE  calculations  ==&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== eNORA (single mixing time) ===&lt;br /&gt;
&lt;br /&gt;
In the &#039;enoe1pt&#039; directory you find the relevant &#039;init.cya&#039; and &#039;CALC_enoe1pt.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro file has the fixed name &#039;init.cya&#039; and is executed automatically each time CYANA is started. It can also be called any time one wants to reinitialize the program by typing &#039;init&#039;. It contains normally at least two commands that read the CYANA library and the protein sequence: &lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
The first line sets the appropriate rmsdrange, and the command &#039;cyanalib&#039; reads the standard CYANA library. The next command reads the protein sequence.&lt;br /&gt;
&lt;br /&gt;
The protein sequence is stored in three-letter code in the file &#039;demo.seq&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Stereo-specificity of dia-stereocenters =====&lt;br /&gt;
&lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
&lt;br /&gt;
However, one may do the following to supply all atoms as stereo specific: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
&lt;br /&gt;
or to supply all atoms as non stereo specific, use:&lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo delete&lt;br /&gt;
&lt;br /&gt;
To get a feedback of the supplied stereo specific assignment add to your &#039;init.cya&#039; the command:&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
&lt;br /&gt;
===== D20 exchange =====&lt;br /&gt;
&lt;br /&gt;
With 3% D2O in the nmr buffer for exchange of backbone amide atoms:&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
===== TauC setting =====&lt;br /&gt;
&lt;br /&gt;
Individual correlation times may be set per atom, the overall tumbling time is set as:&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
Below you find the &#039;CALC.cya&#039; script. You will find comments for the commands options, where we found it appropriate.&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe1pt.cya&#039;:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = 0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 maxdistance = 6.5&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 &lt;br /&gt;
* The parameter definitions, their function is explained later with respect to the functions that use them.&lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
  &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
* 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 &#039;structure select&#039; may be used to select multiple conformers of the pdb.&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 read peaks 5.peaks&lt;br /&gt;
   &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe init |enoe init]]&#039; orders the cross peaks to the specified diagonal and either returns all cross peaks or only the normalizable ones. &lt;br /&gt;
 &lt;br /&gt;
 # fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # calculate the spin-diffusion correction&lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]]  opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe spindiff |enoe spindiff]]&#039; calculates the spin diffusion correction factors per mixing time with the FRM approach (mode=3).&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------     apply spin-diffusion       ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0 &lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe restraint |enoe restraint]]&#039; applies various tolerances to the effective distance (bi- versus uni-directional, known or unknown-stereo specificity, degenerate methelyne and methyl groups, etc.).&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
* finally write the upl and lol files after deleting distances that do not contribute structural information and are redundant (&#039;distance delete fixed&#039;). &lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]]&lt;br /&gt;
 &lt;br /&gt;
* &#039;[[CYANA Command: enoe overview |enoe overview]]&#039; writes the overview file &#039;enoe.ovw&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run the eNOE calculation such as:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe1pt.cya&lt;br /&gt;
&lt;br /&gt;
=== eNORA output files ===&lt;br /&gt;
&lt;br /&gt;
The eNORA algorithm will produce the following output files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;enoe.upl and enoe.lol:&#039;&#039;&#039; Upper limit and lower limit restraint files with tolerances applied.&lt;br /&gt;
* &#039;&#039;&#039;enoe.ovw:&#039;&#039;&#039; Collated results file.&lt;br /&gt;
&lt;br /&gt;
==== The enoe.upl/lol distance restrains ====&lt;br /&gt;
&lt;br /&gt;
Suggested (default) correction factors for lower and upper distance bounds:&lt;br /&gt;
 Condition                                      Factor for lower bound               Factor for upper bound &lt;br /&gt;
 Methyl group                                   3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 = 0.762                 3&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 = 0.903&lt;br /&gt;
 Degenerate isopropyl group (Val, Leu)          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.915 x 0.95 = 0.645          6&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.085 x 1.05 = 0.713&lt;br /&gt;
 Degenerate methylene group                     2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 0.95 = 0.846                  2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; x 1.05 = 0.935&lt;br /&gt;
 2-fold degenerate aromatic protons             2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891                         2&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.891&lt;br /&gt;
 4-fold degenerate aromatic protons             4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794                         4&amp;lt;sup&amp;gt;–1/6&amp;lt;/sup&amp;gt; = 0.794&lt;br /&gt;
 bi-directional NOE                             1                                    1&lt;br /&gt;
 uni-directional NOE                            0.8 (default)                        1.2 (default)&lt;br /&gt;
 &lt;br /&gt;
 Aromatic to non-aromatic NOE &lt;br /&gt;
 normalized to non-aromatic diagonal peak       0.89 (default)                       1.11 (default)&lt;br /&gt;
 &lt;br /&gt;
 no stereospecific assignment                   (default calculated)                 (default calculated)&lt;br /&gt;
&lt;br /&gt;
==== The enoe.ovw file ====&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ASSIGNMENT(i-&amp;gt;j):&#039;&#039;&#039; Assignment arranged with the flow of magnetization.&lt;br /&gt;
* &#039;&#039;&#039;REFFixEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;REFFxCORR:&#039;&#039;&#039; The reff of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxEXP:&#039;&#039;&#039; The experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SIGxCORR:&#039;&#039;&#039; The spin-diffusion corrected experimental sigma of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;SDCx:&#039;&#039;&#039; 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 &#039;enoe reff&#039; command.&lt;br /&gt;
* &#039;&#039;&#039;SDPx:&#039;&#039;&#039; The number of other partner spins involved in spin-diffusion for spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;IZEROx:&#039;&#039;&#039; The back calculated I(0) value of spin x, where x=i,j &lt;br /&gt;
* &#039;&#039;&#039;exp_chiNx:&#039;&#039;&#039; The goodness of fit of the experimental data, where x=i,j&lt;br /&gt;
* &#039;&#039;&#039;corr_chiN x:&#039;&#039;&#039; The goodness of fit of the spin-diffusion corrected experimental data, where x=i,j&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using buildup data) ===&lt;br /&gt;
&lt;br /&gt;
All eNOE related calculations within cyana are carried out using the eNORA modules. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will find the relevant macro&#039;s in the directory &#039;enoebup&#039;.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
The initialization macro is the same as for a single mixing time, except for the setting of the setting of a general rho value:&lt;br /&gt;
 # -------------- avg rho --------------&lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; rho=5.3&lt;br /&gt;
&lt;br /&gt;
==== The eNORA CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_enoe.cya&#039; starts with the following:&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          eNORA routine         ---------------------------------- &lt;br /&gt;
 # ----------------------------------   basic parameter definitions  ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes = &#039;0.02,0.03,0.04,0.05,0.06&#039;&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 rhofile     = &#039;rhoInApo.rho&#039;&lt;br /&gt;
 normed      = 0&lt;br /&gt;
 normspin    = 2&lt;br /&gt;
 mode        = 3&lt;br /&gt;
 bname 	    =&#039;bupplots&#039;&lt;br /&gt;
 dname       =&#039;decplots&#039;&lt;br /&gt;
 izname      =&#039;izPlot&#039;&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------         structure input        ---------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        peak file reading       ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # read in the peak lists&lt;br /&gt;
 do i 1 5&lt;br /&gt;
   read peaks $i.peaks $if(i.eq.1,&#039; &#039;,&#039;append&#039;)&lt;br /&gt;
 end do&lt;br /&gt;
* reading the XEASY peak lists in the order of increasing mixing time. &lt;br /&gt;
    &lt;br /&gt;
 # ----------------------------------   initializing the routine     ----------------------------------&lt;br /&gt;
 # initialize the routine, fit experimental decays and buildups&lt;br /&gt;
 [[CYANA Command: enoe init |enoe init]] normalize=normspin normed=normed time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # print average experimental auto-relaxation and I(0) values to screen&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=2 plot=$izname&lt;br /&gt;
 graf $izname.pdf&lt;br /&gt;
 &lt;br /&gt;
 # supply averaged rho or izero values&lt;br /&gt;
 if (existfile(&#039;$rhofile&#039;)) then&lt;br /&gt;
   read rho $rhofile&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
* Autorelaxation values and/or Izero values are calculated depending on the option set by the user (&#039;[[CYANA Command: enoe diag |enoe diag]]&#039;) and saved in memory or can be overwritten by reading a file (&#039;[[CYANA Command: read rho|read rho]]&#039;). &lt;br /&gt;
&lt;br /&gt;
 # plot the diagonal decay&#039;s  &lt;br /&gt;
 [[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&lt;br /&gt;
 graf $dname.pdf &lt;br /&gt;
 &lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe plotdec |enoe plotdec]] plot=$dname&#039; and &#039;graf $dname.pdf&#039; 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.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # write the auto-relaxation values to file&lt;br /&gt;
 write rhoOut.rho&lt;br /&gt;
 &lt;br /&gt;
 #&lt;br /&gt;
 [[CYANA Command: enoe cross |enoe cross]]&lt;br /&gt;
 peaks select &amp;quot;NONORM list=1&amp;quot;&lt;br /&gt;
 write peaks 1_NONORM.peaks names&lt;br /&gt;
  &lt;br /&gt;
 # fit experimental buildups&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------        spin-diffusion          ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe twospin |enoe twospin]] b0field=b0field time=$mixingtimes mode=$mode&lt;br /&gt;
 [[CYANA Command: enoe spdcorr |enoe spdcorr]] opt=0 time=$mixingtimes&lt;br /&gt;
 &lt;br /&gt;
 # apply spin-diffusion correction to experimental buildups (if calculated) and calculate sigma&lt;br /&gt;
 [[CYANA Command: enoe sig |enoe sigma]] opt=2&lt;br /&gt;
 &lt;br /&gt;
 # calculate reff&lt;br /&gt;
 [[CYANA Command: enoe reff |enoe reff]] b0field=b0field&lt;br /&gt;
 &lt;br /&gt;
 # prepare the cyana restraints (scaling, error margins)&lt;br /&gt;
 [[CYANA Command: enoe restraint |enoe restraint]] errStereoFlag=1 errStereo=-1 chiN=-1 errBi=0&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------        write restraints        ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 # delete fixed distances from upl/lol output&lt;br /&gt;
 distance delete fixed&lt;br /&gt;
 &lt;br /&gt;
 # write the distance restraints to file&lt;br /&gt;
 write upl enoe.upl&lt;br /&gt;
 write lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------         plotting buildups         --------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe plotbup |enoe plotbup]] plot=$bname opt=2&lt;br /&gt;
 graf $bname.pdf&lt;br /&gt;
&lt;br /&gt;
Additional commands only usefull with buildup data:&lt;br /&gt;
* &#039;[[CYANA Command: enoe buildup |enoe plotbup]] plot=$bname opt=2&#039; and &#039;graf $bname.pdf&#039; print the buildups to file for inspection.&lt;br /&gt;
  &lt;br /&gt;
 # ----------------------------------            overview            ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 [[CYANA Command: enoe overview |enoe overview]] &lt;br /&gt;
 &lt;br /&gt;
Start CYANA and execute the &#039;CALC_enoe.cya&#039; macro from the CYANA prompt as such:&lt;br /&gt;
&lt;br /&gt;
 cyana CALC_enoe.cya&lt;br /&gt;
&lt;br /&gt;
The program will run and then stop as soon as it finished plotting the diagonal decay&#039;s and has written the &#039;rhoOut.rho&#039; file. Before commenting out (#) the exit command and running the routine to its completion, do the following exercise.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Compiling the autorelaxation file ====&lt;br /&gt;
&lt;br /&gt;
Before using the calculated averages for auto-relaxation and Izero, check the diagonal decays visually for their quality.&lt;br /&gt;
Edit out any diagonal peaks from the peak files that give bad decays, then run the routine again.&lt;br /&gt;
&lt;br /&gt;
If your are compiling the rhoIn.rho file manually see * [[auto-relaxation and I(0) values]].&lt;br /&gt;
&lt;br /&gt;
=== eNORA (using generic normalized eNOEs) ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In comparison to the regular eNOE calculation there are a few things to change in order to accomplish this feat.&lt;br /&gt;
&lt;br /&gt;
 normalized  = 0&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 #fit experimental decays&lt;br /&gt;
 [[CYANA Command: enoe diag |enoe diag]] opt=3 plot=izplot&lt;br /&gt;
 graf izplot.pdf&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 distance select UNIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_UNIDIR.upl&lt;br /&gt;
 write lol enoe_UNIDIR.lol&lt;br /&gt;
 &lt;br /&gt;
 distance select BIDIR &lt;br /&gt;
 distance select &amp;quot;-GENNORM&amp;quot;&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_BIDIR.upl  &lt;br /&gt;
 write lol enoe_BIDIR.lol &lt;br /&gt;
  &lt;br /&gt;
 distance select GENNORM&lt;br /&gt;
 distance sort&lt;br /&gt;
 write upl enoe_GENNORM.upl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== The TSS approach to spin-diffusion calculations ==&lt;br /&gt;
&lt;br /&gt;
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):&lt;br /&gt;
&lt;br /&gt;
The TSS mode is accessed by setting the parameter mode=2 for the  &#039;enoe spindiff&#039; command (see * [[CYANA Command: enoe spindiff |enoe spindiff]]).&lt;br /&gt;
&lt;br /&gt;
=== Labeling Schemes ===&lt;br /&gt;
&lt;br /&gt;
Deuterated labeling schemes often involve methyl labeling with 3% D2O in the nmr buffer, i.e. &lt;br /&gt;
&lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
 # labeling scheme: VAL_G1 0% LEU_D1 0% ILE_D1 0%&lt;br /&gt;
 atoms set &amp;quot;QG1 @VAL + QD1 @LEU + QD1 @ILE&amp;quot; protlev=0.0&lt;br /&gt;
&lt;br /&gt;
== Considerations regarding the obtained eNOE restraints ==&lt;br /&gt;
&lt;br /&gt;
=== Mapping calculated eNOE restraints onto a known structure ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 (&#039;mkdir&#039;) or copy a directory containing the respective files. Delete what you do not need. Use the regularized xray structure from the exercise above.&lt;br /&gt;
&lt;br /&gt;
You need an init file:&lt;br /&gt;
&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the main macro (name it &#039;CALC_xraymap.cya&#039;):&lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 read regula.pdb unknown=warn&lt;br /&gt;
 &lt;br /&gt;
 weight_vdw=0&lt;br /&gt;
 overview enoe_xray.ovw&lt;br /&gt;
&lt;br /&gt;
*If the restraints do not match with the xray structure, does it mean they are wrong?&lt;br /&gt;
*If you tried the two options, what is (are) the difference(s)?&lt;br /&gt;
&lt;br /&gt;
== Multi-state structure calculation with ensemble-averaged restraints ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To facilitate the discussion of multi-state structure calculations and ensembles we use the following definitions:&lt;br /&gt;
* 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.&lt;br /&gt;
* A structure is defined by a bundle (or an ensemble) of conformers fulfilling the experimental data.&lt;br /&gt;
* A conformer is the result of one individual structure calculation that fulfills the experimental data and may be composed of one or more states.&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calculating a single state structure === &lt;br /&gt;
&lt;br /&gt;
We will perform calculations based on eNOEs by using torsion angle dynamics  in order to compute the three-dimensional structure of the protein.&lt;br /&gt;
&lt;br /&gt;
The &#039;enoe.upl&#039; and &#039;enoe.lol&#039; 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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The single-state structure calculation is in principle a regular structure calculation, using your upl/lol, aco and cco files as input.&lt;br /&gt;
This would look something like this (we will do it differently):&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl XXX.upl&lt;br /&gt;
 read lol XXX.lol&lt;br /&gt;
 read aco XXX.aco&lt;br /&gt;
 read cco XXX.cco&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview sstate structures=20 pdb&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
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 &#039;PREP.cya&#039; macro below, you will realize why this makes sense. &lt;br /&gt;
&lt;br /&gt;
==== Single state calculation ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;sstate&#039; you will find the &#039;init.cya&#039;, &#039;PREP.cya&#039; and the &#039;CALC_sstate.cya&#039; macro&#039;s.&lt;br /&gt;
&lt;br /&gt;
==== The init macro ====&lt;br /&gt;
&lt;br /&gt;
In addition to what was described above, the &#039;init.cya&#039; macro contains additional lines to read the multi-state sequence in order to prepare the restraints and run the structure calculation:&lt;br /&gt;
&lt;br /&gt;
 cyanalib&lt;br /&gt;
 if (existfile(&#039;bundle.seq&#039;)) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
 else&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
 end if&lt;br /&gt;
 rmsdrange:=8-33&lt;br /&gt;
 &lt;br /&gt;
 swap=0&lt;br /&gt;
 expand=1&lt;br /&gt;
&lt;br /&gt;
* 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). &lt;br /&gt;
 &lt;br /&gt;
 atoms stereo &amp;quot;HA? 10&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HB? 7 8 11 13 14 21 23 24 25 26 27 33 34 35 37 38&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG? 8 12 14 17 36 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD2? 18 26 30&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QG? 22&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;QD? 7&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HE2? 33&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HD? 8 14 21 37&amp;quot;&lt;br /&gt;
 atoms stereo &amp;quot;HG1? 28&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;H&amp;quot; protlev=0.97&lt;br /&gt;
&lt;br /&gt;
==== The PREP macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;PREP.cya&#039; 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.&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
* &#039;nbundle=@1&#039; sets the number of states to 1, for a two state structure calculation this need be set to two.&lt;br /&gt;
&lt;br /&gt;
 #multitensor=.true.&lt;br /&gt;
 together=.true.&lt;br /&gt;
 moloffset=100&lt;br /&gt;
&lt;br /&gt;
* &#039;moloffset&#039; sets the offset in residue numbering between the sets of coordinates that compose one conformer.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Sequence file ------&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 print &amp;quot;\# Bundle of $nbundle conformers&amp;quot; &amp;gt;bundle.seq&lt;br /&gt;
 do j 1 nbundle&lt;br /&gt;
   do i 1 nr&lt;br /&gt;
     if (j.lt.nbundle .and. rnam(i).eq.&#039;PL&#039;) break&lt;br /&gt;
     print &amp;quot;$rnam(i) ${$rnum(i)+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
   end do&lt;br /&gt;
   if (j.lt.nbundle) print &amp;quot;PL LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LL2 LP&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 # ------ Make bundle angle restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read aco demo.aco&lt;br /&gt;
 write aco bundle.aco&lt;br /&gt;
 do j 2 nbundle&lt;br /&gt;
   atom set * residue=residue+moloffset&lt;br /&gt;
   write aco bundle.aco append&lt;br /&gt;
 end do&lt;br /&gt;
&lt;br /&gt;
* this prepares the talos angels with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle coupling constant restraints ------&lt;br /&gt;
 &lt;br /&gt;
 read demo.seq&lt;br /&gt;
 read cco demo_backbone.cco&lt;br /&gt;
 read cco demo_aro.cco append&lt;br /&gt;
 read cco demo_JHaHb.cco append&lt;br /&gt;
  &lt;br /&gt;
 print &amp;quot;\# Coupling constant restraint file&amp;quot; &amp;gt;bundle.cco&lt;br /&gt;
 do i 1 ncco&lt;br /&gt;
   i1=iccoa(1,i); i2=iccoa(2,i)&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     m=moloffset*(j-1)&lt;br /&gt;
     print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &lt;br /&gt;
 &amp;gt;&amp;gt;bundle.cco&lt;br /&gt;
   end do&lt;br /&gt;
 end do &lt;br /&gt;
 print &amp;gt;&amp;gt;.&lt;br /&gt;
 read seq bundle.seq&lt;br /&gt;
 read cco bundle.cco &lt;br /&gt;
 write cco bundle.cco karplus&lt;br /&gt;
 &lt;br /&gt;
* this prepares the experimental scalar coupling restraints with the offset in residue numbering. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # ------ Make bundle RDC restraints ------&lt;br /&gt;
 &lt;br /&gt;
 #read bundle.seq&lt;br /&gt;
 #read rdc demo.rdc&lt;br /&gt;
 #print &amp;quot;\# RDC restraint file&amp;quot; &amp;gt;bundle.rdc&lt;br /&gt;
 #do i 1 orientations&lt;br /&gt;
 #  if (multitensor) then&lt;br /&gt;
 #    do j 1 nbundle&lt;br /&gt;
 #      print &amp;quot;${i+orientations*(j-1)} $magnitude(i) $rhombicity(i) ${$rnum(iar(irtena(4,i)))+moloffset*(j-1)}&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #    end do&lt;br /&gt;
 #  else&lt;br /&gt;
 #    print &amp;quot;$i $magnitude(i) $rhombicity(i) $rnum(iar(irtena(4,i)))&amp;quot; &amp;gt;&amp;gt;&lt;br /&gt;
 #  end if&lt;br /&gt;
 #end do&lt;br /&gt;
 #do i 1 nrdc&lt;br /&gt;
 #  i1=irdca(1,i); i2=irdca(2,i)&lt;br /&gt;
 #  do j 1 nbundle&lt;br /&gt;
 #    m=moloffset*(j-1)&lt;br /&gt;
 #    iten=irdct(i); if (multitensor) iten=iten+orientations*(j-1)&lt;br /&gt;
 #    print &amp;quot;${$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,&#039;&amp;amp;&#039;,&#039; &#039;)&amp;quot; &amp;gt;&amp;gt;bundle.rdc&lt;br /&gt;
 #  end do&lt;br /&gt;
 #end do&lt;br /&gt;
 #print &amp;gt;&amp;gt;.&lt;br /&gt;
 #read seq bundle.seq&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 #write rdc bundle.rdc&lt;br /&gt;
&lt;br /&gt;
* if experimental RDC&#039;s  are available include this section of the code.&lt;br /&gt;
&lt;br /&gt;
 # ------ Make ambiguous bundle distance restraints ------&lt;br /&gt;
 &lt;br /&gt;
 subroutine PURGE	&lt;br /&gt;
 	#distance delete &amp;quot;HA 9, HB2 9&amp;quot;&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
* 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. &lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read upl enoe.upl&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write upl bundle.upl&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental upper limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition.&lt;br /&gt;
&lt;br /&gt;
 init&lt;br /&gt;
 &lt;br /&gt;
 read lol enoe.lol&lt;br /&gt;
 &lt;br /&gt;
 PURGE&lt;br /&gt;
 distance modify info=full&lt;br /&gt;
 molecules symmetrize&lt;br /&gt;
 if (nbundle.gt.1) distances set &amp;quot;$moloffset.., $moloffset..&amp;quot; bound=0.0001&lt;br /&gt;
 distances set &amp;quot;*, *&amp;quot; bound=bound*(1.0*nbundle)**(-1.0/6.0)&lt;br /&gt;
 write lol bundle.lol&lt;br /&gt;
&lt;br /&gt;
* this prepares the experimental lower limit distance restraints with the offset in residue numbering, makes them ambiguous and imposes the multi-state averaging condition. &lt;br /&gt;
&lt;br /&gt;
 # ------ Make restraints to keep corresponding atoms together ------&lt;br /&gt;
 &lt;br /&gt;
 if (together .and. nbundle.gt.1 .and. togetherweight.gt.0.0) then&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   molecules define *&lt;br /&gt;
   atom set * vdwgroup=bundle&lt;br /&gt;
   atom select &amp;quot;N C*&amp;quot;&lt;br /&gt;
   do i 1 na&lt;br /&gt;
     if (iamol(i).ne.1) break&lt;br /&gt;
     if (asel(i)) then&lt;br /&gt;
       distance make &amp;quot;$atom(i)&amp;quot; &amp;quot;$anam(i) ${$rnum(iar(i))+moloffset}&amp;quot; upl=1.2 weight=$togetherweight info=none&lt;br /&gt;
     end if&lt;br /&gt;
   end do&lt;br /&gt;
   distances set &amp;quot;* - N CA C CB, * - N CA C CB&amp;quot; weight=weight*0.1&lt;br /&gt;
   molecules symmetrize&lt;br /&gt;
&lt;br /&gt;
* 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).&lt;br /&gt;
* &#039;molecules symmetrize&#039; disables van der Waals forces between the copies of the same molecule within the same calculation&lt;br /&gt;
&lt;br /&gt;
   distances unique&lt;br /&gt;
   write upl together.upl&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
==== The single-state CALC macro ====&lt;br /&gt;
&lt;br /&gt;
The &#039;CALC_sstate.cya&#039; file for structure calculation is outlined below:&lt;br /&gt;
&lt;br /&gt;
 syntax inputseed=@i=3771&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   PREP&lt;br /&gt;
 end if&lt;br /&gt;
 &lt;br /&gt;
 # ------ Structure calculation ------&lt;br /&gt;
 read upl bundle.upl&lt;br /&gt;
 read lol bundle.lol&lt;br /&gt;
 read aco bundle.aco&lt;br /&gt;
 read cco bundle.cco&lt;br /&gt;
 #read rdc bundle.rdc&lt;br /&gt;
 if (existfile(&#039;together.upl&#039;)) read upl together.upl append&lt;br /&gt;
 &lt;br /&gt;
 anneal_weight_rdc := 0.0, 0.5&lt;br /&gt;
 anneal_weight_aco := 1.0, 1.0, 0.0, 0.0&lt;br /&gt;
 anneal_weight_cco := 0.0, 0.5&lt;br /&gt;
 &lt;br /&gt;
 seed=inputseed&lt;br /&gt;
 calc_all 100 steps=50000&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
 &lt;br /&gt;
 if (master) then&lt;br /&gt;
   cut_cco=1.0&lt;br /&gt;
   cut_rdc=3.0&lt;br /&gt;
   weight_aco = 0.0&lt;br /&gt;
 &lt;br /&gt;
   rmsdrange:=8-33,108-133&lt;br /&gt;
   overview bundle structures=20 pdb&lt;br /&gt;
 &lt;br /&gt;
   #read pdb bundle.pdb&lt;br /&gt;
   #rmsdrange:=23-26, 31-34,123-126, 131-134&lt;br /&gt;
   #overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
   #molecules sort &amp;quot;BACKBONE 23-26, 31-34&amp;quot; base=1&lt;br /&gt;
   #write sortStates.pdb all&lt;br /&gt;
   #SPLIT&lt;br /&gt;
 end if&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structure calculation is executed by running the &#039;CALC_sState.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_sState.cya&lt;br /&gt;
&lt;br /&gt;
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 &#039;cyana -n 25 CALC_sState.cya&#039;. &lt;br /&gt;
&lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics on the the structure calculation will be displayed to screen. The final structure is named &#039;bundle.pdb&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Calculating Multi-state structures ===&lt;br /&gt;
&lt;br /&gt;
The multi-state structure calculation is analogous to what was shown for the single-state calculation, therefore we only explain additional commands and changes.&lt;br /&gt;
&lt;br /&gt;
==== Grouping the coordinates of multi-state calculations ====&lt;br /&gt;
&lt;br /&gt;
In the &#039;CALC_multistate.cya&#039; script, there are the following additional commands:&lt;br /&gt;
&lt;br /&gt;
 read pdb bundle.pdb&lt;br /&gt;
 rmsdrange:=23-26,31-34,123-126,131-134&lt;br /&gt;
 overview bundleSec structures=20 pdb # reference=xxx.pdb&lt;br /&gt;
 &lt;br /&gt;
 molecules sort &amp;quot;BACKBONE 23-26,31-34&amp;quot; base=1&lt;br /&gt;
 write sortStates.pdb all&lt;br /&gt;
&lt;br /&gt;
It is very important here that the &#039;rmsdrange&#039; is set the same as for the &#039;molecules sort&#039; command. Otherwise the &#039;pdb write&#039; command inside the &#039;SPLIT&#039; macro, has the potential to create confusing results.&lt;br /&gt;
&lt;br /&gt;
==== The SPLIT macro ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 moloffset=100&lt;br /&gt;
 &lt;br /&gt;
 read pdb sortStates.pdb&lt;br /&gt;
 n=nstruct&lt;br /&gt;
 write_all split&lt;br /&gt;
 &lt;br /&gt;
 nbundle=$rnum(nr)/moloffset+1&lt;br /&gt;
 show nbundle&lt;br /&gt;
 &lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   read seq bundle.seq&lt;br /&gt;
   read pdb split$i(I3.3).pdb&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     atoms select 1-80&lt;br /&gt;
     write pdb split$i(I3.3)-$j.pdb selected&lt;br /&gt;
     atoms set * residue=residue-moloffset&lt;br /&gt;
   end do&lt;br /&gt;
   read seq demo.seq&lt;br /&gt;
   read_all split$i(I3.3)-*.pdb unknown=skip&lt;br /&gt;
   write split$i(I3.3).pdb all&lt;br /&gt;
   do j 1 nbundle&lt;br /&gt;
     remove split$i(I3.3)-$j.pdb&lt;br /&gt;
   end do&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 do i 1 n&lt;br /&gt;
   read pdb split$i(I3.3).pdb append&lt;br /&gt;
 end do&lt;br /&gt;
 write pdb splitall.pdb all&lt;br /&gt;
 rmsd&lt;br /&gt;
&lt;br /&gt;
* The final output is the &#039;splitall.pdb&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Exercise: Setting up a two-state calculation  ====&lt;br /&gt;
&lt;br /&gt;
Copy the &#039;sstate&#039; directory and give it the name &#039;twostate&#039;, then delete all the previous, unnecessary output files to reduce clutter and have better oversight.&lt;br /&gt;
Copy the &#039;CALC_sstate.cya&#039; and rename it &#039;CALC_multistate.cya&#039;.&lt;br /&gt;
&lt;br /&gt;
 cp -r sstate twostate&lt;br /&gt;
 cd twostate &lt;br /&gt;
 mv CALC_sstate.cya CALC_multistate.cya&lt;br /&gt;
 rm  *.out *.job final* rama*&lt;br /&gt;
&lt;br /&gt;
With a text editor, edit the &#039;CALC_multistate.cya&#039; macro to activate the inactive commands (by deleting the preceeding hashtag #) necessary to perform the grouping of states and splitting of the conformers.&lt;br /&gt;
&lt;br /&gt;
With a text editor, change the number of states (nbundle=@i=) from one to two in the &#039;PREP.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 syntax nbundle=@i=1 togetherweight=@r=0.1 multitensor&lt;br /&gt;
&lt;br /&gt;
When you are done preparing the macros as outlined perform the calculation by running the &#039;CALC_multistate.cya&#039; macro:&lt;br /&gt;
&lt;br /&gt;
 cyana -n 33 CALC_multistate.cya.cya&lt;br /&gt;
 &lt;br /&gt;
Carefully analyze the WARNING and ERROR messages if any.&lt;br /&gt;
&lt;br /&gt;
== Results: analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Download and install the molecular viewer Chimera ===&lt;br /&gt;
# Download Chimera (to your personal laptop) from: [https://www.cgl.ucsf.edu/chimera/download.html Chimera]&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Single state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;final.pdb&#039;. You can visualize it, with chimera:&lt;br /&gt;
&lt;br /&gt;
 chimera bundle.pdb&lt;br /&gt;
&lt;br /&gt;
Analyze the result, the bundle seems unnaturally tight for an NMR structure bundle.&lt;br /&gt;
Why?&lt;br /&gt;
&lt;br /&gt;
=== Exercise: Two-state structure analysis ===&lt;br /&gt;
&lt;br /&gt;
The final structure will be &#039;splitall.pdb&#039;. You can visualize it, with the chimera&lt;br /&gt;
&lt;br /&gt;
 chimera splitall.pdb&lt;br /&gt;
&lt;br /&gt;
By then loading &#039;chimera.com&#039; script in the directory, you can individually color the states to cyan and blue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
=== Exercise: Calclulate the RMSD of NMR vs. xray structure using a CYANA macro ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* save the manually edited xray structure (exercise 11) or the the regularized xray structure (containing the ligand and called &#039;regula.pdb&#039;) as &#039;reg_xray.pdb&#039; to use the macro below (or change the name in the macro accordingly).&lt;br /&gt;
* what do you think about the RMSD, does the value make sense? Does the range make sense?&lt;br /&gt;
&lt;br /&gt;
Below you find the commands for a macro (call it &#039;CALC_RMSD.cya&#039;) that will read the regularized xray structure and the calculated nmr structure, then calculating the rmsd of both the protein and ligand parts of the complex:&lt;br /&gt;
&lt;br /&gt;
 read demoLong.seq&lt;br /&gt;
 &lt;br /&gt;
 rmsd range=8-33 structure=final.pdb reference=reg_xray.pdb&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 8-33&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)&lt;br /&gt;
    end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;RMSD of the LIG: ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 read pdb final.pdb&lt;br /&gt;
 structure mean&lt;br /&gt;
 write pdb mean.pdb&lt;br /&gt;
 &lt;br /&gt;
 read pdb mean.pdb&lt;br /&gt;
 read pdb reg_xray.pdb append&lt;br /&gt;
 &lt;br /&gt;
 atom select &amp;quot;BACKBONE 15-111&amp;quot;&lt;br /&gt;
 t=rmsdmean&lt;br /&gt;
 atom select &amp;quot;WITHCOORDALL&amp;quot;&lt;br /&gt;
 j=rindex(&#039;333&#039;)&lt;br /&gt;
 n=0&lt;br /&gt;
 s=0.0&lt;br /&gt;
 do i ifira(j) ifira(j+1)-1&lt;br /&gt;
   if (element(i).gt.1.and.asel(i)) then&lt;br /&gt;
     n=n+1&lt;br /&gt;
     s=s+displacement(i)*2&lt;br /&gt;
   end if&lt;br /&gt;
 end do&lt;br /&gt;
 print &amp;quot;Displacement of the LIG (to ref xray): ${s/n} ($n atoms)&amp;quot;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On improving the final structure ===&lt;br /&gt;
&lt;br /&gt;
General questions to answer regarding this task:&lt;br /&gt;
*How can you get more eNOEs out of the existing data? Hint: think about normalization.&lt;br /&gt;
*Name additional experimental restraints (or inputs) you could use for structure calculation.&lt;br /&gt;
*Name additional NMR experiments you could measure, to acquire experimental data that are not supplied with the demo_data.&lt;br /&gt;
&lt;br /&gt;
== eNORA extensions and options ==&lt;br /&gt;
&lt;br /&gt;
There are a variety of commands to modify eNORA runs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging of spin-diffusion over multiple conformers ===&lt;br /&gt;
&lt;br /&gt;
After reading the pdb set the &#039;structure select&#039; command to:&lt;br /&gt;
&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
&lt;br /&gt;
=== Generating XEASY peak list with expected FRM or two-spin intensities ===&lt;br /&gt;
Remember to set up a init file:&lt;br /&gt;
 &lt;br /&gt;
 cyanalib&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 &lt;br /&gt;
 # -------------- stereo specific assignment  --------------&lt;br /&gt;
 &lt;br /&gt;
  # to supply all atoms as stereo specific, use: &lt;br /&gt;
 atoms select&lt;br /&gt;
 atoms stereo&lt;br /&gt;
 &lt;br /&gt;
 # see the supplied stereo specific assignment&lt;br /&gt;
 atoms stereo list&lt;br /&gt;
 &lt;br /&gt;
 # -------------- tauC --------------&lt;br /&gt;
 &lt;br /&gt;
 atoms set &amp;quot;*&amp;quot; tauc=4.25&lt;br /&gt;
&lt;br /&gt;
The main CALC.cya file:&lt;br /&gt;
&lt;br /&gt;
 # --------------------------   get the shifts from a XEASY peaks list    ---------------------------&lt;br /&gt;
 &lt;br /&gt;
 ./init&lt;br /&gt;
 &lt;br /&gt;
 # convert&lt;br /&gt;
 read 5.peaks&lt;br /&gt;
 shifts adapt contribution=0.0&lt;br /&gt;
 shifts renumber&lt;br /&gt;
 atoms set &amp;quot;* shift=900.0..&amp;quot; shift=none&lt;br /&gt;
 write demo.prot&lt;br /&gt;
 &lt;br /&gt;
 # --------------------------------    basic parameter definitions    --------------------------------&lt;br /&gt;
 ./init&lt;br /&gt;
 echo:= on&lt;br /&gt;
 mixingtimes:= 0.02,0.03,0.04,0.05,0.06&lt;br /&gt;
 b0field     = 700&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------          structure input           ----------------------------------- &lt;br /&gt;
 &lt;br /&gt;
 # specify the conformers for calculations&lt;br /&gt;
 read pdb demo rigid&lt;br /&gt;
 structure select 1&lt;br /&gt;
 &lt;br /&gt;
 # ----------------------------------             peak input             ----------------------------------  &lt;br /&gt;
 &lt;br /&gt;
 loadspectra structure=demo.pdb peaks=N15NOESY,C13NOESY prot=demo.prot simulate&lt;br /&gt;
 &lt;br /&gt;
 # ---------------------------------- run eNORA elements and write peaks ----------------------------------&lt;br /&gt;
 &lt;br /&gt;
 do n 1 length(&#039;mixingtimes&#039;)&lt;br /&gt;
 	# FM&lt;br /&gt;
 	[[CYANA Command: enoe spindiff |enoe spindiff]] b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks N15NOESY_FM_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]]&lt;br /&gt;
 	write peaks C13NOESY_FM_$n.peaks names&lt;br /&gt;
 &lt;br /&gt;
 	# 2 spin&lt;br /&gt;
 	[[CYANA Command: enoe twospin |enoe twospin]]  b0field=b0field time=$mixingtimes(n) mode=3 labilatom=&#039;NONE&#039;&lt;br /&gt;
 	read peaks N15NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks N15NOESY_2spin_$n.peaks names&lt;br /&gt;
 	read peaks C13NOESY_exp.peaks&lt;br /&gt;
 	[[CYANA Command: enoe intensities |enoe intensities]] mode=2&lt;br /&gt;
 	write peaks C13NOESY_2spin_$n.peaks names&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 peaks2dplot dimensions=12&lt;br /&gt;
 &lt;br /&gt;
 read peaks C13NOESY_FM_1.peaks&lt;br /&gt;
 read peaks N15NOESY_FM_1.peaks append&lt;br /&gt;
 &lt;br /&gt;
 shifts initialize&lt;br /&gt;
 shifts adapt&lt;br /&gt;
 atom set &amp;quot;* shift=990.0..&amp;quot; shift=none&lt;br /&gt;
 write prot NOESY_1.prot&lt;br /&gt;
 write peaks NOESY_1.peaks&lt;br /&gt;
&lt;br /&gt;
== Depositing multi-states structures to a PDB data base  ==&lt;br /&gt;
&lt;br /&gt;
 read seq demo.seq&lt;br /&gt;
 read pdb demoState1.pdb &lt;br /&gt;
 read pdb demoState2.pdb append &lt;br /&gt;
 atoms select 11-16,21-26,31-34&lt;br /&gt;
 write pdb append.pdb all&lt;br /&gt;
 &lt;br /&gt;
 read pdb append.pdb rigid&lt;br /&gt;
 structure select 1-20&lt;br /&gt;
 atoms set * chain=A&lt;br /&gt;
 write_all splitA&lt;br /&gt;
 &lt;br /&gt;
 structure select 21-40&lt;br /&gt;
 atoms set * chain=B&lt;br /&gt;
 write_all splitB&lt;br /&gt;
 &lt;br /&gt;
 remove splitAB.pdb&lt;br /&gt;
 do i 1 nstruct&lt;br /&gt;
   j=i+20&lt;br /&gt;
   system &amp;quot;cat splitA$i(I3.3).pdb splitB$j(I3.3).pdb &amp;gt;&amp;gt; splitAB.pdb; rm -f split?$i(I3.3).pdb ; rm -f split?$j(I3.3).pdb&amp;quot;&lt;br /&gt;
 end do&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 write pdb splitAB.pdb all ter&lt;br /&gt;
 read pdb splitAB.pdb&lt;br /&gt;
 deposit pdb=demoAB.pdb&lt;br /&gt;
 &lt;br /&gt;
 read bundle.seq&lt;br /&gt;
 read bundle.lol&lt;br /&gt;
 read bundle.upl&lt;br /&gt;
 read bundle.aco&lt;br /&gt;
 read bundle.cco&lt;br /&gt;
 &lt;br /&gt;
 atom set &amp;quot;* 101-199&amp;quot; chain=B #residue=residue-100&lt;br /&gt;
 atom set &amp;quot;* 1-99&amp;quot; chain=A&lt;br /&gt;
 atom set &amp;quot;* :B101-B199&amp;quot; residue=residue-100&lt;br /&gt;
 write bundleAB.lol&lt;br /&gt;
 write bundleAB.upl&lt;br /&gt;
 write bundleAB.aco&lt;br /&gt;
 write bundleAB.cco karplus&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 molecules define A6-A39 B6-B39&lt;br /&gt;
 atom set * vdwgroup=bundle&lt;br /&gt;
 rmsdrange:=A11-A16,A21-A26,A31-A34,B11-B16,B21-B26,B31-B34&lt;br /&gt;
 &lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 read bundleAB.lol&lt;br /&gt;
 read bundleAB.upl&lt;br /&gt;
 read bundleAB.aco&lt;br /&gt;
 read bundleAB.cco&lt;br /&gt;
 &lt;br /&gt;
 overview&lt;br /&gt;
 &lt;br /&gt;
 read seq demoAB.seq&lt;br /&gt;
 read pdb demoAB.pdb&lt;br /&gt;
 molecules define A5-A39 B5-B39&lt;br /&gt;
 atoms set &amp;quot;* :A*&amp;quot; occupancy=0.5&lt;br /&gt;
 atoms set &amp;quot;* :B*&amp;quot; occupancy=0.5&lt;br /&gt;
 write demoOcc.pdb multistate all details bfactor=0.00&lt;/div&gt;</summary>
		<author><name>Dean</name></author>
	</entry>
</feed>