TABLE OF CONTENTS


::pwtk::eos::run

SYNOPSIS

proc ::pwtk::eos::run {head {eosInput ""}} {

PURPOSE

Run the EOS calculation, i.e., find the optimum "A" lattice parameter.

For non-cubic systems, only "A" is optimized keeping the cell shape intact, i.e., the ratio between A, B, C is maintained, and angles are kept fixed.

ARGUMENTS

Note that

    ::pwtk::eos::run $head $eosInput

is equivalent to

    EOS $eosInput
    ::pwtk::eos::run $head

SOURCE

    variable eos

    if { $eosInput != "" } {
        EOS $eosInput
    }

    ::pwtk::input::pushpop {

        parseEOS_
        init_

        # create $head.d directory ...
        
        print_ "  pw.x I/O files will be stored in directory:  ./${head}.d/\n"
        
        if { ! [file isdirectory ${head}.d]} {
            try {
                file mkdir ${head}.d
            } on error err {
                ::pwtk::error "cannot create directory: ${head}.d\n\n$err" 1
            }
        }
        
        run_${eos(mode)}_ [file join $head.d $head]
        findMinimum  [ibrav2lattice [::pwtk::pwi::ibrav]]  [file join $head.d $head]  $eos(datafile)
        
        if { [file exists [file join $head.d $head.RESULTS]] } {
            file rename -force -- [file join $head.d $head.RESULTS] .
        }
    }
}