forked from pupubear007/primarydock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·155 lines (119 loc) · 6.24 KB
/
makefile
File metadata and controls
executable file
·155 lines (119 loc) · 6.24 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
OBJDIR=obj
BINDIR=bin
OUTDIR=output
SDFDIR=sdf
DIRS=$(OBJDIR) $(BINDIR) $(OUTDIR) $(SDFDIR)
OBJS=$(OBJDIR)/misc.o $(OBJDIR)/point.o $(OBJDIR)/atom.o $(OBJDIR)/intera.o $(OBJDIR)/molecule.o $(OBJDIR)/aminoacid.o $(OBJDIR)/protein.o
TESTS=test/point_test test/atom_test test/molecule_test test/pi_stack_test test/mol_assem_test test/amino_test test/aniso_test test/protein_test test/backbone_test
APPS=$(BINDIR)/primarydock $(BINDIR)/pepteditor
REPORTS=amino_report atom_report aniso_report point_report molecule_report mol_assem_report protein_report
all: $(DIRS) \
$(OBJS) \
$(TESTS) \
$(APPS) \
$(REPORTS)
code: $(OBJS) $(TESTS) molecule_report $(APPS)
primarydock: $(DIRS) $(OBJS) $(BINDIR)/primarydock
pepteditor: $(DIRS) $(OBJS) $(BINDIR)/pepteditor
CC=g++
# Default CFLAG - no code coverage
CFLAGS=-g -Wwrite-strings -fextended-identifiers -std=c++14
# For code coverage instrumentation, switch to these CFLAGS (slower performance):
#CFLAGS=-g -Wwrite-strings -fextended-identifiers -std=c++14 -fprofile-arcs -ftest-coverage
clean:
rm $(OBJDIR)/*.o *.gcov *.gcno *.gcda
$(OBJDIR):
if [ ! -f $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi
$(BINDIR):
if [ ! -f $(BINDIR) ]; then mkdir -p $(BINDIR); fi
$(OUTDIR):
if [ ! -f $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi
$(SDFDIR):
if [ ! -f $(SDFDIR) ]; then mkdir -p $(SDFDIR); fi
$(OBJDIR)/misc.o: src/classes/misc.h src/classes/misc.cpp src/classes/constants.h
$(CC) -c src/classes/misc.cpp -o $(OBJDIR)/misc.o $(CFLAGS)
$(OBJDIR)/point.o: src/classes/point.h src/classes/point.cpp $(OBJDIR)/misc.o src/classes/constants.h
$(CC) -c src/classes/point.cpp -o $(OBJDIR)/point.o $(CFLAGS)
$(OBJDIR)/atom.o: src/classes/atom.h src/classes/atom.cpp $(OBJDIR)/point.o
$(CC) -c src/classes/atom.cpp -o $(OBJDIR)/atom.o $(CFLAGS)
$(OBJDIR)/intera.o: src/classes/intera.h src/classes/intera.cpp $(OBJDIR)/atom.o
$(CC) -c src/classes/intera.cpp -o $(OBJDIR)/intera.o $(CFLAGS)
$(OBJDIR)/molecule.o: src/classes/molecule.h src/classes/molecule.cpp $(OBJDIR)/intera.o
$(CC) -c src/classes/molecule.cpp -o $(OBJDIR)/molecule.o $(CFLAGS)
$(OBJDIR)/aminoacid.o: src/classes/aminoacid.h src/classes/aminoacid.cpp $(OBJDIR)/molecule.o
$(CC) -c src/classes/aminoacid.cpp -o $(OBJDIR)/aminoacid.o $(CFLAGS)
$(OBJDIR)/protein.o: src/classes/protein.h src/classes/protein.cpp $(OBJDIR)/aminoacid.o
$(CC) -c src/classes/protein.cpp -o $(OBJDIR)/protein.o $(CFLAGS)
test/point_test: src/point_test.cpp $(OBJDIR)/point.o
$(CC) src/point_test.cpp $(OBJDIR)/point.o $(OBJDIR)/misc.o -o test/point_test $(CFLAGS)
test/atom_test: src/atom_test.cpp $(OBJDIR)/point.o $(OBJDIR)/atom.o
$(CC) src/atom_test.cpp $(OBJDIR)/misc.o $(OBJDIR)/atom.o $(OBJDIR)/point.o -o test/atom_test $(CFLAGS)
test/molecule_test: src/molecule_test.cpp $(OBJS)
$(CC) src/molecule_test.cpp $(OBJS) -o test/molecule_test $(CFLAGS)
test/pi_stack_test: src/pi_stack_test.cpp $(OBJS)
$(CC) src/pi_stack_test.cpp $(OBJS) -o test/pi_stack_test $(CFLAGS)
test/aniso_test: src/aniso_test.cpp $(OBJS)
$(CC) src/aniso_test.cpp $(OBJS) -o test/aniso_test $(CFLAGS)
test/mol_assem_test: src/mol_assem_test.cpp $(OBJS)
$(CC) src/mol_assem_test.cpp $(OBJS) -o test/mol_assem_test $(CFLAGS)
test/amino_test: src/amino_test.cpp $(OBJS) $(OBJDIR)/aminoacid.o
$(CC) src/amino_test.cpp $(OBJS) -o test/amino_test $(CFLAGS)
test/protein_test: src/protein_test.cpp $(OBJS) $(OBJDIR)/aminoacid.o $(OBJDIR)/protein.o
$(CC) src/protein_test.cpp $(OBJS) -o test/protein_test $(CFLAGS)
test/backbone_test: src/backbone_test.cpp $(OBJS) $(OBJDIR)/aminoacid.o $(OBJDIR)/protein.o
$(CC) src/backbone_test.cpp $(OBJS) -o test/backbone_test $(CFLAGS)
$(BINDIR)/primarydock: src/primarydock.cpp $(OBJS) $(OBJDIR)/aminoacid.o $(OBJDIR)/protein.o
$(CC) src/primarydock.cpp $(OBJS) -o $(BINDIR)/primarydock $(CFLAGS)
$(BINDIR)/pepteditor: src/interpreter.cpp $(OBJS) $(OBJDIR)/aminoacid.o $(OBJDIR)/protein.o
$(CC) src/interpreter.cpp $(OBJS) -o $(BINDIR)/pepteditor $(CFLAGS)
performance_test: $(BINDIR)/primarydock testdata/test_TAAR8.config testdata/TAAR8.upright.pdb testdata/CAD_ion.sdf
./$(BINDIR)/primarydock testdata/test_TAAR8.config
# low-tooling regression tests below
amino_report: REPORT="test/amino_test.approved.txt"
amino_report: test/amino_test
bash src/amino_tests.bash ARNDCEQGHILKMFPUSTWYV
atom_report: REPORT="test/atom_test.approved.txt"
atom_report: test/atom_test
./test/atom_test H >test/atom_test.received.txt
diff --color --unified $(REPORT) test/atom_test.received.txt
aniso_report: REPORT="test/aniso_test.approved.txt"
aniso_report: test/aniso_test
./test/aniso_test >test/aniso_test.received.txt
diff --color --unified $(REPORT) test/aniso_test.received.txt
point_report: REPORT="test/point_test.approved.txt"
point_report: test/point_test
./test/point_test >test/point_test.received.txt
diff --color --unified $(REPORT) test/point_test.received.txt
molecule_report: REPORT="test/molecule_test1.approved.txt"
molecule_report: test/molecule_test
./test/molecule_test 'c1ccccc1' 'c1ccccc1' | tee temp | sed '/^#/d' >test/molecule_test1.received.txt; cat temp # ignore lines starting with #
diff --color --unified $(REPORT) test/molecule_test1.received.txt
mol_assem_report: REPORT="test/mol_assem_test.approved.txt"
mol_assem_report: test/mol_assem_test
bash ./test/mol_assem_tests.sh # these must be checked visually.
./test/mol_assem_test >test/molecule_test.received.txt
echo "Content of test.sdf:" >> test/molecule_test.received.txt
sed '2d' test.sdf >> test/molecule_test.received.txt # remove line 2 (date stamp)
diff --color --unified $(REPORT) test/molecule_test.received.txt
protein_report: REPORT="test/protein_test.approved.txt"
protein_report: test/protein_test
./test/protein_test AAAAAAAAAA >$(REPORT)
# Straight Strand PDB.
echo "Content of test.pdb:" >> $(REPORT)
cat test.pdb >> $(REPORT)
# Alpha helix PDB.
echo "Content of test_alpha.pdb:" >> $(REPORT)
cat test_alpha.pdb >> $(REPORT)
# Beta pleated PDB.
echo "Content of test_beta.pdb:" >> $(REPORT)
cat test_beta.pdb >> $(REPORT)
# 3.10 helix PDB.
echo "Content of test_310.pdb:" >> $(REPORT)
cat test_310.pdb >> $(REPORT)
# Pi helix PDB.
echo "Content of test_pi.pdb:" >> $(REPORT)
cat test_pi.pdb >> $(REPORT)
# SDF of most recent PDB.
echo "Content of test2.sdf:" >> $(REPORT)
sed '2d' test2.sdf >> $(REPORT)
reports: $(REPORTS)