-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
123 lines (93 loc) · 2.91 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Makefile
###############################################
# This is the Makefile that goes with #
# `configure.pl`, which uses Perl's Template #
# Toolkit (very similar to Liquid) #
###############################################
# Executables
OPENBABEL := babel
PKM_PACKMOL := packmol
GMX_MDRUN := gmx_d mdrun
TNK_DYNAMIC := dynamic
TNK_MINIMIZE := minimize
# The name of the configure file to do the work
CONFIGURE := ./configure.pl
###############################################
# This block contains all of the parameters #
# needed to build the initial snapshots; the #
# prefix denotes the program the variables #
# pertain to. The prefixes PKM, GMX, and TNK #
# correspond to Packmol, GROMACS, and Tinker, #
# respectively. #
###############################################
MOLNAMES := kaA kaB
PREFIX := 01
SUFFIX := 001
PKM_INPFILE := packmol-pos.inp
PKM_TARGETS := $(PKM_INPFILE)
GMX_ITPFILES := $(addsuffix .itp, $(MOLNAMES))
GMX_TOPFILE := topol.top
GMX_PTLFILES := $(GMX_ITPFILES) $(GMX_TOPFILE)
GMX_MDPFILE := step-min.mdp step-pre.mdp step-run.mdp
GMX_CONFIN := confin.gro
GMX_CONFIN_BOX := confin-box.gro
GMX_TARGETS := $(GMX_CONFIN) $(GMX_MDPFILE) \
$(GMX_PTLFILES) $(GMX_CONFIN_BOX)
TNK_KEYFILE := keyfile.key
TNK_PRMFILE := output.prm
#TNK_PRMFILE := prmfile.prm
TNK_PTLFILES := $(TNK_KEYFILE) $(TNK_PRMFILE)
TNK_CONFIN := confin.xyz
TNK_TARGETS := $(TNK_CONFIN) $(TNK_PTLFILES)
#TNK_TARGETS := $(TNK_PTLFILES) $(PKM_INPFILE)
# Include macros here
define newline
endef
define TNK_PRMHEADER =
##############################
# This Tinker parameter file #
# was generated by topsect #
##############################
forcefield OPLS-AA/L
vdwtype LENNARD-JONES
radiusrule GEOMETRIC
radiussize DIAMETER
radiustype SIGMA
epsilonrule GEOMETRIC
torsionunit 0.5
imptorunit 0.5
vdw-14-scale 2.0
chg-14-scale 2.0
endef
.PHONY: check clean header
%: %.tt
$(CONFIGURE) $<
all: $(GMX_TARGETS) $(TNK_TARGETS)
header.tmp:
@echo '$(subst $(newline),\n,${TNK_PRMHEADER})' >$@
output.prm: topol.top
./runtopsect
confin.pdb: $(PKM_TARGETS)
$(PKM_PACKMOL) <$(PKM_INPFILE)
$(TNK_CONFIN): confin.pdb
$(OPENBABEL) -ipdb $< -otxyz $@.temp
sed -r -e '2,6401s/0$$$$/1/g' -e '6402,8001s/0$$$$/2/g' $@.temp >$@
$(GMX_CONFIN): confin.pdb
$(OPENBABEL) -ipdb $< -ogro $@
$(GMX_CONFIN_BOX): confin.gro fixbox
bash ./fixbox
$(TNK_PRMFILE): header.tmp
$(GMX_TARGETS): $(PKM_TARGETS)
$(TNK_TARGETS): $(PKM_TARGETS)
clean:
rm -rf output.log $(GMX_TARGETS) $(TNK_TARGETS) $(PKM_TARGETS) confin.pdb header.tmp confin.xyz.temp fixbox
very-clean:
make clean
rm -f out.log topol.tpr traj.trr mdout.mdp md.log ener.edr confout.gro state.cpt state_prev.cpt \#*
check:
@echo "Parameters:"
@echo "Gromacs Targets:"
@echo $(GMX_TARGETS)
@echo "Tinker Targets:"
@echo $(TNK_TARGETS)
# vim: tw=65:ts=4:sts=4:sw=4:sta