- fix misformatted molblock and make sure unit test is actually executed (#7647)

- consolidate two neighboring if clauses into one

Co-authored-by: ptosco <paolo.tosco@novartis.com>
This commit is contained in:
Paolo Tosco
2024-07-23 08:37:44 +02:00
committed by GitHub
parent 40d4c55a39
commit a0da0b16d4
2 changed files with 22 additions and 23 deletions

View File

@@ -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);

View File

@@ -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")
);