Conf
go back to Main Page, Computational Resources, Scripts, Macromodel_to_gaussian
This is a cshell and AWK script.
It is called by another script called makeconf. It does cut the geometries from a Macromodel conformation search.
#! /bin/csh -f
set num = $1 set name = $2
awk -v a=$num '{;if($1 == a ){ print $2};}' < list > ene
awk '{;if($9 =="X"){a = $1;};};END{print a}' < $name'.mae' > nat
set natom = `cat nat` set ene_a = `cat ene`
awk -v a=$ene_a -v b=$natom '{;if($1 == a){;n = 0;{;while( n <= 2){;getline;if($1 == ":::"){; m = n+1; n=m;};};getline;{for(n = 1; n <= b; n++){;print $0;getline;};};};};}' < $name'.mae' > 'conf'$num
awk '{a = $2; b = $3; c = $4; getline <"conf1"; d = $1; print d,a,b,c}' < 'conf'$num > $name'_conf'$num'.coord'
rm -f 'conf'$num
rm -f nat
rm -f ene