mirror of https://gitlab.com/QEF/q-e.git
Nev version of the script to extract core-wavefunctions from
gipaw pseudopotentials. This new version extracts the core wavefunction from UPF version 1 and UPF version 2. Provided by A. Seitsonen. MCB git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6634 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
47d45bc631
commit
24637dc007
|
@ -4,6 +4,9 @@ LANG=C
|
||||||
|
|
||||||
cat $1 | awk '
|
cat $1 | awk '
|
||||||
|
|
||||||
|
|
||||||
|
#<UPF v1>
|
||||||
|
|
||||||
/Number of points in mesh/ {
|
/Number of points in mesh/ {
|
||||||
nris = $1
|
nris = $1
|
||||||
}
|
}
|
||||||
|
@ -38,6 +41,56 @@ cat $1 | awk '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#</UPF v1>
|
||||||
|
|
||||||
|
|
||||||
|
#<UPF v2>
|
||||||
|
|
||||||
|
/mesh_size=/ {
|
||||||
|
nris = $0
|
||||||
|
gsub ( "[ ]*mesh_size=\"", "", nris )
|
||||||
|
gsub ( "\"[ ]*$", "", nris )
|
||||||
|
}
|
||||||
|
|
||||||
|
/<PP_R /,/<\/PP_R>/ {
|
||||||
|
if ( $1 != "<PP_R" && $1 != "</PP_R>" ) {
|
||||||
|
for ( i = 1; i <= NF; i++ ) {
|
||||||
|
r[++val] = 1*$i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/<PP_GIPAW_CORE_ORBITAL.[0-9] / {
|
||||||
|
proj++
|
||||||
|
val_wfc = 0
|
||||||
|
}
|
||||||
|
/<PP_GIPAW_CORE_ORBITAL.[0-9]/,/<\/PP_GIPAW_CORE_ORBITAL.[0-9]>/ {
|
||||||
|
st = $1; gsub ( "[0-9]*", "", st )
|
||||||
|
# if ( index( $0, "label=" ) != 0 && index( $0, "label=\"1S\"" ) == 0 ) { next }
|
||||||
|
|
||||||
|
if ( index( $0, " n=\"" ) != 0 || index( $0, "^n=\"" ) != 0 ) {
|
||||||
|
n[proj] = $0
|
||||||
|
gsub( "[a-z0-9A-Z=_.<> \"]*n=\"", "", n[proj] )
|
||||||
|
gsub( "[\">]*$", "", n[proj] )
|
||||||
|
n[proj] = int ( n[proj] + 1e-5 )
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( index( $0, " l=\"" ) != 0 || index( $0, "l=\"" ) == 1 ) {
|
||||||
|
l[proj] = $0
|
||||||
|
gsub( "[a-z0-9A-Z=_.<> \"]*l=\"", "", l[proj] )
|
||||||
|
gsub( "[\">]*$", "", l[proj] )
|
||||||
|
l[proj] = int ( l[proj] + 1e-5 )
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( index( $0, ">" ) != 0 || index( $0, "<" ) != 0 ) { next }
|
||||||
|
for ( i = 1; i <= NF; i++ ) {
|
||||||
|
f[++val_wfc,proj] = $i
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#</UPF v2>
|
||||||
|
|
||||||
|
|
||||||
END {
|
END {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue