Sorry for the delayed response.  Work has been quite hectic at the
moment.  This is a clear bug, so if you could submit a bug report,
that would be much appreciated.  A catch for n == 0 could be added to
fix this problem, but I am very interested in why this situation
occured in the first place.  The only reason I can think of right now
is that all 500 Monte Carlo simulations failed!  If so, that would be
impressive!

Cheers,

Edward



On Jan 28, 2008 7:01 PM, Sebastien Morin <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I recently helped someone use relax and got into a small problem related to
> model elimination, I think.
>
>  The script used consisted of minimizing one model-free model, doing Monte
> Carlo simulations, eliminating bad simulations and calculating errors (just
> as in the sample script on page 30, section 6.2.1, of the manual, v1.2.11).
>
>  ==================================================================
>  #### Script for model-free analysis: model5
>  #### Create the run
>  name='m5'
>  run.create(name,'mf')
>  #### Nuclei type
>  nuclei('N')
>  #### Load the sequence
>  sequence.read(name, 'sequence')
>  #### Load relaxation data
>  relax_data.read(name, 'R1', '600', 599.624 * 1e6, 'AMP-600R1s')
>  relax_data.read(name, 'R2', '600', 599.624 * 1e6, 'AMP-600R2s')
>  relax_data.read(name, 'NOE', '600', 599.624 * 1e6, 'AMP-600NOEs')
>  relax_data.read(name, 'R1', '500', 499.897 * 1e6, 'AMP-500R1s')
>  relax_data.read(name, 'R2', '500', 499.897 * 1e6, 'AMP-500R2s')
>  relax_data.read(name, 'NOE', '500', 499.897 * 1e6, 'AMP-500NOEs')
>  #### Setup other values
>  diffusion_tensor.init(name, 6.7 * 1e-9, fixed=1)
>  value.set(name, 1.02 * 1e-10, 'bond_length')
>  value.set(name, -172 * 1e-6, 'csa')
>  #### Select the model-free model
>  model_free.select_model(run=name, model=name)
>  #### Grid search
>  grid_search(name, inc=11)
>  #### Minimise
>  minimise('newton', run=name)
>  #### Monte Carlo simulations
>  monte_carlo.setup(name, number=500)
>  monte_carlo.create_data(name)
>  monte_carlo.initial_values(name)
>  minimise('newton', run=name)
>  eliminate(run=name)
>  monte_carlo.error_analysis(name)
>  #### Finish
>  results.write(run=name, file=name, force=1)
>  ==================================================================
>
>  R1s, R2s and NOEs were available from 2 magnetic fields for most residues,
> some of which only had data from 1 magnetic field. For some models
> (5,6,7,8), model elimination eliminated lots of simulations... When reaching
> the 'monte_carlo.error_analysis' call, relax crashed with the following
> error :
>
>  ==================================================================
>  relax> monte_carlo.error_analysis(run='m5', prune=0.0)
>  Traceback (most recent call last):
>    File "/usr/local/bin/relax", line 454, in ?
>      Relax()
>    File "/usr/local/bin/relax", line 166, in __init__
>      self.interpreter.run()
>    File "/usr/local/packages/relax/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/local/packages/relax/prompt/interpreter.py", line 391, in
> run_script
>      console.interact(intro, local, script_file, quit)
>    File "/usr/local/packages/relax/prompt/interpreter.py", line 343, in
> interact_script
>      execfile(script_file, local)
>    File "./model5", line 42, in ?
>      monte_carlo.error_analysis(name)
>    File "/usr/local/packages/relax/prompt/monte_carlo.py", line 145, in
> error_analysis
>      self.__relax__.generic.monte_carlo.error_analysis(run=run, prune=prune)
>    File "/usr/local/packages/relax/generic_fns/monte_carlo.py", line 220, in
> error_analysis
>      Xav = Xsum / float(n)
>  ZeroDivisionError: float division
>  ==================================================================
>
>  It seems 'n' was zero for at least one residue...
>
>  Is this something that should be fixed within relax (adding a test that
> would skip error analysis when n=0, but allow the script to end without
> crashing, or adding a more useful error message) ?
>
>  Thanks !
>
>
>  Séb  :)
>  --
> Sebastien Morin
> Etudiant au PhD en biochimie
> Laboratoire de resonance magnetique nucleaire
> Dr Stephane Gagne
> CREFSIP (Universite Laval, Quebec, CANADA)
> 1-418-656-2131 #4530
>
>
> _______________________________________________
> relax (http://nmr-relax.com)
>
> This is the relax-users 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-users
>
>

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

This is the relax-users 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-users

Reply via email to