mailscripts


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

Header


Content

Posted by Hongyan Li on January 16, 2007 - 07:29:
Hi, everyone,
I used a mf-multimodel.py (similar to the sample script) to generate m0 to m9
models and then used modsel.py to select a suitable model for each spin and
then minimised all parameters using selected models. I would also like to do
Monte Carlo simulations at the last stage, but combining these together, it
will take too long to run. Any suggestion how to improve it. Ths script I used
is like this:
# Script for model-free model selection.

# Nuclei type
nuclei('N')

# Set the run names.
runs = ['m0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm9']

# Loop over the run names.
for name in runs:
    print "\n\n# " + name + " #"

    # Create the run.
    run.create(name, 'mf')

    # Reload precalculated results from the file 'm1/results', etc.
    results.read(run=name, file='results', dir=name)

# Model elimination.
eliminate()

# Model selection.
run.create('aic', 'mf')
model_selection('AIC', 'aic')

# Minimise all parameters.
fix('aic', 'all', fixed=0)
minimise('newton', run='aic')

# Monte Carlo Simulations
monte_carlo.setup('aic', number=500)
monte_carlo.create_data('aic')
monte_carlo.initial_values('aic')
minimise('newton', run='aic')
eliminate(run='aic')
monte_carlo.error_analysis('aic')



# Write the results.
state.save('save', force=1)
results.write(run='aic', file='results', force=1)

With best regards,

Hongyan

Dr. Hongyan Li
Department of Chemistry
The University of Hong Kong
Pokfulam Road
Hong Kong




Related Messages


Powered by MHonArc, Updated Wed Jan 17 06:00:19 2007