TABLE OF CONTENTS
::pwtk::eos::EOS
SYNOPSIS
proc ::pwtk::eos::EOS {content} {
PURPOSE
The input data for the EOS calculation are specified by means of the EOS namelist. This proc is the implementation of the EOS namelist and performs various checks on "input" variables.
ARGUMENTS
- content -- input data (in namelist syntax) for EOS calculations, e.g.:
EOS { mode = auto a0 = 7.2 ... }
Default values for EOS input variables are defined in eos.tcl config file.
DESCRIPTION of EOS variables:
- mode -- mode of the lattice parameter search [OPTIONAL, default=auto]. Possibilities are: auto, range, and stepwise
- npoints -- number of single-point scf calculations [OPTIONAL]
- use_estimator_points -- whether to use the initial estimator points data in the final assessment (fitting) of the results
- use_stress -- whether to use the stress (i.e. tstress=.true. in the CONTROL namelist) [OPTIONAL, default=true]
- restart -- restart the EOS calculation [OPTIONAL, default=false]
mode == auto: lattice-parameter scan range is automatically determined, and npoints scf calculations is performed in this range. The following optional variables may be specified:
- a0 -- initial guess for the lattice-parameter (in Bohr); [OPTIONAL, default = celldm(1)]
- B0 -- initial guess for the bulk-modulus (in kbar); used only when a0 is substantially far from minimum. Possible values are: "small", "medium", "high", or numeric value in kbar units. [OPTIONAL]
- da0 -- criterion for choosing the 2nd estimator point, a = a0*(1 +/- da0) [OPTIONAL]
- scale_min, scale_max -- determine the lattice-parameter scan range for the "npoints" scf calculations as: [scale_min*a0, scale_max*a0], where a0 is the two point estimation of lattice-parameter [OPTIONAL]
mode == range: lattice-parameter is scanned in the specified range, as determined by the following two variables:
- amin, amax -- range to scan the lattice parameter, from "amin" to "amax" [REQUIRED]
mode == stepwise: lattice-parameter is scanned in stepwise fashion, starting at amin with increments da:
- amin -- lower bound of the range to scan the lattice parameters [REQUIRED]
- da -- increment (in Bohr units) for lattice parameter scan. This means that npoints scf calculations will be performed at: amin, amin+da, amin+2*da, ... [REQUIRED]
SUMMARY of EOS namelist:
* mode == auto:
EOS { mode = auto npoints = integer-number (OPTIONAL) a0 = real-value (OPTIONAL) B0 = small|medium|high|real-value (OPTIONAL) da0 = real-value (OPTIONAL) scale_min = real-value (OPTIONAL) scale_max = real-value (OPTIONAL) }
* mode == range:
EOS { mode = range npoints = integer-number (OPTIONAL) amin = real-value (REQUIRED) amax = real-value (REQUIRED) }
* mode == stepwise:
EOS { mode = stepwise npoints = integer-number (OPTIONAL) amin = real-value (REQUIRED) da = real-value (REQUIRED) }
SOURCE
::pwtk::input::namelist EOS $content # parse the input data for EOS calculation and perform some checks variable eos variable eos_default foreach var [::pwtk::input::namelistVars_ EOS] { set value [::pwtk::input::namelistGetVarValue EOS $var 1] # this is to allow: EOS { value = } if { $value == "" } { if { [info exists eos_default($var)] } { set eos($var) $eos_default($var) } continue } switch -exact -- [string tolower $var] { restart { set value [string trim $value .] if { ! [string is boolean $value] } { ::pwtk::error "wrong value for EOS's restart variable, must be boolean, but got $value" } else { set eos(restart) $value } } use_stress { set value [string trim $value .] if { ! [string is boolean $value] } { ::pwtk::error "wrong value for EOS's use_stress variable, must be boolean, but got $value" } else { set eos(use_stress) $value } } use_estimator_points { set value [string trim $value .] if { ! [string is boolean $value] } { ::pwtk::error "wrong value for EOS's use_estimator_points variable, must be boolean, but got $value" } else { set eos(use_estimator_points) $value } } mode { if { [regexp (auto|range|stepwise) $value] } { set eos(mode) $value } else { ::pwtk::error "wrong mode for EOS calculation: ${value}, must be one of auto, range, or stepwise" } } b0 { if { [regexp (high|medium|small) $value] } { set eos(B0) $eos(B0_$value) } elseif { [::pwtk::is_double $value] } { set value [pwtk::mathParser $value] if { $value < 5 || $value > 5000 } { ::pwtk::error "B0 value, ${value} kbar, out of acceptable range, must be witin \[5,5000\] kbar" } set eos(B0) $value } else { ::pwtk::error "wrong value of B0 for ALAR calculation: ${value}, must be one of high, medium, small, or real-number in kbar" } } a0 - scale_min - scale_max - amin - amax - da - da0 { if { [::pwtk::is_double $value] } { set value [pwtk::mathParser $value] set eos($var) $value } else { ::pwtk::error "wrong value of $var for EOS calculation: ${value}, must be a real-number" } # additional number checks if { [regexp (a0|amin|amax|scale_min) $var] && $value < 0.5 } { ::pwtk::error "increase $var, which is too small, ${value}" } elseif { $var == "scale_max" && $value > 2.0 } { ::pwtk::error "scale_max is too big: ${value}, should be lower than 2.0, say, around 1.10" } } npoints { if { [::pwtk::is_int $value] } { set value [expr $value] if { $value < 4 } { ::pwtk::error "npoints must be >= 4" } set eos($var) $value } else { ::pwtk::error "wrong value of $var for EOS calculation: ${value}, must be an integer-number" } } default { ::pwtk::error "wrong EOS's variable name: $var" } } } # additional after tests: before running check that a0 > 0.5 && da < 0.5*a0 }