Author: bugman Date: Thu Jul 3 22:29:34 2008 New Revision: 6632 URL: http://svn.gna.org/viewcvs/relax?rev=6632&view=rev Log: A few fixes for the model-free duplicate() method. Modified: 1.3/specific_fns/model_free/main.py Modified: 1.3/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=6632&r1=6631&r2=6632&view=diff ============================================================================== --- 1.3/specific_fns/model_free/main.py (original) +++ 1.3/specific_fns/model_free/main.py Thu Jul 3 22:29:34 2008 @@ -963,9 +963,11 @@ @type global_stats: bool """ - # First create the pipe_to data pipe, if it doesn't exist. + # First create the pipe_to data pipe, if it doesn't exist (restoring the current pipe at the end). + current_pipe = ds.current_pipe if not ds.has_key(pipe_to): pipes.create(pipe_to, pipe_type='mf') + ds.current_pipe = current_pipe # Duplicate all non-sequence specific data. for data_name in dir(ds[pipe_from]): @@ -1001,10 +1003,9 @@ # Sequence specific data. if param_set == 'mf' or (param_set == 'local_tm' and not global_stats): # Duplicate the sequence data if it doesn't exist. - if not hasattr(ds[pipe_to], 'mol'): + if ds[pipe_to].mol.is_empty(): sequence.copy(pipe_from=pipe_from, pipe_to=pipe_to) - # # Create the sequence data if it does not exist. if not ds.res.has_key(new_run) or not len(ds.res[new_run]): # Add the new run to 'ds.res'.