Conf: Difference between revisions
No edit summary |
No edit summary |
||
| Line 22: | Line 22: | ||
rm -f 'conf'$num | rm -f 'conf'$num | ||
rm -f nat | rm -f nat | ||
rm -f ene | rm -f ene | ||
Revision as of 09:40, 30 September 2009
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){;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;getline;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