Difference between revisions of "Tutorial for model free SBiNLab"

From relax wiki
Jump to navigation Jump to search
 
(163 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Background ==
+
= Background =
 
This is a tutorial for Lau and Kaare in SBiNLab, and hopefully others.
 
This is a tutorial for Lau and Kaare in SBiNLab, and hopefully others.
  
 
To get inspiration of example scripts files and '''see''' how the protocol is performed, have a look here:
 
To get inspiration of example scripts files and '''see''' how the protocol is performed, have a look here:
* nmr-relax-code/test_suite/system_tests/scripts/model_free/dauvergne_protocol.py
+
* [https://github.com/nmr-relax/relax/blob/master/auto_analyses/dauvergne_protocol.py nmr-relax-code/auto_analyses/dauvergne_protocol.py]
* nmr-relax-code/auto_analyses/dauvergne_protocol.py
 
  
== Scripts ==
+
For references, see [http://www.nmr-relax.com/refs.shtml relax references]:
To get the protocol to work, we need to
+
* [[Model-free_analysis_single_field#Protocol|See this description of the protocol by Edward]] and image [http://www.nmr-relax.com/manual/The_diffusion_seeded_paradigm.html The diffusion seeded paradigm]
 +
* [http://www.nmr-relax.com/manual/Model_free_analysis.html Link to the manual]
 +
* [http://www.nmr-relax.com/manual/The_model_free_models.html Summary of model-free models]
 +
* [http://www.nmr-relax.com/manual/molmol_macro_apply.html#SECTION081284600000000000000 Summary of parameter meaning and value to pymol visualization]
 +
* d'Auvergne, E. J. and Gooley, P. R. (2008). [http://dx.doi.org/10.1007/s10858-007-9214-2 Optimisation of NMR dynamic models I. Minimisation algorithms and their performance within the model-free and Brownian rotational diffusion spaces. J. Biomol. NMR, 40(2), 107-119.]
 +
* d'Auvergne, E. J. and Gooley, P. R. (2008). [http://dx.doi.org/10.1007/s10858-007-9213-3 Optimisation of NMR dynamic models II. A new methodology for the dual optimisation of the model-free parameters and the Brownian rotational diffusion tensor. J. Biomol. NMR, 40(2), 121-133.]
  
* Load a PDB structure
+
= Script inspiration =
* Assign the "data structure" in relax through spin-assignments
+
== model-free : Script inspiration for setup and analysis ==
* Assign necessary "information" as isotope information to each spin-assignment
+
The distribution of relax includes a folder '''sample_scripts/model_free''' which contain
* Read "R1, R2 and NOE" for different magnet field strengths
+
a folder with scripts for analysis.
* Calculate some properties
 
* Check the data
 
* Run the protocol
 
  
To work most efficiently, it is important to perform each step 1 by 1,
+
It can be seen here: https://github.com/nmr-relax/relax/tree/master/sample_scripts/model_free
and closely inspect the log for any errors.
 
  
For similar tutorial, have a look at: [[Tutorial_for_model-free_analysis_sam_mahdi|Tutorial for model-free analysis sam mahdi]]
+
Here is the current list
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/back_calculate.py back_calculate.py]. Back-calculate and save relaxation data starting from a saved model-free results file.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/bmrb_deposition.py bmrb_deposition.py] Script for creating a NMR-STAR 3.1 formatted file for BMRB deposition of model-free results.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/cv.py cv.py] Script for model-free analysis using cross-validation model selection.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/dasha.py dasha.py] Script for model-free analysis using the program Dasha.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/dauvergne_protocol.py dauvergne_protocol.py] Script for black-box model-free analysis.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/diff_min.py diff_min.py] Demonstration script for diffusion tensor optimisation in a model-free analysis.]
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/final_data_extraction.py final_data_extraction.py] Extract Data to Table
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/generate_ri.py generate_ri.py] Script for back-calculating the relaxation data.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/grace_S2_vs_te.py grace_S2_vs_te.py] Script for creating a grace plot of the simulated order parameters vs. simulated correlation times.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/ grace_ri_data_correlation.py] Script for creating correlations plots of experimental verses back calculated relaxation data.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/map.py map.py] Script for mapping the model-free space for OpenDX visualisation.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/mf_multimodel.py mf_multimodel.py] This script performs a model-free analysis for the models 'm0' to 'm9' (or 'tm0' to 'tm9').
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/modsel.py modsel.py] Script for model-free model selection.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/molmol_plot.py molmol_plot.py] Script for generating Molmol macros for highlighting model-free motions
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/palmer.py palmer.py] Script for model-free analysis using Art Palmer's program 'Modelfree4'. Download from http://comdnmr.nysbc.org/comd-nmr-dissem/comd-nmr-software
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/remap.py remap.py] Script for mapping the model-free space.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/single_model.py single_model.py] This script performs a model-free analysis for the single model 'm4'.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/table_csv.py table_csv.py] Script for converting the model-free results into a CSV table.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/model_free/table_latex.py table_latex.py] Script for converting the model-free results into a LaTeX table.
  
=== Test load of PDB ===
+
== Other script inspiration for checking ==
First we just want to test to read the PDB file.
+
The distribution of relax includes a folder '''sample_scripts/''' which contain a folder with scripts for analysis.
  
'''01_read_pdb.py'''
+
It can be seen here: https://github.com/nmr-relax/relax/tree/master/sample_scripts
<source lang="python">
 
# Python module imports.
 
from time import asctime, localtime
 
import os
 
  
# relax module imports.
+
'''R1 / R2 Calculation'''
from auto_analyses.dauvergne_protocol import dAuvergne_protocol
+
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/relax_fit.py relax_fit.py] Script for relaxation curve fitting.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/relax_curve_diff.py relax_curve_diff.py] Script for creating a Grace plot of peak intensity differences.
 +
The resultant plot is useful for finding bad points or bad spectra when fitting exponential curves determine the R1 and R2 relaxation rates.  If the averages deviate systematically from zero, bias in the spectra or fitting will be clearly revealed. To use this script, R1 or R2 exponential curve fitting must have previously have been carried out the program state saved to the file 'rx.save' (either with or without the .gz or .bz2 ).  The file name of the saved state can be changed at the top of this script.
  
# Set up the data pipe.
+
'''NOE calculation'''
#######################
+
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/noe.py noe.py] Script for calculating NOEs.
  
# The following sequence of user function calls can be changed as needed.
+
'''Test data'''
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/jw_mapping.py jw_mapping.py] Script for reduced spectral density mapping.
 +
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/consistency_tests.py consistency_tests.py] Script for consistency testing.
 +
Severe artifacts can be introduced if model-free analysis is performed from inconsistent multiple magnetic field datasets. The use of simple tests as validation tools for the consistency assessment can help avoid such problems in order to extract more reliable information from spin relaxation experiments. In particular, these tests are useful for detecting inconsistencies arising from R2 data. Since such inconsistencies can yield artifactual Rex parameters within model-free analysis, these tests should be use routinely prior to any analysis such as model-free calculations.
 +
This script will allow one to calculate values for the three consistency tests J(0), F_eta and F_R2. Once this is done, qualitative analysis can be performed by comparing values obtained at different magnetic fields. Correlation plots and histograms are useful tools for such comparison, such as presented in Morin & Gagne (2009a) J. Biomol. NMR, 45: 361-372.
  
# Create the data pipe.
+
'''Other representations'''
bundle_name = "mf (%s)" % asctime(localtime())
+
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/angles.py angles.py] Script for calculating the protein NH bond vector angles with respect to the diffusion tensor.
name = "origin"
+
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/xh_vector_dist.py xh_vector_dist.py] Script for creating a PDB representation of the distribution of XH bond vectors.
pipe.create(name, 'mf', bundle=bundle_name)
+
* [https://github.com/nmr-relax/relax/blob/master/sample_scripts/diff_tensor_pdb.py diff_tensor_pdb.py] Script for creating a PDB representation of the Brownian rotational diffusion tensor.
  
# Load the PDB file.
+
= Scripts - Part 2 =
structure.read_pdb('energy_1.pdb', set_mol_name='TEMP', read_model=1)
+
We now try to setup things a little more efficient.
  
# Set up the 15N and 1H spins (both backbone and Trp indole sidechains).
+
Relax is able to read previous results file, so let us divide the task up into:
structure.load_spins('@N', ave_pos=True)
 
structure.load_spins('@NE1', ave_pos=True)
 
structure.load_spins('@H', ave_pos=True)
 
structure.load_spins('@HE1', ave_pos=True)
 
  
# Assign isotopes
+
* 1: Load the data and save as state file. Inspect in GUI before running.
spin.isotope('15N', spin_id='@N*')
+
* 2: Run the Model 1: local_tm.  
spin.isotope('1H', spin_id='@H*')
+
* 3: Here make 4 scripts. Each of them only depends on Model 1:
</source>
+
** Model 2: sphere
 +
** Model 3: prolate
 +
** Model 4: oblate
 +
** Model 5: ellipsoid
 +
* 4: Make an intermediate 'final' model script. This will automatically detect files from above.
 +
 
 +
== Prepare data ==
 +
We make a new folder and try.
  
Run with
+
{| class="mw-collapsible mw-collapsed wikitable"
 +
! See commands
 +
|-
 +
|
 
<source lang="bash">
 
<source lang="bash">
relax 01_read_pdb.py -t 01_read_pdb.log
+
mkdir 20171010_model_free_2_HADDOCK
 +
cp 20171010_model_free/*.dat 20171010_model_free_2_HADDOCK
 +
cp 20171010_model_free/*.pdb 20171010_model_free_2_HADDOCK
 +
 
 +
# Get scripts
 +
cd 20171010_model_free_2_HADDOCK
 +
git init
 +
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
 +
git fetch
 +
git checkout -t origin/master
 
</source>
 
</source>
 +
|}
  
 +
And a new one, changing the NOE error
 
{| class="mw-collapsible mw-collapsed wikitable"
 
{| class="mw-collapsible mw-collapsed wikitable"
! Output from logfile
+
! See commands
 
|-
 
|-
 
|
 
|
 
<source lang="bash">
 
<source lang="bash">
script = '01_read_pdb.py'
+
mkdir 20171010_model_free_3_HADDOCK
----------------------------------------------------------------------------------------------------
+
cp 20171010_model_free/*.dat 20171010_model_free_3_HADDOCK
# Python module imports.
+
cp 20171010_model_free/*.pdb 20171010_model_free_3_HADDOCK
from time import asctime, localtime
 
import os
 
  
# relax module imports.
+
# Get scripts
from auto_analyses.dauvergne_protocol import dAuvergne_protocol
+
cd 20171010_model_free_3_HADDOCK
 +
git init
 +
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
 +
git fetch
 +
git checkout -t origin/master
  
# Set up the data pipe.
+
# Change NOE error
#######################
+
sed -i 's/0.1*$/0.05/' NOE_600MHz_new.dat
 +
sed -i 's/0.1*$/0.05/' NOE_750MHz.dat
 +
</source>
 +
|}
  
# The following sequence of user function calls can be changed as needed.
+
And a new one, changing the NOE error, and deselecting N-terminal.<br>
 +
Consistency test, found that this stretch contained outliers.
 +
{| class="mw-collapsible mw-collapsed wikitable"
 +
! See commands
 +
|-
 +
|
 +
<source lang="bash">
 +
mkdir 20171010_model_free_4_HADDOCK
 +
cp 20171010_model_free/*.dat 20171010_model_free_4_HADDOCK
 +
cp 20171010_model_free/*.pdb 20171010_model_free_4_HADDOCK
  
# Create the data pipe.
+
# Get scripts
bundle_name = "mf (%s)" % asctime(localtime())
+
cd 20171010_model_free_4_HADDOCK
name = "origin"
+
git init
pipe.create(name, 'mf', bundle=bundle_name)
+
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
 +
git fetch
 +
git checkout -t origin/master
  
# Load the PDB file.
+
# Change NOE error
structure.read_pdb('energy_1.pdb', set_mol_name='TEMP', read_model=1)
+
sed -i 's/0.1*$/0.05/' NOE_600MHz_new.dat
 +
sed -i 's/0.1*$/0.05/' NOE_750MHz.dat
  
# Set up the 15N and 1H spins (both backbone and Trp indole sidechains).
+
# Make deselection
structure.load_spins('@N', ave_pos=True)
+
echo "#" > deselect.txt
structure.load_spins('@NE1', ave_pos=True)
+
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t151" >> deselect.txt
structure.load_spins('@H', ave_pos=True)
+
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t152" >> deselect.txt
structure.load_spins('@HE1', ave_pos=True)
+
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t153" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t154" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t155" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t156" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t157" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t158" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t159" >> deselect.txt
 +
</source>
 +
|}
  
# Assign isotopes
+
And a new one, changing the NOE error, and deselecting spins found from consistency test.<br>
spin.isotope('15N', spin_id='@N*')
+
{| class="mw-collapsible mw-collapsed wikitable"
spin.isotope('1H', spin_id='@H*')
+
! See commands
 +
|-
 +
|
 +
<source lang="bash">
 +
mkdir 20171010_model_free_5_HADDOCK
 +
cp 20171010_model_free/*.dat 20171010_model_free_5_HADDOCK
 +
cp 20171010_model_free/*.pdb 20171010_model_free_5_HADDOCK
  
----------------------------------------------------------------------------------------------------
+
# Get scripts
 +
cd 20171010_model_free_5_HADDOCK
 +
git init
 +
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
 +
git fetch
 +
git checkout -t origin/master
  
relax> pipe.create(pipe_name='origin', pipe_type='mf', bundle='mf (Fri Oct 13 17:44:18 2017)')
+
# Change NOE error
 +
sed -i 's/0.1*$/0.05/' NOE_600MHz_new.dat
 +
sed -i 's/0.1*$/0.05/' NOE_750MHz.dat
  
relax> structure.read_pdb(file='energy_1.pdb', dir=None, read_mol=None, set_mol_name='TEMP', read_model=1, set_model_num=None, alt_loc=None, verbosity=1, merge=False)
+
# Make deselection
 +
echo "#" > deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t158" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t157" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t17" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t159" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t120" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t59" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t98" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t49" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t76" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t155" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t156" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t48" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t154" >> deselect.txt
 +
</source>
 +
|}
  
Internal relax PDB parser.
+
And a new one, without changing the NOE error, and deselecting spins found from consistency test.<br>
Opening the file 'energy_1.pdb' for reading.
+
{| class="mw-collapsible mw-collapsed wikitable"
RelaxWarning: Cannot determine the element associated with atom 'X'.
+
! See commands
RelaxWarning: Cannot determine the element associated with atom 'Z'.
+
|-
RelaxWarning: Cannot determine the element associated with atom 'OO'.
+
|
RelaxWarning: Cannot determine the element associated with atom 'OO2'.
+
<source lang="bash">
Adding molecule 'TEMP' to model 1 (from the original molecule number 1 of model 1).
+
mkdir 20171010_model_free_6_HADDOCK
 
+
cp 20171010_model_free/*.dat 20171010_model_free_6_HADDOCK
relax> structure.load_spins(spin_id='@N', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
+
cp 20171010_model_free/*.pdb 20171010_model_free_6_HADDOCK
Adding the following spins to the relax data store.
 
 
 
# mol_name    res_num    res_name    spin_num    spin_name   
 
REMOVED FROM DISPLAY
 
 
 
relax> structure.load_spins(spin_id='@NE1', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
 
Adding the following spins to the relax data store.
 
 
 
# mol_name    res_num    res_name    spin_num    spin_name   
 
REMOVED FROM DISPLAY
 
 
 
relax> structure.load_spins(spin_id='@H', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
 
Adding the following spins to the relax data store.
 
 
 
# mol_name    res_num    res_name    spin_num    spin_name   
 
REMOVED FROM DISPLAY
 
  
relax> structure.load_spins(spin_id='@HE1', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
+
# Get scripts
Adding the following spins to the relax data store.
+
cd 20171010_model_free_6_HADDOCK
 +
git init
 +
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
 +
git fetch
 +
git checkout -t origin/master
  
# mol_name    res_num    res_name    spin_num    spin_name   
+
# Make deselection
REMOVED FROM DISPLAY
+
echo "#" > deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t158" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t157" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t17" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t159" >> deselect.txt
  
relax> spin.isotope(isotope='15N', spin_id='@N*', force=False)
+
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t59" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t98" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t76" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t155" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t156" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t120" >> deselect.txt
  
relax> spin.isotope(isotope='1H', spin_id='@H*', force=False)
+
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t49" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t48" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t154" >> deselect.txt
  
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t33" >> deselect.txt
 +
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t67" >> deselect.txt
 
</source>
 
</source>
 
|}
 
|}
  
=== Test load of data ===
+
== 11_read_data_GUI_inspect.py - Read data GUI inspect ==
That looked to go fine, so let us try to just load data.
+
This will read the data and save as a state.
  
Copy '''01_read_pdb.py''' to '''02_read_data.py''' and add:
+
The GUI can be a good place to inspect the setup and files.
<source lang="python">
 
# Load the relaxation data.
 
relax_data.read(ri_id='R1_600',  ri_type='R1',  frq=600.17*1e6, file='R1_600MHz_new_model_free.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='R2_600',  ri_type='R2',  frq=600.17*1e6, file='R2_600MHz_new_model_free.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='NOE_600',  ri_type='NOE',  frq=600.17*1e6, file='NOE_600MHz_new.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='R1_750',  ri_type='R1',  frq=750.06*1e6, file='R1_750MHz_model_free.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='R2_750',  ri_type='R2',  frq=750.06*1e6, file='R2_750MHz_model_free.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='NOE_750', ri_type='NOE', frq=750.06*1e6, file='NOE_750MHz.dat', mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
  
# Define the magnetic dipole-dipole relaxation interaction.
+
See content of:
interatom.define(spin_id1='@N', spin_id2='@H', direct_bond=True)
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/11_read_data_GUI_inspect.py 11_read_data_GUI_inspect.py]
interatom.define(spin_id1='@NE1', spin_id2='@HE1', direct_bond=True)
 
interatom.set_dist(spin_id1='@N*', spin_id2='@H*', ave_dist=1.02 * 1e-10)
 
interatom.unit_vectors()
 
 
 
# Define the chemical shift relaxation interaction.
 
value.set(-172 * 1e-6, 'csa', spin_id='@N*')
 
</source>
 
  
 
Run with
 
Run with
 
<source lang="bash">
 
<source lang="bash">
relax 02_read_data.py -t 02_read_data.log
+
relax 11_read_data_GUI_inspect.py -t 11_read_data_GUI_inspect.log
 
</source>
 
</source>
  
{| class="mw-collapsible mw-collapsed wikitable"
+
To check in GUI
! Output from logfile
+
* relax -g
|-
+
* File -> Open relax state
|
+
* In folder "result_10" open "result_10_ini.bz2"
<source lang="bash">
+
* View -> Data pipe editor
script = '02_read_data.py'
+
* Right click on pipe, and select "Associate with a new auto-analysis"
----------------------------------------------------------------------------------------------------
 
# Python module imports.
 
from time import asctime, localtime
 
import os
 
  
# relax module imports.
+
=== relax 11_test_consistency.py - Consistency test of our data ===
from auto_analyses.dauvergne_protocol import dAuvergne_protocol
+
Before running the analysis, it is wise to run a script for [[Tutorial_for_model_free_SBiNLab#Other_script_inspiration_for_checking|consistency testing]].
  
# Set up the data pipe.
+
See here:
#######################
+
* Morin & Gagne (2009a) [http://dx.doi.org/10.1007/s10858-009-9381-4 Simple tests for the validation of multiple field spin relaxation data. J. Biomol. NMR, 45: 361-372.]
  
# The following sequence of user function calls can be changed as needed.
+
Highlights:
 +
* Comparing results obtained at different magnetic fields should, in the case of perfect consistency and assuming the absence of conformational exchange, yield equal values independently of the magnetic field.
 +
* avoid the potential extraction of erroneous information as well as the waste of time associated to dissecting inconsistent datasets using numerous long model-free minimisations with different subsets of data.
 +
* The authors prefer the use of the spectral density at zero frequency J(0) alone since it '''does not rely''' on an estimation of the global correlation time '''tc/tm''', neither on a measure of theta, the angle between the 15N–1H vector and the principal axis of the 15N chemical shift tensor. Hence, J(0) is less likely to be affected by incorrect parameterisation of input parameters.
  
# Create the data pipe.
+
See content of:
bundle_name = "mf (%s)" % asctime(localtime())
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/11_test_consistency.py 11_test_consistency.py]
name = "origin"
+
<source lang="bash">
pipe.create(name, 'mf', bundle=bundle_name)
+
relax 11_test_consistency.py -t 11_test_consistency.py.log
  
# Load the PDB file.
+
#Afterwards, go into the folder at plot data.
structure.read_pdb('energy_1.pdb', set_mol_name='TEMP', read_model=1)
+
python plot_txt_files.py
 +
./grace2images.py
 +
</source>
  
# Set up the 15N and 1H spins (both backbone and Trp indole sidechains).
+
== 12_Model_1_I_local_tm.py - Only run local_tm ==
structure.load_spins('@N', ave_pos=True)
+
Now we only run '''Model 1'''.
structure.load_spins('@NE1', ave_pos=True)
 
structure.load_spins('@H', ave_pos=True)
 
structure.load_spins('@HE1', ave_pos=True)
 
  
# Assign isotopes
+
* DIFF_MODEL = ['local_tm']
spin.isotope('15N', spin_id='@N*')
+
* GRID_INC = 11 # This is the standard
spin.isotope('1H', spin_id='@H*')
+
* MC_NUM = 0 # This has no influence in Model 1-5
 +
* MAX_ITER = 20 # Stop if it has not converged in 20 rounds
  
# Load the relaxation data.
+
Normally between 8 to 15 multiple rounds of optimisation of the are required for the proper execution of this script.<br>
relax_data.read(ri_id='R1_600',  ri_type='R1',  frq=600.17*1e6, file='R1_600MHz_new_model_free.dat', mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
+
This is can also be see here in Figure 2.
relax_data.read(ri_id='R2_600',  ri_type='R2',  frq=600.17*1e6, file='R2_600MHz_new_model_free.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
+
* d'Auvergne, E. J. and Gooley, P. R. (2008). [http://dx.doi.org/10.1007/s10858-007-9213-3 Optimisation of NMR dynamic models II. A new methodology for the dual optimisation of the model-free parameters and the Brownian rotational diffusion tensor. J. Biomol. NMR, 40(2), 121-133.]
relax_data.read(ri_id='NOE_600',  ri_type='NOE',  frq=600.17*1e6, file='NOE_600MHz_new.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='R1_750',  ri_type='R1',  frq=750.06*1e6, file='R1_750MHz_model_free.dat',  mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='R2_750',  ri_type='R2',  frq=750.06*1e6, file='R2_750MHz_model_free.dat', mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
relax_data.read(ri_id='NOE_750', ri_type='NOE', frq=750.06*1e6, file='NOE_750MHz.dat', mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7)
 
  
# Define the magnetic dipole-dipole relaxation interaction.
+
Relax should stop calculation, if a model does not converge.
interatom.define(spin_id1='@N', spin_id2='@H', direct_bond=True)
 
interatom.define(spin_id1='@NE1', spin_id2='@HE1', direct_bond=True)
 
interatom.set_dist(spin_id1='@N*', spin_id2='@H*', ave_dist=1.02 * 1e-10)
 
interatom.unit_vectors()
 
  
# Define the chemical shift relaxation interaction.
+
See content of:
value.set(-172 * 1e-6, 'csa', spin_id='@N*')
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/12_Model_1_I_local_tm.py 12_Model_1_I_local_tm.py]
  
----------------------------------------------------------------------------------------------------
+
We use [http://www.dayid.org/comp/tm.html tmux] to make a terminal-session, we can get back to,
 +
if our own terminal connection get closed.
  
relax> pipe.create(pipe_name='origin', pipe_type='mf', bundle='mf (Fri Oct 13 17:51:28 2017)')
+
Run with
 +
<source lang="bash">
 +
# Make terminal-session
 +
tmux new -s m1
  
relax> structure.read_pdb(file='energy_1.pdb', dir=None, read_mol=None, set_mol_name='TEMP', read_model=1, set_model_num=None, alt_loc=None, verbosity=1, merge=False)
+
relax 12_Model_1_I_local_tm.py -t 12_Model_1_I_local_tm.log
  
Internal relax PDB parser.
+
# or
Opening the file 'energy_1.pdb' for reading.
+
tmux new -s m1
RelaxWarning: Cannot determine the element associated with atom 'X'.
+
mpirun -np 22 relax --multi='mpi4py' 12_Model_1_I_local_tm.py -t 12_Model_1_I_local_tm.log
RelaxWarning: Cannot determine the element associated with atom 'Z'.
+
</source>
RelaxWarning: Cannot determine the element associated with atom 'OO'.
 
RelaxWarning: Cannot determine the element associated with atom 'OO2'.
 
Adding molecule 'TEMP' to model 1 (from the original molecule number 1 of model 1).
 
  
relax> structure.load_spins(spin_id='@N', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
+
You can then in another terminal follow the logfile by
Adding the following spins to the relax data store.
+
<source lang="bash">
 +
less +F 12_Model_I_local_tm.log
 +
</source>
  
# mol_name    res_num   res_name    spin_num    spin_name   
+
* To scroll up and down, use keyboard: '''Ctrl+c'''
REMOVED FROM DISPLAY
+
* To return to follow mode, use keyboard: '''Shift+f'''
 +
* To exit, use keyboard: '''Ctrl+c'''   and then: '''q'''
  
relax> structure.load_spins(spin_id='@NE1', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
+
== 13_Model_2-5 - Run Model 2 to 5 ==
Adding the following spins to the relax data store.
+
When Model 1 is completed, then make 4 terminal windows and run them at the
 +
same time.
  
# mol_name    res_num    res_name    spin_num    spin_name   
+
These scripts do:
REMOVED FROM DISPLAY
+
* Read the state file from before with setup
 +
* Change DIFF_MODEL accordingly
  
relax> structure.load_spins(spin_id='@H', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/13_Model_2_II_sphere.py 13_Model_2_II_sphere.py]
Adding the following spins to the relax data store.
+
<source lang="bash">
 +
tmux new -s m2
 +
relax 13_Model_2_II_sphere.py -t 13_Model_2_II_sphere.log
 +
# Or
 +
mpirun -np 5 relax --multi='mpi4py' 13_Model_2_II_sphere.py -t 13_Model_2_II_sphere.log
  
# mol_name    res_num    res_name    spin_num    spin_name   
+
# When relax is running, push: Ctrl+b and then d, to disconnect without exit
REMOVED FROM DISPLAY
+
</source>
  
relax> structure.load_spins(spin_id='@HE1', from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/13_Model_3_III_prolate.py 13_Model_3_III_prolate.py]
Adding the following spins to the relax data store.
+
<source lang="bash">
 +
tmux new -s m3
 +
relax 13_Model_3_III_prolate.py -t 13_Model_3_III_prolate.log
 +
# Or
 +
mpirun -np 5 relax --multi='mpi4py' 13_Model_3_III_prolate.py -t 13_Model_3_III_prolate.log
 +
</source>
  
# mol_name    res_num    res_name    spin_num    spin_name   
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/13_Model_4_IV_oblate.py 13_Model_4_IV_oblate.py]
REMOVED FROM DISPLAY
+
<source lang="bash">
 +
tmux new -s m4
 +
relax 13_Model_4_IV_oblate.py -t 13_Model_4_IV_oblate.log
 +
# Or
 +
mpirun -np 5 relax --multi='mpi4py' 13_Model_4_IV_oblate.py -t 13_Model_4_IV_oblate.log
 +
</source>
  
relax> spin.isotope(isotope='15N', spin_id='@N*', force=False)
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/13_Model_5_V_ellipsoid.py 13_Model_5_V_ellipsoid.py]
 +
<source lang="bash">
 +
tmux new -s m5
 +
relax 13_Model_5_V_ellipsoid.py -t 13_Model_5_V_ellipsoid.log
 +
# Or
 +
mpirun -np 5 relax --multi='mpi4py' 13_Model_5_V_ellipsoid.py -t 13_Model_5_V_ellipsoid.log
 +
</source>
  
relax> spin.isotope(isotope='1H', spin_id='@H*', force=False)
+
To join session
 +
<source lang="bash">
 +
# List
 +
tmux list-s
  
relax> relax_data.read(ri_id='R1_600', ri_type='R1', frq=600170000.0, file='R1_600MHz_new_model_free.dat', dir=None, spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7, sep=None, spin_id=None)
+
# Join either
Opening the file 'R1_600MHz_new_model_free.dat' for reading.
+
tmux a -t m1
 +
tmux a -t m2
 +
tmux a -t m3
 +
tmux a -t m4
 +
tmux a -t m5
 +
</source>
  
The following 600.17 MHz R1 relaxation data with the ID 'R1_600' has been loaded into the relax data store:
+
== 14_intermediate_final.py - Inspection during model optimization ==
 +
During running of model 2-5, the current results can be inspected with
 +
this nifty scripts.
  
# Spin_ID          Value      Error     
+
The script will ask for input of MC numbers. So just run it.
REMOVED FROM DISPLAY   
 
  
relax> relax_data.read(ri_id='R2_600', ri_type='R2', frq=600170000.0, file='R2_600MHz_new_model_free.dat', dir=None, spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7, sep=None, spin_id=None)
+
[https://github.com/tlinnet/relax_modelfree_scripts/blob/master/14_intermediate_final.py 14_intermediate_final.py]
Opening the file 'R2_600MHz_new_model_free.dat' for reading.
+
<source lang="bash">
 +
tmux new -s final
 +
relax 14_intermediate_final.py -t 14_intermediate_final.log
 +
</source>
  
The following 600.17 MHz R2 relaxation data with the ID 'R2_600' has been loaded into the relax data store:
+
This does:
 +
* Option: Collect current best result from Model 2-5, and make MC simulations, and finalize to get current results files
 +
** [http://comdnmr.nysbc.org/comd-nmr-dissem/comd-nmr-software Make analysis script for palmer Modelfree4]
 +
** Get more spin information
 +
* Make a pymol file, that collects all of relax pymol command files into 1 pymol session
 +
* Option: Collect all chi2 and number of params k, for each iteration per model
 +
** Make a python plot file for plotting this results
  
# Spin_ID          Value        Error     
+
=== Per iteration get: chi2, k, tm ===
REMOVED FROM DISPLAY 
+
Afterwards, plot the data.
 +
<source lang="bash">
 +
python results_collected.py
 +
</source>
  
relax> relax_data.read(ri_id='NOE_600', ri_type='NOE', frq=600170000.0, file='NOE_600MHz_new.dat', dir=None, spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7, sep=None, spin_id=None)
+
=== Pymol macro ===
Opening the file 'NOE_600MHz_new.dat' for reading.
+
You also get a pymol folder.
  
The following 600.17 MHz NOE relaxation data with the ID 'NOE_600' has been loaded into the relax data store:
+
See here for info how the macro is applied
 +
* [http://www.nmr-relax.com/manual/molmol_macro_apply.html#SECTION081284600000000000000 Summary of parameter meaning and value to pymol visualization]
  
# Spin_ID          Value        Error   
+
Run with
REMOVED FROM DISPLAY 
+
<source lang="bash">
 +
pymol 0_0_apply_all_pymol_commands.pml
 +
</source>
  
relax> relax_data.read(ri_id='R1_750', ri_type='R1', frq=750060000.0, file='R1_750MHz_model_free.dat', dir=None, spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7, sep=None, spin_id=None)
+
= To run on Haddock =
Opening the file 'R1_750MHz_model_free.dat' for reading.
+
Have a look here, how to get standalone python [[Anaconda_linux_mac|Anaconda linux]].
 +
Also have a look here [[OpenMPI]].
  
The following 750.06 MHz R1 relaxation data with the ID 'R1_750' has been loaded into the relax data store:
+
<source lang="bash">
 +
# SSH in
 +
ssh haddock
  
# Spin_ID          Value      Error     
+
# Test with shell
REMOVED FROM DISPLAY 
+
mpirun -np 6 echo "hello world"
  
relax> relax_data.read(ri_id='R2_750', ri_type='R2', frq=750060000.0, file='R2_750MHz_model_free.dat', dir=None, spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7, sep=None, spin_id=None)
+
# Test with python
Opening the file 'R2_750MHz_model_free.dat' for reading.
+
mpirun -np 6 python -m mpi4py helloworld
  
The following 750.06 MHz R2 relaxation data with the ID 'R2_750' has been loaded into the relax data store:
+
# Test with relax
 +
mpirun -np 6 relax --multi='mpi4py'
 +
# Look for: Processor fabric: MPI 2.2 running via mpi4py with 5 slave processors & 1 master.  Using MPICH2 1.4.1.
 +
</source>
  
# Spin_ID          Value        Error     
+
Now we run '''04_run_default_with_tolerance_lim.py''' with more power!<br>
REMOVED FROM DISPLAY   
+
We use [http://www.dayid.org/comp/tm.html tmux] to make a terminal-session, we can get back to,
 +
if our own terminal connection get closed.
  
relax> relax_data.read(ri_id='NOE_750', ri_type='NOE', frq=750060000.0, file='NOE_750MHz.dat', dir=None, spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6, error_col=7, sep=None, spin_id=None)
+
* start a new session: '''tmux'''
Opening the file 'NOE_750MHz.dat' for reading.
+
* re-attach a detached session: '''tmux attach'''
  
The following 750.06 MHz NOE relaxation data with the ID 'NOE_750' has been loaded into the relax data store:
+
<source lang="bash">
 +
# Make terminal-session
 +
tmux
  
# Spin_ID          Value        Error   
+
# Start relax
REMOVED FROM DISPLAY   
+
mpirun -np 20 relax --multi='mpi4py' 04_run_default_with_tolerance_lim.py -t 04_run_default_with_tolerance_lim.log
 +
</source>
  
relax> interatom.define(spin_id1='@N', spin_id2='@H', direct_bond=True, spin_selection=True, pipe=None)
+
= Useful commands to log file =
Interatomic interactions are now defined for the following spins:
 
  
# Spin_ID_1        Spin_ID_2         
+
While the analysis is running, these commands could be used to check the logfile for errors
'#TEMP:3@N'      '#TEMP:3@H'     
+
<source lang="bash">
'#TEMP:4@N'      '#TEMP:4@H'     
+
### Check convergence
'#TEMP:5@N'      '#TEMP:5@H'     
+
# For chi2
'#TEMP:6@N'      '#TEMP:6@H'     
+
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Chi-squared test:"
'#TEMP:7@N'      '#TEMP:7@H'     
 
'#TEMP:8@N'      '#TEMP:8@H'     
 
'#TEMP:9@N'      '#TEMP:9@H'     
 
'#TEMP:10@N'    '#TEMP:10@H'   
 
'#TEMP:11@N'    '#TEMP:11@H'   
 
'#TEMP:13@N'    '#TEMP:13@H'   
 
'#TEMP:14@N'    '#TEMP:14@H'   
 
'#TEMP:15@N'    '#TEMP:15@H'   
 
'#TEMP:16@N'    '#TEMP:16@H'   
 
'#TEMP:17@N'    '#TEMP:17@H'   
 
'#TEMP:18@N'    '#TEMP:18@H'   
 
'#TEMP:19@N'    '#TEMP:19@H'   
 
'#TEMP:20@N'    '#TEMP:20@H'   
 
'#TEMP:21@N'    '#TEMP:21@H'   
 
'#TEMP:22@N'    '#TEMP:22@H'   
 
'#TEMP:23@N'    '#TEMP:23@H'   
 
'#TEMP:24@N'    '#TEMP:24@H'   
 
'#TEMP:25@N'    '#TEMP:25@H'   
 
'#TEMP:26@N'    '#TEMP:26@H'   
 
'#TEMP:27@N'    '#TEMP:27@H'   
 
'#TEMP:28@N'    '#TEMP:28@H'   
 
'#TEMP:29@N'    '#TEMP:29@H'   
 
'#TEMP:30@N'    '#TEMP:30@H'   
 
'#TEMP:31@N'    '#TEMP:31@H'   
 
'#TEMP:32@N'    '#TEMP:32@H'   
 
'#TEMP:33@N'    '#TEMP:33@H'   
 
'#TEMP:34@N'    '#TEMP:34@H'   
 
'#TEMP:35@N'    '#TEMP:35@H'   
 
'#TEMP:36@N'    '#TEMP:36@H'   
 
'#TEMP:37@N'    '#TEMP:37@H'   
 
'#TEMP:38@N'    '#TEMP:38@H'   
 
'#TEMP:39@N'    '#TEMP:39@H'   
 
'#TEMP:40@N'    '#TEMP:40@H'   
 
'#TEMP:41@N'    '#TEMP:41@H'   
 
'#TEMP:42@N'    '#TEMP:42@H'   
 
'#TEMP:43@N'    '#TEMP:43@H'   
 
'#TEMP:45@N'    '#TEMP:45@H'   
 
'#TEMP:46@N'    '#TEMP:46@H'   
 
'#TEMP:47@N'    '#TEMP:47@H'   
 
'#TEMP:48@N'    '#TEMP:48@H'   
 
'#TEMP:49@N'    '#TEMP:49@H'   
 
'#TEMP:50@N'    '#TEMP:50@H'   
 
'#TEMP:51@N'    '#TEMP:51@H'   
 
'#TEMP:52@N'    '#TEMP:52@H'   
 
'#TEMP:53@N'    '#TEMP:53@H'   
 
'#TEMP:54@N'    '#TEMP:54@H'   
 
'#TEMP:55@N'    '#TEMP:55@H'   
 
'#TEMP:56@N'    '#TEMP:56@H'   
 
'#TEMP:57@N'    '#TEMP:57@H'   
 
'#TEMP:58@N'    '#TEMP:58@H'   
 
'#TEMP:59@N'    '#TEMP:59@H'   
 
'#TEMP:60@N'    '#TEMP:60@H'   
 
'#TEMP:61@N'    '#TEMP:61@H'   
 
'#TEMP:62@N'    '#TEMP:62@H'   
 
'#TEMP:63@N'    '#TEMP:63@H'   
 
'#TEMP:64@N'    '#TEMP:64@H'   
 
'#TEMP:65@N'    '#TEMP:65@H'   
 
'#TEMP:66@N'    '#TEMP:66@H'   
 
'#TEMP:67@N'    '#TEMP:67@H'   
 
'#TEMP:68@N'    '#TEMP:68@H'   
 
'#TEMP:69@N'    '#TEMP:69@H'   
 
'#TEMP:70@N'    '#TEMP:70@H'   
 
'#TEMP:71@N'    '#TEMP:71@H'   
 
'#TEMP:72@N'    '#TEMP:72@H'   
 
'#TEMP:73@N'    '#TEMP:73@H'   
 
'#TEMP:74@N'    '#TEMP:74@H'   
 
'#TEMP:75@N'    '#TEMP:75@H'   
 
'#TEMP:76@N'    '#TEMP:76@H'   
 
'#TEMP:77@N'    '#TEMP:77@H'   
 
'#TEMP:78@N'    '#TEMP:78@H'   
 
'#TEMP:79@N'    '#TEMP:79@H'   
 
'#TEMP:80@N'    '#TEMP:80@H'   
 
'#TEMP:81@N'    '#TEMP:81@H'   
 
'#TEMP:82@N'    '#TEMP:82@H'   
 
'#TEMP:83@N'    '#TEMP:83@H'   
 
'#TEMP:84@N'    '#TEMP:84@H'   
 
'#TEMP:85@N'    '#TEMP:85@H'   
 
'#TEMP:87@N'    '#TEMP:87@H'   
 
'#TEMP:88@N'    '#TEMP:88@H'   
 
'#TEMP:89@N'    '#TEMP:89@H'   
 
'#TEMP:90@N'    '#TEMP:90@H'   
 
'#TEMP:91@N'    '#TEMP:91@H'   
 
'#TEMP:93@N'    '#TEMP:93@H'   
 
'#TEMP:94@N'    '#TEMP:94@H'   
 
'#TEMP:95@N'    '#TEMP:95@H'   
 
'#TEMP:96@N'    '#TEMP:96@H'   
 
'#TEMP:97@N'    '#TEMP:97@H'   
 
'#TEMP:98@N'    '#TEMP:98@H'   
 
'#TEMP:99@N'    '#TEMP:99@H'   
 
'#TEMP:100@N'    '#TEMP:100@H'   
 
'#TEMP:101@N'    '#TEMP:101@H'   
 
'#TEMP:102@N'    '#TEMP:102@H'   
 
'#TEMP:103@N'    '#TEMP:103@H'   
 
'#TEMP:104@N'    '#TEMP:104@H'   
 
'#TEMP:105@N'    '#TEMP:105@H'   
 
'#TEMP:106@N'    '#TEMP:106@H'   
 
'#TEMP:107@N'    '#TEMP:107@H'   
 
'#TEMP:108@N'    '#TEMP:108@H'   
 
'#TEMP:109@N'    '#TEMP:109@H'   
 
'#TEMP:110@N'    '#TEMP:110@H'   
 
'#TEMP:111@N'    '#TEMP:111@H'   
 
'#TEMP:112@N'    '#TEMP:112@H'   
 
'#TEMP:113@N'    '#TEMP:113@H'   
 
'#TEMP:114@N'    '#TEMP:114@H'   
 
'#TEMP:115@N'    '#TEMP:115@H'   
 
'#TEMP:116@N'    '#TEMP:116@H'   
 
'#TEMP:117@N'    '#TEMP:117@H'   
 
'#TEMP:118@N'    '#TEMP:118@H'   
 
'#TEMP:119@N'    '#TEMP:119@H'   
 
'#TEMP:120@N'    '#TEMP:120@H'   
 
'#TEMP:121@N'    '#TEMP:121@H'   
 
'#TEMP:122@N'    '#TEMP:122@H'   
 
'#TEMP:123@N'    '#TEMP:123@H'   
 
'#TEMP:124@N'    '#TEMP:124@H'   
 
'#TEMP:125@N'    '#TEMP:125@H'   
 
'#TEMP:127@N'    '#TEMP:127@H'   
 
'#TEMP:128@N'    '#TEMP:128@H'   
 
'#TEMP:129@N'    '#TEMP:129@H'   
 
'#TEMP:130@N'    '#TEMP:130@H'   
 
'#TEMP:131@N'    '#TEMP:131@H'   
 
'#TEMP:132@N'    '#TEMP:132@H'   
 
'#TEMP:133@N'    '#TEMP:133@H'   
 
'#TEMP:134@N'    '#TEMP:134@H'   
 
'#TEMP:136@N'    '#TEMP:136@H'   
 
'#TEMP:138@N'    '#TEMP:138@H'   
 
'#TEMP:139@N'    '#TEMP:139@H'   
 
'#TEMP:140@N'    '#TEMP:140@H'   
 
'#TEMP:141@N'    '#TEMP:141@H'   
 
'#TEMP:142@N'    '#TEMP:142@H'   
 
'#TEMP:143@N'    '#TEMP:143@H'   
 
'#TEMP:144@N'    '#TEMP:144@H'   
 
'#TEMP:145@N'    '#TEMP:145@H'   
 
'#TEMP:146@N'    '#TEMP:146@H'   
 
'#TEMP:147@N'    '#TEMP:147@H'   
 
'#TEMP:148@N'    '#TEMP:148@H'   
 
'#TEMP:149@N'    '#TEMP:149@H'   
 
'#TEMP:150@N'    '#TEMP:150@H'   
 
'#TEMP:151@N'    '#TEMP:151@H'   
 
'#TEMP:152@N'    '#TEMP:152@H'   
 
'#TEMP:153@N'    '#TEMP:153@H'   
 
'#TEMP:154@N'    '#TEMP:154@H'   
 
'#TEMP:155@N'    '#TEMP:155@H'   
 
'#TEMP:156@N'    '#TEMP:156@H'   
 
'#TEMP:157@N'    '#TEMP:157@H'   
 
'#TEMP:158@N'    '#TEMP:158@H'   
 
'#TEMP:159@N'    '#TEMP:159@H'   
 
  
relax> interatom.define(spin_id1='@NE1', spin_id2='@HE1', direct_bond=True, spin_selection=True, pipe=None)
+
# For other tests
Interatomic interactions are now defined for the following spins:
+
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical "
 +
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical model-free models test:"
 +
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical diffusion tensor parameter test:"
 +
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical model-free parameter test:"
  
# Spin_ID_1          Spin_ID_2           
+
# To look for not converged errors
'#TEMP:33@NE1'    '#TEMP:33@HE1'   
+
# For chi2
'#TEMP:48@NE1'    '#TEMP:48@HE1'   
+
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The chi-squared value has not converged."
'#TEMP:49@NE1'    '#TEMP:49@HE1'   
 
'#TEMP:59@NE1'    '#TEMP:59@HE1'   
 
'#TEMP:98@NE1'    '#TEMP:98@HE1'   
 
  
relax> interatom.set_dist(spin_id1='@N*', spin_id2='@H*', ave_dist=1.0200000000000001e-10, unit='meter')
+
# For other tests
The following averaged distances have been set:
+
cat 04_run_default_with_tolerance_lim.log | grep -B 7 " have not converged."
 +
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The model-free models have not converged."
 +
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The diffusion parameters have not converged."
 +
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The model-free parameters have not converged."
 +
</source>
  
# Spin_ID_1          Spin_ID_2            Ave_distance(meters)     
+
You can then inspect the logfile by '''less''': [http://www.thegeekstuff.com/2010/02/unix-less-command-10-tips-for-effective-navigation 10-tips for less]
'#TEMP:3@N'       '#TEMP:3@H'       1.0200000000000001e-10   
 
'#TEMP:4@N'      '#TEMP:4@H'      1.0200000000000001e-10   
 
'#TEMP:5@N'      '#TEMP:5@H'      1.0200000000000001e-10   
 
'#TEMP:6@N'      '#TEMP:6@H'      1.0200000000000001e-10   
 
'#TEMP:7@N'      '#TEMP:7@H'      1.0200000000000001e-10   
 
'#TEMP:8@N'      '#TEMP:8@H'      1.0200000000000001e-10  
 
'#TEMP:9@N'      '#TEMP:9@H'      1.0200000000000001e-10   
 
'#TEMP:10@N'      '#TEMP:10@H'      1.0200000000000001e-10   
 
'#TEMP:11@N'      '#TEMP:11@H'      1.0200000000000001e-10   
 
'#TEMP:13@N'      '#TEMP:13@H'      1.0200000000000001e-10  
 
'#TEMP:14@N'      '#TEMP:14@H'      1.0200000000000001e-10   
 
'#TEMP:15@N'      '#TEMP:15@H'      1.0200000000000001e-10   
 
'#TEMP:16@N'      '#TEMP:16@H'      1.0200000000000001e-10   
 
'#TEMP:17@N'      '#TEMP:17@H'      1.0200000000000001e-10   
 
'#TEMP:18@N'      '#TEMP:18@H'      1.0200000000000001e-10   
 
'#TEMP:19@N'      '#TEMP:19@H'      1.0200000000000001e-10   
 
'#TEMP:20@N'      '#TEMP:20@H'      1.0200000000000001e-10   
 
'#TEMP:21@N'      '#TEMP:21@H'      1.0200000000000001e-10   
 
'#TEMP:22@N'      '#TEMP:22@H'      1.0200000000000001e-10   
 
'#TEMP:23@N'      '#TEMP:23@H'      1.0200000000000001e-10   
 
'#TEMP:24@N'      '#TEMP:24@H'      1.0200000000000001e-10   
 
'#TEMP:25@N'      '#TEMP:25@H'      1.0200000000000001e-10   
 
'#TEMP:26@N'      '#TEMP:26@H'      1.0200000000000001e-10   
 
'#TEMP:27@N'      '#TEMP:27@H'      1.0200000000000001e-10   
 
'#TEMP:28@N'      '#TEMP:28@H'      1.0200000000000001e-10   
 
'#TEMP:29@N'      '#TEMP:29@H'      1.0200000000000001e-10   
 
'#TEMP:30@N'      '#TEMP:30@H'      1.0200000000000001e-10   
 
'#TEMP:31@N'      '#TEMP:31@H'      1.0200000000000001e-10   
 
'#TEMP:32@N'      '#TEMP:32@H'      1.0200000000000001e-10   
 
'#TEMP:33@N'      '#TEMP:33@H'      1.0200000000000001e-10   
 
'#TEMP:34@N'      '#TEMP:34@H'      1.0200000000000001e-10   
 
'#TEMP:35@N'      '#TEMP:35@H'      1.0200000000000001e-10   
 
'#TEMP:36@N'      '#TEMP:36@H'      1.0200000000000001e-10   
 
'#TEMP:37@N'      '#TEMP:37@H'      1.0200000000000001e-10   
 
'#TEMP:38@N'      '#TEMP:38@H'      1.0200000000000001e-10   
 
'#TEMP:39@N'      '#TEMP:39@H'      1.0200000000000001e-10   
 
'#TEMP:40@N'      '#TEMP:40@H'      1.0200000000000001e-10   
 
'#TEMP:41@N'      '#TEMP:41@H'      1.0200000000000001e-10   
 
'#TEMP:42@N'      '#TEMP:42@H'      1.0200000000000001e-10   
 
'#TEMP:43@N'      '#TEMP:43@H'      1.0200000000000001e-10   
 
'#TEMP:45@N'      '#TEMP:45@H'      1.0200000000000001e-10   
 
'#TEMP:46@N'      '#TEMP:46@H'      1.0200000000000001e-10   
 
'#TEMP:47@N'      '#TEMP:47@H'      1.0200000000000001e-10   
 
'#TEMP:48@N'      '#TEMP:48@H'      1.0200000000000001e-10   
 
'#TEMP:49@N'      '#TEMP:49@H'      1.0200000000000001e-10   
 
'#TEMP:50@N'      '#TEMP:50@H'      1.0200000000000001e-10   
 
'#TEMP:51@N'      '#TEMP:51@H'      1.0200000000000001e-10   
 
'#TEMP:52@N'      '#TEMP:52@H'      1.0200000000000001e-10   
 
'#TEMP:53@N'      '#TEMP:53@H'      1.0200000000000001e-10   
 
'#TEMP:54@N'      '#TEMP:54@H'      1.0200000000000001e-10   
 
'#TEMP:55@N'      '#TEMP:55@H'      1.0200000000000001e-10   
 
'#TEMP:56@N'      '#TEMP:56@H'      1.0200000000000001e-10   
 
'#TEMP:57@N'      '#TEMP:57@H'      1.0200000000000001e-10   
 
'#TEMP:58@N'      '#TEMP:58@H'      1.0200000000000001e-10   
 
'#TEMP:59@N'      '#TEMP:59@H'      1.0200000000000001e-10   
 
'#TEMP:60@N'      '#TEMP:60@H'      1.0200000000000001e-10   
 
'#TEMP:61@N'      '#TEMP:61@H'      1.0200000000000001e-10   
 
'#TEMP:62@N'      '#TEMP:62@H'      1.0200000000000001e-10   
 
'#TEMP:63@N'      '#TEMP:63@H'      1.0200000000000001e-10   
 
'#TEMP:64@N'      '#TEMP:64@H'      1.0200000000000001e-10   
 
'#TEMP:65@N'      '#TEMP:65@H'      1.0200000000000001e-10   
 
'#TEMP:66@N'      '#TEMP:66@H'      1.0200000000000001e-10   
 
'#TEMP:67@N'      '#TEMP:67@H'      1.0200000000000001e-10   
 
'#TEMP:68@N'      '#TEMP:68@H'      1.0200000000000001e-10   
 
'#TEMP:69@N'      '#TEMP:69@H'      1.0200000000000001e-10   
 
'#TEMP:70@N'      '#TEMP:70@H'      1.0200000000000001e-10   
 
'#TEMP:71@N'      '#TEMP:71@H'      1.0200000000000001e-10   
 
'#TEMP:72@N'      '#TEMP:72@H'      1.0200000000000001e-10   
 
'#TEMP:73@N'      '#TEMP:73@H'      1.0200000000000001e-10   
 
'#TEMP:74@N'      '#TEMP:74@H'      1.0200000000000001e-10   
 
'#TEMP:75@N'      '#TEMP:75@H'      1.0200000000000001e-10   
 
'#TEMP:76@N'      '#TEMP:76@H'      1.0200000000000001e-10   
 
'#TEMP:77@N'      '#TEMP:77@H'      1.0200000000000001e-10   
 
'#TEMP:78@N'      '#TEMP:78@H'      1.0200000000000001e-10   
 
'#TEMP:79@N'      '#TEMP:79@H'      1.0200000000000001e-10   
 
'#TEMP:80@N'      '#TEMP:80@H'      1.0200000000000001e-10   
 
'#TEMP:81@N'      '#TEMP:81@H'      1.0200000000000001e-10   
 
'#TEMP:82@N'      '#TEMP:82@H'      1.0200000000000001e-10   
 
'#TEMP:83@N'      '#TEMP:83@H'      1.0200000000000001e-10   
 
'#TEMP:84@N'      '#TEMP:84@H'      1.0200000000000001e-10   
 
'#TEMP:85@N'      '#TEMP:85@H'      1.0200000000000001e-10   
 
'#TEMP:87@N'      '#TEMP:87@H'      1.0200000000000001e-10   
 
'#TEMP:88@N'      '#TEMP:88@H'      1.0200000000000001e-10   
 
'#TEMP:89@N'      '#TEMP:89@H'      1.0200000000000001e-10   
 
'#TEMP:90@N'      '#TEMP:90@H'      1.0200000000000001e-10   
 
'#TEMP:91@N'      '#TEMP:91@H'      1.0200000000000001e-10   
 
'#TEMP:93@N'      '#TEMP:93@H'      1.0200000000000001e-10   
 
'#TEMP:94@N'      '#TEMP:94@H'      1.0200000000000001e-10   
 
'#TEMP:95@N'      '#TEMP:95@H'      1.0200000000000001e-10   
 
'#TEMP:96@N'      '#TEMP:96@H'      1.0200000000000001e-10   
 
'#TEMP:97@N'      '#TEMP:97@H'      1.0200000000000001e-10   
 
'#TEMP:98@N'      '#TEMP:98@H'      1.0200000000000001e-10   
 
'#TEMP:99@N'      '#TEMP:99@H'      1.0200000000000001e-10   
 
'#TEMP:100@N'    '#TEMP:100@H'    1.0200000000000001e-10   
 
'#TEMP:101@N'    '#TEMP:101@H'    1.0200000000000001e-10   
 
'#TEMP:102@N'    '#TEMP:102@H'    1.0200000000000001e-10   
 
'#TEMP:103@N'    '#TEMP:103@H'    1.0200000000000001e-10   
 
'#TEMP:104@N'    '#TEMP:104@H'    1.0200000000000001e-10   
 
'#TEMP:105@N'    '#TEMP:105@H'    1.0200000000000001e-10   
 
'#TEMP:106@N'    '#TEMP:106@H'    1.0200000000000001e-10   
 
'#TEMP:107@N'    '#TEMP:107@H'    1.0200000000000001e-10   
 
'#TEMP:108@N'    '#TEMP:108@H'    1.0200000000000001e-10   
 
'#TEMP:109@N'    '#TEMP:109@H'    1.0200000000000001e-10   
 
'#TEMP:110@N'    '#TEMP:110@H'    1.0200000000000001e-10   
 
'#TEMP:111@N'    '#TEMP:111@H'    1.0200000000000001e-10   
 
'#TEMP:112@N'    '#TEMP:112@H'    1.0200000000000001e-10   
 
'#TEMP:113@N'    '#TEMP:113@H'    1.0200000000000001e-10   
 
'#TEMP:114@N'    '#TEMP:114@H'    1.0200000000000001e-10   
 
'#TEMP:115@N'    '#TEMP:115@H'    1.0200000000000001e-10   
 
'#TEMP:116@N'    '#TEMP:116@H'    1.0200000000000001e-10   
 
'#TEMP:117@N'    '#TEMP:117@H'    1.0200000000000001e-10   
 
'#TEMP:118@N'    '#TEMP:118@H'    1.0200000000000001e-10   
 
'#TEMP:119@N'    '#TEMP:119@H'    1.0200000000000001e-10   
 
'#TEMP:120@N'    '#TEMP:120@H'    1.0200000000000001e-10   
 
'#TEMP:121@N'    '#TEMP:121@H'    1.0200000000000001e-10   
 
'#TEMP:122@N'    '#TEMP:122@H'    1.0200000000000001e-10   
 
'#TEMP:123@N'    '#TEMP:123@H'    1.0200000000000001e-10   
 
'#TEMP:124@N'    '#TEMP:124@H'    1.0200000000000001e-10   
 
'#TEMP:125@N'    '#TEMP:125@H'    1.0200000000000001e-10   
 
'#TEMP:127@N'    '#TEMP:127@H'    1.0200000000000001e-10   
 
'#TEMP:128@N'    '#TEMP:128@H'    1.0200000000000001e-10   
 
'#TEMP:129@N'    '#TEMP:129@H'    1.0200000000000001e-10   
 
'#TEMP:130@N'    '#TEMP:130@H'    1.0200000000000001e-10   
 
'#TEMP:131@N'    '#TEMP:131@H'    1.0200000000000001e-10   
 
'#TEMP:132@N'    '#TEMP:132@H'    1.0200000000000001e-10   
 
'#TEMP:133@N'    '#TEMP:133@H'    1.0200000000000001e-10   
 
'#TEMP:134@N'    '#TEMP:134@H'    1.0200000000000001e-10   
 
'#TEMP:136@N'    '#TEMP:136@H'    1.0200000000000001e-10   
 
'#TEMP:138@N'    '#TEMP:138@H'    1.0200000000000001e-10   
 
'#TEMP:139@N'    '#TEMP:139@H'    1.0200000000000001e-10   
 
'#TEMP:140@N'    '#TEMP:140@H'    1.0200000000000001e-10   
 
'#TEMP:141@N'    '#TEMP:141@H'    1.0200000000000001e-10   
 
'#TEMP:142@N'    '#TEMP:142@H'    1.0200000000000001e-10   
 
'#TEMP:143@N'    '#TEMP:143@H'    1.0200000000000001e-10   
 
'#TEMP:144@N'    '#TEMP:144@H'    1.0200000000000001e-10   
 
'#TEMP:145@N'    '#TEMP:145@H'    1.0200000000000001e-10   
 
'#TEMP:146@N'    '#TEMP:146@H'    1.0200000000000001e-10   
 
'#TEMP:147@N'    '#TEMP:147@H'    1.0200000000000001e-10   
 
'#TEMP:148@N'    '#TEMP:148@H'    1.0200000000000001e-10   
 
'#TEMP:149@N'    '#TEMP:149@H'    1.0200000000000001e-10   
 
'#TEMP:150@N'    '#TEMP:150@H'    1.0200000000000001e-10   
 
'#TEMP:151@N'    '#TEMP:151@H'    1.0200000000000001e-10   
 
'#TEMP:152@N'    '#TEMP:152@H'    1.0200000000000001e-10   
 
'#TEMP:153@N'    '#TEMP:153@H'    1.0200000000000001e-10   
 
'#TEMP:154@N'    '#TEMP:154@H'    1.0200000000000001e-10   
 
'#TEMP:155@N'    '#TEMP:155@H'    1.0200000000000001e-10   
 
'#TEMP:156@N'    '#TEMP:156@H'    1.0200000000000001e-10   
 
'#TEMP:157@N'    '#TEMP:157@H'    1.0200000000000001e-10   
 
'#TEMP:158@N'    '#TEMP:158@H'    1.0200000000000001e-10   
 
'#TEMP:159@N'    '#TEMP:159@H'    1.0200000000000001e-10   
 
'#TEMP:33@NE1'    '#TEMP:33@HE1'    1.0200000000000001e-10   
 
'#TEMP:48@NE1'    '#TEMP:48@HE1'    1.0200000000000001e-10   
 
'#TEMP:49@NE1'    '#TEMP:49@HE1'    1.0200000000000001e-10   
 
'#TEMP:59@NE1'    '#TEMP:59@HE1'    1.0200000000000001e-10   
 
'#TEMP:98@NE1'    '#TEMP:98@HE1'    1.0200000000000001e-10   
 
  
relax> interatom.unit_vectors(ave=True)
+
<source lang="bash">
Averaging all vectors.
+
less 04_run_default_with_tolerance_lim.log
Calculated 1 N-H unit vector between the spins '#TEMP:3@N' and '#TEMP:3@H'.
+
</source>
Calculated 1 N-H unit vector between the spins '#TEMP:4@N' and '#TEMP:4@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:5@N' and '#TEMP:5@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:6@N' and '#TEMP:6@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:7@N' and '#TEMP:7@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:8@N' and '#TEMP:8@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:9@N' and '#TEMP:9@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:10@N' and '#TEMP:10@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:11@N' and '#TEMP:11@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:13@N' and '#TEMP:13@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:14@N' and '#TEMP:14@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:15@N' and '#TEMP:15@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:16@N' and '#TEMP:16@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:17@N' and '#TEMP:17@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:18@N' and '#TEMP:18@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:19@N' and '#TEMP:19@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:20@N' and '#TEMP:20@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:21@N' and '#TEMP:21@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:22@N' and '#TEMP:22@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:23@N' and '#TEMP:23@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:24@N' and '#TEMP:24@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:25@N' and '#TEMP:25@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:26@N' and '#TEMP:26@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:27@N' and '#TEMP:27@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:28@N' and '#TEMP:28@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:29@N' and '#TEMP:29@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:30@N' and '#TEMP:30@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:31@N' and '#TEMP:31@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:32@N' and '#TEMP:32@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:33@N' and '#TEMP:33@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:34@N' and '#TEMP:34@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:35@N' and '#TEMP:35@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:36@N' and '#TEMP:36@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:37@N' and '#TEMP:37@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:38@N' and '#TEMP:38@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:39@N' and '#TEMP:39@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:40@N' and '#TEMP:40@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:41@N' and '#TEMP:41@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:42@N' and '#TEMP:42@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:43@N' and '#TEMP:43@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:45@N' and '#TEMP:45@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:46@N' and '#TEMP:46@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:47@N' and '#TEMP:47@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:48@N' and '#TEMP:48@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:49@N' and '#TEMP:49@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:50@N' and '#TEMP:50@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:51@N' and '#TEMP:51@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:52@N' and '#TEMP:52@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:53@N' and '#TEMP:53@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:54@N' and '#TEMP:54@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:55@N' and '#TEMP:55@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:56@N' and '#TEMP:56@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:57@N' and '#TEMP:57@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:58@N' and '#TEMP:58@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:59@N' and '#TEMP:59@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:60@N' and '#TEMP:60@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:61@N' and '#TEMP:61@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:62@N' and '#TEMP:62@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:63@N' and '#TEMP:63@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:64@N' and '#TEMP:64@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:65@N' and '#TEMP:65@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:66@N' and '#TEMP:66@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:67@N' and '#TEMP:67@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:68@N' and '#TEMP:68@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:69@N' and '#TEMP:69@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:70@N' and '#TEMP:70@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:71@N' and '#TEMP:71@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:72@N' and '#TEMP:72@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:73@N' and '#TEMP:73@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:74@N' and '#TEMP:74@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:75@N' and '#TEMP:75@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:76@N' and '#TEMP:76@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:77@N' and '#TEMP:77@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:78@N' and '#TEMP:78@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:79@N' and '#TEMP:79@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:80@N' and '#TEMP:80@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:81@N' and '#TEMP:81@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:82@N' and '#TEMP:82@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:83@N' and '#TEMP:83@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:84@N' and '#TEMP:84@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:85@N' and '#TEMP:85@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:87@N' and '#TEMP:87@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:88@N' and '#TEMP:88@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:89@N' and '#TEMP:89@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:90@N' and '#TEMP:90@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:91@N' and '#TEMP:91@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:93@N' and '#TEMP:93@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:94@N' and '#TEMP:94@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:95@N' and '#TEMP:95@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:96@N' and '#TEMP:96@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:97@N' and '#TEMP:97@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:98@N' and '#TEMP:98@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:99@N' and '#TEMP:99@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:100@N' and '#TEMP:100@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:101@N' and '#TEMP:101@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:102@N' and '#TEMP:102@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:103@N' and '#TEMP:103@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:104@N' and '#TEMP:104@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:105@N' and '#TEMP:105@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:106@N' and '#TEMP:106@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:107@N' and '#TEMP:107@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:108@N' and '#TEMP:108@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:109@N' and '#TEMP:109@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:110@N' and '#TEMP:110@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:111@N' and '#TEMP:111@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:112@N' and '#TEMP:112@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:113@N' and '#TEMP:113@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:114@N' and '#TEMP:114@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:115@N' and '#TEMP:115@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:116@N' and '#TEMP:116@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:117@N' and '#TEMP:117@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:118@N' and '#TEMP:118@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:119@N' and '#TEMP:119@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:120@N' and '#TEMP:120@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:121@N' and '#TEMP:121@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:122@N' and '#TEMP:122@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:123@N' and '#TEMP:123@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:124@N' and '#TEMP:124@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:125@N' and '#TEMP:125@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:127@N' and '#TEMP:127@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:128@N' and '#TEMP:128@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:129@N' and '#TEMP:129@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:130@N' and '#TEMP:130@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:131@N' and '#TEMP:131@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:132@N' and '#TEMP:132@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:133@N' and '#TEMP:133@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:134@N' and '#TEMP:134@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:136@N' and '#TEMP:136@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:138@N' and '#TEMP:138@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:139@N' and '#TEMP:139@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:140@N' and '#TEMP:140@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:141@N' and '#TEMP:141@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:142@N' and '#TEMP:142@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:143@N' and '#TEMP:143@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:144@N' and '#TEMP:144@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:145@N' and '#TEMP:145@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:146@N' and '#TEMP:146@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:147@N' and '#TEMP:147@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:148@N' and '#TEMP:148@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:149@N' and '#TEMP:149@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:150@N' and '#TEMP:150@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:151@N' and '#TEMP:151@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:152@N' and '#TEMP:152@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:153@N' and '#TEMP:153@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:154@N' and '#TEMP:154@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:155@N' and '#TEMP:155@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:156@N' and '#TEMP:156@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:157@N' and '#TEMP:157@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:158@N' and '#TEMP:158@H'.
 
Calculated 1 N-H unit vector between the spins '#TEMP:159@N' and '#TEMP:159@H'.
 
Calculated 1 NE1-HE1 unit vector between the spins '#TEMP:33@NE1' and '#TEMP:33@HE1'.
 
Calculated 1 NE1-HE1 unit vector between the spins '#TEMP:48@NE1' and '#TEMP:48@HE1'.
 
Calculated 1 NE1-HE1 unit vector between the spins '#TEMP:49@NE1' and '#TEMP:49@HE1'.
 
Calculated 1 NE1-HE1 unit vector between the spins '#TEMP:59@NE1' and '#TEMP:59@HE1'.
 
Calculated 1 NE1-HE1 unit vector between the spins '#TEMP:98@NE1' and '#TEMP:98@HE1'.
 
  
relax> value.set(val=-0.00017199999999999998, param='csa', index=0, spin_id='@N*', error=False, force=True)
+
'''To find pattern:''' We have to escape with '''\''' for special character like: ()[] etc.
 +
<source lang="bash">
 +
# Search forward
 +
/Value \(iter 14\)
 +
/The chi-squared value has not converged
 
</source>
 
</source>
|}
+
'''n''' or '''N''' – for next match in forward / previous match in backward
  
=== Inspect data in GUI ===
+
* To return to follow mode, use keyboard: '''Shift+f'''
The GUI can be a good place to inspect the setup and files.
+
* To exit, use keyboard: '''Ctrl+c'''    and then: '''q'''
  
Copy '''02_read_data.py''' to '''03_save_state_inspect_GUI.py''' and add:
+
= rsync files =
 +
== rsync files after completion to Sauron ==
 +
When a run is completed, then sync files to Sauron file server.
  
<source lang="python">
+
Make a '''rsync_to_sbinlab.sh''' file with content
# Analysis variables.
+
{| class="mw-collapsible mw-collapsed wikitable"
#####################
+
! See file content
# The model-free models.  Do not change these unless absolutely necessary, the protocol is likely to fail if these are changed.
+
|-
MF_MODELS = ['m0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9']
+
|
#MF_MODELS = ['m1', 'm2']
+
<source lang="bash">
LOCAL_TM_MODELS = ['tm0', 'tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm6', 'tm7', 'tm8', 'tm9']
+
#!/bin/bash
 
 
# The grid search size (the number of increments per dimension).
 
GRID_INC = 11
 
  
# The optimisation technique. Standard is: min_algor='newton' : and cannot be changed in the GUI.
+
read -p "Username on sauron :" -r
MIN_ALGOR = 'newton'
 
  
# The number of Monte Carlo simulations to be used for error analysis at the end of the analysis.
+
RUSER=$REPLY
#MC_NUM = 500
+
SAURON=10.61.4.60
MC_NUM = 20
+
PROJ=`basename "$PWD"`
  
# The diffusion model. Standard is 'Fully automated', which means: DIFF_MODEL=['local_tm', 'sphere', 'prolate', 'oblate', 'ellipsoid', 'final']
+
FROM=${PWD}
# 'local_tm', 'sphere', ''prolate', 'oblate', 'ellipsoid', or 'final'
+
TO=${RUSER}@${SAURON}:/data/sbinlab2/${RUSER}/Downloads
#DIFF_MODEL = 'local_tm'
 
DIFF_MODEL = ['local_tm', 'sphere', 'prolate', 'oblate', 'ellipsoid', 'final']
 
  
# The maximum number of iterations for the global iteration.  Set to None, then the algorithm iterates until convergence.
+
# -a: "archive"- archive mode; equals -rlptgoD (no -H,-A,-X). syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.
MAX_ITER = None
+
# We want to remove the -o and -g options:
 +
# -o, --owner                preserve owner (super-user only)
 +
# -g, --group                preserve group
 +
# -rlptD : Instead or
 +
# -a --no-o --no-g 
 +
# -z: Compression over network
 +
# -P: It combines the flags --progress and --partial. The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers:
 +
# -h, Output numbers in a more human-readable format.
  
# Automatic looping over all rounds until convergence (must be a boolean value of True or False). Standard is: conv_loop=True : and cannot be changed in the GUI.
+
# Always double-check your arguments before executing an rsync command.
CONV_LOOP = True
+
# -n
  
# Change some minimise opt params.
+
echo "I will now do a DRY RUN, which does not move files"
# This goes into: minimise.execute(self.min_algor, func_tol=self.opt_func_tol, max_iter=self.opt_max_iterations)
+
read -p "Are you sure? y/n :" -n 1 -r
#####################
+
echo ""
#dAuvergne_protocol.opt_func_tol = 1e-5 # Standard:  opt_func_tol = 1e-25 
 
#dAuvergne_protocol.opt_max_iterations = 1000 # Standard: opt_max_iterations = int(1e7)
 
dAuvergne_protocol.opt_func_tol = 1e-10 # Standard:  opt_func_tol = 1e-25 
 
dAuvergne_protocol.opt_max_iterations = int(1e5) # Standard: opt_max_iterations = int(1e7)
 
  
#####################################
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
 +
  rsync -rlptDPzh -n ${FROM} ${TO}
 +
else
 +
  echo "Not doing DRY RUN"
 +
fi
  
# The results dir.
+
echo ""
var = 'result_03'
 
results_dir = os.getcwd() + os.sep + var
 
  
# Save the state before running. Open and check in GUI!
+
echo "I will now do the sync of files"
state.save(state=var+'_ini.bz2', dir=results_dir, force=True)
+
read -p "Are you sure? y/n :" -n 1 -r
 +
echo ""
  
# To check in GUI
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
# relax -g
+
  rsync -rlptDPzh ${FROM} ${TO}
# File -> Open relax state
+
else
# In folder "result_03" open "result_03_ini.bz2"
+
  echo "Not doing anything"
# View -> Data pipe editor
+
fi
# Right click on pipe, and select "Associate with a new auto-analysis"
 
 
</source>
 
</source>
  
Run with
+
Make it executable and run
 
<source lang="bash">
 
<source lang="bash">
relax 03_save_state_inspect_GUI.py -t 03_save_state_inspect_GUI.log
+
chmod +x rsync_to_sbinlab.sh
 +
 
 +
#run
 +
./rsync_to_sbinlab2.sh
 
</source>
 
</source>
 +
|}
  
To check in GUI
+
== rsync files from BIO to home mac ==
* relax -g
+
To inspect from home mac.
* File -> Open relax state
 
* In folder "result_03" open "result_03_ini.bz2"
 
* View -> Data pipe editor
 
* Right click on pipe, and select "Associate with a new auto-analysis"
 
  
=== Try fast run ===
+
Make a '''rsync_from_bio_to_home.sh''' file with content
Now we try a fast run, to see if everything is setup
+
{| class="mw-collapsible mw-collapsed wikitable"
 +
! See file content
 +
|-
 +
|
 +
<source lang="bash">
 +
#!/bin/bash
 +
 +
read -p "Username on bio:" -r
 +
 +
RUSER=$REPLY
 +
BIO=ssh-bio.science.ku.dk
  
Copy '''03_save_state_inspect_GUI.py''' to '''04_run_default_with_tolerance_lim.py''' and modify last lines:
+
#PROJ=Desktop/kaare_relax
 +
PROJ=Desktop/kaare_relax/20171010_model_free_HADDOCK
 +
PROJDIR=`basename "$PROJ"`
  
<source lang="python">
+
FROM=${RUSER}@${BIO}:/home/${RUSER}/${PROJ}
# The results dir.
+
TO=${PWD}/${PROJDIR}
var = 'result_04'
 
results_dir = os.getcwd() + os.sep + var
 
  
# Save the state before running. Open and check in GUI!
+
# -a: "archive"- archive mode; equals -rlptgoD (no -H,-A,-X). syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.
state.save(state=var+'_ini.bz2', dir=results_dir, force=True)
+
# We want to remove the -o and -g options:
 +
# -o, --owner                preserve owner (super-user only)
 +
# -g, --group                preserve group
 +
# -rlptD : Instead or
 +
# -a --no-o --no-g 
 +
# -z: Compression over network
 +
# -P: It combines the flags --progress and --partial. The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers:
 +
# -h, Output numbers in a more human-readable format.
 +
 +
# Always double-check your arguments before executing an rsync command.
 +
# -n
 +
 +
echo "I will now do a DRY RUN, which does not move files"
 +
read -p "Are you sure? y/n :" -n 1 -r
 +
echo ""
 +
 +
if [[ $REPLY =~ ^[Yy]$ ]]; then
 +
  rsync -rlptDPzh -n ${FROM} ${TO}
 +
else
 +
  echo "Not doing DRY RUN"
 +
fi
 +
 +
echo ""
 +
 +
echo "I will now do the sync of files"
 +
read -p "Are you sure? y/n :" -n 1 -r
 +
echo ""
 +
 +
if [[ $REPLY =~ ^[Yy]$ ]]; then
 +
  rsync -rlptDPzh ${FROM} ${TO}
 +
else
 +
  echo "Not doing anything"
 +
fi
 +
</source>
  
# To check in GUI
+
Make it executable and run
# relax -g
+
<source lang="bash">
# File -> Open relax state
+
chmod +x rsync_from_bio_to_home.sh
# In folder "result_03" open "result_03_ini.bz2"
 
# View -> Data pipe editor
 
# Right click on pipe, and select "Associate with a new auto-analysis"
 
  
dAuvergne_protocol(pipe_name=name, pipe_bundle=bundle_name, results_dir=results_dir, diff_model=DIFF_MODEL, mf_models=MF_MODELS, local_tm_models=LOCAL_TM_MODELS, grid_inc=GRID_INC, min_algor=MIN_ALGOR, mc_sim_num=MC_NUM, max_iter=MAX_ITER, conv_loop=CONV_LOOP)
+
#run
 +
./rsync_from_bio_to_home.sh
 
</source>
 
</source>
 +
|}
  
Before running, is worth to note, which values are NOT set to default values in the GUI.
+
= About the protocol =
* dAuvergne_protocol.opt_func_tol = 1e-10 # Standard:  opt_func_tol = 1e-25 
 
* dAuvergne_protocol.opt_max_iterations = int(1e5) # Standard: opt_max_iterations = int(1e7)
 
 
 
These 2 values is used in the '''minfx''' python package, and is an instruction to the minimiser function, to continue changing parameter values,
 
UNTIL either the difference in chi2 values between "2 steps" is less than 1e-10, OR if the number all steps is larger than 10^5.
 
It's an instruction not to be tooooo pedantic, here in the exploration phase. When finalising for publication, these values
 
should be set to their standard value.
 
 
 
* MC_NUM = 20
 
Number of Monte-Carlo simulations. The protocol will find optimum parameter values in this protocol, but error
 
estimation will not be very reliable. Standard is 500.
 
 
 
Run with
 
<source lang="bash">
 
relax 04_run_default_with_tolerance_lim.py -t 04_run_default_with_tolerance_lim.log
 
</source>
 
  
== To run on Haddock ==
+
'''Model I -  'local_tm''''<br>
Have a look here, how to get standalone python [[Anaconda_linux_mac|Anaconda linux]].
+
This will optimise the diffusion model whereby all spin of the molecule have a local tm value, i.e. there is no global diffusion tensor.  This model needs to be optimised prior to optimising any of the other diffusion models. Each spin is fitted to the multiple model-free models separately, where the parameter tm is included in each model.
Also have a look here [[OpenMPI]].
 
  
<source lang="bash">
+
'''Model II - 'sphere''''<br>
# SSH in
+
This will optimise the isotropic diffusion model.  Multiple steps are required, an initial optimisation of the diffusion tensor, followed by a repetitive optimisation until convergence of the diffusion tensor.  In the relax script UI each of these steps requires this script to be rerun, unless the conv_loop flag is True.  In the GUI (graphical user interface), the procedure is repeated automatically until convergence.  For the initial optimisation, which will be placed in the directory './sphere/init/', the following steps are used:
ssh haddock
+
* The model-free models and parameter values for each spin are set to those of diffusion model MI.
 +
* The local tm parameter is removed from the models.
 +
* The model-free parameters are fixed and a global spherical diffusion tensor is minimised
 +
* For the repetitive optimisation, each minimisation is named from 'round_1' onwards.  The initial 'round_1' optimisation will extract the diffusion tensor from the results file in './sphere/init/', and the results will be placed in the directory './sphere/round_1/'.  Each successive round will take the diffusion tensor from the previous round.  The following steps are used:
 +
** The global diffusion tensor is fixed and the multiple model-free models are fitted to each spin.
 +
** AIC model selection is used to select the models for each spin.
 +
** All model-free and diffusion parameters are allowed to vary and a global optimisation of all parameters is carried out.
  
# Load mpi modules
+
'''Model III - 'prolate''''<br>
module load mpi/openmpi-x86_64
+
The methods used are identical to those of diffusion model MII, except that an axially symmetric diffusion tensor with Da >= 0 is used.  The base directory containing all the results is './prolate/'.
  
# Test with shell
+
'''Model IV -'oblate''''<br>
mpirun -np 6 echo "hello world"
+
The methods used are identical to those of diffusion model MII, except that an axially symmetric diffusion tensor with Da <= 0 is used.  The base directory containing all the results is './oblate/'.
  
# Test with python
+
'''Model V - 'ellipsoid''''<br>
mpirun -np 6 python -m mpi4py helloworld
+
The methods used are identical to those of diffusion model MII, except that a fully anisotropic diffusion tensor is used (also known as rhombic or asymmetric diffusion).  The base directory is './ellipsoid/'
  
# Test with relax
+
''''final''''<br>
mpirun -np 6 relax --multi='mpi4py'
+
Once all the diffusion models have converged, the final run can be executed. This is done by setting the variable diff_model to 'final'. This consists of two steps, diffusion tensor model selection, and Monte Carlo simulationsFirstly AIC model selection is used to select between the diffusion tensor models. Monte Carlo simulations are then run solely on this selected diffusion model. Minimisation of the model is bypassed as it is assumed that the model is already fully optimised (if this is not the case the final run is not yet appropriate).
# Look for: Processor fabric: MPI 2.2 running via mpi4py with 5 slave processors & 1 masterUsing MPICH2 1.4.1.
+
The final black-box model-free results will be placed in the file 'final/results'.
</source>
 
  
== See also ==
+
= See also =
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 
[[Category:Model-free_analysis]]
 
[[Category:Model-free_analysis]]

Latest revision as of 10:40, 22 October 2017

Background

This is a tutorial for Lau and Kaare in SBiNLab, and hopefully others.

To get inspiration of example scripts files and see how the protocol is performed, have a look here:

For references, see relax references:

Script inspiration

model-free : Script inspiration for setup and analysis

The distribution of relax includes a folder sample_scripts/model_free which contain a folder with scripts for analysis.

It can be seen here: https://github.com/nmr-relax/relax/tree/master/sample_scripts/model_free

Here is the current list

  • back_calculate.py. Back-calculate and save relaxation data starting from a saved model-free results file.
  • bmrb_deposition.py Script for creating a NMR-STAR 3.1 formatted file for BMRB deposition of model-free results.
  • cv.py Script for model-free analysis using cross-validation model selection.
  • dasha.py Script for model-free analysis using the program Dasha.
  • dauvergne_protocol.py Script for black-box model-free analysis.
  • diff_min.py Demonstration script for diffusion tensor optimisation in a model-free analysis.]
  • final_data_extraction.py Extract Data to Table
  • generate_ri.py Script for back-calculating the relaxation data.
  • grace_S2_vs_te.py Script for creating a grace plot of the simulated order parameters vs. simulated correlation times.
  • grace_ri_data_correlation.py Script for creating correlations plots of experimental verses back calculated relaxation data.
  • map.py Script for mapping the model-free space for OpenDX visualisation.
  • mf_multimodel.py This script performs a model-free analysis for the models 'm0' to 'm9' (or 'tm0' to 'tm9').
  • modsel.py Script for model-free model selection.
  • molmol_plot.py Script for generating Molmol macros for highlighting model-free motions
  • palmer.py Script for model-free analysis using Art Palmer's program 'Modelfree4'. Download from http://comdnmr.nysbc.org/comd-nmr-dissem/comd-nmr-software
  • remap.py Script for mapping the model-free space.
  • single_model.py This script performs a model-free analysis for the single model 'm4'.
  • table_csv.py Script for converting the model-free results into a CSV table.
  • table_latex.py Script for converting the model-free results into a LaTeX table.

Other script inspiration for checking

The distribution of relax includes a folder sample_scripts/ which contain a folder with scripts for analysis.

It can be seen here: https://github.com/nmr-relax/relax/tree/master/sample_scripts

R1 / R2 Calculation

The resultant plot is useful for finding bad points or bad spectra when fitting exponential curves determine the R1 and R2 relaxation rates. If the averages deviate systematically from zero, bias in the spectra or fitting will be clearly revealed. To use this script, R1 or R2 exponential curve fitting must have previously have been carried out the program state saved to the file 'rx.save' (either with or without the .gz or .bz2 ). The file name of the saved state can be changed at the top of this script.

NOE calculation

  • noe.py Script for calculating NOEs.

Test data

Severe artifacts can be introduced if model-free analysis is performed from inconsistent multiple magnetic field datasets. The use of simple tests as validation tools for the consistency assessment can help avoid such problems in order to extract more reliable information from spin relaxation experiments. In particular, these tests are useful for detecting inconsistencies arising from R2 data. Since such inconsistencies can yield artifactual Rex parameters within model-free analysis, these tests should be use routinely prior to any analysis such as model-free calculations. This script will allow one to calculate values for the three consistency tests J(0), F_eta and F_R2. Once this is done, qualitative analysis can be performed by comparing values obtained at different magnetic fields. Correlation plots and histograms are useful tools for such comparison, such as presented in Morin & Gagne (2009a) J. Biomol. NMR, 45: 361-372.

Other representations

  • angles.py Script for calculating the protein NH bond vector angles with respect to the diffusion tensor.
  • xh_vector_dist.py Script for creating a PDB representation of the distribution of XH bond vectors.
  • diff_tensor_pdb.py Script for creating a PDB representation of the Brownian rotational diffusion tensor.

Scripts - Part 2

We now try to setup things a little more efficient.

Relax is able to read previous results file, so let us divide the task up into:

  • 1: Load the data and save as state file. Inspect in GUI before running.
  • 2: Run the Model 1: local_tm.
  • 3: Here make 4 scripts. Each of them only depends on Model 1:
    • Model 2: sphere
    • Model 3: prolate
    • Model 4: oblate
    • Model 5: ellipsoid
  • 4: Make an intermediate 'final' model script. This will automatically detect files from above.

Prepare data

We make a new folder and try.

See commands
mkdir 20171010_model_free_2_HADDOCK
cp 20171010_model_free/*.dat 20171010_model_free_2_HADDOCK
cp 20171010_model_free/*.pdb 20171010_model_free_2_HADDOCK

# Get scripts
cd 20171010_model_free_2_HADDOCK
git init
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
git fetch
git checkout -t origin/master

And a new one, changing the NOE error

See commands
mkdir 20171010_model_free_3_HADDOCK
cp 20171010_model_free/*.dat 20171010_model_free_3_HADDOCK
cp 20171010_model_free/*.pdb 20171010_model_free_3_HADDOCK

# Get scripts
cd 20171010_model_free_3_HADDOCK
git init
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
git fetch
git checkout -t origin/master

# Change NOE error
sed -i 's/0.1*$/0.05/' NOE_600MHz_new.dat
sed -i 's/0.1*$/0.05/' NOE_750MHz.dat

And a new one, changing the NOE error, and deselecting N-terminal.
Consistency test, found that this stretch contained outliers.

See commands
mkdir 20171010_model_free_4_HADDOCK
cp 20171010_model_free/*.dat 20171010_model_free_4_HADDOCK
cp 20171010_model_free/*.pdb 20171010_model_free_4_HADDOCK

# Get scripts
cd 20171010_model_free_4_HADDOCK
git init
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
git fetch
git checkout -t origin/master

# Change NOE error
sed -i 's/0.1*$/0.05/' NOE_600MHz_new.dat
sed -i 's/0.1*$/0.05/' NOE_750MHz.dat

# Make deselection
echo "#" > deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t151" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t152" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t153" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t154" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t155" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t156" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t157" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t158" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t159" >> deselect.txt

And a new one, changing the NOE error, and deselecting spins found from consistency test.

See commands
mkdir 20171010_model_free_5_HADDOCK
cp 20171010_model_free/*.dat 20171010_model_free_5_HADDOCK
cp 20171010_model_free/*.pdb 20171010_model_free_5_HADDOCK

# Get scripts
cd 20171010_model_free_5_HADDOCK
git init
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
git fetch
git checkout -t origin/master

# Change NOE error
sed -i 's/0.1*$/0.05/' NOE_600MHz_new.dat
sed -i 's/0.1*$/0.05/' NOE_750MHz.dat

# Make deselection
echo "#" > deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t158" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t157" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t17" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t159" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t120" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t59" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t98" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t49" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t76" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t155" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t156" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t48" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t154" >> deselect.txt

And a new one, without changing the NOE error, and deselecting spins found from consistency test.

See commands
mkdir 20171010_model_free_6_HADDOCK
cp 20171010_model_free/*.dat 20171010_model_free_6_HADDOCK
cp 20171010_model_free/*.pdb 20171010_model_free_6_HADDOCK

# Get scripts
cd 20171010_model_free_6_HADDOCK
git init
git remote add origin git@github.com:tlinnet/relax_modelfree_scripts.git
git fetch
git checkout -t origin/master

# Make deselection
echo "#" > deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t158" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t157" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t17" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t159" >> deselect.txt

cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t59" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t98" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t76" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t155" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t156" >> deselect.txt 
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t120" >> deselect.txt

cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t49" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t48" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t154" >> deselect.txt

cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t33" >> deselect.txt
cat R1_600MHz_new_model_free.dat | grep -P "ArcCALD\t67" >> deselect.txt

11_read_data_GUI_inspect.py - Read data GUI inspect

This will read the data and save as a state.

The GUI can be a good place to inspect the setup and files.

See content of: 11_read_data_GUI_inspect.py

Run with

relax 11_read_data_GUI_inspect.py -t 11_read_data_GUI_inspect.log

To check in GUI

  • relax -g
  • File -> Open relax state
  • In folder "result_10" open "result_10_ini.bz2"
  • View -> Data pipe editor
  • Right click on pipe, and select "Associate with a new auto-analysis"

relax 11_test_consistency.py - Consistency test of our data

Before running the analysis, it is wise to run a script for consistency testing.

See here:

Highlights:

  • Comparing results obtained at different magnetic fields should, in the case of perfect consistency and assuming the absence of conformational exchange, yield equal values independently of the magnetic field.
  • avoid the potential extraction of erroneous information as well as the waste of time associated to dissecting inconsistent datasets using numerous long model-free minimisations with different subsets of data.
  • The authors prefer the use of the spectral density at zero frequency J(0) alone since it does not rely on an estimation of the global correlation time tc/tm, neither on a measure of theta, the angle between the 15N–1H vector and the principal axis of the 15N chemical shift tensor. Hence, J(0) is less likely to be affected by incorrect parameterisation of input parameters.

See content of: 11_test_consistency.py

relax 11_test_consistency.py -t 11_test_consistency.py.log

#Afterwards, go into the folder at plot data.
python plot_txt_files.py
./grace2images.py

12_Model_1_I_local_tm.py - Only run local_tm

Now we only run Model 1.

  • DIFF_MODEL = ['local_tm']
  • GRID_INC = 11 # This is the standard
  • MC_NUM = 0 # This has no influence in Model 1-5
  • MAX_ITER = 20 # Stop if it has not converged in 20 rounds

Normally between 8 to 15 multiple rounds of optimisation of the are required for the proper execution of this script.
This is can also be see here in Figure 2.

Relax should stop calculation, if a model does not converge.

See content of: 12_Model_1_I_local_tm.py

We use tmux to make a terminal-session, we can get back to, if our own terminal connection get closed.

Run with

# Make terminal-session
tmux new -s m1

relax 12_Model_1_I_local_tm.py -t 12_Model_1_I_local_tm.log

# or
tmux new -s m1
mpirun -np 22 relax --multi='mpi4py' 12_Model_1_I_local_tm.py -t 12_Model_1_I_local_tm.log

You can then in another terminal follow the logfile by

less +F 12_Model_I_local_tm.log
  • To scroll up and down, use keyboard: Ctrl+c
  • To return to follow mode, use keyboard: Shift+f
  • To exit, use keyboard: Ctrl+c and then: q

13_Model_2-5 - Run Model 2 to 5

When Model 1 is completed, then make 4 terminal windows and run them at the same time.

These scripts do:

  • Read the state file from before with setup
  • Change DIFF_MODEL accordingly

13_Model_2_II_sphere.py

tmux new -s m2
relax 13_Model_2_II_sphere.py -t 13_Model_2_II_sphere.log
# Or
mpirun -np 5 relax --multi='mpi4py' 13_Model_2_II_sphere.py -t 13_Model_2_II_sphere.log

# When relax is running, push: Ctrl+b and then d, to disconnect without exit

13_Model_3_III_prolate.py

tmux new -s m3
relax 13_Model_3_III_prolate.py -t 13_Model_3_III_prolate.log
# Or
mpirun -np 5 relax --multi='mpi4py' 13_Model_3_III_prolate.py -t 13_Model_3_III_prolate.log

13_Model_4_IV_oblate.py

tmux new -s m4
relax 13_Model_4_IV_oblate.py -t 13_Model_4_IV_oblate.log
# Or
mpirun -np 5 relax --multi='mpi4py' 13_Model_4_IV_oblate.py -t 13_Model_4_IV_oblate.log

13_Model_5_V_ellipsoid.py

tmux new -s m5
relax 13_Model_5_V_ellipsoid.py -t 13_Model_5_V_ellipsoid.log
# Or
mpirun -np 5 relax --multi='mpi4py' 13_Model_5_V_ellipsoid.py -t 13_Model_5_V_ellipsoid.log

To join session

# List
tmux list-s

# Join either
tmux a -t m1
tmux a -t m2
tmux a -t m3
tmux a -t m4
tmux a -t m5

14_intermediate_final.py - Inspection during model optimization

During running of model 2-5, the current results can be inspected with this nifty scripts.

The script will ask for input of MC numbers. So just run it.

14_intermediate_final.py

tmux new -s final
relax 14_intermediate_final.py -t 14_intermediate_final.log

This does:

  • Option: Collect current best result from Model 2-5, and make MC simulations, and finalize to get current results files
  • Make a pymol file, that collects all of relax pymol command files into 1 pymol session
  • Option: Collect all chi2 and number of params k, for each iteration per model
    • Make a python plot file for plotting this results

Per iteration get: chi2, k, tm

Afterwards, plot the data.

python results_collected.py

Pymol macro

You also get a pymol folder.

See here for info how the macro is applied

Run with

pymol 0_0_apply_all_pymol_commands.pml

To run on Haddock

Have a look here, how to get standalone python Anaconda linux. Also have a look here OpenMPI.

# SSH in
ssh haddock

# Test with shell
mpirun -np 6 echo "hello world"

# Test with python
mpirun -np 6 python -m mpi4py helloworld

# Test with relax
mpirun -np 6 relax --multi='mpi4py'
# Look for: Processor fabric:  MPI 2.2 running via mpi4py with 5 slave processors & 1 master.  Using MPICH2 1.4.1.

Now we run 04_run_default_with_tolerance_lim.py with more power!
We use tmux to make a terminal-session, we can get back to, if our own terminal connection get closed.

  • start a new session: tmux
  • re-attach a detached session: tmux attach
# Make terminal-session
tmux

# Start relax
mpirun -np 20 relax --multi='mpi4py' 04_run_default_with_tolerance_lim.py -t 04_run_default_with_tolerance_lim.log

Useful commands to log file

While the analysis is running, these commands could be used to check the logfile for errors

### Check convergence 
# For chi2
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Chi-squared test:"

# For other tests
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical "
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical model-free models test:"
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical diffusion tensor parameter test:"
cat 04_run_default_with_tolerance_lim.log | grep -A 10 "Identical model-free parameter test:"

# To look for not converged errors
# For chi2
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The chi-squared value has not converged."

# For other tests
cat 04_run_default_with_tolerance_lim.log | grep -B 7 " have not converged."
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The model-free models have not converged."
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The diffusion parameters have not converged."
cat 04_run_default_with_tolerance_lim.log | grep -B 7 "The model-free parameters have not converged."

You can then inspect the logfile by less: 10-tips for less

less 04_run_default_with_tolerance_lim.log

To find pattern: We have to escape with \ for special character like: ()[] etc.

# Search forward
/Value \(iter 14\)
/The chi-squared value has not converged

n or N – for next match in forward / previous match in backward

  • To return to follow mode, use keyboard: Shift+f
  • To exit, use keyboard: Ctrl+c and then: q

rsync files

rsync files after completion to Sauron

When a run is completed, then sync files to Sauron file server.

Make a rsync_to_sbinlab.sh file with content

See file content
#!/bin/bash

read -p "Username on sauron :" -r

RUSER=$REPLY
SAURON=10.61.4.60
PROJ=`basename "$PWD"`

FROM=${PWD}
TO=${RUSER}@${SAURON}:/data/sbinlab2/${RUSER}/Downloads

# -a: "archive"- archive mode; equals -rlptgoD (no -H,-A,-X). syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.
# We want to remove the -o and -g options:
# -o, --owner                 preserve owner (super-user only)
# -g, --group                 preserve group
# -rlptD : Instead or
# -a --no-o --no-g  
# -z: Compression over network
# -P: It combines the flags --progress and --partial. The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers:
# -h, Output numbers in a more human-readable format.

# Always double-check your arguments before executing an rsync command.
# -n 

echo "I will now do a DRY RUN, which does not move files"
read -p "Are you sure? y/n :" -n 1 -r
echo ""

if [[ $REPLY =~ ^[Yy]$ ]]; then
  rsync -rlptDPzh -n ${FROM} ${TO} 
else
  echo "Not doing DRY RUN"
fi

echo ""

echo "I will now do the sync of files"
read -p "Are you sure? y/n :" -n 1 -r
echo ""

if [[ $REPLY =~ ^[Yy]$ ]]; then
  rsync -rlptDPzh ${FROM} ${TO}
else
  echo "Not doing anything"
fi

Make it executable and run

chmod +x rsync_to_sbinlab.sh

#run
./rsync_to_sbinlab2.sh

rsync files from BIO to home mac

To inspect from home mac.

Make a rsync_from_bio_to_home.sh file with content

See file content
#!/bin/bash
 
read -p "Username on bio:" -r
 
RUSER=$REPLY
BIO=ssh-bio.science.ku.dk

#PROJ=Desktop/kaare_relax
PROJ=Desktop/kaare_relax/20171010_model_free_HADDOCK
PROJDIR=`basename "$PROJ"`

FROM=${RUSER}@${BIO}:/home/${RUSER}/${PROJ} 
TO=${PWD}/${PROJDIR}

# -a: "archive"- archive mode; equals -rlptgoD (no -H,-A,-X). syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.
# We want to remove the -o and -g options:
# -o, --owner                 preserve owner (super-user only)
# -g, --group                 preserve group
# -rlptD : Instead or
# -a --no-o --no-g  
# -z: Compression over network
# -P: It combines the flags --progress and --partial. The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers:
# -h, Output numbers in a more human-readable format.
 
# Always double-check your arguments before executing an rsync command.
# -n 
 
echo "I will now do a DRY RUN, which does not move files"
read -p "Are you sure? y/n :" -n 1 -r
echo ""
 
if [[ $REPLY =~ ^[Yy]$ ]]; then
  rsync -rlptDPzh -n ${FROM} ${TO} 
else
  echo "Not doing DRY RUN"
fi
 
echo ""
 
echo "I will now do the sync of files"
read -p "Are you sure? y/n :" -n 1 -r
echo ""
 
if [[ $REPLY =~ ^[Yy]$ ]]; then
  rsync -rlptDPzh ${FROM} ${TO}
else
  echo "Not doing anything"
fi

Make it executable and run

chmod +x rsync_from_bio_to_home.sh

#run
./rsync_from_bio_to_home.sh

About the protocol

Model I - 'local_tm'
This will optimise the diffusion model whereby all spin of the molecule have a local tm value, i.e. there is no global diffusion tensor. This model needs to be optimised prior to optimising any of the other diffusion models. Each spin is fitted to the multiple model-free models separately, where the parameter tm is included in each model.

Model II - 'sphere'
This will optimise the isotropic diffusion model. Multiple steps are required, an initial optimisation of the diffusion tensor, followed by a repetitive optimisation until convergence of the diffusion tensor. In the relax script UI each of these steps requires this script to be rerun, unless the conv_loop flag is True. In the GUI (graphical user interface), the procedure is repeated automatically until convergence. For the initial optimisation, which will be placed in the directory './sphere/init/', the following steps are used:

  • The model-free models and parameter values for each spin are set to those of diffusion model MI.
  • The local tm parameter is removed from the models.
  • The model-free parameters are fixed and a global spherical diffusion tensor is minimised
  • For the repetitive optimisation, each minimisation is named from 'round_1' onwards. The initial 'round_1' optimisation will extract the diffusion tensor from the results file in './sphere/init/', and the results will be placed in the directory './sphere/round_1/'. Each successive round will take the diffusion tensor from the previous round. The following steps are used:
    • The global diffusion tensor is fixed and the multiple model-free models are fitted to each spin.
    • AIC model selection is used to select the models for each spin.
    • All model-free and diffusion parameters are allowed to vary and a global optimisation of all parameters is carried out.

Model III - 'prolate'
The methods used are identical to those of diffusion model MII, except that an axially symmetric diffusion tensor with Da >= 0 is used. The base directory containing all the results is './prolate/'.

Model IV -'oblate'
The methods used are identical to those of diffusion model MII, except that an axially symmetric diffusion tensor with Da <= 0 is used. The base directory containing all the results is './oblate/'.

Model V - 'ellipsoid'
The methods used are identical to those of diffusion model MII, except that a fully anisotropic diffusion tensor is used (also known as rhombic or asymmetric diffusion). The base directory is './ellipsoid/'

'final'
Once all the diffusion models have converged, the final run can be executed. This is done by setting the variable diff_model to 'final'. This consists of two steps, diffusion tensor model selection, and Monte Carlo simulations. Firstly AIC model selection is used to select between the diffusion tensor models. Monte Carlo simulations are then run solely on this selected diffusion model. Minimisation of the model is bypassed as it is assumed that the model is already fully optimised (if this is not the case the final run is not yet appropriate). The final black-box model-free results will be placed in the file 'final/results'.

See also