relax 2.1.0
Molecular dynamics by NMR data analysis
Copyright (C) 2001-2006 Edward d'Auvergne
Copyright (C) 2006-2012 the relax development team
This is free software which you are welcome to modify and redistribute under the conditions of the
GNU General Public License (GPL). This program, including all modules, is licensed under the GPL
and comes with absolutely no warranty. For details type 'GPL' within the relax prompt.
Assistance in using the relax prompt and scripting interface can be accessed by typing 'help' within
the prompt.
Processor fabric: Uni-processor.
script = 'T1_curve_fit.py'
----------------------------------------------------------------------------------------------------
###############################################################################
# #
# Copyright (C) 2004-2008 Edward d'Auvergne #
# #
# This file is part of the program relax. #
# #
# relax is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# relax is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with relax; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
###############################################################################
# Script for relaxation curve fitting.
######################################
# Create the 'rx' data pipe.
pipe.create('rx', 'relax_fit')
# Load sequence and spins
sequence.read('sequence.out', spin_name_col=2)
# Spectrum names.
names = [
'T1_0111',
'T1_0333',
'T1_0555',
'T1_111',
'T1_1998',
'T1_333',
'T1_4995',
'T1_666',
'T1_888',
]
# Relaxation times (in seconds).
times = [
0.0111,
0.0333,
0.0555,
0.111,
0.1998,
0.333,
0.4995,
0.666,
0.888,
]
# Loop over the spectra.
for i in xrange(len(names)):
# Load the peak intensities.
spectrum.read_intensities(file=names[i]+'.list', spectrum_id=names[i], int_method='height')
# Set the relaxation times.
relax_fit.relax_time(time=times[i], spectrum_id=names[i])
# Set the baseplane error
spectrum.baseplane_rmsd(error=461070, spectrum_id='T1_0111')
spectrum.baseplane_rmsd(error=437800, spectrum_id='T1_0333')
spectrum.baseplane_rmsd(error=440440, spectrum_id='T1_0555')
spectrum.baseplane_rmsd(error=426960, spectrum_id='T1_111')
spectrum.baseplane_rmsd(error=376040, spectrum_id='T1_1998')
spectrum.baseplane_rmsd(error=323600, spectrum_id='T1_333')
spectrum.baseplane_rmsd(error=262310, spectrum_id='T1_4995')
spectrum.baseplane_rmsd(error=212290, spectrum_id='T1_666')
spectrum.baseplane_rmsd(error=164550, spectrum_id='T1_888')
# Peak intensity error analysis.
spectrum.error_analysis()
# Deselect unresolved spins.
deselect.read(file='unresolved')
# Set the relaxation curve type.
relax_fit.select_model('exp')
# Grid search.
grid_search(inc=11)
# Minimise.
minimise('simplex', scaling=False, constraints=False)
# Monte Carlo simulations.
monte_carlo.setup(number=500)
monte_carlo.create_data()
monte_carlo.initial_values()
minimise('simplex', scaling=False, constraints=False)
monte_carlo.error_analysis()
# Save the relaxation rates.
value.write(param='rx', file='rx.out', force=True)
# Save the results.
results.write(file='results', force=True)
# Create Grace plots of the data.
grace.write(y_data_type='rx', file='rx.agr', force=True) # Relaxation rate.
# Display the Grace plots.
grace.view(file='rx.agr')
# Save the program state.
state.save('rx.save', force=True)
----------------------------------------------------------------------------------------------------
relax> pipe.create(pipe_name='rx', pipe_type='relax_fit', bundle=None)
relax> sequence.read(file='sequence.out', dir=None, spin_id_col=None, mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, spin_name_col=2, sep=None, spin_id=None)
Opening the file 'sequence.out' for reading.
# mol_name res_num res_name spin_num spin_name
None None None None Res_name
None None None None Trp
None None None None Trp
None None None None Ser
None None None None Asn
None None None None Ser
None None None None Ser
None None None None Ala
None None None None Thr
None None None None Pro
None None None None Ile
None None None None Val
None None None None Gln
None None None None Phe
None None None None Gln
None None None None Gly
None None None None Glu
None None None None Ser
None None None None Asn
None None None None Cys
None None None None Leu
None None None None Lys
None None None None Cys
None None None None Phe
None None None None Arg
None None None None Tyr
None None None None Arg
None None None None Leu
None None None None Asn
None None None None Asp
None None None None Lys
None None None None His
None None None None Arg
None None None None His
None None None None Leu
None None None None Phe
None None None None Asp
None None None None Leu
None None None None Ile
None None None None Ser
None None None None Ser
None None None None Thr
None None None None Trp
None None None None His
None None None None Trp
None None None None Ala
None None None None Ser
None None None None Pro
None None None None Lys
None None None None Ala
None None None None Pro
None None None None His
None None None None Lys
None None None None His
None None None None Ala
None None None None Ile
None None None None Val
None None None None Thr
None None None None Val
None None None None Thr
None None None None Tyr
None None None None His
None None None None Ser
None None None None Glu
None None None None Glu
None None None None Gln
None None None None Arg
None None None None Gln
None None None None Gln
None None None None Phe
None None None None Leu
None None None None Asn
None None None None Val
None None None None Val
None None None None Lys
None None None None Ile
None None None None Pro
None None None None Pro
None None None None Thr
None None None None Ile
None None None None Arg
None None None None His
None None None None Ala
None None None None Leu
None None None None Gly
None None None None Phe
None None None None Met
None None None None Ser
None None None None Met
None None None None His
None None None None Leu
None None None None Leu
relax> spectrum.read_intensities(file='T1_0111.list', dir=None, spectrum_id='T1_0111', heteronuc='N', proton='HN', int_method='height', int_col=None, spin_id_col=None, mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, spin_name_col=None, sep=None, spin_id=None, ncproc=None)
Opening the file 'T1_0111.list' for reading.
Sparky formatted data file.
Number of header lines found: 1
RelaxWarning: Cannot find the spin :42@N within the sequence.
RelaxWarning: Cannot find the spin :79@N within the sequence.
RelaxWarning: Cannot find the spin :35@N within the sequence.
RelaxWarning: Cannot find the spin :39@N within the sequence.
RelaxWarning: Cannot find the spin :80@N within the sequence.
RelaxWarning: Cannot find the spin :37@N within the sequence.
RelaxWarning: Cannot find the spin :49@N within the sequence.
RelaxWarning: Cannot find the spin :20@N within the sequence.
RelaxWarning: Cannot find the spin :26@N within the sequence.
RelaxWarning: Cannot find the spin :66@N within the sequence.
RelaxWarning: Cannot find the spin :30@N within the sequence.
RelaxWarning: Cannot find the spin :74@N within the sequence.
RelaxWarning: Cannot find the spin :36@N within the sequence.
RelaxWarning: Cannot find the spin :83@N within the sequence.
RelaxWarning: Cannot find the spin :29@N within the sequence.
RelaxWarning: Cannot find the spin :7@N within the sequence.
RelaxWarning: Cannot find the spin :31@N within the sequence.
RelaxWarning: Cannot find the spin :59@N within the sequence.
RelaxWarning: Cannot find the spin :71@N within the sequence.
RelaxWarning: Cannot find the spin :13@N within the sequence.
RelaxWarning: Cannot find the spin :75@N within the sequence.
RelaxWarning: Cannot find the spin :22@N within the sequence.
RelaxWarning: Cannot find the spin :68@N within the sequence.
RelaxWarning: Cannot find the spin :41@N within the sequence.
RelaxWarning: Cannot find the spin :67@N within the sequence.
RelaxWarning: Cannot find the spin :52@N within the sequence.
RelaxWarning: Cannot find the spin :4@N within the sequence.
RelaxWarning: Cannot find the spin :86@N within the sequence.
RelaxWarning: Cannot find the spin :10@N within the sequence.
RelaxWarning: Cannot find the spin :54@N within the sequence.
RelaxWarning: Cannot find the spin :88@N within the sequence.
RelaxWarning: Cannot find the spin :34@N within the sequence.
RelaxWarning: Cannot find the spin :60@N within the sequence.
RelaxWarning: Cannot find the spin :65@N within the sequence.
RelaxWarning: Cannot find the spin :57@N within the sequence.
RelaxWarning: Cannot find the spin :15@N within the sequence.
RelaxWarning: Cannot find the spin :78@N within the sequence.
RelaxWarning: Cannot find the spin :84@N within the sequence.
RelaxWarning: Cannot find the spin :25@N within the sequence.
RelaxWarning: Cannot find the spin :40@N within the sequence.
RelaxWarning: Cannot find the spin :56@N within the sequence.
RelaxWarning: Cannot find the spin :48@N within the sequence.
RelaxWarning: Cannot find the spin :61@N within the sequence.
RelaxWarning: Cannot find the spin :12@N within the sequence.
RelaxWarning: Cannot find the spin :53@N within the sequence.
RelaxWarning: Cannot find the spin :6@N within the sequence.
RelaxWarning: Cannot find the spin :43@N within the sequence.
RelaxWarning: Cannot find the spin :33@N within the sequence.
RelaxWarning: Cannot find the spin :72@N within the sequence.
RelaxWarning: Cannot find the spin :32@N within the sequence.
RelaxWarning: Cannot find the spin :16@N within the sequence.
RelaxWarning: Cannot find the spin :19@N within the sequence.
RelaxWarning: Cannot find the spin :11@N within the sequence.
RelaxWarning: Cannot find the spin :21@N within the sequence.
RelaxWarning: Cannot find the spin :58@N within the sequence.
RelaxWarning: Cannot find the spin :8@N within the sequence.
RelaxWarning: Cannot find the spin :28@N within the sequence.
RelaxWarning: Cannot find the spin :62@N within the sequence.
RelaxWarning: Cannot find the spin :45@N within the sequence.
RelaxWarning: Cannot find the spin :91@N within the sequence.
RelaxError: No data could be loaded from the peak list