I have a protein files (3B7V) and need to find the binding energy between it's two chains. I build PQR files for each then calculate their energy. Minus them to the total energy we get the binding energy.
Here my script in Bash.
#!/bin/bashTurn back in 5 minutes. I don't think posting this blog is sooooooooooooooooo smart. I just, oops, delete my script. LOL
rm Energy.txt
cd APBS
for i in A B 3B7V
do
cd $i
E=$(sed -n '/Global/p' log$i | awk '{print $6}')
Erray=$(python -c "print float('$E')")
echo $i = $Erray kJ/mol$'\n' >> ../../Energy.txt
A[j]=$Erray;
let j=j+1
cd .. #at APBS folder
done
cd ..
Esum=`echo "${A[2]} - ${A[1]} - ${A[0]}" | bc`
echo Energy binding$'\n'$Esum >> Energy.txt
cat Energy.txt