mailRe: Error message with the script "palmer.py"


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on April 09, 2008 - 10:12:
Hi,

This problem is a hard one to handle.  There is already a bit of code
in relax's parser of Modelfree's mfout STAR formatted file which
handles corrupted mfout files (the problem was with fused columns with
many *****).  But catching this one is much harder.  The easy fix here
it to put an upper limit on te when running Modelfree, or to get the
print statements in Modelfree to have a single space between column
format strings (like when relax uses "%s %s %8.3f" rather than
"%s%s%8.3f).  This problem, I'm pretty sure, is not handled by the
STAR format itself and is simply a Modelfree output formatting bug.

But despite this, relax could be modified to handle this type of
corruption in the mfout file.  Right now though, I can't think of a
robust algorithm to handle this.  It will have to be a check in the
parser, but relying on there being exactly 3 decimal places in all
floating point numbers in the mfout file is dangerous.  The algorithm
should handle column fusions anywhere in the mfout file where 2
floating point numbers are located side by side.  I'll have to think
about this one some more.

Cheers,

Edward



On Tue, Apr 8, 2008 at 5:19 PM, Sébastien Morin
<sebastien.morin.1@xxxxxxxxx> wrote:
Hi,

 I am using the script "palmer.py" to extract dynamic information using
 AIC model selection, but ModelFree4 as an optimization tool.

 I tried the script several times before with a good success, however, I
 now get an error message when trying to extract parameters for model
 "m5" during stage 2.

 =========================
 relax> palmer.extract(run='m5', dir=None)
 Traceback (most recent call last):
  File "/home/semor/packages/relax-1.2/relax", line 454, in ?
    Relax()
  File "/home/semor/packages/relax-1.2/relax", line 166, in __init__
    self.interpreter.run()
  File "/home/semor/packages/relax-1.2/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 "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 391,
 in run_script
    console.interact(intro, local, script_file, quit)
  File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 343,
 in interact_script
    execfile(script_file, local)
  File "./palmer__stage_2.py", line 142, in ?
    exec_stage_2(runs)
  File "./palmer__stage_2.py", line 76, in exec_stage_2
    palmer.extract(run=name)
  File "/home/semor/packages/relax-1.2/prompt/palmer.py", line 263, in
 extract
    self.__relax__.generic.palmer.extract(run=run, dir=dir)
  File "/home/semor/packages/relax-1.2/generic_fns/palmer.py", line 562,
 in extract
    data.ts = data.ts / 1e12
 TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
 =========================


 I had a look at the "te" parameter (sometimes called "ts" in relax, but
 always "te" in ModelFree4) and the values and errors are sometimes
 extremely high... For example :

 =========================
 ...
 41          0.000 1279767296.000    1          0.000
 0.000          0.000          0.000
 ...
 59      10000.000  215564320.000    1          0.000
 0.000          0.000          0.000
 60      10000.000 3750023168.000    1          0.000
 0.000          0.000          0.000
 61      10000.000      11655.404    1          0.000
 0.000          0.000          0.000
 ...
 =========================


 Also, on line is badly formatted with an absent separating field :

 =========================
 246      10000.00019682363392.000    1          0.000
 0.000          0.000          0.000
 =========================


 I modified the "mfout" file so this line is now :

 =========================
 246      10000.00 19682363392.000    1          0.000
 0.000          0.000          0.000
 =========================


 and the script now passes without any problem...

 This issue is probably caused by the ModelFree4 parser... However, do
 you think it could be catched by relax and re-formatted so that relax
 doesn't crash ?

 Thanks !
 Cheers,


 Séb  :)


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

 This is the relax-users mailing list
 relax-users@xxxxxxx

 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




Related Messages


Powered by MHonArc, Updated Sun Apr 13 01:41:28 2008