TABLE OF CONTENTS
::pwtk::pwi::filterAtomicSpecies
SYNOPSIS
proc ::pwtk::pwi::filterAtomicSpecies {{atmSymbCmd_ ::pwtk::pwi::getAtmSymbList}} {
PURPOSE
Starting from QE v4.0, the pw.x aborts if unused atomic species are specified. In order to prevent that, this proc filters-out unsed species
ARGUMENTS
- atmSymbCmd_ -- [OPTIONAL] used only internally within the PWTK (to know when we are dealing with neb.x, then the atmSymbCmd_ == ::pwtk::nebi::getAtmSymbList)
RETURN VALUE
- filtered atomic species data in format to be used for ATOMIC_SPECIES
SOURCE
set content [::pwtk::input::cardGetContent ATOMIC_SPECIES] set atmSymb [lsort -unique [$atmSymbCmd_]] set result "" foreach line [split $content \n] { # skip empty lines if { [string is space $line] } { continue } if { [lindex $line 0] in $atmSymb } { lappend result $line } } return [join $result \n] }