Open main menu

Changes

'''relax_3_spectra_settings.py'''
<source lang="bashpython">
# Loop over the spectra settings.
ncycfile=open('ncyc.txt','r')
=== Analyse in GUI ===
Start relax in GUI mode
<source lang="bashpython">
relax_disp -g
</source>
=== Analyse via script ===
Add the following python relax script file to the relax directory
 
'''relax_1_ini.py'''
<source lang="bash">
# Taken from the relax disp manual, section 10.6.1 Dispersion script mode - the sample script
# Python module imports.
from os import sep
 
# relax module imports.
from auto_analyses.relax_disp import Relax_disp
 
# Analysis variables.
#####################
 
# The dispersion models.
MODELS = ['R2eff', 'No Rex', 'LM63', 'CR72', 'IT99', 'NS 2-site expanded']
 
# The grid search size (the number of increments per dimension).
GRID_INC = 21
 
# The number of Monte Carlo simulations to be used for error analysis at the end of the analysis.
MC_NUM = 500
 
# The model selection technique to use.
MODSEL = 'AIC'
 
# Experiment settings
#set_dir = "spectrometer_data_processed"
set_dir = None
 
# Set up the data pipe.
#######################
 
# Create the data pipe.
pipe_name = 'base pipe'
pipe_bundle = 'relax_disp'
pipe.create(pipe_name=pipe_name, bundle=pipe_bundle, pipe_type='relax_disp')
 
# Set the relaxation dispersion experiment type.
relax_disp.exp_type('cpmg fixed')
 
# Create the spins
script(file='relax_2_spins.py', dir=set_dir)
 
# Name the isotope for field strength scaling.
spin.isotope(isotope='15N')
 
# Read the spectrum from NMRSeriesTab file. The "auto" will generate spectrum name of form: Z_A{i}
spectrum.read_intensities(file="peaks_list_max_standard.ser", dir=set_dir, spectrum_id='auto', int_method='height')
 
# Set the spectra experimental properties/settings.
script(file='relax_3_spectra_settings.py', dir=set_dir)
 
# Auto-analysis execution.
##########################
 
# Do not change!
Relax_disp(pipe_name=pipe_name, pipe_bundle=pipe_bundle, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM, modsel=MODSEL)
 
# Save the program state.
#state.save('rx.save', force=True)
</source>
= See also =
[[Category:Tutorials]]
Trusted, Bureaucrats
1,382

edits