Edward d'Auvergne wrote:

> Hi,
>
> I'm sorry that I was unable to respond to emails last week.  That week
> was my last at Melbourne Uni and I had to pack and prepare for my
> postdoc position in Europe which will be starting soon.
>
can you give us details?

> As for the error, I'm not sure what is happening.  



we think we do now ;-)

> Each Element
> container corresponding to a residue for which relaxation data has
> been loaded must have the 'num_ri' variable.  The script is definitely
> not the source of the error and I can't find the problem reported in
> the bug tracker (https://gna.org/bugs/?group=relax).  Would you like
> to have a go at trying to find the bug Gary?  Could you run the script
> using relax version 1.2.10, 1.3.0, or the 1.2 repository line to see
> if the bug is located in that code as well or if it is something which
> is solely found in the code of the multi_processor branch?  


Its not a multiprocessor specific bug because it appears in the 1.3.0 
tag. It appears that in  write_columnar_results


                    /# No simulation values.
/                    *else*:
                        /# Sphere.
/                        *if* self.relax.data.diff[self.run].type == *'sphere'*:
                            diff_params = [None]

                        /# Spheroid.
/                        *elif* self.relax.data.diff[self.run].type == 
*'spheroid'*:
                            diff_params = [None, None, None, None]

                        /# Ellipsoid.
/                        *elif* self.relax.data.diff[self.run].type == 
*'ellipsoid'*:
                            diff_params = [None, None, None, None, None, None]

                /# Loop over the sequence.
/                *for* j *in* xrange(len(self.relax.data.res[self.run])):
                    /# Reassign data structure.
/                    data = self.relax.data.res[self.run][j]

                    /# Model details.
/                    model = None
                    *if* hasattr(data, *'model'*):
                        model = data.model

                    equation = None
                    *if* hasattr(data, *'equation'*):
                        equation = data.equation


we should have

                /# Loop over the sequence.
/                *for* j *in* xrange(len(self.relax.data.res[self.run])):
                    /# Reassign data structure.
/                    data = self.relax.data.res[self.run][j]
                    
                    if not data.selected:
                        continue



which avoids writing mc data for residues with no relaxation data (the 
data sets I was using were some of the ones chris cooked up for 
'selection' problems). I can test this against a 1.2  version but I have 
no idea what revison  to try against. Chris isn't sure either. I also 
don't have any data (old 'correct' montecarlo results files) which I can 
test the current behaviour against.

> I've
> looked at the code and know how I could modify it so that the error is
> avoided when using the results.write() user function, however that
> would be a temporary solution and source of the error will probably
> affect other parts of relax.  For any spin with relaxation data,
> 'num_ri' has to exist.
>
I think the problem here was that we had spins without relaxation data 
(because this is chris's nasty data)

Do you think the bug fix is correct? (I can give examples of the data 
that failed)  If so should I  fix the 1.3.0 tag line and the 1.3 branch 
(separately or by merging [it could be messy])


regards
gary

> Cheers,
>
> Edward
>
>
> On 3/30/07, Gary S. Thompson <[EMAIL PROTECTED]> wrote:
>
>> The following script crashes at result.write with
>>
>> relax> results.write(run='m1', file='results', dir='m1', force=1,
>> format='columnar', compress_type=1)
>> Opening the file 'm1/results.bz2' for writing.
>> Traceback (most recent call last):
>>   File "../relax", line 591, in ?
>>     multi_processor.run()
>>   File
>> "/usr/jessy/garyt/projects/relax_branch/branch_multi1/multi/uni_processor.py",
>>  
>>
>> line 106, in run
>>     self.relax_instance.run()
>>   File "../relax", line 175, in run
>>     self.interpreter.run()
>>   File
>> "/usr/jessy/garyt/projects/relax_branch/branch_multi1/prompt/interpreter.py",
>>  
>>
>> line 216, in run
>>     run_script(intro=self.relax.intro_string, local=self.local,
>> script_file=self.relax.script_file, quit=1)
>>   File
>> "/usr/jessy/garyt/projects/relax_branch/branch_multi1/prompt/interpreter.py",
>>  
>>
>> line 392, in run_script
>>     console.interact(intro, local, script_file, quit)
>>   File
>> "/usr/jessy/garyt/projects/relax_branch/branch_multi1/prompt/interpreter.py",
>>  
>>
>> line 343, in interact_script
>>     execfile(script_file, local)
>>   File "test_multimodel_mc.py", line 75, in ?
>>     results.write(run=name, file='results', force=1)
>>   File
>> "/usr/jessy/garyt/projects/relax_branch/branch_multi1/prompt/results.py", 
>>
>> line 201, in write
>>     self.__relax__.generic.results.write(run=run, file=file,
>> directory=dir, force=force, format=format, compress_type=compress_type)
>>   File
>> "/usr/jessy/garyt/projects/relax_branch/branch_multi1/generic_fns/results.py",
>>  
>>
>> line 166, in write
>>     self.write_function(results_file, run)
>>   File
>> "/usr/jessy/garyt/projects/relax_branch/branch_multi1/specific_fns/model_free.py",
>>  
>>
>> line 5177, in write_columnar_results
>>     for l in xrange(data.num_ri):
>> AttributeError: Element instance has no attribute 'num_ri'
>>
>> # Script for model-free analysis.
>>
>> dataPaths = ['test_data/noe600_hgts.dat',
>>              'test_data/T1-500_051205_hgts.bs',
>>              'test_data/T1-600_hgts.bs',
>>              'test_data/T2-500_061205_hgts.bs',
>>              'test_data/T2-600_hgts.bs',
>>              'test_data/noe750.dat',
>>              'test_data/T1_750_hgts.bs',
>>              'test_data/T2_750_hgts.bs']
>>
>> dataTypes = [('NOE', '600', 599.8e6),
>>              ('R1', '500', 499.8e6),
>>              ('R1', '600', 599.8e6),
>>              ('R2', '500', 499.8e6),
>>              ('R2', '600', 599.8e6),
>>              ('NOE', '750', 750.8e6),
>>              ('R1', '750', 750.8e6),
>>              ('R2', '750', 750.8e6)]
>>
>> # Set the run names (also the names of preset model-free models).
>> #runs = ['tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm6', 'tm7', 'tm8', 'tm9']
>> runs = ['m1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9']
>>
>> # Nuclei type
>> nuclei('N')
>>
>> # Loop over the runs.
>> for name in runs:
>>     # Create the run.
>>     run.create(name, 'mf')
>>
>>     # Load the sequence.
>>     #sequence.read(name, 'noe.500.out')
>>
>>     # Load a PDB file.
>>     #pdb(name, 'test_data/test.pdb', proton='HN')
>>     structure.read_pdb(name, 'test_data/test.pdb')
>>     structure.vectors(name, proton='HN')
>>
>>     # Load the relaxation data.
>>     for dataSet in xrange(len(dataPaths)):
>>         relax_data.read(name, dataTypes[dataSet][0],
>> dataTypes[dataSet][1], dataTypes[dataSet][2], dataPaths[dataSet])
>>
>>     # Setup other values.
>>     diffusion_tensor.init(name, 1e-8, fixed=1)
>>     #diffusion_tensor.init(name, (1e-8, 1.0, 60, 290), param_types=0,
>> spheroid_type='oblate', fixed=0)
>>     value.set(name, 1.02 * 1e-10, 'bond_length')
>>     value.set(name, -160 * 1e-6, 'csa')
>>     #value.set(name, 0.970, 's2')
>>     #value.set(name, 1.0, 's2f')
>>     #value.set(name, 2048e-12, 'te')
>>     #value.set(name, 2048e-12, 'tf')
>>     #value.set(name, 2048e-12, 'ts')
>>     #value.set(name, 0.149/(2*pi*600e6)**2, 'rex')
>>
>>     # Select the model-free model.
>>     model_free.select_model(run=name, model=name)
>>     #fix(name, 'all_res')
>>
>>     # Minimise.
>>     grid_search(name, inc=11)
>>     minimise('newton', run=name)
>>
>>     # Monte Carlo simulations.
>>     monte_carlo.setup(name, number=100)
>>     monte_carlo.create_data(name)
>>     monte_carlo.initial_values(name)
>>     minimise('newton', run=name)
>>     eliminate(run=name)
>>     monte_carlo.error_analysis(name)
>>
>>
>>     # Write the results.
>>     results.write(run=name, file='results', force=1)
>>
>> # Save the program state.
>> state.save('save', force=1)
>>
>>
>> regards
>> gary
>>
>> -- 
>> -------------------------------------------------------------------
>> Dr Gary Thompson
>> Astbury Centre for Structural Molecular Biology,
>> University of Leeds, Astbury Building,
>> Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
>> email: [EMAIL PROTECTED]                   Fax  +44-113-2331407
>> -------------------------------------------------------------------
>>
>>
>>
>> _______________________________________________
>> relax (http://nmr-relax.com)
>>
>> This is the relax-devel mailing list
>> [email protected]
>>
>> To unsubscribe from this list, get a password
>> reminder, or change your subscription options,
>> visit the list information page at
>> https://mail.gna.org/listinfo/relax-devel
>>
>
> .
>


-- 
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
email: [EMAIL PROTECTED]                   Fax  +44-113-2331407
-------------------------------------------------------------------



_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to