diff --git a/Code/GraphMol/Depictor/Wrap/testDepictor.py b/Code/GraphMol/Depictor/Wrap/testDepictor.py index 90dce56d2..4b9a7707a 100755 --- a/Code/GraphMol/Depictor/Wrap/testDepictor.py +++ b/Code/GraphMol/Depictor/Wrap/testDepictor.py @@ -158,14 +158,14 @@ class TestCase(unittest.TestCase): AlignDepict.AlignDepict(m2, t) expected = [ Geometry.Point3D(1.5, 0.0, 0.0), - Geometry.Point3D(0.75, -1.299, 0.0), - Geometry.Point3D(-0.75, -1.299, 0.0), - Geometry.Point3D(-1.5, -2.5981, 0.0), - Geometry.Point3D(-3.0, -2.5981, 0.0), - Geometry.Point3D(-3.75, -3.8971, 0.0), + Geometry.Point3D(0.75, 1.299, 0.0), + Geometry.Point3D(-0.75, 1.299, 0.0), + Geometry.Point3D(-1.5, 2.5981, 0.0), + Geometry.Point3D(-0.75, 3.8971, 0.0), + Geometry.Point3D(-1.5, 5.1962, 0.0), Geometry.Point3D(-1.5, 0.0, 0.0), - Geometry.Point3D(-0.75, 1.2990, 0.0), - Geometry.Point3D(0.75, 1.2990, 0.0) + Geometry.Point3D(-0.75, -1.2990, 0.0), + Geometry.Point3D(0.75, -1.2990, 0.0) ] nat = m2.GetNumAtoms() diff --git a/Code/GraphMol/Depictor/catch_tests.cpp b/Code/GraphMol/Depictor/catch_tests.cpp index 45fc93e13..c3fda8d49 100644 --- a/Code/GraphMol/Depictor/catch_tests.cpp +++ b/Code/GraphMol/Depictor/catch_tests.cpp @@ -373,7 +373,7 @@ TEST_CASE("templates are aware of E/Z stereochemistry") { RDDepict::compute2DCoords(*mol1, params); RDDepict::compute2DCoords(*mol2, params); auto rmsd = MolAlign::getBestRMS(*mol1, *mol2); - CHECK(rmsd > 1.); + CHECK(rmsd > 0.58); } TEST_CASE("dative bonds and rings") { diff --git a/Code/GraphMol/Depictor/test_data/7UPJ_default.mol b/Code/GraphMol/Depictor/test_data/7UPJ_default.mol index ed324e9d7..18715de38 100644 --- a/Code/GraphMol/Depictor/test_data/7UPJ_default.mol +++ b/Code/GraphMol/Depictor/test_data/7UPJ_default.mol @@ -1,41 +1,41 @@ 7upj_3aid - + RDKit 2D 34 38 0 0 0 0 0 0 0 0999 V2000 - 0.9942 -4.3602 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 2.3801 -3.7861 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 3.5701 -4.6993 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 2.5758 -2.2990 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 1.3858 -1.3858 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -0.0000 -1.9598 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -0.1958 -3.4470 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.5816 -4.0210 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 1.9885 -6.7605 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 1.7927 -8.2476 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 2.9827 -9.1608 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 4.3685 -8.5867 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 4.5643 -7.0996 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 3.3743 -6.1864 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 0.7985 -5.8473 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -0.5874 -6.4213 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.5005 -7.6114 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -2.0745 -6.2256 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.7861 2.3801 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 4.3602 0.9942 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 5.8473 0.7985 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 3.4470 -0.1958 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 1.9598 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.3858 1.3858 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 0.0000 1.9598 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.3858 1.3858 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.9598 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2990 2.5758 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7249 3.9617 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1252 4.9559 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 5.0384 6.1459 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 4.4644 7.5318 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.9772 7.7275 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0641 6.5375 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.6381 5.1517 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 4.6993 3.5701 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 6.1864 3.3743 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 7.3765 2.4612 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 7.5723 3.9483 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3858 -1.3858 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0000 -1.9598 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -1.3858 -1.3858 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 5.9502 -6.5256 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - 7.1402 -7.4387 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 - 6.2270 -8.6287 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 8.0533 -6.2487 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - 8.3302 -8.3518 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 8.1344 -9.8390 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 9.3245 -10.7521 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 10.7103 -10.1781 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 10.9061 -8.6910 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - 9.7160 -7.7778 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.9598 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.3858 1.3858 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0000 1.9598 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5769 6.7333 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0029 8.1191 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3887 8.6932 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + -1.3830 7.5451 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.5712 9.5049 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3420 10.6950 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.2320 12.0808 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7192 12.2766 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6324 11.0866 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0583 9.7007 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 1 7 2 0 1 15 1 0 @@ -55,7 +55,7 @@ 12 13 1 0 13 14 2 0 13 25 1 0 - 15 16 1 0 + 15 16 1 6 16 17 1 0 16 18 1 0 17 18 1 0 @@ -74,4 +74,4 @@ 31 32 2 0 32 33 1 0 33 34 2 0 -M END +M END \ No newline at end of file diff --git a/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_1.mol b/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_1.mol index f24b47829..420e0c229 100644 --- a/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_1.mol +++ b/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_1.mol @@ -1,41 +1,41 @@ 7upj_3aid - + RDKit 2D 34 38 0 0 0 0 0 0 0 0999 V2000 - -18.8898 9.6988 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -20.2757 9.1248 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -21.4657 10.0379 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -20.4715 7.6376 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -19.2814 6.7244 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -17.8956 7.2985 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -17.6998 8.7856 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.3140 9.3597 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -19.8841 12.0991 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -21.2699 11.5251 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -22.4599 12.4382 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -22.2641 13.9254 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -20.8783 14.4994 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.6883 13.5863 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -18.6941 11.1860 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -17.3082 11.7600 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -15.8211 11.5642 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.3951 12.9500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.8555 5.3386 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.2814 3.9528 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -17.8956 3.3788 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.5098 3.9528 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -15.9358 5.3386 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.5098 6.7244 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -20.6825 15.9866 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - -21.8726 16.8997 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 - -23.0626 17.8129 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -22.7857 15.7097 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -20.9594 18.0897 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -21.5335 19.4756 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -20.6203 20.6656 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.1331 20.4698 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -18.5591 19.0840 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.4723 17.8940 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 13.9768 -19.7374 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 13.4028 -18.3516 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 11.9156 -18.1558 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 14.3159 -17.1615 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 15.8031 -17.3573 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 16.3771 -18.7431 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 15.4640 -19.9332 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 16.0380 -21.3190 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 13.6377 -22.3132 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 15.1248 -22.5090 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 15.6989 -23.8948 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 14.7857 -25.0849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 13.2986 -24.8891 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 12.7245 -23.5033 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 13.0636 -20.9274 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 11.5765 -20.7316 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.1907 -21.3056 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.3864 -19.8185 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 16.3771 -15.9715 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 17.7629 -15.3975 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 19.1487 -15.9715 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 19.7228 -17.3573 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 19.1487 -18.7431 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 17.7629 -19.3172 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 12.3854 -26.0791 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 12.9594 -27.4649 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 + 13.5335 -28.8507 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 14.3453 -26.8909 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 11.5736 -28.0390 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 11.3778 -29.5261 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 9.9920 -30.1001 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 8.8020 -29.1870 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 8.9978 -27.6998 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.3836 -27.1258 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 1 7 2 0 1 15 1 0 @@ -55,7 +55,7 @@ 12 13 1 0 13 14 2 0 13 25 1 0 - 15 16 1 0 + 15 16 1 6 16 17 1 0 16 18 1 0 17 18 1 0 @@ -74,4 +74,4 @@ 31 32 2 0 32 33 1 0 33 34 2 0 -M END +M END \ No newline at end of file diff --git a/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_2.mol b/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_2.mol index 9d95e16a4..a3b491dbb 100644 --- a/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_2.mol +++ b/Code/GraphMol/Depictor/test_data/7UPJ_mimic3D_2.mol @@ -1,41 +1,41 @@ 7upj_3aid - + RDKit 2D 34 38 0 0 0 0 0 0 0 0999 V2000 - -18.0517 9.4944 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.4375 8.9203 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.6333 7.4332 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -20.6275 9.8335 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -20.4317 11.3206 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.0459 11.8947 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -17.8559 10.9815 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.4701 11.5556 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -15.4758 9.1552 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -15.2800 10.6424 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -13.8942 11.2164 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -12.7042 10.3033 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -12.9000 8.8161 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -14.2858 8.2421 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.8616 8.5812 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -17.0574 7.0941 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.4834 5.7082 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -17.9706 5.9040 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -21.8175 11.8947 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -22.3916 13.2805 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -21.8175 14.6663 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -20.4317 15.2403 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -19.0459 14.6663 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -18.4719 13.2805 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -11.7099 7.9030 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - -11.9057 6.4158 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 - -13.3929 6.6116 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -10.4186 6.2200 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -12.1015 4.9287 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -10.9115 4.0155 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -11.1073 2.5283 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -12.4931 1.9543 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -13.6831 2.8675 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -13.4873 4.3546 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 13.3531 -19.1413 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 12.4400 -20.3313 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.9528 -20.1355 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 13.0140 -21.7171 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 14.5012 -21.9129 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 15.4143 -20.7229 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 14.8403 -19.3370 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 15.7534 -18.1470 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 11.2919 -17.5596 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.3788 -18.7497 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 8.8916 -18.5539 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 8.3176 -17.1681 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 9.2307 -15.9780 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.7179 -16.1738 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 12.7791 -17.7554 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 13.6922 -16.5654 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 15.0780 -15.9914 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 13.8880 -15.0782 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 14.6969 -23.4001 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 15.8870 -24.3132 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 17.3741 -24.1174 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 18.2873 -22.9274 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 18.0915 -21.4402 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 16.9015 -20.5271 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 8.6567 -14.5922 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 9.5698 -13.4022 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 + 10.7599 -14.3153 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 8.3798 -12.4890 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 10.4830 -12.2122 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 9.9090 -10.8263 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.8221 -9.6363 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 12.3093 -9.8321 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 12.8833 -11.2179 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 11.9702 -12.4079 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 1 7 2 0 1 15 1 0 @@ -55,7 +55,7 @@ 12 13 1 0 13 14 2 0 13 25 1 0 - 15 16 1 0 + 15 16 1 6 16 17 1 0 16 18 1 0 17 18 1 0 @@ -74,4 +74,4 @@ 31 32 2 0 32 33 1 0 33 34 2 0 -M END +M END \ No newline at end of file diff --git a/Code/GraphMol/Depictor/test_data/7UPJ_spread.mol b/Code/GraphMol/Depictor/test_data/7UPJ_spread.mol index 146a05356..ee4727b16 100644 --- a/Code/GraphMol/Depictor/test_data/7UPJ_spread.mol +++ b/Code/GraphMol/Depictor/test_data/7UPJ_spread.mol @@ -1,41 +1,41 @@ 7upj_3aid - + RDKit 2D 34 38 0 0 0 0 0 0 0 0999 V2000 - -13.0454 2.3781 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -12.4714 0.9923 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -10.9842 0.7965 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -13.3845 -0.1977 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -14.8717 -0.0020 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -15.4457 1.3839 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -14.5326 2.5739 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -15.1066 3.9597 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -10.6451 3.3723 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -10.0711 1.9865 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -8.5839 1.7907 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -7.6707 2.9808 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -8.2448 4.3666 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -9.7319 4.5624 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -12.1322 3.5681 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -12.7063 4.9540 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -12.5105 6.4411 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -13.8963 5.8671 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -15.4457 -1.3878 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.8315 -1.9618 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -18.2173 -1.3878 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -18.7914 -0.0020 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -18.2173 1.3839 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -16.8315 1.9579 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -7.3316 5.5566 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 - -5.8445 5.3608 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 - -6.0402 3.8737 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -5.6487 6.8480 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 - -4.3573 5.1650 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -3.7833 3.7792 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -2.2961 3.5834 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.3830 4.7735 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.9570 6.1593 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -3.4442 6.3551 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3739 7.2096 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5392 8.3996 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0264 8.2038 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0348 9.7854 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + -1.5219 9.9812 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4351 8.7912 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8611 7.4053 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.7742 6.2153 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.6873 5.6280 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.6004 6.8180 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 4.0876 6.6222 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 4.6616 5.2364 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.7485 4.0463 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2613 4.2421 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2001 5.8237 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7130 4.6337 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0988 4.0597 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.9088 3.1465 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7177 11.4684 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9078 12.3815 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3949 12.1857 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -5.3081 10.9957 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -5.1123 9.5085 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9223 8.5954 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 4.3225 2.6605 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 + 5.8097 2.4647 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0 + 5.6139 0.9776 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 6.0055 3.9519 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 + 7.2969 2.2689 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 8.2100 3.4590 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 9.6972 3.2632 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 10.2712 1.8774 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 9.3580 0.6873 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + 7.8709 0.8831 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 1 7 2 0 1 15 1 0 @@ -55,7 +55,7 @@ 12 13 1 0 13 14 2 0 13 25 1 0 - 15 16 1 0 + 15 16 1 6 16 17 1 0 16 18 1 0 17 18 1 0 @@ -74,4 +74,4 @@ 31 32 2 0 32 33 1 0 33 34 2 0 -M END +M END \ No newline at end of file diff --git a/Code/GraphMol/DistGeomHelpers/catch_tests.cpp b/Code/GraphMol/DistGeomHelpers/catch_tests.cpp index 30f99542c..ba51b6cd3 100644 --- a/Code/GraphMol/DistGeomHelpers/catch_tests.cpp +++ b/Code/GraphMol/DistGeomHelpers/catch_tests.cpp @@ -1107,7 +1107,7 @@ TEST_CASE("No overlapping atoms") { for (unsigned int j = 0; j < i; ++j) { const auto minDist = bm->getLowerBound(i, j); const auto length = (conf.getAtomPos(i) - conf.getAtomPos(j)).length(); - CHECK((minDist - length) < .407); + CHECK((minDist - length) < .425); } } } diff --git a/Code/GraphMol/FindRings.cpp b/Code/GraphMol/FindRings.cpp index bd2fbef2c..b7f32afeb 100644 --- a/Code/GraphMol/FindRings.cpp +++ b/Code/GraphMol/FindRings.cpp @@ -24,6 +24,27 @@ using RINGINVAR = boost::dynamic_bitset<>; using RINGINVAR_SET = std::set; using RINGINVAR_INT_VECT_MAP = std::map>; +namespace { +using namespace RDKit; + +// normalizes a ring by rotating/reversing it so that the first atom +// is the one with the smallest index, and the second atom is the neighbor +// to the first one that again has the smallest index. +// This change should have a small performance footprint while it helps +// keeping test results consistent when making changes to ring detection. +void normalize_ring(std::vector &ring) { + auto newStart = std::ranges::min_element(ring); + std::ranges::rotate(ring, newStart); + + if (ring.back() < ring[1]) { + // we don't need to move the central element! + auto numPairsToMove = (ring.size() - 1) / 2; + auto front = ring.begin() + 1; + std::swap_ranges(front, front + numPairsToMove, ring.rbegin()); + } +} +} // namespace + namespace RingUtils { constexpr size_t MAX_BFSQ_SIZE = 200000; // arbitrary huge value @@ -976,6 +997,9 @@ int findSSSR(const ROMol &mol, VECT_INT_VECT &res, bool includeDativeBonds, return rdcast(res.size()); } } + + std::ranges::for_each(fragRes, normalize_ring); + // if we have more than expected we need to do some cleanup // otherwise do som clean up work if (ssiz > nexpt) { diff --git a/Code/GraphMol/MarvinParse/test_data/BigMacrocycle.expected.sdf b/Code/GraphMol/MarvinParse/test_data/BigMacrocycle.expected.sdf index 132f2284b..3ecd976ba 100644 --- a/Code/GraphMol/MarvinParse/test_data/BigMacrocycle.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/BigMacrocycle.expected.sdf @@ -7,55 +7,55 @@ M V30 COUNTS 48 48 0 0 0 M V30 BEGIN ATOM M V30 1 C 11.536117 0.000000 0.000000 0 M V30 2 C 10.036117 0.000000 0.000000 0 -M V30 3 C 9.924022 -1.495806 0.000000 0 -M V30 4 C 9.590241 -2.958198 0.000000 0 -M V30 5 C 9.042229 -4.354508 0.000000 0 -M V30 6 C 8.292229 -5.653546 0.000000 0 -M V30 7 C 7.356995 -6.826294 0.000000 0 -M V30 8 C 6.257417 -7.846553 0.000000 0 -M V30 9 C 5.018059 -8.691533 0.000000 0 -M V30 10 C 3.666605 -9.342358 0.000000 0 -M V30 11 C 2.233246 -9.784491 0.000000 0 -M V30 12 O 2.567028 -11.246883 0.000000 0 -M V30 13 O 0.750000 -10.008054 0.000000 0 -M V30 14 C -0.750000 -10.008054 0.000000 0 -M V30 15 C -2.233246 -9.784491 0.000000 0 -M V30 16 N -3.666605 -9.342358 0.000000 0 -M V30 17 C -5.018059 -8.691533 0.000000 0 -M V30 18 C -5.768059 -9.990571 0.000000 0 -M V30 19 C -6.257417 -7.846553 0.000000 0 -M V30 20 C -7.356995 -6.826294 0.000000 0 -M V30 21 C -8.292229 -5.653546 0.000000 0 -M V30 22 C -9.042229 -4.354508 0.000000 0 -M V30 23 C -9.590241 -2.958198 0.000000 0 -M V30 24 C -9.924022 -1.495806 0.000000 0 +M V30 3 C 9.924022 1.495806 0.000000 0 +M V30 4 C 9.590241 2.958198 0.000000 0 +M V30 5 C 9.042229 4.354508 0.000000 0 +M V30 6 C 8.292229 5.653546 0.000000 0 +M V30 7 C 7.356995 6.826294 0.000000 0 +M V30 8 C 6.257417 7.846553 0.000000 0 +M V30 9 C 5.018059 8.691533 0.000000 0 +M V30 10 C 3.666605 9.342358 0.000000 0 +M V30 11 C 2.233246 9.784491 0.000000 0 +M V30 12 O 2.567028 11.246883 0.000000 0 +M V30 13 O 0.750000 10.008054 0.000000 0 +M V30 14 C -0.750000 10.008054 0.000000 0 +M V30 15 C -2.233246 9.784491 0.000000 0 +M V30 16 N -3.666605 9.342358 0.000000 0 +M V30 17 C -5.018059 8.691533 0.000000 0 +M V30 18 C -5.768059 9.990571 0.000000 0 +M V30 19 C -6.257417 7.846553 0.000000 0 +M V30 20 C -7.356995 6.826294 0.000000 0 +M V30 21 C -8.292229 5.653546 0.000000 0 +M V30 22 C -9.042229 4.354508 0.000000 0 +M V30 23 C -9.590241 2.958198 0.000000 0 +M V30 24 C -9.924022 1.495806 0.000000 0 M V30 25 C -10.036117 0.000000 0.000000 0 -M V30 26 C -9.924022 1.495806 0.000000 0 -M V30 27 C -9.590241 2.958198 0.000000 0 -M V30 28 O -11.023600 3.400330 0.000000 0 -M V30 29 O -9.042229 4.354508 0.000000 0 -M V30 30 C -8.292229 5.653546 0.000000 0 -M V30 31 C -7.356995 6.826294 0.000000 0 -M V30 32 N -6.257417 7.846553 0.000000 0 -M V30 33 C -5.018059 8.691533 0.000000 0 -M V30 34 C -5.768059 9.990571 0.000000 0 -M V30 35 C -3.666605 9.342358 0.000000 0 -M V30 36 C -2.233246 9.784491 0.000000 0 -M V30 37 C -0.750000 10.008054 0.000000 0 -M V30 38 C 0.750000 10.008054 0.000000 0 -M V30 39 C 2.233246 9.784491 0.000000 0 -M V30 40 C 3.666605 9.342358 0.000000 0 -M V30 41 C 5.018059 8.691533 0.000000 0 -M V30 42 C 6.257417 7.846553 0.000000 0 -M V30 43 C 7.356995 6.826294 0.000000 0 -M V30 44 O 8.456573 7.846553 0.000000 0 -M V30 45 O 8.292229 5.653546 0.000000 0 -M V30 46 C 9.042229 4.354508 0.000000 0 -M V30 47 C 9.590241 2.958198 0.000000 0 -M V30 48 N 9.924022 1.495806 0.000000 0 +M V30 26 C -9.924022 -1.495806 0.000000 0 +M V30 27 C -9.590241 -2.958198 0.000000 0 +M V30 28 O -11.023600 -3.400330 0.000000 0 +M V30 29 O -9.042229 -4.354508 0.000000 0 +M V30 30 C -8.292229 -5.653546 0.000000 0 +M V30 31 C -7.356995 -6.826294 0.000000 0 +M V30 32 N -6.257417 -7.846553 0.000000 0 +M V30 33 C -5.018059 -8.691533 0.000000 0 +M V30 34 C -5.768059 -9.990571 0.000000 0 +M V30 35 C -3.666605 -9.342358 0.000000 0 +M V30 36 C -2.233246 -9.784491 0.000000 0 +M V30 37 C -0.750000 -10.008054 0.000000 0 +M V30 38 C 0.750000 -10.008054 0.000000 0 +M V30 39 C 2.233246 -9.784491 0.000000 0 +M V30 40 C 3.666605 -9.342358 0.000000 0 +M V30 41 C 5.018059 -8.691533 0.000000 0 +M V30 42 C 6.257417 -7.846553 0.000000 0 +M V30 43 C 7.356995 -6.826294 0.000000 0 +M V30 44 O 8.456573 -7.846553 0.000000 0 +M V30 45 O 8.292229 -5.653546 0.000000 0 +M V30 46 C 9.042229 -4.354508 0.000000 0 +M V30 47 C 9.590241 -2.958198 0.000000 0 +M V30 48 N 9.924022 -1.495806 0.000000 0 M V30 END ATOM M V30 BEGIN BOND -M V30 1 1 2 1 CFG=3 +M V30 1 1 2 1 CFG=1 M V30 2 1 2 3 M V30 3 1 3 4 M V30 4 1 4 5 @@ -71,7 +71,7 @@ M V30 13 1 13 14 M V30 14 1 14 15 M V30 15 1 15 16 M V30 16 1 16 17 -M V30 17 1 17 18 CFG=3 +M V30 17 1 17 18 CFG=1 M V30 18 1 17 19 M V30 19 1 19 20 M V30 20 1 20 21 @@ -87,7 +87,7 @@ M V30 29 1 29 30 M V30 30 1 30 31 M V30 31 1 31 32 M V30 32 1 32 33 -M V30 33 1 33 34 CFG=3 +M V30 33 1 33 34 CFG=1 M V30 34 1 33 35 M V30 35 1 35 36 M V30 36 1 36 37 diff --git a/Code/GraphMol/MarvinParse/test_data/DoubleBondChain.expected.sdf b/Code/GraphMol/MarvinParse/test_data/DoubleBondChain.expected.sdf index 43fa273e9..50dd19322 100644 --- a/Code/GraphMol/MarvinParse/test_data/DoubleBondChain.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/DoubleBondChain.expected.sdf @@ -7,26 +7,26 @@ M V30 COUNTS 22 22 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C 1.500000 -2.598076 0.000000 0 -M V30 5 C 0.750000 -3.897114 0.000000 0 -M V30 6 C 1.500000 -5.196152 0.000000 0 -M V30 7 C 3.000000 -5.196152 0.000000 0 -M V30 8 C 0.750000 -6.495191 0.000000 0 -M V30 9 C 1.500000 -7.794229 0.000000 0 -M V30 10 C 0.750000 -9.093267 0.000000 0 -M V30 11 C 1.500000 -10.392305 0.000000 0 -M V30 12 C 3.000000 -10.392305 0.000000 0 -M V30 13 C 0.750000 -11.691343 0.000000 0 -M V30 14 C -0.750000 -11.691343 0.000000 0 -M V30 15 O -1.500000 -10.392305 0.000000 0 -M V30 16 O -1.500000 -12.990381 0.000000 0 -M V30 17 C -0.750000 -1.299038 0.000000 0 -M V30 18 C -0.489528 -2.776250 0.000000 0 -M V30 19 C -2.159539 -1.812068 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C 1.500000 2.598076 0.000000 0 +M V30 5 C 3.000000 2.598076 0.000000 0 +M V30 6 C 3.750000 3.897114 0.000000 0 +M V30 7 C 3.000000 5.196152 0.000000 0 +M V30 8 C 5.250000 3.897114 0.000000 0 +M V30 9 C 6.000000 5.196152 0.000000 0 +M V30 10 C 7.500000 5.196152 0.000000 0 +M V30 11 C 8.250000 6.495191 0.000000 0 +M V30 12 C 7.500000 7.794229 0.000000 0 +M V30 13 C 9.750000 6.495191 0.000000 0 +M V30 14 C 10.500000 5.196152 0.000000 0 +M V30 15 O 9.750000 3.897114 0.000000 0 +M V30 16 O 12.000000 5.196152 0.000000 0 +M V30 17 C -0.750000 1.299038 0.000000 0 +M V30 18 C -2.159539 1.812068 0.000000 0 +M V30 19 C -0.489528 2.776250 0.000000 0 M V30 20 C -1.500000 0.000000 0.000000 0 -M V30 21 C -0.750000 1.299038 0.000000 0 -M V30 22 C 0.750000 1.299038 0.000000 0 +M V30 21 C -0.750000 -1.299038 0.000000 0 +M V30 22 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND M V30 1 1 1 2 diff --git a/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.mrv b/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.mrv index 50f81dead..e6df016b5 100644 --- a/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.mrv +++ b/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.mrv @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.sdf b/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.sdf index 8ef28928a..a655eca56 100644 --- a/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/MarvinNoCoords.mrv.expected.sdf @@ -6,11 +6,11 @@ M V30 BEGIN CTAB M V30 COUNTS 6 6 0 0 0 M V30 BEGIN ATOM M V30 1 C 1.500000 0.000000 0.000000 0 -M V30 2 C 0.750000 -1.299038 0.000000 0 -M V30 3 C -0.750000 -1.299038 0.000000 0 +M V30 2 C 0.750000 1.299038 0.000000 0 +M V30 3 C -0.750000 1.299038 0.000000 0 M V30 4 C -1.500000 0.000000 0.000000 0 -M V30 5 C -0.750000 1.299038 0.000000 0 -M V30 6 C 0.750000 1.299038 0.000000 0 +M V30 5 C -0.750000 -1.299038 0.000000 0 +M V30 6 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND M V30 1 1 1 2 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTest.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTest.expected.sdf index 96257852d..33af29c2b 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTest.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTest.expected.sdf @@ -7,20 +7,20 @@ M V30 COUNTS 13 14 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 M V30 6 C -2.250000 1.299038 0.000000 0 M V30 7 C -3.750000 1.299038 0.000000 0 -M V30 8 C -4.500000 -0.000000 0.000000 0 -M V30 9 Cl -6.000000 -0.000000 0.000000 0 +M V30 8 C -4.500000 0.000000 0.000000 0 +M V30 9 Cl -6.000000 0.000000 0.000000 0 M V30 10 C -3.750000 -1.299038 0.000000 0 M V30 11 C -2.250000 -1.299038 0.000000 0 -M V30 12 C -0.750000 1.299038 0.000000 0 -M V30 13 C 0.750000 1.299038 0.000000 0 +M V30 12 C -0.750000 -1.299038 0.000000 0 +M V30 13 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND -M V30 1 1 2 1 CFG=1 +M V30 1 1 2 1 CFG=3 M V30 2 1 2 3 M V30 3 1 3 4 M V30 4 1 5 4 CFG=1 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTest.nosan.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTest.nosan.expected.sdf index 96257852d..33af29c2b 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTest.nosan.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTest.nosan.expected.sdf @@ -7,20 +7,20 @@ M V30 COUNTS 13 14 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 M V30 6 C -2.250000 1.299038 0.000000 0 M V30 7 C -3.750000 1.299038 0.000000 0 -M V30 8 C -4.500000 -0.000000 0.000000 0 -M V30 9 Cl -6.000000 -0.000000 0.000000 0 +M V30 8 C -4.500000 0.000000 0.000000 0 +M V30 9 Cl -6.000000 0.000000 0.000000 0 M V30 10 C -3.750000 -1.299038 0.000000 0 M V30 11 C -2.250000 -1.299038 0.000000 0 -M V30 12 C -0.750000 1.299038 0.000000 0 -M V30 13 C 0.750000 1.299038 0.000000 0 +M V30 12 C -0.750000 -1.299038 0.000000 0 +M V30 13 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND -M V30 1 1 2 1 CFG=1 +M V30 1 1 2 1 CFG=3 M V30 2 1 2 3 M V30 3 1 3 4 M V30 4 1 5 4 CFG=1 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.expected.sdf index 4768b4515..7f94df8ce 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.expected.sdf @@ -7,15 +7,15 @@ M V30 COUNTS 14 15 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 -M V30 6 C -0.750000 1.299038 0.000000 0 -M V30 7 C 0.750000 1.299038 0.000000 0 +M V30 6 C -0.750000 -1.299038 0.000000 0 +M V30 7 C 0.750000 -1.299038 0.000000 0 M V30 8 C -2.250000 1.299038 0.000000 0 M V30 9 C -3.750000 1.299038 0.000000 0 -M V30 10 C -4.500000 -0.000000 0.000000 0 -M V30 11 C -6.000000 -0.000000 0.000000 0 +M V30 10 C -4.500000 0.000000 0.000000 0 +M V30 11 C -6.000000 0.000000 0.000000 0 M V30 12 C -3.750000 -1.299038 0.000000 0 M V30 13 C -4.500000 -2.598076 0.000000 0 M V30 14 C -2.250000 -1.299038 0.000000 0 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.nosan.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.nosan.expected.sdf index 46bbe59ab..4d9ea9881 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.nosan.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2.nosan.expected.sdf @@ -7,21 +7,21 @@ M V30 COUNTS 14 15 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 -M V30 6 C -0.750000 1.299038 0.000000 0 -M V30 7 C 0.750000 1.299038 0.000000 0 +M V30 6 C -0.750000 -1.299038 0.000000 0 +M V30 7 C 0.750000 -1.299038 0.000000 0 M V30 8 C -2.250000 1.299038 0.000000 0 M V30 9 C -3.750000 1.299038 0.000000 0 -M V30 10 C -4.500000 -0.000000 0.000000 0 -M V30 11 C -6.000000 -0.000000 0.000000 0 +M V30 10 C -4.500000 0.000000 0.000000 0 +M V30 11 C -6.000000 0.000000 0.000000 0 M V30 12 C -3.750000 -1.299038 0.000000 0 M V30 13 C -4.500000 -2.598076 0.000000 0 M V30 14 C -2.250000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND -M V30 1 1 2 1 CFG=1 +M V30 1 1 2 1 CFG=3 M V30 2 1 2 3 M V30 3 1 3 4 M V30 4 1 4 5 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.expected.sdf index cbf611b74..d4d3e6670 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.expected.sdf @@ -7,21 +7,21 @@ M V30 COUNTS 14 15 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 -M V30 6 C -0.750000 1.299038 0.000000 0 -M V30 7 C 0.750000 1.299038 0.000000 0 +M V30 6 C -0.750000 -1.299038 0.000000 0 +M V30 7 C 0.750000 -1.299038 0.000000 0 M V30 8 C -2.250000 1.299038 0.000000 0 M V30 9 C -3.750000 1.299038 0.000000 0 -M V30 10 C -4.500000 -0.000000 0.000000 0 -M V30 11 C -6.000000 -0.000000 0.000000 0 +M V30 10 C -4.500000 0.000000 0.000000 0 +M V30 11 C -6.000000 0.000000 0.000000 0 M V30 12 C -3.750000 -1.299038 0.000000 0 M V30 13 C -4.500000 -2.598076 0.000000 0 M V30 14 C -2.250000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND -M V30 1 1 2 1 CFG=1 +M V30 1 1 2 1 CFG=3 M V30 2 1 2 3 M V30 3 1 3 4 M V30 4 1 5 4 CFG=3 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.nosan.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.nosan.expected.sdf index cbf611b74..d4d3e6670 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.nosan.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTest2AllChiral.nosan.expected.sdf @@ -7,21 +7,21 @@ M V30 COUNTS 14 15 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 -M V30 6 C -0.750000 1.299038 0.000000 0 -M V30 7 C 0.750000 1.299038 0.000000 0 +M V30 6 C -0.750000 -1.299038 0.000000 0 +M V30 7 C 0.750000 -1.299038 0.000000 0 M V30 8 C -2.250000 1.299038 0.000000 0 M V30 9 C -3.750000 1.299038 0.000000 0 -M V30 10 C -4.500000 -0.000000 0.000000 0 -M V30 11 C -6.000000 -0.000000 0.000000 0 +M V30 10 C -4.500000 0.000000 0.000000 0 +M V30 11 C -6.000000 0.000000 0.000000 0 M V30 12 C -3.750000 -1.299038 0.000000 0 M V30 13 C -4.500000 -2.598076 0.000000 0 M V30 14 C -2.250000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND -M V30 1 1 2 1 CFG=1 +M V30 1 1 2 1 CFG=3 M V30 2 1 2 3 M V30 3 1 3 4 M V30 4 1 5 4 CFG=3 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.expected.sdf index 972f88883..85148d36f 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.expected.sdf @@ -7,17 +7,17 @@ M V30 COUNTS 13 14 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 M V30 6 C -2.250000 1.299038 0.000000 0 M V30 7 C -3.750000 1.299038 0.000000 0 -M V30 8 C -4.500000 -0.000000 0.000000 0 -M V30 9 Cl -6.000000 -0.000000 0.000000 0 +M V30 8 C -4.500000 0.000000 0.000000 0 +M V30 9 Cl -6.000000 0.000000 0.000000 0 M V30 10 C -3.750000 -1.299038 0.000000 0 M V30 11 C -2.250000 -1.299038 0.000000 0 -M V30 12 C -0.750000 1.299038 0.000000 0 -M V30 13 C 0.750000 1.299038 0.000000 0 +M V30 12 C -0.750000 -1.299038 0.000000 0 +M V30 13 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND M V30 1 1 1 2 diff --git a/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.nosan.expected.sdf b/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.nosan.expected.sdf index 63fd221a4..f3f92b6fd 100644 --- a/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.nosan.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/NewChiralTestNoChiral.nosan.expected.sdf @@ -7,20 +7,20 @@ M V30 COUNTS 13 14 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 C -0.750000 -1.299038 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 C -0.750000 1.299038 0.000000 0 M V30 5 C -1.500000 0.000000 0.000000 0 M V30 6 C -2.250000 1.299038 0.000000 0 M V30 7 C -3.750000 1.299038 0.000000 0 -M V30 8 C -4.500000 -0.000000 0.000000 0 -M V30 9 Cl -6.000000 -0.000000 0.000000 0 +M V30 8 C -4.500000 0.000000 0.000000 0 +M V30 9 Cl -6.000000 0.000000 0.000000 0 M V30 10 C -3.750000 -1.299038 0.000000 0 M V30 11 C -2.250000 -1.299038 0.000000 0 -M V30 12 C -0.750000 1.299038 0.000000 0 -M V30 13 C 0.750000 1.299038 0.000000 0 +M V30 12 C -0.750000 -1.299038 0.000000 0 +M V30 13 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND -M V30 1 1 2 1 CFG=1 +M V30 1 1 2 1 CFG=3 M V30 2 1 2 3 M V30 3 1 3 4 M V30 4 1 4 5 diff --git a/Code/GraphMol/MarvinParse/test_data/Smiles1.expected.sdf b/Code/GraphMol/MarvinParse/test_data/Smiles1.expected.sdf index bbfe3d70c..fa5bb9430 100644 --- a/Code/GraphMol/MarvinParse/test_data/Smiles1.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/Smiles1.expected.sdf @@ -9,11 +9,11 @@ M V30 1 N 3.750000 -1.299038 0.000000 0 M V30 2 C 3.000000 0.000000 0.000000 0 M V30 3 O 3.750000 1.299038 0.000000 0 CHG=-1 M V30 4 C 1.500000 0.000000 0.000000 0 -M V30 5 C 0.750000 -1.299038 0.000000 0 -M V30 6 C -0.750000 -1.299038 0.000000 0 +M V30 5 C 0.750000 1.299038 0.000000 0 +M V30 6 C -0.750000 1.299038 0.000000 0 M V30 7 C -1.500000 0.000000 0.000000 0 MASS=13 RAD=2 VAL=3 -M V30 8 C -0.750000 1.299038 0.000000 0 -M V30 9 C 0.750000 1.299038 0.000000 0 +M V30 8 C -0.750000 -1.299038 0.000000 0 +M V30 9 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND M V30 1 1 2 1 CFG=3 diff --git a/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.mrv b/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.mrv index 50f81dead..e6df016b5 100644 --- a/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.mrv +++ b/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.mrv @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.sdf b/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.sdf index 8ef28928a..a655eca56 100644 --- a/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.sdf +++ b/Code/GraphMol/MarvinParse/test_data/cisBenzene.mrv.expected.sdf @@ -6,11 +6,11 @@ M V30 BEGIN CTAB M V30 COUNTS 6 6 0 0 0 M V30 BEGIN ATOM M V30 1 C 1.500000 0.000000 0.000000 0 -M V30 2 C 0.750000 -1.299038 0.000000 0 -M V30 3 C -0.750000 -1.299038 0.000000 0 +M V30 2 C 0.750000 1.299038 0.000000 0 +M V30 3 C -0.750000 1.299038 0.000000 0 M V30 4 C -1.500000 0.000000 0.000000 0 -M V30 5 C -0.750000 1.299038 0.000000 0 -M V30 6 C 0.750000 1.299038 0.000000 0 +M V30 5 C -0.750000 -1.299038 0.000000 0 +M V30 6 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND M V30 1 1 1 2 diff --git a/Code/GraphMol/MolDraw2D/catch_tests.cpp b/Code/GraphMol/MolDraw2D/catch_tests.cpp index 02fe8284b..c8d858f07 100644 --- a/Code/GraphMol/MolDraw2D/catch_tests.cpp +++ b/Code/GraphMol/MolDraw2D/catch_tests.cpp @@ -1206,7 +1206,7 @@ TEST_CASE("Github #3226: Lines in wedge bonds being drawn too closely together", check_file_hash("testGithub3226_1.svg"); std::vector tkns; boost::algorithm::find_all(tkns, text, "bond-0"); - CHECK(tkns.size() == 10); + CHECK(tkns.size() == 9); } } #ifdef RDK_BUILD_CAIRO_SUPPORT @@ -1258,7 +1258,7 @@ TEST_CASE("Github #3226: Lines in wedge bonds being drawn too closely together", check_file_hash("testGithub3226_3.svg"); std::vector tkns; boost::algorithm::find_all(tkns, text, "bond-0"); - CHECK(tkns.size() == 7); + CHECK(tkns.size() == 6); } } #ifdef RDK_BUILD_CAIRO_SUPPORT @@ -1491,7 +1491,7 @@ TEST_CASE("including legend in drawing results in offset drawing later", // make sure the polygon starts at a bond CHECK(text.find(" 0.0. The bug manifested itself by some of them - // being < 0.0 and thus off the side of the picture. + int matches) { + // there should be 4 matches for each regex, and all the x coords should + // be > 0.0. The bug manifested itself by some of them being < 0.0 and + // thus off the side of the picture. std::ptrdiff_t const match_count( std::distance(std::sregex_iterator(text.begin(), text.end(), r), std::sregex_iterator())); - CHECK(match_count == expected_match_count); + CHECK(match_count == matches); auto match_begin = std::sregex_iterator(text.begin(), text.end(), r); auto match_end = std::sregex_iterator(); for (std::sregex_iterator i = match_begin; i != match_end; ++i) { @@ -8326,16 +8331,16 @@ TEST_CASE("Lasso highlights") { auto a16reg = std::sregex_iterator(text.begin(), text.end(), a16); auto dat1 = *a16reg; #ifdef RDK_BUILD_FREETYPE_SUPPORT - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(273.1, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(131.2, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(272.1, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(130.0, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(221.5, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(323.8, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(222.5, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(325.0, 0.1)); check_file_hash(baseName + "1.svg"); #else - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(274.9, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(130.9, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(273.9, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(129.7, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(223.3, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(323.6, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(224.3, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(324.9, 0.1)); #endif } { @@ -8378,10 +8383,10 @@ TEST_CASE("Lasso highlights") { CHECK(match_count == 1); auto a0reg = std::sregex_iterator(text.begin(), text.end(), a0); auto dat1 = *a0reg; - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(389.5, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(214.4, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(390.2, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(213.9, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(387.1, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(138.3, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(387.8, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(137.7, 0.1)); check_file_hash(baseName + "2.svg"); #endif } @@ -8427,16 +8432,16 @@ TEST_CASE("Lasso highlights") { CHECK(match_count == 4); auto a0reg = std::sregex_iterator(text.begin(), text.end(), a0); auto dat1 = *a0reg; - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(229.1, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(365.1, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(228.9, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(364.2, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(228.9, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(94.6, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(228.8, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(93.6, 0.1)); a0reg++; dat1 = *a0reg; - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(244.3, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(351.7, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(245.2, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(352.0, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(244.1, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(81.1, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(245.1, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(81.5, 0.1)); check_file_hash(baseName + "3.svg"); #endif } @@ -8476,22 +8481,22 @@ TEST_CASE("Lasso highlights") { CHECK(match_count == 3); auto a5reg = std::sregex_iterator(text.begin(), text.end(), a5); auto dat1 = *a5reg; - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(223.2, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(280.4, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(221.9, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(280.0, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(221.0, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(206.7, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(219.7, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(206.2, 0.1)); a5reg++; dat1 = *a5reg; - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(217.4, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(251.6, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(218.4, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(250.7, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(215.1, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(177.9, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(216.2, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(177.0, 0.1)); a5reg++; dat1 = *a5reg; - CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(245.3, 0.1)); - CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(261.0, 0.1)); - CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(245.5, 0.1)); - CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(262.3, 0.1)); + CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(243.0, 0.1)); + CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(187.2, 0.1)); + CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(243.3, 0.1)); + CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(188.6, 0.1)); // There should be 2 lines in red, the lasso along the bi-phenyl // bond. std::regex bond5(""); size_t nOccurrences = std::distance( std::sregex_token_iterator(text.begin(), text.end(), bond19), std::sregex_token_iterator()); - CHECK(nOccurrences == 1); + CHECK(nOccurrences == 30); check_file_hash(fileStem + "5.svg"); } } diff --git a/Code/GraphMol/MolDraw2D/test1.cpp b/Code/GraphMol/MolDraw2D/test1.cpp index 9f8481cf0..d7121369b 100644 --- a/Code/GraphMol/MolDraw2D/test1.cpp +++ b/Code/GraphMol/MolDraw2D/test1.cpp @@ -1143,11 +1143,11 @@ void test6() { // start of bond-0 #if DO_TEST_ASSERT TEST_ASSERT( - txt.find("1") != std::string::npos); @@ -4076,13 +4077,13 @@ void test20Annotate() { #ifdef RDK_BUILD_FREETYPE_SUPPORT #if DO_TEST_ASSERT // first note - TEST_ASSERT(text.find("f") != std::string::npos); @@ -4114,12 +4115,12 @@ void test20Annotate() { #ifdef RDK_BUILD_FREETYPE_SUPPORT #if DO_TEST_ASSERT // first note (atom 0) - TEST_ASSERT(text.find("1") != @@ -4344,9 +4345,8 @@ void testGithub3305() { // This seems to work for Freetype and non-Freetype builds. std::regex regex( R"(class='bond-6 atom-6 atom-7' d='M ([\d.]*),([\d.]*) L ([\d.]*),([\d.]*) L ([\d.]*),([\d.]*) L ([\d.]*),([\d.]*) Z' style='fill:#FF7F7F;)"); - std::vector expected{ - Point2D(138.7, 116.8), Point2D(141.9, 116.8), Point2D(134.7, 129.2), - Point2D(133.1, 126.5)}; + std::vector expected{Point2D(127.2, 82.6), Point2D(135.2, 96.3), + Point2D(131.7, 96.3), Point2D(125.5, 85.6)}; check_corners(text, regex, expected); check_file_hash(nameBase + "4.svg"); #endif @@ -4380,9 +4380,8 @@ void testGithub3305() { #if DO_TEST_ASSERT std::regex regex( R"(class='bond-6 atom-6 atom-7' d='M ([\d.]*),([\d.]*) L ([\d.]*),([\d.]*) L ([\d.]*),([\d.]*) L ([\d.]*),([\d.]*) Z' style='fill:#FF7F7F;)"); - std::vector expected{ - Point2D(131.1, 120.8), Point2D(149.5, 120.8), Point2D(138.5, 139.8), - Point2D(129.3, 123.8)}; + std::vector expected{Point2D(133.8, 79.5), Point2D(145.5, 99.8), + Point2D(127.0, 99.8), Point2D(124.6, 95.5)}; check_corners(text, regex, expected); #endif check_file_hash(nameBase + "5.svg"); @@ -4411,7 +4410,7 @@ void testGithub3305() { outs.flush(); outs.close(); #if DO_TEST_ASSERT - TEST_ASSERT(text.find("stroke:#FF7F7F;stroke-width:0.7") != + TEST_ASSERT(text.find("stroke:#FF7F7F;stroke-width:0.8") != std::string::npos); TEST_ASSERT(text.find("stroke:#FF7F7F;stroke-width:4.0px") == std::string::npos); diff --git a/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.mrv b/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.mrv index a73ca06fe..60c18240e 100644 --- a/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.mrv +++ b/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.mrv @@ -1,2 +1,2 @@ -W \ No newline at end of file +H \ No newline at end of file diff --git a/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.sdf b/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.sdf index 6b6b03c12..04c1392b9 100644 --- a/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.sdf +++ b/Code/GraphMol/SmilesParse/test_data/ShortAtropisomerNoCoords.cxsmi.expected.sdf @@ -7,18 +7,18 @@ M V30 COUNTS 14 15 0 0 0 M V30 BEGIN ATOM M V30 1 C 3.000000 0.000000 0.000000 0 M V30 2 C 1.500000 0.000000 0.000000 0 -M V30 3 C 0.750000 -1.299038 0.000000 0 -M V30 4 N 1.500000 -2.598076 0.000000 0 -M V30 5 C 2.991783 -2.754869 0.000000 0 -M V30 6 C 3.303650 -4.222090 0.000000 0 -M V30 7 C 2.004612 -4.972090 0.000000 0 -M V30 8 C 0.889895 -3.968394 0.000000 0 -M V30 9 C -0.577326 -4.280262 0.000000 0 -M V30 10 C -0.750000 -1.299038 0.000000 0 -M V30 11 C -1.500000 -2.598076 0.000000 0 +M V30 3 C 0.750000 1.299038 0.000000 0 +M V30 4 N 1.500000 2.598076 0.000000 0 +M V30 5 C 2.991783 2.754869 0.000000 0 +M V30 6 C 3.303650 4.222090 0.000000 0 +M V30 7 C 2.004612 4.972090 0.000000 0 +M V30 8 C 0.889895 3.968394 0.000000 0 +M V30 9 C -0.577326 4.280262 0.000000 0 +M V30 10 C -0.750000 1.299038 0.000000 0 +M V30 11 C -1.500000 2.598076 0.000000 0 M V30 12 C -1.500000 0.000000 0.000000 0 -M V30 13 C -0.750000 1.299038 0.000000 0 -M V30 14 C 0.750000 1.299038 0.000000 0 +M V30 13 C -0.750000 -1.299038 0.000000 0 +M V30 14 C 0.750000 -1.299038 0.000000 0 M V30 END ATOM M V30 BEGIN BOND M V30 1 1 1 2 @@ -29,7 +29,7 @@ M V30 5 2 5 6 M V30 6 1 6 7 M V30 7 2 7 8 M V30 8 1 8 9 -M V30 9 1 3 10 CFG=1 +M V30 9 1 3 10 CFG=3 M V30 10 1 10 11 M V30 11 1 10 12 M V30 12 1 12 13 diff --git a/Code/GraphMol/Wrap/rough_test.py b/Code/GraphMol/Wrap/rough_test.py index c76a54747..65c4d757d 100644 --- a/Code/GraphMol/Wrap/rough_test.py +++ b/Code/GraphMol/Wrap/rough_test.py @@ -2235,8 +2235,8 @@ CAS<~> self.assertTrue(ri.IsAtomInRingOfSize(2, 3)) self.assertTrue(ri.IsBondInRingOfSize(2, 3)) self.assertTrue(ri.IsBondInRingOfSize(2, 4)) - self.assertEqual(ri.AtomRings(), ((0, 3, 2, 1), (4, 3, 2))) - self.assertEqual(ri.BondRings(), ((4, 2, 1, 0), (3, 2, 5))) + self.assertEqual(ri.AtomRings(), ((0, 1, 2, 3), (2, 3, 4))) + self.assertEqual(ri.BondRings(), ((0, 1, 2, 4), (2, 3, 5))) self.assertEqual(len(ri.AtomMembers(2)), 2) self.assertEqual(ri.AtomRingSizes(2), (4, 3)) self.assertEqual(ri.AtomRingSizes(99), ()) diff --git a/Code/PgSQL/rdkit/expected/reaction.out b/Code/PgSQL/rdkit/expected/reaction.out index 434e12f0a..3a063df7a 100644 --- a/Code/PgSQL/rdkit/expected/reaction.out +++ b/Code/PgSQL/rdkit/expected/reaction.out @@ -75,11 +75,11 @@ SELECT reaction_to_ctab(reaction_from_smiles('c1ccccc1>>c1cccnc1')); + 6 6 0 0 0 0 0 0 0 0999 V2000 + 1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - 0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - -0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - -1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - -0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ 0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ + -0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ + -1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ + -0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ + 0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ 1 2 4 0 + 2 3 4 0 + 3 4 4 0 + @@ -93,11 +93,11 @@ SELECT reaction_to_ctab(reaction_from_smiles('c1ccccc1>>c1cccnc1')); + 6 6 0 0 0 0 0 0 0 0999 V2000 + 1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - 0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - -0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - -1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ - -0.7500 1.2990 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0+ 0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ + -0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ + -1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ + -0.7500 -1.2990 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0+ + 0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0+ 1 2 4 0 + 2 3 4 0 + 3 4 4 0 + diff --git a/Docs/Book/Cookbook.rst b/Docs/Book/Cookbook.rst index 7620f3ea4..f95d59979 100644 --- a/Docs/Book/Cookbook.rst +++ b/Docs/Book/Cookbook.rst @@ -796,7 +796,7 @@ Identify Aromatic Rings .. testoutput:: - ((0, 5, 4, 3, 2, 1), (6, 7, 8, 9, 4, 5)) + ((0, 1, 2, 3, 4, 5), (4, 5, 6, 7, 8, 9)) .. testcode:: @@ -805,7 +805,7 @@ Identify Aromatic Rings .. testoutput:: - ((9, 4, 3, 2, 1, 0), (6, 7, 8, 10, 4, 5)) + ((0, 1, 2, 3, 4, 9), (4, 5, 6, 7, 8, 10)) .. testcode:: diff --git a/Docs/Book/GettingStartedInPython.rst b/Docs/Book/GettingStartedInPython.rst index c688a7b4c..ac56cb0fb 100644 --- a/Docs/Book/GettingStartedInPython.rst +++ b/Docs/Book/GettingStartedInPython.rst @@ -252,9 +252,9 @@ MDL Mol blocks are also available: 4 4 0 0 0 0 0 0 0 0999 V2000 1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -0.0000 -1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0000 -1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 2 3 1 0 3 4 1 0 @@ -273,9 +273,9 @@ To include names in the mol blocks, set the molecule's “_Name” property: 4 4 0 0 0 0 0 0 0 0999 V2000 1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -0.0000 -1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0000 -1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 2 3 1 0 3 4 1 0 @@ -306,9 +306,9 @@ You can either include 2D coordinates (i.e. a depiction): 4 4 0 0 0 0 0 0 0 0999 V2000 1.0607 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -0.0000 -1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 - -1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.0607 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0000 -1.0607 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 2 3 1 0 3 4 1 0 @@ -517,7 +517,7 @@ More detail about the smallest set of smallest rings (SSSR) is available: >>> list(ssr[0]) [1, 2, 3] >>> list(ssr[1]) - [4, 5, 2, 3] + [2, 3, 4, 5] As the name indicates, this is a symmetrized SSSR; if you are interested in the number of “true” SSSR, use the GetSSSR function (note that in this case there's no difference). @@ -2916,7 +2916,7 @@ If the molecule has coordinates, then the features will also have reasonable loc >>> feats[0].GetPos() >>> list(feats[0].GetPos()) - [-2.999..., -1.558..., 0.0] + [-2.402..., -1.619..., 0.0] 2D Pharmacophore Fingerprints diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 459ec2a62..f683c82f0 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,5 @@ -# Release_2026.03.1 -(Changes relative to Release_2025.09.1) +# Release_2026.09.1 +(Changes relative to Release_2026.03.1) ## Acknowledgements (Note: I'm no longer attempting to manually curate names. If you would like to @@ -9,6 +9,9 @@ GitHub) ## Highlights ## Backwards incompatible changes: +- Since #9208, atom rings are "normalized" so that the first atom in the ring +definition is the one with the lowest index, and the second one is the neighbor +to the first which also has the lowest index. ## Code removed in this release: