#! /bin/sh
# generate a run file for methane, with 1 H replaced by some ligand (run adfprep
# -liststructures to get full list of available structures) note the -a flag
# makes adfprep produce an .adf file as well, which can be opened by ADFinput to
# check your system
for ligand in CN CO CO3 NC NH2 NH2CH3 NH3 OC OCH3 OH PH3 Pyridine; do
"$ADFBIN/adfprep" -t GO -m "$ADFHOME/examples/adf/LoopAtomsLigands/methane.xyz" -structure "2 Ligands/$ligand.adf" -a methane.$ligand.adf > methane.$ligand.run
done
# similar, replace the C atom by other atoms
for atom in C Si Ge Sn Pb; do
"$ADFBIN/adfprep" -t GO -m "$ADFHOME/examples/adf/LoopAtomsLigands/methane.xyz" -atomtype "1 $atom" -a methane.$atom.adf > methane.$atom.run
done
# following part of the script is just to check that the run files have been
# generated correctly in the test enviornment
for ligand in CN CO CO3 NC NH2 NH2CH3 NH3 OC OCH3 OH PH3 Pyridine; do
cat methane.$ligand.run >> all
done
for atom in C Si Ge Sn Pb; do
cat methane.$atom.run >> all
done
DIFF=`diff -w -i -q all "$ADFHOME/examples/adf/LoopAtomsLigands/ref-all"`
echo Diff result: $DIFF
if test -z "$DIFF"; then
echo "Ligand run files are correct 0.0"
else
echo "Ligand run files differ 1.0"
fi
echo Done