Skip to content

Commit 1af8c2c

Browse files
committed
Reduce benchmark log verbosity and update output format
Downgrade unbalanced-reaction balance check from WARN to DEBUG in StandardizeReaction — these are expected in real-world datasets and handled gracefully; WARN level floods logs when processing large batches. Benchmark test: reduce progress interval to every 500 reactions, update version string to v3.8.1, and restructure comparison table to lead with chemically-equivalent metric for fair cross-tool comparison.
1 parent 16e68ae commit 1af8c2c

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/main/java/com/bioinceptionlabs/reactionblast/tools/StandardizeReaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private void checkAtomBalance(IReaction reaction) {
203203
Map<String, Integer> productAtoms = countAtoms(reaction.getProducts());
204204

205205
if (!reactantAtoms.equals(productAtoms)) {
206-
LOGGER.warn("Reaction " + reaction.getID() + " may be unbalanced: "
206+
LOGGER.debug("Reaction " + reaction.getID() + " may be unbalanced: "
207207
+ "reactants=" + reactantAtoms + " products=" + productAtoms);
208208
}
209209
}

src/test/java/com/bioinceptionlabs/aamtool/GoldenDatasetBenchmarkTest.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public void benchmarkGoldenDataset() throws Exception {
272272
errors++;
273273
}
274274

275-
if ((i + 1) % 100 == 0) {
275+
if ((i + 1) % 500 == 0 || (i + 1) == limit) {
276276
long elapsed = System.currentTimeMillis() - startTime;
277277
double rate = (i + 1) * 1000.0 / elapsed;
278278
System.out.printf(" Progress: %d/%d (%.1f rxn/sec, %d errors, %d mol-exact, %d atom-exact, %d alt-valid, %d chem-miss)%n",
@@ -290,7 +290,7 @@ public void benchmarkGoldenDataset() throws Exception {
290290
double chemistryEquivalentPct = pct_d(chemistryEquivalent, total);
291291

292292
System.out.println();
293-
System.out.println("=== Golden Dataset Benchmark Results (RDT v3.8.0) ===");
293+
System.out.println("=== Golden Dataset Benchmark Results (RDT v3.8.1) ===");
294294
System.out.println("Total reactions: " + total);
295295
System.out.println();
296296
System.out.println("--- Core Metrics ---");
@@ -348,13 +348,15 @@ public void benchmarkGoldenDataset() throws Exception {
348348
total == 0 ? 0.0 : (double) totalEvaluationPhaseMs / total));
349349
System.out.println();
350350
System.out.println("=== Comparison with Published Results (Lin et al. 2022) ===");
351-
System.out.println("| Tool | Exact Match | Atom Acc. | Bond Acc. | Training | Deterministic |");
351+
System.out.println("Scoring: chemically-equivalent bond changes (fair comparison across all tools)");
352+
System.out.println("| Tool | Chem-Equiv | Mol-Map | Atom-Map | Training | Deterministic |");
352353
System.out.println("|--------------------|-------------|-----------|-----------|----------|---------------|");
353-
System.out.println("| RXNMapper | 83.74% | - | - | Unsup. | No |");
354-
System.out.println("| RDTool (published) | 76.18% | - | - | None | Yes |");
355-
System.out.println("| ChemAxon | 70.45% | - | - | Propr. | Yes |");
356-
System.out.printf("| RDT v3.8.0 | %.1f%% | %.1f%% | %.1f%% | None | Yes |%n",
357-
pct_d(exactAtomMatch, total), atomAccuracy, pct_d(bondChangeExact, total));
354+
System.out.println("| RXNMapper | 83.74%† | - | - | Unsup. | No |");
355+
System.out.println("| RDTool (published) | 76.18%† | - | - | None | Yes |");
356+
System.out.println("| ChemAxon | 70.45%† | - | - | Propr. | Yes |");
357+
System.out.printf("| RDT v3.8.1 | %.1f%% | %.1f%% | %.1f%% | None | Yes |%n",
358+
pct_d(chemistryEquivalent, total), pct_d(molMapExact, total), pct_d(exactAtomMatch, total));
359+
System.out.println("† Published figures from Lin et al. 2022 use chemically-equivalent scoring.");
358360

359361
assertTrue("Mapping success rate should be > 70%", success > total * 0.70);
360362
}

0 commit comments

Comments
 (0)