mailRe: two questions: hybrid analysis and convergence problems


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

Header


Content

Posted by Douglas Kojetin on June 25, 2007 - 14:16:
The script still fails.  I'm using the following code:

#--start
import glob
runs = glob.glob('prolate/round_*')

# Loop over the runs.
for name in runs:
    print name
    run.create(name, 'mf')
    results.read(run=name, file='results', dir=name+'/aic')
    chisq=self.relax.data.chi2[name]
    print "%s: %1.10f" % (name, chisq)
#--end


and here is the error reported:


##--error start
Traceback (most recent call last):
  File "/home/dkojetin/bin/relax", line 454, in ?
    Relax()
  File "/home/dkojetin/bin/relax", line 166, in __init__
    self.interpreter.run()
  File "/opt/relax/1.2/prompt/interpreter.py", line 213, in run
run_script(intro=self.relax.intro_string, local=self.local, script_file=self.relax.script_file, quit=1)
  File "/opt/relax/1.2/prompt/interpreter.py", line 388, in run_script
    console.interact(intro, local, script_file, quit)
File "/opt/relax/1.2/prompt/interpreter.py", line 340, in interact_script
    execfile(script_file, local)
  File "chisq.py", line 11, in ?
    abc=self.relax.data.chi2[name]
KeyError: 'prolate/round_29'
##--error-end




On Jun 25, 2007, at 3:10 AM, Edward d'Auvergne wrote:

On 6/25/07, Douglas Kojetin <douglas.kojetin@xxxxxxxxx> wrote:
Hi Edward,

I'm trying to write a script to calculate the chisq values for each
of the prolate rounds, but I'm having some trouble as I'm not 100%
familiar with the relax subroutines.

Your code is almost there. I think I know where the script failed though.


#--start
import glob
runs = glob.glob('prolate/round_*')

# Loop over the runs.
for name in runs:
     name=name+'/aic'
     run.create(name, 'mf')
     results.read(name)

This should all be ok.

     chi2=self.relax.data.chi2[run]

Here the 'run' variable should be replaced by 'name'.


     print "%s: %1.20f" % (name, chi2)

#--end

This should also work.


But this does not seem to work.  Can someone help me with the proper
code to extract chisq values from multiple runs?

If the script fails with the fix, would you be able to attach a print
out of the error message to help in solving where the script failed?

Cheers,

Edward




Related Messages


Powered by MHonArc, Updated Mon Jun 25 15:00:39 2007