TABLE OF CONTENTS


::pwtk::nebi::getAtmSymbList

SYNOPSIS

proc ::pwtk::nebi::getAtmSymbList {} {

PURPOSE

Get a sequential list of atomic-symbols from ATOMIC_POSITIONS card (in the same order), i.e.:

      AtmSy1
      AtmSy2
      ...

SOURCE

    set pos [::pwtk::input::cardGetContent POSITIONS]
    if { $pos == "" } {
        # if POSITIONS is empty, perhaps the old alternative syntax is used
        set pos [::pwtk::input::cardGetContent ATOMIC_POSITIONS]
    }

    set result ""
    foreach line [split $pos \n] {
        if { [string match -nocase *first_image* $line] || [regexp ATOMIC_POSITIONS $line] || [regexp TOTAL_CHARGE $line] } { 
            continue
        } elseif { [string match -nocase *intermediate_image* $line] || [string match -nocase *last_image* $line] } {
            return $result
        } else {
            if { [llength $line] >= 4 } {
                lappend result [lindex $line 0]
            }
        }
    }
    return $result
}