#!/bin/bash

mkdir scan2

for dihedral in {0..39} ;do
   
  #specify the .mol file here and the atoms between which the dihedral angle is defined
  #I use a step size of 9 degrees per scan

 "$AMSBIN/amsprep" -t GO -m PyrDMA-frag.mol -dihed "8 16 44 19 $((9*dihedral))"> "PyrDMA.txt"
  
  mkdir scan2/angle"("$dihedral")"
  mv PyrDMA.txt scan2/angle"("$dihedral")"/coordfrag.txt

done


