-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathgcif_to_mol2
executable file
·43 lines (35 loc) · 1023 Bytes
/
gcif_to_mol2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
filename=$1
res=${filename:5:3}
echo "Residue $res"
if [ -f "$res.mol2" ]; then
# skip modification date check, since Nigel's changes are not key here
# if [ "$filename" -ot "$res.mol2" ]; then
echo " already done: skipping"
exit 0
# fi
fi
# Check if PBEh-3c method was used:
egrep '(PBEh-3c|def2-TZVP)' $filename > /dev/null
status=$?
if [ "$status" != 0 ]; then
echo " does not use PBEh-3c or def2-TZVP"
exit 0
fi
# Check for fullerenes
grep fullerene $filename > /dev/null
status=$?
if [ "$status" == 0 ]; then
echo " contains fullerene"
exit 0
fi
# N.B.: right now (Nov. 22) one needs to be on the "geostd" branch for
# this to work.
$AMBERHOME/bin/antechamber -i $filename -fi ccif -o $res.mol2 -fo mol2 \
-bk comp_$res -s 0 -dr no \
-at gaff2 -c abcg2 -ek 'qm_theory="AM1", maxcyc=0, ndiis_attempts=700,'
status=$?
if [ "$status" == 0 ]; then
$AMBERHOME/bin/parmchk2 -s 2 -i $res.mol2 -f mol2 -o $res.frcmod
fi
/bin/rm -f ANTECH* ATOMTYP* sqm.*