From a0da0b16d42e9d939f082f96fca768d71714cb34 Mon Sep 17 00:00:00 2001 From: Paolo Tosco Date: Tue, 23 Jul 2024 08:37:44 +0200 Subject: [PATCH] - fix misformatted molblock and make sure unit test is actually executed (#7647) - consolidate two neighboring if clauses into one Co-authored-by: ptosco --- Code/MinimalLib/common_defs.h | 2 -- Code/MinimalLib/tests/tests.js | 43 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Code/MinimalLib/common_defs.h b/Code/MinimalLib/common_defs.h index 12211a190..5af00b828 100644 --- a/Code/MinimalLib/common_defs.h +++ b/Code/MinimalLib/common_defs.h @@ -92,8 +92,6 @@ class DrawerFromDetails { origWedgingMol.reset(new ROMol(mol)); Chirality::reapplyMolBlockWedging(*origWedgingMol); molPtr = origWedgingMol.get(); - } - if (molDrawingDetails.useMolBlockWedging) { drawer().drawOptions().useMolBlockWedging = false; } drawer().setOffset(molDrawingDetails.offsetx, molDrawingDetails.offsety); diff --git a/Code/MinimalLib/tests/tests.js b/Code/MinimalLib/tests/tests.js index 44fb425ce..fdc955d5b 100644 --- a/Code/MinimalLib/tests/tests.js +++ b/Code/MinimalLib/tests/tests.js @@ -3000,28 +3000,28 @@ M END function test_get_molblock_use_molblock_wedging() { var mb = ` - RDKit 2D + RDKit 2D - 9 10 0 0 1 0 0 0 0 0999 V2000 - 1.4885 -4.5513 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 2.0405 -3.9382 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 2.8610 -4.0244 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 3.1965 -3.2707 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 3.0250 -2.4637 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 2.2045 -2.3775 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 1.7920 -1.6630 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - 1.8690 -3.1311 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 2.5834 -2.7186 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 2 1 1 1 - 2 3 1 0 - 4 3 1 0 - 4 5 1 0 - 6 5 1 0 - 6 7 1 1 - 6 8 1 0 - 8 9 1 1 - 8 2 1 0 - 4 9 1 1 + 9 10 0 0 1 0 0 0 0 0999 V2000 + 1.4885 -4.5513 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0405 -3.9382 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.8610 -4.0244 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.1965 -3.2707 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.0250 -2.4637 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2045 -2.3775 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7920 -1.6630 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 1.8690 -3.1311 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.5834 -2.7186 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2 1 1 1 + 2 3 1 0 + 4 3 1 0 + 4 5 1 0 + 6 5 1 0 + 6 7 1 1 + 6 8 1 0 + 8 9 1 1 + 8 2 1 0 + 4 9 1 1 M END `; var mol = RDKitModule.get_mol(mb); @@ -3115,6 +3115,7 @@ initRDKitModule().then(function(instance) { test_assign_cip_labels(); test_smiles_smarts_params(); test_wedged_bond_atropisomer(); + test_get_molblock_use_molblock_wedging(); waitAllTestsFinished().then(() => console.log("Tests finished successfully") );