TABLE OF CONTENTS


::pwtk::deleteCoor

SYNOPSIS

proc ::pwtk::deleteCoor {deleteList coor} {

PURPOSE

Delete requested atoms from the supplied coordinates.

ARGUMENTS

SOURCE

    set nat        [::pwtk::getNAtoms $coor]
    set coorList   [split [::pwtk::purifyCoor $coor] \n]
    set sortedList [lsort -integer -decreasing [::pwtk::parseRangeString $deleteList [::pwtk::getNAtoms $coor]]]

    set newCoor {}
    for {set ia 1} {$ia <= $nat} {incr ia} {
        if { ! ($ia in $sortedList) } {
            append newCoor [lindex $coorList $ia-1]\n
        }
    }
    return $newCoor
}