TABLE OF CONTENTS


36d-neb_vs_flo_vs_sbco

DESCRIPTION

How to time calculations in PWTK. In this example, we compare the NEB vs FLO vs SBCO performance for the dissociation of N2O @ Pd(110).

EXAMPLE SOURCE FILE

neb_vs_flo_vs_sbco.pwtk

SOURCE

# NEB

input_pushpop {
    # ::pwtk::measure_time times the execuation of a script
    set t_neb [measure_time { import neb-N2OPd.pwtk }]
}

# FLO

input_pushpop {
    # execute the flo_n2o.pwtk script and measure the execution time
    set t_flo [measure_time { import flo-N2OPd.pwtk }]
}

# SBCO

input_pushpop {
    # for a fair comparison with FLO & NEB, redefine 'sbco_run' to
    # turn the auto-feature ON and post-relax OFF; this way the
    # sbco_n2o.pwtk script can be reused
    proc sbco_run {head} {
        SBCO { auto = true  post_relax = false }
        ::pwtk::sbco_run $head
    }
    # execute the sbco_n2o.pwtk script and measure the execution time
    set t_sbco [measure_time { import sbco-N2OPd.pwtk }]
}


# printout

print "
Summary:

 NEB calculation took :   $t_neb seconds
 FLO calculation took :   $t_flo seconds
SBCO calculation took :   $t_sbco seconds
"