mirror of https://gitlab.com/QEF/q-e.git
First attempt, not yet completely working, of a GUI for the atomic code
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2166 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
605a912480
commit
780b00cedd
|
@ -1 +1 @@
|
||||||
2.1.3
|
2.1CVS
|
||||||
|
|
|
@ -0,0 +1,94 @@
|
||||||
|
tracevar iswitch w {
|
||||||
|
switch -exact -- [varvalue iswitch] {
|
||||||
|
1 {
|
||||||
|
groupwidget inputp disable
|
||||||
|
groupwidget test disable
|
||||||
|
groupwidget pseudization disable
|
||||||
|
widget sic enable
|
||||||
|
}
|
||||||
|
2 {
|
||||||
|
groupwidget inputp disable
|
||||||
|
groupwidget test enable
|
||||||
|
groupwidget pseudization disable
|
||||||
|
widget sic disable
|
||||||
|
}
|
||||||
|
3 {
|
||||||
|
groupwidget inputp enable
|
||||||
|
groupwidget test enable
|
||||||
|
groupwidget pseudization enable
|
||||||
|
widget sic disable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tracevar dft w {
|
||||||
|
if { [varvalue dft] == "'REPLACE_ME'" } {
|
||||||
|
widget dft_ enable
|
||||||
|
} else {
|
||||||
|
widget dft_ disable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tracevar nld w {
|
||||||
|
if { [varvalue nld] == 0 } {
|
||||||
|
widget rlderiv disable
|
||||||
|
widget eminld disable
|
||||||
|
widget emaxld disable
|
||||||
|
widget deld disable
|
||||||
|
} else {
|
||||||
|
widget rlderiv enable
|
||||||
|
widget eminld enable
|
||||||
|
widget emaxld enable
|
||||||
|
widget deld enable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tracevar lloc w {
|
||||||
|
if { [varvalue lloc] == -1 } {
|
||||||
|
widget rcloc enable
|
||||||
|
} else {
|
||||||
|
widget rcloc disable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tracevar nlcc w {
|
||||||
|
if { [varvalue nlcc] == ".true." } {
|
||||||
|
widget rcore enable
|
||||||
|
} else {
|
||||||
|
widget rcore disable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tracevar lpaw w {
|
||||||
|
if { [varvalue lpaw] == ".true." } {
|
||||||
|
widget file_recon enable
|
||||||
|
} else {
|
||||||
|
widget file_recon disable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tracevar tm w {
|
||||||
|
if { [varvalue tm] == ".false." } {
|
||||||
|
widget rho0 enable
|
||||||
|
} else {
|
||||||
|
widget rho0 disable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tracevar rel w {
|
||||||
|
if { [varvalue rel] == 2 } {
|
||||||
|
widget lsd disable
|
||||||
|
} else {
|
||||||
|
widget lsd enable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
postprocess {
|
||||||
|
varset iswitch -value 1
|
||||||
|
varset rel -value 1
|
||||||
|
varset dft -value 'PZ'
|
||||||
|
varset nld -value 0
|
||||||
|
varset lloc -value -1
|
||||||
|
varset nlcc -value .false.
|
||||||
|
varset lpaw -value .false.
|
||||||
|
varset tm -value .false.
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
help title -vartype character -helpfmt txt2html -helptext {
|
||||||
|
title
|
||||||
|
}
|
|
@ -0,0 +1,280 @@
|
||||||
|
source commands.tcl
|
||||||
|
|
||||||
|
set ::guib::settings(filename_only_tail) 1
|
||||||
|
|
||||||
|
module LD1\#auto -title "PWSCF GUI: module LD1.x" -script {
|
||||||
|
|
||||||
|
readfilter ::pwscf::atomicReadFilter
|
||||||
|
writefilter ::pwscf::atomicDFTFilter
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
namelist input -name "INPUT" {
|
||||||
|
#
|
||||||
|
required {
|
||||||
|
var iswitch {
|
||||||
|
-label "Type of calculation:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"All-Electron"
|
||||||
|
"PseudoPotential Generation"
|
||||||
|
"PseudoPotential test"}
|
||||||
|
-value {1 3 2}
|
||||||
|
-default "All-Electron"
|
||||||
|
}
|
||||||
|
var atom {
|
||||||
|
-label "Atomic Symbol:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var config {
|
||||||
|
-label "Electronic Configuration:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var rel {
|
||||||
|
-label "Relativistic Effects:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"Non Relativistic (Schroedinger)"
|
||||||
|
"Scalar Relativistic"
|
||||||
|
"Full Relativistic (Dirac)"}
|
||||||
|
-value {0 1 2}
|
||||||
|
}
|
||||||
|
var lsd {
|
||||||
|
-label "LSDA Spin Polarization:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"No" "Yes"}
|
||||||
|
-value {0 1}
|
||||||
|
-default 0
|
||||||
|
}
|
||||||
|
var dft {
|
||||||
|
-label "Exchange-Correlation:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"Ceperley-Alder LDA, Perdew-Zunger data (PZ)"
|
||||||
|
"Perdew-Wang GGA (PW91)"
|
||||||
|
"Becke-Perdew GGA (BP)"
|
||||||
|
"Perdew-Becke-Ernzerhof (PBE)"
|
||||||
|
"Becke-Lee-Yang-Parr (BLYP)"
|
||||||
|
"Other"
|
||||||
|
}
|
||||||
|
-value {'PZ' 'PW91' 'BP' 'PBE' 'BLYP' 'REPLACE_ME'}
|
||||||
|
}
|
||||||
|
var dft_ {
|
||||||
|
-label "Enter Exchange-Correlation Functional:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#
|
||||||
|
optional {
|
||||||
|
var title {
|
||||||
|
-label "Job name or Comment (optional):"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var prefix {
|
||||||
|
-label "Prefix for output file names:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var beta {
|
||||||
|
-label "Mixing parameter for self-consistency:"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
var tr2 {
|
||||||
|
-label "Convergence Threshold for self-consistency:"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
|
||||||
|
var latt {
|
||||||
|
-label "Latter Correction:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"No" "Yes"}
|
||||||
|
-value {0 1}
|
||||||
|
-default 0
|
||||||
|
}
|
||||||
|
var sic {
|
||||||
|
-label "Self-Interaction Correction:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"No" "Yes"}
|
||||||
|
-value {0 1}
|
||||||
|
-default 0
|
||||||
|
}
|
||||||
|
separator -label "--- Grid: r(i)= exp (xmin + (i-1)*dx) / Z ---"
|
||||||
|
var xmin {
|
||||||
|
-label "Grid parameter xmin:"
|
||||||
|
-validate fortrannegreal
|
||||||
|
}
|
||||||
|
var dx {
|
||||||
|
-label "Grid parameter dx:"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
var rmax {
|
||||||
|
-label "Grid parameter rmax:"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
separator -label "--- Parameters for Logarithmic derivative calculation ---"
|
||||||
|
var nld {
|
||||||
|
-label "Number of logarithmic derivatives to calculate:"
|
||||||
|
-widget optionmenu
|
||||||
|
-textvalue {
|
||||||
|
"None" "1" "2" "3" "4"
|
||||||
|
}
|
||||||
|
-value { 0 1 2 3 4 }
|
||||||
|
-default "None"
|
||||||
|
}
|
||||||
|
var rlderiv {
|
||||||
|
-label "Radius at which logarithmic derivatives are calculated:"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
var eminld {
|
||||||
|
-label "Minimum energy (Ry) for Plotting:"
|
||||||
|
-validate fortranreal
|
||||||
|
}
|
||||||
|
var emaxld {
|
||||||
|
-label "Maximum energy (Ry) for Plotting:"
|
||||||
|
-validate fortranreal
|
||||||
|
}
|
||||||
|
var deld {
|
||||||
|
-label "Plotting in steps of Delta E (Ry):"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
#
|
||||||
|
}
|
||||||
|
#
|
||||||
|
}
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
namelist inputp -name "INPUTP" {
|
||||||
|
#
|
||||||
|
required {
|
||||||
|
var pseudotype {
|
||||||
|
-label "Type of PseudoPotential:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {
|
||||||
|
"Norm Conserving, one channel per angular momentum"
|
||||||
|
"Norm Conserving, more than one channel per angular momentum"
|
||||||
|
"UltraSoft"}
|
||||||
|
-value {1 2 3}
|
||||||
|
}
|
||||||
|
var file_pseudopw {
|
||||||
|
-label "Name of the file containing the output PP:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var lloc {
|
||||||
|
-label "Local Potential channel:"
|
||||||
|
-widget optionmenu
|
||||||
|
-textvalue {
|
||||||
|
"all-electron potential" "L=0" "L=1" "L=2" "L=3" "L=4"
|
||||||
|
}
|
||||||
|
-value { -1 0 1 2 3 4 }
|
||||||
|
-default "all-electron potential"
|
||||||
|
}
|
||||||
|
var rcloc {
|
||||||
|
-label "Matching Radius for Local Potential (optional if a L channel was specified):"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
var tm {
|
||||||
|
-label "Type of pseudization procedure:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {
|
||||||
|
"Troullier-Martins"
|
||||||
|
"Rabe-Rappe-Kaxiras-Joannopoulos"
|
||||||
|
}
|
||||||
|
-value {.true. .false.}
|
||||||
|
}
|
||||||
|
var rho0 {
|
||||||
|
-label "Charge at r=0:"
|
||||||
|
-validate fortrannonnegreal
|
||||||
|
-default 0.0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#
|
||||||
|
optional {
|
||||||
|
var nlcc {
|
||||||
|
-label "Nonlinear Core Correction:"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"No" "Yes"}
|
||||||
|
-value {.false. .true.}
|
||||||
|
-default "No"
|
||||||
|
}
|
||||||
|
var rcore {
|
||||||
|
-label "Matching Radius for Nonlinear Core Correction:"
|
||||||
|
-validate fortranposreal
|
||||||
|
}
|
||||||
|
var lpaw {
|
||||||
|
-label "Generate PAW dataset (experimental feature):"
|
||||||
|
-widget radiobox
|
||||||
|
-textvalue {"No" "Yes"}
|
||||||
|
-value {.false. .true.}
|
||||||
|
-default "No"
|
||||||
|
}
|
||||||
|
var file_recons {
|
||||||
|
-label "Name of the file containing data needed for PAW reconstruction:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var file_chi {
|
||||||
|
-label "Name of the file containing the output pseudo-orbitals:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var file_beta {
|
||||||
|
-label "Name of the file containing the output beta functions:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var file_qvan {
|
||||||
|
-label "Name of the file containing the output Q functions:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var file_screen {
|
||||||
|
-label "Name of the file containing the output screeing potential:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
var file_core {
|
||||||
|
-label "Name of the file containing the output total and core charge:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# This section is not yet working
|
||||||
|
#
|
||||||
|
group pseudization -name "Specify states to be pseudized" -decor normal {
|
||||||
|
line Nwfs {
|
||||||
|
var nwfs -label "Number of states:" -widget spinint -validate posint -default 1
|
||||||
|
|
||||||
|
table wfs {
|
||||||
|
-caption "Enter Wavefunctions to be Pseudized:"
|
||||||
|
-head {Label N L Occupancy Energy Rcut "US Rcut"}
|
||||||
|
-validate {char int int char real real real}
|
||||||
|
-cols 7
|
||||||
|
-rows 8
|
||||||
|
-outfmt {" %2s " %1d %1d %8.3f %8.3f %6.2f %6.2f}
|
||||||
|
} }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
namelist test -name "TEST" {
|
||||||
|
var nconf {
|
||||||
|
-label "Number of testing configurations:"
|
||||||
|
-widget spinint
|
||||||
|
-validate posint
|
||||||
|
-default 1
|
||||||
|
}
|
||||||
|
var file_pseudo {
|
||||||
|
-label "Name of the file containing the input PP:"
|
||||||
|
-fmt %S
|
||||||
|
}
|
||||||
|
dimension configts {
|
||||||
|
-label "Test electronic configurations"
|
||||||
|
-start 1
|
||||||
|
-end 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# take care of specialties
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
source atomic-event.tcl
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------
|
||||||
|
# source the HELP file
|
||||||
|
# ------------------------------------------------------------------------
|
||||||
|
source atomic-help.tcl
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
# ------------------------------------------------------------------------
|
||||||
|
# partial check if input file has an acceptable format
|
||||||
|
# ------------------------------------------------------------------------
|
||||||
|
proc ::pwscf::atomicReadFilter {moduleObj channel} {
|
||||||
|
|
||||||
|
# ld1.x formatted input file should have the &INPUT namelist
|
||||||
|
|
||||||
|
set status [::pwscf::readFilter::findNamelists $moduleObj $channel INPUT errMsg]
|
||||||
|
if { $status == 0 } {
|
||||||
|
$moduleObj readFileWrongFormat ld1.x $errMsg
|
||||||
|
}
|
||||||
|
return [readFilter::default $moduleObj $channel {logical amass}]
|
||||||
|
}
|
||||||
|
# ------------------------------------------------------------------------
|
||||||
|
# dft is a namelist variable
|
||||||
|
# We need to remove dft_ and replace dft_ with dft
|
||||||
|
# ------------------------------------------------------------------------
|
||||||
|
proc ::pwscf::atomicDFTFilter {moduleObj outputContent} {
|
||||||
|
set result {}
|
||||||
|
|
||||||
|
foreach line [split $outputContent \n] {
|
||||||
|
if { [string match {*'REPLACE_ME' *} $line] } {
|
||||||
|
# we skip this line
|
||||||
|
} elseif { [string match {*dft_ *} $line] } {
|
||||||
|
# replace dft_ with dft
|
||||||
|
|
||||||
|
# usage: regsub ?switches? exp string subSpec varName
|
||||||
|
#
|
||||||
|
# regsub == regular-expression-substitution
|
||||||
|
# exp -- regular expresion to match
|
||||||
|
# string -- string to make the regsub
|
||||||
|
# subSpec -- what to do with the portion of string that matches
|
||||||
|
# expression (i.e. this is the replacement string)
|
||||||
|
# varName -- where to store the result
|
||||||
|
|
||||||
|
regsub -- dft_ $line dft newLine
|
||||||
|
append result $newLine\n
|
||||||
|
} else {
|
||||||
|
# simply append
|
||||||
|
append result $line\n
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result
|
||||||
|
}
|
||||||
|
#---
|
|
@ -19,7 +19,7 @@
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: pwscf.itcl,v 1.3 2004-09-20 07:06:05 kokalj Exp $
|
# $Id: pwscf.itcl,v 1.4 2005-09-12 17:13:52 giannozz Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
tk_setPalette #d9d9d9
|
tk_setPalette #d9d9d9
|
||||||
|
@ -82,6 +82,9 @@ $gui addModule module pr "ProjWFC.X" [file join $env(PWGUI) modules projwfc proj
|
||||||
$gui addModule module d3 "D3.X" [file join $env(PWGUI) modules d3 d3.tcl] {
|
$gui addModule module d3 "D3.X" [file join $env(PWGUI) modules d3 d3.tcl] {
|
||||||
{{D3.X Input File} {*.d3.inp}}
|
{{D3.X Input File} {*.d3.inp}}
|
||||||
}
|
}
|
||||||
|
$gui addModule module ld "LD1.X" [file join $env(PWGUI) modules atomic atomic.tcl] {
|
||||||
|
{{LD1.X Input File} {*.ld1.inp}}
|
||||||
|
}
|
||||||
|
|
||||||
#$gui addModule cascade pwscf "PWscf files ..." {
|
#$gui addModule cascade pwscf "PWscf files ..." {
|
||||||
# $gui addModule command ...
|
# $gui addModule command ...
|
||||||
|
@ -106,6 +109,7 @@ $gui addHelp help pp "PP.X Input Syntax" [file join $env(PWGUI) doc p
|
||||||
$gui addHelp help chdens "ChDENS.X Input Syntax" [file join $env(PWGUI) doc pwdocs INPUT_CHDENS.html]
|
$gui addHelp help chdens "ChDENS.X Input Syntax" [file join $env(PWGUI) doc pwdocs INPUT_CHDENS.html]
|
||||||
$gui addHelp help projwfc "ProjWFC.X Input Syntax" [file join $env(PWGUI) doc pwdocs INPUT_PROJWFC.html]
|
$gui addHelp help projwfc "ProjWFC.X Input Syntax" [file join $env(PWGUI) doc pwdocs INPUT_PROJWFC.html]
|
||||||
$gui addHelp help d3 "D3.X Input Syntax" [file join $env(PWGUI) doc pwdocs INPUT_D3.html]
|
$gui addHelp help d3 "D3.X Input Syntax" [file join $env(PWGUI) doc pwdocs INPUT_D3.html]
|
||||||
|
$gui addHelp help ld "LD1.X Input Syntax" [file join $env(PWGUI) doc pwdocs INPUT.html]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue