Conf: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
go back to [[Main Page]], [[Computational Resources]], [[Scripts]], [[Macromodel_to_gaussian]] | go back to [[Main Page]], [[Computational Resources]], [[Scripts]], [[Macromodel_to_gaussian]] | ||
This is a bash and AWK script, that is called by another script called [[makeconf]]. It does cut the geometries from a Macromodel conformation search. | |||
---- | ---- | ||
Revision as of 08:46, 30 September 2009
go back to Main Page, Computational Resources, Scripts, Macromodel_to_gaussian
This is a bash and AWK script, that 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'