#!/bin/csh -f echo Step 1 echo make the coordinate center at "(0,0,0)", the tranlation vector is saved in echo file vector.save. The purpose of this step is to avoide the problem of big echo coordinates causing no space between two values in gaussian output, which echo makes some programs "(such as espgen)" fail. echo echo ../../../bin/translate -i nad.mol2 -f mol2 -o nad_c.mol2 -c center -a1 0 ">" vector.save  echo ../../../bin/translate -i nad.mol2 -f mol2 -o nad_c.mol2 -c center -a1 0 \ > vector.save || goto error echo Step 2 echo run antechamber to generate gaussian gcrt file echo echo ../../../bin/antechamber -i nad_c.mol2 -fi mol2 -o nad.gau -fo gcrt ">" antechamber.out echo ../../../bin/antechamber -i nad_c.mol2 -fi mol2 -o nad.gau -fo gcrt \ >& antechamber.out || goto error echo Step 3 echo run gaussian, then generate a new mol2 file "(nad_c.mol2)" from the gaussian echo output file, using the charge flag of '-resp' if ESP were printed out in the echo gaussian output file. echo echo ../../../bin/antechamber -i nad.gout -fi gout -fo mol2 -o nad_c.mol2 -c resp ">>" antechamber.out echo ../../../bin/antechamber -i nad.gout -fi gout -fo mol2 -o nad_c.mol2 -c resp \ >& antechamber.out || goto error echo Step 4 echo since the coordinates have been translated, one may translate the molecule echo back using the 'translate' program with the saved vectors or do a Least-square fitting  echo echo translate echo echo ../../../bin/translate -i nad_c.mol2 -f mol2 -o nad.mol2 -c translate -vx -45.1416 -vy -52.7378 -vz -78.7059 ">" translate.out echo ../../../bin/translate -i nad_c.mol2 -f mol2 -o nad.mol2 -c translate \ -vx -45.1416 -vy -52.7378 -vz -78.7059 >& translate.out || goto error echo lsfit echo echo ../../../bin/translate -i nad_c.mol2 -f mol2 -o nad.mol2 -c match -r nad.mol2  echo ../../../bin/translate -i nad_c.mol2 -f mol2 -o nad.mol2 -c match \ -r nad.mol2 || goto error echo echo Step 5 echo If one wants to use am1-bcc charge, skip the above steps and just run the echo following command echo  echo ../../../bin/antechamber -i nad.mol2 -fi mol2 -o nad_c.mol2 -fo mol2 -c bcc -s 2 ">>" antechamber.out echo  ../../../bin/antechamber -i nad.mol2 -fi mol2 -o nad_c.mol2 -fo mol2 \ -c bcc -s 2 >& antechamber.out || goto error echo Step 6 echo run parmchk to find missing force field parameters echo echo ../../../bin/parmchk -i nad_c.mol2 -f mol2 -o frcmod echo ../../../bin/parmchk -i nad_c.mol2 -f mol2 -o frcmod || goto error echo Step 7 echo run tleap to generate topology file echo echo ../../../bin/tleap -s -f leap.in ">" leap.out echo ../../../bin/tleap -s -f leap.in > leap.out ../../dacdif -t 1 prmtop.save prmtop ../../dacdif -t 1 prmcrd.save prmcrd ../../dacdif -t 1 frcmod.save frcmod ../../dacdif nad.mol2.save nad.mol2 /bin/rm -f ANTE* ATOMTYPE.INF BCCTYPE.INF for* FOR* NEWPDB.PDB PREP.INF mopac.in exit(0) error: echo " ${0}: Program error" exit(1)