Author: michaelbieri Date: Sun Mar 14 23:19:55 2010 New Revision: 10993 URL: http://svn.gna.org/viewcvs/relax?rev=10993&view=rev Log: Cleaned up relax_fit.py code, which was broken after revision http://svn.gna.org/viewcvs/relax?rev=10960&view=rev. Modified: branches/bieri_gui/auto_analyses/relax_fit.py Modified: branches/bieri_gui/auto_analyses/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/auto_analyses/relax_fit.py?rev=10993&r1=10992&r2=10993&view=diff ============================================================================== --- branches/bieri_gui/auto_analyses/relax_fit.py (original) +++ branches/bieri_gui/auto_analyses/relax_fit.py Sun Mar 14 23:19:55 2010 @@ -22,10 +22,6 @@ # Module docstring. """The automatic relaxation curve fitting protocol.""" - -#python modules -import time -from os import sep # relax module imports. from prompt.interpreter import Interpreter @@ -57,96 +53,6 @@ self.relax_times = relax_times self.int_method = int_method self.mc_num = mc_num - self.pdb_file = pdb_file - self.unresolved = unresolved - self.directory = directory - self.grace_dir = self.directory + sep + 'grace' - self.rx_type = rx_type - self.freq = str(freq) - - # User variable checks. - self.check_vars() - - # Load the interpreter. - self.interpreter = Interpreter(show_script=False, quit=False, raise_relax_error=True) - self.interpreter.populate_self() - self.interpreter.on(verbose=False) - - # Execute. - self.run() - - - def run(self): - """Set up and run the curve-fitting.""" - - # Create the data pipe. - self.interpreter.pipe.create(self.pipe_name, 'relax_fit') - - # Load the sequence. - self.interpreter.sequence.read(file=self.seq_args[0], dir=self.seq_args[1], mol_name_col=self.seq_args[2], res_num_col=self.seq_args[3], res_name_col=self.seq_args[4], spin_num_col=self.seq_args[5], spin_name_col=self.seq_args[6], sep=self.seq_args[7]) - - # Loop over the spectra. - for i in xrange(len(self.file_names)): - # Load the peak intensities. - self.interpreter.spectrum.read_intensities(file=self.file_names[i], spectrum_id=self.file_names[i], int_method=self.int_method) - - # Set the relaxation times. - self.interpreter.relax_fit.relax_time(time=self.relax_times[i]), spectrum_id=self.file_names[i]) -############################################################################### -# # -# Copyright (C) 2004-2010 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 # -# # -############################################################################### - -# Module docstring. -"""The automatic relaxation curve fitting protocol.""" - -# relax module imports. -from prompt.interpreter import Interpreter - - - -class Relax_fit: - def __init__(self, pipe_name='rx', seq_args=None, file_names=None, relax_times=None, int_method='height', mc_num=500): - """Perform relaxation curve fitting. - - @keyword pipe_name: The name of the data pipe to create. - @type pipe_name: str - @keyword seq_args: The sequence data (file name, dir, mol_name_col, res_num_col, res_name_col, spin_num_col, spin_name_col, sep). These are the arguments to the sequence.read() user function, for more information please see the documentation for that function. - @type seq_args: list of lists of [str, None or str, None or int, None or int, None or int, None or int, None or int, None or int, None or int, None or str] - @keyword file_names: A list of all the peak list file names. - @type file_names: list of str - @keyword relax_times: The list of relaxation times corresponding to file_names. These two lists must be of the same size. - @type relax_times: list of float - @keyword int_method: The integration method, one of 'height', 'point sum' or 'other'. - @type int_method: str - @keyword mc_num: The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. - @type mc_num: int - """ - - # Store the args. - self.pipe_name = pipe_name - self.seq_args = seq_args - self.file_names = file_names - self.relax_times = relax_times - self.int_method = int_method - self.mc_num = mc_num # User variable checks. self.check_vars()