Conf: Difference between revisions

From Wiki
Jump to navigation Jump to search
New page: #! /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...
 
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
go back to [[Main Page]], [[Computational Resources]], [[Scripts]], [[Macromodel_to_gaussian]]


#! /bin/csh -f
 
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.
----
 
<nowiki>#! /bin/csh -f</nowiki>


set num = $1
set num = $1
set name = $2
set name = $2
awk -v a=$num '{;if($1 == a ){ print $2};}' < list > ene
awk -v a=$num '{;if($1 == a ){ print $2};}' < list > ene


Line 9: Line 17:


set natom = `cat nat`
set natom = `cat nat`
set ene_a = `cat ene`
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 -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'
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

Latest revision as of 11:32, 28 January 2010

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