QM/MM documentation in user guide
[namd.git] / lib / qmmm / saveDipole.sh
1 #!/bin/bash
2
3 targDir=`dirname "$1"`
4 ID=`basename "$targDir"`
5
6 echo "Input file: $1"
7 echo "Target Dir: $targDir"
8 echo "Target ID: $ID"
9
10 dp=`cat $1.TmpOut | grep "Total Dipole Moment" | sed -e 's/ \{1,\}/,/g' -e 's/^.*:,\(.*\)/\1/'`
11 echo "Dipole moment: $dp"
12
13 if [ ! -f "/home/melomcr/Research/NAMD_QMMM/TestSystem/dipoleMoments_$ID.csv" ] ; then
14 echo "x,y,z" > /home/melomcr/Research/NAMD_QMMM/TestSystem/dipoleMoments_$ID.csv
15 fi
16
17 echo "$dp" >> /home/melomcr/Research/NAMD_QMMM/TestSystem/dipoleMoments_$ID.csv