Changes

Jump to navigation Jump to search

Tutorial for model-free analysis sam mahdi

3,063 bytes added, 16:52, 13 September 2016
== Current script ==
Sam has provided this script. <br> It is not entirely clear how the "The dauvergne_protocol model-free auto-analysis" was initiated. Maybe a combination of GUI and scripts?
<source lang="python">
cd $CWDrelax> from time import asctime, localtimerelax> from auto_analyses.dauvergne_protocol import dAuvergne_protocol relax> DIFF_MODEL=['local_tm','sphere','prolate','oblate','ellipsoid','final']relax> MF_MODELS=['m0','m1','m2','m3','m4','m5','m6','m7','m8','m9']relax> LOCAL_TM_MODELS=['tm0','tm1','tm2','tm3','tm4','tm5','tm6','tm7','tm7','tm8','tm9']relax> GRID_INC=11relax> MIN_ALGOR='newton'relax> MC_NUM=500relax> CONV_LOOP=Truerelax> pipe_bundle="mf(%s)"%asctime(localtime())relax> name="origin-"+pipe_bundlerelax> pipe.create(name,'mf',bundle=pipe_bundle)relax> structure.read_pdb('2d9j.pdb',set_mol_name='hRGS7')relax> structure.load_spins('@N',ave_pos=True)relax> structure.load_spins('@NE1',ave_pos=True)relax> structure.load_spins('@H',ave_pos=True)relax> structure.load_spins('@HE1',ave_pos=True)relax> spin.isotope('15N',spin_id='@N*')relax> spin.isotope('1H',spin_id='@H*')relax> interatom.define(spin_id1='@N',spin_id2='@H', direct_bond=True)relax> interatom.define(spin_id1='@NE1',spin_id2='@HE1', direct_bond=True)relax> interatom.set_dist(spin_id1='@N*',spin_id2='@H*',ave_dist=1.02*1e-10)relax> interatom.unit_vectors()relax> value.set(-172*1e-6,'csa',spin_id='@N*')</source>
set FIDS=`cat fid_files= Make suggestion script ===== Copy sample script ===To provide a suggestion script, the relax example script is copied to the folder with the data.ls`set DIRN1<source lang=`dirname "bash"># Find where relax is called from. It's a symbolic link in the users bin folder.tlinnet@linmac:Sam_25044$PWDwhich relax/Users/tlinnet/${FIDS[1]}`bin/relax foreach I (`seq 2 ${#FIDS}`)Read the link to the folder where relax is installed.set FID=${FIDS[tlinnet@linmac:Sam_25044$I]}; set DIRN=readlink `dirname $FIDwhich relax`cd $DIRN/Users/tlinnet/software/relax_trunk_svn/relax echo $DIRN# Copy sample scriptcp -f $DIRN1/fid.com .cp -f $DIRN1Users/tlinnet/software/relax_trunk_svn/nmrproc.com ..sample_scripts/fid.com.model_free/nmrprocdauvergne_protocol.comcd py sam_script..endpy
</source>
=== Now modify sample script ===
We are going to edit "sam_script.py".
 
<source lang="python">
# Python module imports.
from time import asctime, localtime
# relax module imports.
from auto_analyses.dauvergne_protocol import dAuvergne_protocol
 
 
# Analysis variables.
#####################
# The diffusion model.
DIFF_MODEL = 'local_tm'
 
# 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']
LOCAL_TM_MODELS = ['tm0', 'tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm6', 'tm7', 'tm8', 'tm9']
 
# The grid search size (the number of increments per dimension).
GRID_INC = 11
# The optimisation technique.
MIN_ALGOR = 'newton'
 
# The number of Monte Carlo simulations to be used for error analysis at the end of the analysis.
MC_NUM = 10
 
# Automatic looping over all rounds until convergence (must be a boolean value of True or False).
CONV_LOOP = True
 
# Set up the data pipe.
#######################
 
# The following sequence of user function calls can be changed as needed.
 
# Create the data pipe.
pipe_bundle = "mf (%s)" % asctime(localtime())
name = "origin - " + pipe_bundle
pipe.create(name, 'mf', bundle=pipe_bundle)
</source>
 
Now we are just going to try this.
<source lang="bash">
relax sam_script.py
</source>
== See also ==
[[Category:Tutorials]]
[[Category:Relaxation dispersion analysis]]

Navigation menu