#!/bin/ksh # Script to grab the atomic coordinates for all atoms of a certain atomic type # (independent of symmetry considerations). if [ $# -ne 1 ]; then echo "Usage: lmchg [type]" exit 2 else atom=$1 shift 1 fi grep "ATOM=$atom" CTRL | grep "POS" | sed 's/=/\ /g' | sed 's/SITE/\ /g' | awk '{printf "%s %12.8f %12.8f %12.8f \n", " ATOM='$atom' POS=", $4, $5, $6}' exit 0