TABLE OF CONTENTS
::pwtk::deleteCoor
SYNOPSIS
proc ::pwtk::deleteCoor {deleteList coor} {
PURPOSE
Delete requested atoms from the supplied coordinates.
ARGUMENTS
- deleteList -- list of indices of atoms to delete; index of the first atom is 1 (list of atoms can also have a symbolic compact syntax supported by ::pwtk::parseRangeString)
- coor -- atomic coordinates in the form "AtmSymb x y z"
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 }