<commit_before><?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.peptides" value="data/peptides.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="4"/>
	
	<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>
				<pathelement location="${build.home}/lib/cdk.jar"/>
				<pathelement location="${build.home}/lib/json.jar"/>
				<pathelement path="${jarfile}" />
			</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.peptides}" />
			<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.peptides}" />
			<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="resultsToHTML" depends="">
		<java classname="main.Json2HTML" failonerror="true">
			<arg value="${exec.monomers}" />
			<arg value="${molecules}" />
			<arg value="${exec.rules}" />
			<arg value="${exec.residues}" />
			<arg value="${coverage}" />
			<arg value="-html" />
			<arg value="-v" />
		</java>
	</target>

	<target name="resultsToZip" depends="">
		<java classname="main.Json2HTML" failonerror="true">
			<arg value="${exec.monomers}" />
			<arg value="${molecules}" />
			<arg value="${exec.rules}" />
			<arg value="${exec.residues}" />
			<arg value="${coverage}" />
			<arg value="-zip" />
			<arg value="${zipFile}" />
			<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"><commit_msg>Deletion of old ant targets<commit_after><?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.peptides" value="data/peptides.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="4"/>
	
	<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>
				<pathelement location="${build.home}/lib/cdk.jar"/>
				<pathelement location="${build.home}/lib/json.jar"/>
				<pathelement path="${jarfile}" />
			</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.peptides}" />
			<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.peptides}" />
			<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">
{'fraction_non_alphanumeric': 0.23949097736518202, 'fraction_numerical': 0.003546469177010535, 'mean_word_length': 4.174311926605505, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 2, '>': 257, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7672140', 'n_tokens_mistral': 3722, 'n_tokens_neox': 3283, 'n_words': 571}