Normalize rings (#9208)

* normalize rings

* update tests

* update doctests

* update release notes
This commit is contained in:
Ricardo Rodriguez
2026-04-01 05:37:02 +02:00
committed by GitHub
parent c6cabf4153
commit 9e301c15d6
32 changed files with 444 additions and 413 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -24,6 +24,27 @@ using RINGINVAR = boost::dynamic_bitset<>;
using RINGINVAR_SET = std::set<RINGINVAR>;
using RINGINVAR_INT_VECT_MAP = std::map<RINGINVAR, std::vector<int>>;
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<int> &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<int>(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) {

View File

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

View File

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

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com http://www.chemaxon.com/marvin/schema/mrvSchema_20_20_0.xsd"><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="1.5" y2="0.00000"/><atom id="a2" elementType="C" x2="0.75" y2="-1.29904"/><atom id="a3" elementType="C" x2="-0.75" y2="-1.29904"/><atom id="a4" elementType="C" x2="-1.5" y2="0.00000"/><atom id="a5" elementType="C" x2="-0.75" y2="1.29904"/><atom id="a6" elementType="C" x2="0.75" y2="1.29904"/></atomArray><bondArray><bond id="b1" atomRefs2="a1 a2" order="1"/><bond id="b2" atomRefs2="a2 a3" order="2"/><bond id="b3" atomRefs2="a3 a4" order="1"/><bond id="b4" atomRefs2="a4 a5" order="2"/><bond id="b5" atomRefs2="a5 a6" order="1"/><bond id="b6" atomRefs2="a1 a6" order="2"/></bondArray></molecule></MChemicalStruct></MDocument></cml>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com http://www.chemaxon.com/marvin/schema/mrvSchema_20_20_0.xsd"><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="1.5" y2="0.00000"/><atom id="a2" elementType="C" x2="0.75" y2="1.29904"/><atom id="a3" elementType="C" x2="-0.75" y2="1.29904"/><atom id="a4" elementType="C" x2="-1.5" y2="0.00000"/><atom id="a5" elementType="C" x2="-0.75" y2="-1.29904"/><atom id="a6" elementType="C" x2="0.75" y2="-1.29904"/></atomArray><bondArray><bond id="b1" atomRefs2="a1 a2" order="1"/><bond id="b2" atomRefs2="a2 a3" order="2"/><bond id="b3" atomRefs2="a3 a4" order="1"/><bond id="b4" atomRefs2="a4 a5" order="2"/><bond id="b5" atomRefs2="a5 a6" order="1"/><bond id="b6" atomRefs2="a1 a6" order="2"/></bondArray></molecule></MChemicalStruct></MDocument></cml>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com http://www.chemaxon.com/marvin/schema/mrvSchema_20_20_0.xsd"><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="1.5" y2="0.00000"/><atom id="a2" elementType="C" x2="0.75" y2="-1.29904"/><atom id="a3" elementType="C" x2="-0.75" y2="-1.29904"/><atom id="a4" elementType="C" x2="-1.5" y2="0.00000"/><atom id="a5" elementType="C" x2="-0.75" y2="1.29904"/><atom id="a6" elementType="C" x2="0.75" y2="1.29904"/></atomArray><bondArray><bond id="b1" atomRefs2="a1 a2" order="1"/><bond id="b2" atomRefs2="a2 a3" order="2"/><bond id="b3" atomRefs2="a3 a4" order="1"/><bond id="b4" atomRefs2="a4 a5" order="2"/><bond id="b5" atomRefs2="a5 a6" order="1"/><bond id="b6" atomRefs2="a1 a6" order="2"/></bondArray></molecule></MChemicalStruct></MDocument></cml>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com http://www.chemaxon.com/marvin/schema/mrvSchema_20_20_0.xsd"><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="1.5" y2="0.00000"/><atom id="a2" elementType="C" x2="0.75" y2="1.29904"/><atom id="a3" elementType="C" x2="-0.75" y2="1.29904"/><atom id="a4" elementType="C" x2="-1.5" y2="0.00000"/><atom id="a5" elementType="C" x2="-0.75" y2="-1.29904"/><atom id="a6" elementType="C" x2="0.75" y2="-1.29904"/></atomArray><bondArray><bond id="b1" atomRefs2="a1 a2" order="1"/><bond id="b2" atomRefs2="a2 a3" order="2"/><bond id="b3" atomRefs2="a3 a4" order="1"/><bond id="b4" atomRefs2="a4 a5" order="2"/><bond id="b5" atomRefs2="a5 a6" order="1"/><bond id="b6" atomRefs2="a1 a6" order="2"/></bondArray></molecule></MChemicalStruct></MDocument></cml>

View File

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

View File

@@ -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<std::string> 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<std::string> 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("<path class='bond-0 atom-0 atom-1' d='M 315.3,136.5") !=
std::string::npos);
CHECK(text.find("<path d='M 311.8,142.6") != std::string::npos);
CHECK(text.find("<path d='M 315.3,136.5") != std::string::npos);
}
}
@@ -5684,7 +5684,7 @@ M END
regex =
R"(class='bond-1 atom-1 atom-2' d='M ([\d.]*),([\d.]*) L ([\d.]*),([\d.]*)')";
dbl = drawnBondLength(regex, text);
CHECK(dbl == Catch::Approx(14.4));
CHECK_THAT(dbl, Catch::Matchers::WithinAbs(14.4, 0.1));
check_file_hash(nameBase + "12.svg");
}
}
@@ -6423,8 +6423,13 @@ TEST_CASE("Github5947: Ellipse extremes not calculated correctly.") {
// check that the first ellipse is in the right place
std::regex r2("<ellipse cx='(\\d+\\.\\d+)' cy='(\\d+\\.\\d+)'");
auto ell1 = *std::sregex_iterator(text.begin(), text.end(), r2);
#ifdef RDK_BUILD_FREETYPE_SUPPORT
CHECK_THAT(stod(ell1[1]), Catch::Matchers::WithinAbs(308.0, 0.1));
CHECK_THAT(stod(ell1[2]), Catch::Matchers::WithinAbs(200.0, 0.1));
CHECK_THAT(stod(ell1[2]), Catch::Matchers::WithinAbs(200.0, 1.1));
#else
CHECK_THAT(stod(ell1[1]), Catch::Matchers::WithinAbs(308.0, 0.1));
CHECK_THAT(stod(ell1[2]), Catch::Matchers::WithinAbs(198.0, 0.1));
#endif
check_file_hash(nameBase + ".svg");
}
@@ -6762,14 +6767,14 @@ M END
outs.close();
auto check_bond = [](const std::string &text, const std::regex &r,
std::ptrdiff_t expected_match_count) {
// There should be expected_match_count 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.
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("<path class='bond-5 atom-5 atom-6.*stroke:#FF0000;");
@@ -8535,16 +8540,16 @@ TEST_CASE("Lasso highlights") {
CHECK(match_count == 2);
auto a11reg = std::sregex_iterator(text.begin(), text.end(), a11);
auto dat1 = *a11reg;
CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(223.5, 0.1));
CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(131.9, 0.1));
CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(222.2, 0.1));
CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(131.4, 0.1));
CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(346.2, 0.1));
CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(279.1, 0.1));
CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(345.0, 0.1));
CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(278.7, 0.1));
a11reg++;
dat1 = *a11reg;
CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(245.3, 0.1));
CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(112.6, 0.1));
CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(245.5, 0.1));
CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(114.0, 0.1));
CHECK_THAT(stod(dat1[1]), Catch::Matchers::WithinAbs(340.5, 0.1));
CHECK_THAT(stod(dat1[2]), Catch::Matchers::WithinAbs(250.9, 0.1));
CHECK_THAT(stod(dat1[3]), Catch::Matchers::WithinAbs(341.6, 0.1));
CHECK_THAT(stod(dat1[4]), Catch::Matchers::WithinAbs(250.0, 0.1));
// There should not be any red lines for bond 5.
std::regex bond5("<path class='bond-5 atom-5 atom-6.*stroke:#FF0000;");
@@ -10159,12 +10164,12 @@ TEST_CASE("Github 7739 - Bad multi-coloured wedge") {
outs << text;
outs.flush();
std::regex bond19(
"<path class='bond-1 atom-1 atom-2' .*style='fill:#000000;"
"fill-rule:evenodd;fill-opacity:1;stroke:#000000;");
"<path class='bond-1 atom-1 atom-2' .*style='fill:none;fill-rule:evenodd;stroke:#000000;"
"stroke-width:1.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />");
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");
}
}

View File

@@ -1143,11 +1143,11 @@ void test6() {
// start of bond-0
#if DO_TEST_ASSERT
TEST_ASSERT(
txt.find("<path class='bond-0 atom-0 atom-1' d='M 268.9,148.0") !=
txt.find("<path class='bond-0 atom-0 atom-1' d='M 268.9,152.0") !=
std::string::npos);
// start of first radical spot
TEST_ASSERT(
txt.find("<path class='atom-0' d='M 282.9,152.0 L 282.9,152.2") !=
txt.find("<path class='atom-0' d='M 282.9,156.0 L 282.9,156.2") !=
std::string::npos);
#endif
check_file_hash(nameBase + ".svg");
@@ -1354,7 +1354,7 @@ void test8PrepareMolForDrawing() {
TEST_ASSERT(!nm.getConformer().is3D());
TEST_ASSERT(nm.getBondBetweenAtoms(3, 10)->getBondType() == Bond::SINGLE);
TEST_ASSERT(nm.getBondBetweenAtoms(3, 10)->getBondDir() ==
Bond::BEGINDASH);
Bond::BEGINWEDGE);
// make sure we can do it again:
MolDraw2DUtils::prepareMolForDrawing(nm);
@@ -1362,7 +1362,7 @@ void test8PrepareMolForDrawing() {
TEST_ASSERT(nm.getNumConformers() == 1);
TEST_ASSERT(nm.getBondBetweenAtoms(3, 10)->getBondType() == Bond::SINGLE);
TEST_ASSERT(nm.getBondBetweenAtoms(3, 10)->getBondDir() ==
Bond::BEGINDASH);
Bond::BEGINWEDGE);
}
{
RWMol nm(*m);
@@ -1372,7 +1372,7 @@ void test8PrepareMolForDrawing() {
TEST_ASSERT(nm.getNumConformers() == 1);
TEST_ASSERT(nm.getBondBetweenAtoms(3, 2)->getBondType() == Bond::SINGLE);
TEST_ASSERT(nm.getBondBetweenAtoms(3, 2)->getBondDir() ==
Bond::BEGINWEDGE);
Bond::BEGINDASH);
}
delete m;
}
@@ -3244,7 +3244,7 @@ M END
outs.close();
#ifdef RDK_BUILD_FREETYPE_SUPPORT
#if DO_TEST_ASSERT
TEST_ASSERT(text.find("<path class='atom-8' d='M 166.1 92.7") !=
TEST_ASSERT(text.find("<path class='atom-8' d='M 29.4 115.0") !=
std::string::npos);
#endif
#else
@@ -3719,24 +3719,25 @@ void testGithub2931() {
"<ellipse cx='(\\d+\\.\\d+)' cy='(\\d+\\.\\d+)'"
" rx='(\\d+\\.\\d+)' ry='(\\d+\\.\\d+)' class='atom-6'");
std::smatch match = *std::sregex_iterator(text.begin(), text.end(), r1);
#ifdef RDK_BUILD_FREETYPE_SUPPORT
#if DO_TEST_ASSERT
TEST_ASSERT(text.find("stroke:#FF8C00;stroke-width:8.0px") !=
std::string::npos);
// it's an ellipse, so different radii
TEST_ASSERT(fabs(stod(match[1]) - 243) <
1); // significant variability with freetype version here
TEST_ASSERT(fabs(stod(match[2]) - 350.2) < 1.0);
TEST_ASSERT(fabs(stod(match[3]) - 12.0) < 0.2);
TEST_ASSERT(fabs(stod(match[4]) - 12.4) < 0.2);
// significant variability with freetype version here
TEST_ASSERT(fabs(stod(match[1]) - 243.4) < 1.0);
TEST_ASSERT(fabs(stod(match[2]) - 103.7) < 1.0);
TEST_ASSERT(fabs(stod(match[3]) - 11.8) < 0.2);
TEST_ASSERT(fabs(stod(match[4]) - 12.1) < 0.2);
#endif
#else
TEST_ASSERT(text.find("stroke:#FF8C00;stroke-width:8.0px") !=
std::string::npos);
TEST_ASSERT(fabs(stod(match[1]) - 243.4) < 0.1);
TEST_ASSERT(fabs(stod(match[2]) - 349.3) < 0.1);
TEST_ASSERT(fabs(stod(match[3]) - 9.7) < 0.1);
TEST_ASSERT(fabs(stod(match[4]) - 11.0) < 0.1);
TEST_ASSERT(fabs(stod(match[2]) - 103.7) < 0.1);
TEST_ASSERT(fabs(stod(match[3]) - 9.5) < 0.1);
TEST_ASSERT(fabs(stod(match[4]) - 10.7) < 0.1);
#endif
check_file_hash("testGithub2931_1.svg");
}
@@ -3763,15 +3764,15 @@ void testGithub2931() {
std::string::npos);
// it's a circle
TEST_ASSERT(fabs(stod(match[1]) - 243.9) < 0.1);
TEST_ASSERT(fabs(stod(match[2]) - 350.0) < 0.1);
TEST_ASSERT(fabs(stod(match[3]) - 12.2) < 0.1);
TEST_ASSERT(fabs(stod(match[4]) - 12.2) < 0.1);
TEST_ASSERT(fabs(stod(match[2]) - 104.7) < 0.1);
TEST_ASSERT(fabs(stod(match[3]) - 12.1) < 0.1);
TEST_ASSERT(fabs(stod(match[4]) - 12.1) < 0.1);
#endif
#else
TEST_ASSERT(text.find("stroke:#FF8C00;stroke-width:8.0px") !=
std::string::npos);
TEST_ASSERT(fabs(stod(match[1]) - 243.9) < 0.1);
TEST_ASSERT(fabs(stod(match[2]) - 347.7) < 0.1);
TEST_ASSERT(fabs(stod(match[2]) - 103.2) < 0.1);
TEST_ASSERT(fabs(stod(match[3]) - 12.1) < 0.1);
TEST_ASSERT(fabs(stod(match[4]) - 12.1) < 0.1);
#endif
@@ -3823,15 +3824,15 @@ void testGithub2931() {
TEST_ASSERT(text.find("stroke:#FF8C00;stroke-width:8.0px") !=
std::string::npos);
TEST_ASSERT(
text.find("<ellipse cx='246.7' cy='341.6' rx='11.6' ry='11.6'"
" class='atom-6' style='fill:none;stroke:#00FF00;") !=
text.find("<ellipse cx='246.7' cy='113.5' rx='9.3' ry='9.3' "
"class='atom-6' style='fill:none;stroke:#00FF00;") !=
std::string::npos);
#endif
#else
TEST_ASSERT(text.find("stroke:#FF8C00;stroke-width:8.0px") !=
std::string::npos);
TEST_ASSERT(
text.find("<ellipse cx='247.8' cy='294.5' rx='11.6' ry='11.6' "
text.find("<ellipse cx='247.8' cy='159.9' rx='11.5' ry='11.5' "
"class='atom-5' style='fill:none;stroke:#00FF00") !=
std::string::npos);
#endif
@@ -3996,13 +3997,13 @@ void test20Annotate() {
#ifdef RDK_BUILD_FREETYPE_SUPPORT
#if DO_TEST_ASSERT
// first note (atom 0)
TEST_ASSERT(text.find("<path class='note' d='M 51.9 122.3") !=
TEST_ASSERT(text.find("<path class='note' d='M 332.1 160.7") !=
std::string::npos);
#endif
#else
// first one of atom note 11
TEST_ASSERT(text.find("<text x='392.8' y='215.5' class='note' "
"style='font-size:11px;font-style:normal;font-weight:"
TEST_ASSERT(text.find("<text x='73.5' y='312.9' class='note' "
"style='font-size:10px;font-style:normal;font-weight:"
"normal;fill-opacity:1;stroke:none;font-family:sans-"
"serif;text-anchor:start;fill:#000000' >1</text>") !=
std::string::npos);
@@ -4076,13 +4077,13 @@ void test20Annotate() {
#ifdef RDK_BUILD_FREETYPE_SUPPORT
#if DO_TEST_ASSERT
// first note
TEST_ASSERT(text.find("<path class='note' d='M 157.4 177.9") !=
TEST_ASSERT(text.find("<path class='note' d='M 216.9 296.7") !=
std::string::npos);
#endif
#else
// f of foolish
TEST_ASSERT(text.find("<text x='146.4' y='182.4' class='note' "
"style='font-size:12px;font-style:normal;font-weight:"
TEST_ASSERT(text.find("<text x='206.2' y='299.6' class='note' "
"style='font-size:11px;font-style:normal;font-weight:"
"normal;fill-opacity:1;stroke:none;font-family:sans-"
"serif;text-anchor:start;fill:#000000' >f</text>") !=
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("<path class='note' d='M 20.7 48.9") !=
TEST_ASSERT(text.find("<path class='note' d='M 132.9 64.3") !=
std::string::npos);
#endif
#else
// first one of atom note 11
TEST_ASSERT(text.find("<text x='157.1' y='86.2' class='note' "
TEST_ASSERT(text.find("<text x='32.4' y='125.2' class='note' "
"style='font-size:4px;font-style:normal;font-weight:"
"normal;fill-opacity:1;stroke:none;font-family:sans-"
"serif;text-anchor:start;fill:#000000' >1</text>") !=
@@ -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<Point2D> expected{
Point2D(138.7, 116.8), Point2D(141.9, 116.8), Point2D(134.7, 129.2),
Point2D(133.1, 126.5)};
std::vector<Point2D> 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<Point2D> expected{
Point2D(131.1, 120.8), Point2D(149.5, 120.8), Point2D(138.5, 139.8),
Point2D(129.3, 123.8)};
std::vector<Point2D> 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);

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com http://www.chemaxon.com/marvin/schema/mrvSchema_20_20_0.xsd"><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="3" y2="0.00000"/><atom id="a2" elementType="C" x2="1.5" y2="0.00000"/><atom id="a3" elementType="C" x2="0.75" y2="-1.29904"/><atom id="a4" elementType="N" x2="1.5" y2="-2.59808"/><atom id="a5" elementType="C" x2="2.99178" y2="-2.75487"/><atom id="a6" elementType="C" x2="3.30365" y2="-4.22209"/><atom id="a7" elementType="C" x2="2.00461" y2="-4.97209"/><atom id="a8" elementType="C" x2="0.889895" y2="-3.96839"/><atom id="a9" elementType="C" x2="-0.577326" y2="-4.28026"/><atom id="a10" elementType="C" x2="-0.75" y2="-1.29904"/><atom id="a11" elementType="C" x2="-1.5" y2="-2.59808"/><atom id="a12" elementType="C" x2="-1.5" y2="0.00000"/><atom id="a13" elementType="C" x2="-0.75" y2="1.29904"/><atom id="a14" elementType="C" x2="0.75" y2="1.29904"/></atomArray><bondArray><bond id="b1" atomRefs2="a1 a2" order="1"/><bond id="b2" atomRefs2="a2 a3" order="2"/><bond id="b3" atomRefs2="a3 a4" order="1"/><bond id="b4" atomRefs2="a4 a5" order="1"/><bond id="b5" atomRefs2="a5 a6" order="2"/><bond id="b6" atomRefs2="a6 a7" order="1"/><bond id="b7" atomRefs2="a7 a8" order="2"/><bond id="b8" atomRefs2="a8 a9" order="1"/><bond id="b9" atomRefs2="a3 a10" order="1"><bondStereo>W</bondStereo></bond><bond id="b10" atomRefs2="a10 a11" order="1"/><bond id="b11" atomRefs2="a10 a12" order="1"/><bond id="b12" atomRefs2="a12 a13" order="1"/><bond id="b13" atomRefs2="a13 a14" order="1"/><bond id="b14" atomRefs2="a14 a2" order="1"/><bond id="b15" atomRefs2="a8 a4" order="1"/></bondArray></molecule></MChemicalStruct></MDocument></cml>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com http://www.chemaxon.com/marvin/schema/mrvSchema_20_20_0.xsd"><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="3" y2="0.00000"/><atom id="a2" elementType="C" x2="1.5" y2="0.00000"/><atom id="a3" elementType="C" x2="0.75" y2="1.29904"/><atom id="a4" elementType="N" x2="1.5" y2="2.59808"/><atom id="a5" elementType="C" x2="2.99178" y2="2.75487"/><atom id="a6" elementType="C" x2="3.30365" y2="4.22209"/><atom id="a7" elementType="C" x2="2.00461" y2="4.97209"/><atom id="a8" elementType="C" x2="0.889895" y2="3.96839"/><atom id="a9" elementType="C" x2="-0.577326" y2="4.28026"/><atom id="a10" elementType="C" x2="-0.75" y2="1.29904"/><atom id="a11" elementType="C" x2="-1.5" y2="2.59808"/><atom id="a12" elementType="C" x2="-1.5" y2="0.00000"/><atom id="a13" elementType="C" x2="-0.75" y2="-1.29904"/><atom id="a14" elementType="C" x2="0.75" y2="-1.29904"/></atomArray><bondArray><bond id="b1" atomRefs2="a1 a2" order="1"/><bond id="b2" atomRefs2="a2 a3" order="2"/><bond id="b3" atomRefs2="a3 a4" order="1"/><bond id="b4" atomRefs2="a4 a5" order="1"/><bond id="b5" atomRefs2="a5 a6" order="2"/><bond id="b6" atomRefs2="a6 a7" order="1"/><bond id="b7" atomRefs2="a7 a8" order="2"/><bond id="b8" atomRefs2="a8 a9" order="1"/><bond id="b9" atomRefs2="a3 a10" order="1"><bondStereo>H</bondStereo></bond><bond id="b10" atomRefs2="a10 a11" order="1"/><bond id="b11" atomRefs2="a10 a12" order="1"/><bond id="b12" atomRefs2="a12 a13" order="1"/><bond id="b13" atomRefs2="a13 a14" order="1"/><bond id="b14" atomRefs2="a14 a2" order="1"/><bond id="b15" atomRefs2="a8 a4" order="1"/></bondArray></molecule></MChemicalStruct></MDocument></cml>

View File

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

View File

@@ -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), ())

View File

@@ -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 +