forked from yoann-dufresne/Smiles2Monomers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
174 lines (140 loc) · 4.92 KB
/
build.xml
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Smiles2Monomers" default="compile" basedir=".">
<property name="lib.home" value="${basedir}/lib"/>
<property name="build.home" value="${basedir}/build"/>
<property name="src.home" value="${basedir}/src"/>
<property name="tests.home" value="${basedir}/tests"/>
<property name="reports.home" value="${build.home}/reports"/>
<property name="exec.monomers" value="data/monomers.json"/>
<property name="exec.learning" value="data/learning.json"/>
<property name="exec.polymers" value="data/polymers.json"/>
<property name="exec.rules" value="data/rules.json"/>
<property name="exec.residues" value="data/residues.json"/>
<property name="exec.chains" value="data/chains.json"/>
<property name="jarfile" value="${build.home}/s2m.jar"/>
<property name="exec.blocSize" value="2"/>
<property name="exec.outfolder" value="${build.home}/results" />
<path id="compile.classpath">
<fileset dir="${build.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="exec.classpath">
<fileset dir="${build.home}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${build.home}">
<include name="s2m.jar"/>
</fileset>
</path>
<target name="clean" description="Delete old build and dist directories">
<delete dir="${build.home}"/>
</target>
<target name="prepare" depends="clean">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/classes"/>
<mkdir dir="${build.home}/tests"/>
<mkdir dir="${build.home}/reports"/>
<mkdir dir="${build.home}/lib"/>
<mkdir dir="${exec.outfolder}"/>
</target>
<target name="copy" depends="prepare">
<copy file="${lib.home}/hamcrest-core.jar" tofile="${build.home}/lib/hamcrest-core.jar"/>
<copy file="${lib.home}/junit.jar" tofile="${build.home}/lib/junit.jar"/>
<copy file="${lib.home}/libtw.jar" tofile="${build.home}/lib/libtw.jar"/>
<copy file="${lib.home}/cdk-1.4.19.jar" tofile="${build.home}/lib/cdk.jar"/>
<copy file="${lib.home}/json-simple-1.1.1.jar" tofile="${build.home}/lib/json.jar"/>
<copy file="${lib.home}/xerces.jar" tofile="${build.home}/lib/xerces.jar"/>
</target>
<target name="compile" depends="copy">
<javac srcdir="${src.home}" destdir="${build.home}/classes" deprecation="true" includeAntRuntime="no">
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="translateSmiles" depends="">
<java classname="main.PeptidesToCanonicalSmiles" failonerror="true" fork="true">
<arg value="${file}" />
<classpath refid="exec.classpath"/>
</java>
</target>
<target name="preCompute" depends="">
<java classname="main.PreComputation" failonerror="true">
<jvmarg value="-Xmx4G"/>
<arg value="-mono" />
<arg value="${exec.monomers}" />
<arg value="-rul" />
<arg value="${exec.rules}" />
<arg value="-res" />
<arg value="${exec.residues}" />
<arg value="-poly" />
<arg value="${exec.learning}" />
<arg value="-cha" />
<arg value="${exec.chains}" />
<arg value="-markovian" />
<arg value="${exec.blocSize}" />
<!--arg value="-v" /-->
<classpath refid="exec.classpath"/>
</java>
</target>
<target name="s2m" depends="">
<java classname="main.ProcessPolymers" failonerror="true">
<arg value="-mono" />
<arg value="${exec.monomers}" />
<arg value="-rul" />
<arg value="${exec.rules}" />
<arg value="-res" />
<arg value="${exec.residues}" />
<arg value="-poly" />
<arg value="${exec.polymers}" />
<arg value="-cha" />
<arg value="${exec.chains}" />
<arg value="-html" />
<arg value="-outfolder" />
<arg value="${exec.outfolder}" />
<arg value="-v" />
<classpath refid="exec.classpath"/>
</java>
</target>
<target name="tests_compile" depends="" >
<javac srcdir="${tests.home}" destdir="${build.home}/tests" includeantruntime="false">
<classpath>
<fileset dir="${build.home}/lib">
<include name="*.jar" />
</fileset>
<pathelement path="${build.home}/classes" />
</classpath>
<include name="**/*.java"/>
</javac>
</target>
<target name="tests" depends="compile, tests_compile" description="Run JUnits tests to verify program integrity">
<junit printsummary="true" haltonfailure="false">
<classpath>
<fileset dir="${build.home}/lib">
<include name="*.jar" />
</fileset>
<pathelement path="${build.home}/tests" />
<pathelement path="${build.home}/classes" />
</classpath>
<assertions>
<enable/>
</assertions>
<formatter type="xml" usefile="true"/>
<batchtest>
<fileset dir="${build.home}/tests">
<include name="**/*Test*" />
</fileset>
</batchtest>
</junit>
<move todir="${reports.home}">
<fileset dir="${basedir}">
<include name="TEST-*.xml"/>
</fileset>
</move>
</target>
<target name="create_jar" description="Create executble jar from sourcefiles">
<jar destfile="${build.home}/s2m.jar"
basedir="${build.home}/classes"
includes="**/*.class">
</jar>
</target>
</project>