smiles-js 2.0.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +162 -0
- package/README.md +39 -0
- package/docs/MIRROR_PLAN.md +204 -0
- package/docs/smiles.peggy +215 -0
- package/package.json +1 -1
- package/scripts/coverage-summary.js +1 -1
- package/src/codegen/branch-crossing-ring.js +27 -6
- package/src/codegen/interleaved-fused-ring.js +24 -0
- package/src/decompiler.js +236 -51
- package/src/decompiler.test.js +232 -60
- package/src/fragment.test.js +7 -2
- package/src/manipulation.js +409 -4
- package/src/manipulation.test.js +359 -1
- package/src/method-attachers.js +37 -8
- package/src/node-creators.js +7 -0
- package/src/parser/ast-builder.js +23 -8
- package/src/parser/ring-group-builder.js +14 -2
- package/src/parser/ring-utils.js +28 -0
- package/test-integration/__snapshots__/acetaminophen.test.js.snap +20 -0
- package/test-integration/__snapshots__/adjuvant-analgesics.test.js.snap +63 -1
- package/test-integration/__snapshots__/cholesterol-drugs.test.js.snap +437 -0
- package/test-integration/__snapshots__/dexamethasone.test.js.snap +31 -0
- package/test-integration/__snapshots__/endocannabinoids.test.js.snap +79 -2
- package/test-integration/__snapshots__/endogenous-opioids.test.js.snap +1116 -0
- package/test-integration/__snapshots__/hypertension-medication.test.js.snap +70 -1
- package/test-integration/__snapshots__/local-anesthetics.test.js.snap +97 -0
- package/test-integration/__snapshots__/nsaids-otc.test.js.snap +61 -1
- package/test-integration/__snapshots__/nsaids-prescription.test.js.snap +115 -2
- package/test-integration/__snapshots__/opioids.test.js.snap +113 -4
- package/test-integration/__snapshots__/steroids.test.js.snap +381 -2
- package/test-integration/acetaminophen.test.js +15 -3
- package/test-integration/adjuvant-analgesics.test.js +43 -7
- package/test-integration/cholesterol-drugs.test.js +127 -20
- package/test-integration/cholesterol.test.js +112 -0
- package/test-integration/dexamethasone.test.js +8 -2
- package/test-integration/endocannabinoids.test.js +48 -12
- package/test-integration/endogenous-opioids.smiles.js +32 -0
- package/test-integration/endogenous-opioids.test.js +192 -0
- package/test-integration/hypertension-medication.test.js +32 -8
- package/test-integration/local-anesthetics.smiles.js +33 -0
- package/test-integration/local-anesthetics.test.js +64 -16
- package/test-integration/mirror.test.js +151 -0
- package/test-integration/nsaids-otc.test.js +40 -10
- package/test-integration/nsaids-prescription.test.js +72 -18
- package/test-integration/opioids.test.js +56 -14
- package/test-integration/polymer.test.js +148 -0
- package/test-integration/steroids.test.js +112 -28
- package/test-integration/utils.js +4 -2
- package/todo +2 -3
|
@@ -71,6 +71,23 @@ exports[`Telmisartan Integration Test parses telmisartan 1`] = `
|
|
|
71
71
|
`;
|
|
72
72
|
|
|
73
73
|
exports[`Telmisartan Integration Test generates valid code via toCode() 1`] = `
|
|
74
|
+
"export const v1 = Fragment('CCC');
|
|
75
|
+
export const v2 = Fragment('C1=CC((=CC1))');
|
|
76
|
+
export const v3 = Fragment('C1=NC((=CN1))');
|
|
77
|
+
export const v4 = Fragment('C2=C(C=C(C=C2))');
|
|
78
|
+
export const v5 = v3.fuse(2, v4);
|
|
79
|
+
export const v6 = Fragment('C5=CC=CC5');
|
|
80
|
+
export const v7 = Fragment('C5=NC=CN5');
|
|
81
|
+
export const v8 = Fragment('C3=CC=C(C=C3)');
|
|
82
|
+
export const v9 = Fragment('C6=CC=CC=C6');
|
|
83
|
+
export const v10 = Fragment('C4=CC=CC=C4');
|
|
84
|
+
export const v11 = Linear(['O'], ['=']);
|
|
85
|
+
export const v12 = v5.addSequentialRings([{ ring: v7, depth: 1 }, { ring: v8, depth: 2 }, { ring: v9, depth: 1 }, { ring: v10, depth: 2 }], { chainAtoms: [{ atom: 'C', depth: 2, position: 'before' }, { atom: 'C', depth: 2, position: 'after', attachments: [v11] }, { atom: 'O', depth: 2, position: 'after' }, { atom: 'C', depth: 1, position: 'after' }] });
|
|
86
|
+
export const v13 = Fragment('C');
|
|
87
|
+
export const v14 = Molecule([v1, v12, v13]);"
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`Telmisartan Integration Test generates valid verbose code via toCode() 1`] = `
|
|
74
91
|
"export const v1 = Linear(['C', 'C', 'C']);
|
|
75
92
|
export const v2 = Ring({ atoms: 'C', size: 5, bonds: ['=', null, '=', null, null], branchDepths: [0, 0, 0, 2, 2] });
|
|
76
93
|
export const v3 = v2.substitute(2, 'N');
|
|
@@ -219,6 +236,22 @@ exports[`Losartan Integration Test parses losartan 1`] = `
|
|
|
219
236
|
`;
|
|
220
237
|
|
|
221
238
|
exports[`Losartan Integration Test generates valid code via toCode() 1`] = `
|
|
239
|
+
"export const v1 = Fragment('CCCC');
|
|
240
|
+
export const v2 = Fragment('C1=CC=CC1');
|
|
241
|
+
export const v3 = Fragment('C1=NC=CN1');
|
|
242
|
+
export const v4 = Fragment('Cl');
|
|
243
|
+
export const v5 = v3.attach(3, v4);
|
|
244
|
+
export const v6 = Fragment('CO');
|
|
245
|
+
export const v7 = v5.attach(4, v6);
|
|
246
|
+
export const v8 = Fragment('C');
|
|
247
|
+
export const v9 = Fragment('C2=CC=C(C=C2)');
|
|
248
|
+
export const v10 = Fragment('C3=CC=CC=C3');
|
|
249
|
+
export const v11 = Fragment('N4=NNN=N4');
|
|
250
|
+
export const v12 = Fragment('C4=NNN=N4');
|
|
251
|
+
export const v13 = Molecule([v1, v7, v8, v9, v10, v12]);"
|
|
252
|
+
`;
|
|
253
|
+
|
|
254
|
+
exports[`Losartan Integration Test generates valid verbose code via toCode() 1`] = `
|
|
222
255
|
"export const v1 = Linear(['C', 'C', 'C', 'C']);
|
|
223
256
|
export const v2 = Ring({ atoms: 'C', size: 5, bonds: ['=', null, '=', null, null] });
|
|
224
257
|
export const v3 = v2.substitute(2, 'N');
|
|
@@ -372,6 +405,26 @@ exports[`Valsartan Integration Test parses valsartan 1`] = `
|
|
|
372
405
|
`;
|
|
373
406
|
|
|
374
407
|
exports[`Valsartan Integration Test generates valid code via toCode() 1`] = `
|
|
408
|
+
"export const v1 = Fragment('CCCCCNCCO');
|
|
409
|
+
export const v2 = Linear(['O'], ['=']);
|
|
410
|
+
export const v3 = v1.attach(5, v2);
|
|
411
|
+
export const v4 = Fragment('C');
|
|
412
|
+
export const v5 = Fragment('C1=CC=C(C=C1)');
|
|
413
|
+
export const v6 = Fragment('C2=CC=CC=C2');
|
|
414
|
+
export const v7 = Fragment('N3=NNN=N3');
|
|
415
|
+
export const v8 = Fragment('C3=NNN=N3');
|
|
416
|
+
export const v9 = v6.addSequentialRings([{ ring: v8 }]);
|
|
417
|
+
export const v10 = Molecule([v4, v5, v9]);
|
|
418
|
+
export const v11 = v3.attach(6, v10);
|
|
419
|
+
export const v12 = Fragment('CC');
|
|
420
|
+
export const v13 = Fragment('C');
|
|
421
|
+
export const v14 = v12.attach(1, v13);
|
|
422
|
+
export const v15 = v11.attach(7, v14);
|
|
423
|
+
export const v16 = Linear(['O'], ['=']);
|
|
424
|
+
export const v17 = v15.attach(8, v16);"
|
|
425
|
+
`;
|
|
426
|
+
|
|
427
|
+
exports[`Valsartan Integration Test generates valid verbose code via toCode() 1`] = `
|
|
375
428
|
"export const v1 = Linear(['C', 'C', 'C', 'C', 'C', 'N', 'C', 'C', 'O']);
|
|
376
429
|
export const v2 = Linear(['O'], ['=']);
|
|
377
430
|
export const v3 = v1.attach(5, v2);
|
|
@@ -528,6 +581,22 @@ exports[`Irbesartan Integration Test parses irbesartan 1`] = `
|
|
|
528
581
|
`;
|
|
529
582
|
|
|
530
583
|
exports[`Irbesartan Integration Test generates valid code via toCode() 1`] = `
|
|
584
|
+
"export const v1 = Fragment('CCCC');
|
|
585
|
+
export const v2 = Fragment('C1=CCCC1');
|
|
586
|
+
export const v3 = Fragment('C1=NCCN1');
|
|
587
|
+
export const v4 = Linear(['O'], ['=']);
|
|
588
|
+
export const v5 = v3.attach(4, v4);
|
|
589
|
+
export const v6 = Fragment('C2(CCCC2)');
|
|
590
|
+
export const v7 = FusedRing({ metadata: { rings: [{ ring: v5, start: 4, end: 13, atoms: [{ position: 4, depth: 0, value: 'C', rings: [1, 1] }, { position: 5, depth: 0, value: 'N', bond: '=', rings: [1] }, { position: 6, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 11, depth: 0, value: 'C', rings: [1] }, { position: 13, depth: 0, value: 'N', rings: [1] }] }, { ring: v6, start: 6, end: 10, atoms: [{ position: 6, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 7, depth: 1, value: 'C', rings: [2], branchId: 10 }, { position: 8, depth: 1, value: 'C', rings: [2], branchId: 10 }, { position: 9, depth: 1, value: 'C', rings: [2], branchId: 10 }, { position: 10, depth: 1, value: 'C', rings: [2], branchId: 10 }] }] } });
|
|
591
|
+
export const v8 = Fragment('C');
|
|
592
|
+
export const v9 = Fragment('C3=CC=C(C=C3)');
|
|
593
|
+
export const v10 = Fragment('C4=CC=CC=C4');
|
|
594
|
+
export const v11 = Fragment('N5=NNN=N5');
|
|
595
|
+
export const v12 = Fragment('C5=NNN=N5');
|
|
596
|
+
export const v13 = Molecule([v1, v7, v8, v9, v10, v12]);"
|
|
597
|
+
`;
|
|
598
|
+
|
|
599
|
+
exports[`Irbesartan Integration Test generates valid verbose code via toCode() 1`] = `
|
|
531
600
|
"export const v1 = Linear(['C', 'C', 'C', 'C']);
|
|
532
601
|
export const v2 = Ring({ atoms: 'C', size: 5, bonds: ['=', null, null, null, null] });
|
|
533
602
|
export const v3 = v2.substitute(2, 'N');
|
|
@@ -535,7 +604,7 @@ export const v4 = v3.substitute(5, 'N');
|
|
|
535
604
|
export const v5 = Linear(['O'], ['=']);
|
|
536
605
|
export const v6 = v4.attach(4, v5);
|
|
537
606
|
export const v7 = Ring({ atoms: 'C', size: 5, ringNumber: 2, offset: 2, branchDepths: [0, 1, 1, 1, 1] });
|
|
538
|
-
export const v8 = FusedRing({ metadata: { rings: [{ ring: v6, start: 4, end: 13, atoms: [{ position: 4, depth: 0, value: 'C', rings: [1, 1] }, { position: 5, depth: 0, value: 'N', bond: '=', rings: [1] }, { position: 6, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 11, depth: 0, value: 'C', rings: [1] }, { position: 13, depth: 0, value: 'N', rings: [1] }] }, { ring: v7, start: 6, end: 10, atoms: [{ position: 6, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 7, depth: 1, value: 'C', rings: [2] }, { position: 8, depth: 1, value: 'C', rings: [2] }, { position: 9, depth: 1, value: 'C', rings: [2] }, { position: 10, depth: 1, value: 'C', rings: [2] }] }] } });
|
|
607
|
+
export const v8 = FusedRing({ metadata: { rings: [{ ring: v6, start: 4, end: 13, atoms: [{ position: 4, depth: 0, value: 'C', rings: [1, 1] }, { position: 5, depth: 0, value: 'N', bond: '=', rings: [1] }, { position: 6, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 11, depth: 0, value: 'C', rings: [1] }, { position: 13, depth: 0, value: 'N', rings: [1] }] }, { ring: v7, start: 6, end: 10, atoms: [{ position: 6, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 7, depth: 1, value: 'C', rings: [2], branchId: 10 }, { position: 8, depth: 1, value: 'C', rings: [2], branchId: 10 }, { position: 9, depth: 1, value: 'C', rings: [2], branchId: 10 }, { position: 10, depth: 1, value: 'C', rings: [2], branchId: 10 }] }] } });
|
|
539
608
|
export const v9 = Linear(['C']);
|
|
540
609
|
export const v10 = Ring({ atoms: 'C', size: 6, ringNumber: 3, bonds: ['=', null, '=', null, '=', null], branchDepths: [0, 0, 0, 0, 1, 1] });
|
|
541
610
|
export const v11 = Ring({ atoms: 'C', size: 6, ringNumber: 4, bonds: ['=', null, '=', null, '=', null] });
|
|
@@ -93,6 +93,19 @@ exports[`Lidocaine Integration Test parses lidocaine 1`] = `
|
|
|
93
93
|
`;
|
|
94
94
|
|
|
95
95
|
exports[`Lidocaine Integration Test generates valid code via toCode() 1`] = `
|
|
96
|
+
"export const v1 = Fragment('CCNCCN');
|
|
97
|
+
export const v2 = Fragment('CC');
|
|
98
|
+
export const v3 = v1.attach(3, v2);
|
|
99
|
+
export const v4 = Linear(['O'], ['=']);
|
|
100
|
+
export const v5 = v3.attach(5, v4);
|
|
101
|
+
export const v6 = Fragment('C1=CC=CC=C1');
|
|
102
|
+
export const v7 = Fragment('C');
|
|
103
|
+
export const v8 = v6.attach(2, v7);
|
|
104
|
+
export const v9 = Fragment('C');
|
|
105
|
+
export const v10 = Molecule([v5, v8, v9]);"
|
|
106
|
+
`;
|
|
107
|
+
|
|
108
|
+
exports[`Lidocaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
96
109
|
"export const v1 = Linear(['C', 'C', 'N', 'C', 'C', 'N']);
|
|
97
110
|
export const v2 = Linear(['C', 'C']);
|
|
98
111
|
export const v3 = v1.attach(3, v2);
|
|
@@ -210,6 +223,20 @@ exports[`Bupivacaine Integration Test parses bupivacaine 1`] = `
|
|
|
210
223
|
`;
|
|
211
224
|
|
|
212
225
|
exports[`Bupivacaine Integration Test generates valid code via toCode() 1`] = `
|
|
226
|
+
"export const v1 = Fragment('CCCC');
|
|
227
|
+
export const v2 = Fragment('C1CCCCC1');
|
|
228
|
+
export const v3 = Fragment('N1CCCCC1');
|
|
229
|
+
export const v4 = Fragment('CN');
|
|
230
|
+
export const v5 = Linear(['O'], ['=']);
|
|
231
|
+
export const v6 = v4.attach(1, v5);
|
|
232
|
+
export const v7 = Fragment('C2=CC=CC=C2');
|
|
233
|
+
export const v8 = Fragment('C');
|
|
234
|
+
export const v9 = v7.attach(2, v8);
|
|
235
|
+
export const v10 = Fragment('C');
|
|
236
|
+
export const v11 = Molecule([v1, v3, v6, v9, v10]);"
|
|
237
|
+
`;
|
|
238
|
+
|
|
239
|
+
exports[`Bupivacaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
213
240
|
"export const v1 = Linear(['C', 'C', 'C', 'C']);
|
|
214
241
|
export const v2 = Ring({ atoms: 'C', size: 6 });
|
|
215
242
|
export const v3 = v2.substitute(1, 'N');
|
|
@@ -326,6 +353,20 @@ exports[`Ropivacaine Integration Test parses ropivacaine 1`] = `
|
|
|
326
353
|
`;
|
|
327
354
|
|
|
328
355
|
exports[`Ropivacaine Integration Test generates valid code via toCode() 1`] = `
|
|
356
|
+
"export const v1 = Fragment('CCC');
|
|
357
|
+
export const v2 = Fragment('C1CCCCC1');
|
|
358
|
+
export const v3 = Fragment('N1CCCCC1');
|
|
359
|
+
export const v4 = Fragment('CN');
|
|
360
|
+
export const v5 = Linear(['O'], ['=']);
|
|
361
|
+
export const v6 = v4.attach(1, v5);
|
|
362
|
+
export const v7 = Fragment('C2=CC=CC=C2');
|
|
363
|
+
export const v8 = Fragment('C');
|
|
364
|
+
export const v9 = v7.attach(2, v8);
|
|
365
|
+
export const v10 = Fragment('C');
|
|
366
|
+
export const v11 = Molecule([v1, v3, v6, v9, v10]);"
|
|
367
|
+
`;
|
|
368
|
+
|
|
369
|
+
exports[`Ropivacaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
329
370
|
"export const v1 = Linear(['C', 'C', 'C']);
|
|
330
371
|
export const v2 = Ring({ atoms: 'C', size: 6 });
|
|
331
372
|
export const v3 = v2.substitute(1, 'N');
|
|
@@ -437,6 +478,20 @@ exports[`Mepivacaine Integration Test parses mepivacaine 1`] = `
|
|
|
437
478
|
`;
|
|
438
479
|
|
|
439
480
|
exports[`Mepivacaine Integration Test generates valid code via toCode() 1`] = `
|
|
481
|
+
"export const v1 = Fragment('C');
|
|
482
|
+
export const v2 = Fragment('C1CCCCC1');
|
|
483
|
+
export const v3 = Fragment('N1CCCCC1');
|
|
484
|
+
export const v4 = Fragment('CN');
|
|
485
|
+
export const v5 = Linear(['O'], ['=']);
|
|
486
|
+
export const v6 = v4.attach(1, v5);
|
|
487
|
+
export const v7 = Fragment('C2=CC=CC=C2');
|
|
488
|
+
export const v8 = Fragment('C');
|
|
489
|
+
export const v9 = v7.attach(2, v8);
|
|
490
|
+
export const v10 = Fragment('C');
|
|
491
|
+
export const v11 = Molecule([v1, v3, v6, v9, v10]);"
|
|
492
|
+
`;
|
|
493
|
+
|
|
494
|
+
exports[`Mepivacaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
440
495
|
"export const v1 = Linear(['C']);
|
|
441
496
|
export const v2 = Ring({ atoms: 'C', size: 6 });
|
|
442
497
|
export const v3 = v2.substitute(1, 'N');
|
|
@@ -530,6 +585,17 @@ exports[`Prilocaine Integration Test parses prilocaine 1`] = `
|
|
|
530
585
|
`;
|
|
531
586
|
|
|
532
587
|
exports[`Prilocaine Integration Test generates valid code via toCode() 1`] = `
|
|
588
|
+
"export const v1 = Fragment('CCCNCCN');
|
|
589
|
+
export const v2 = Fragment('C');
|
|
590
|
+
export const v3 = v1.attach(5, v2);
|
|
591
|
+
export const v4 = Linear(['O'], ['=']);
|
|
592
|
+
export const v5 = v3.attach(6, v4);
|
|
593
|
+
export const v6 = Fragment('C1=CC=CC=C1');
|
|
594
|
+
export const v7 = Fragment('C');
|
|
595
|
+
export const v8 = Molecule([v5, v6, v7]);"
|
|
596
|
+
`;
|
|
597
|
+
|
|
598
|
+
exports[`Prilocaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
533
599
|
"export const v1 = Linear(['C', 'C', 'C', 'N', 'C', 'C', 'N']);
|
|
534
600
|
export const v2 = Linear(['C']);
|
|
535
601
|
export const v3 = v1.attach(5, v2);
|
|
@@ -602,6 +668,15 @@ exports[`Benzocaine Integration Test parses benzocaine 1`] = `
|
|
|
602
668
|
`;
|
|
603
669
|
|
|
604
670
|
exports[`Benzocaine Integration Test generates valid code via toCode() 1`] = `
|
|
671
|
+
"export const v1 = Fragment('CCOC');
|
|
672
|
+
export const v2 = Linear(['O'], ['=']);
|
|
673
|
+
export const v3 = v1.attach(4, v2);
|
|
674
|
+
export const v4 = Fragment('C1=CC=CC=C1');
|
|
675
|
+
export const v5 = Fragment('N');
|
|
676
|
+
export const v6 = Molecule([v3, v4, v5]);"
|
|
677
|
+
`;
|
|
678
|
+
|
|
679
|
+
exports[`Benzocaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
605
680
|
"export const v1 = Linear(['C', 'C', 'O', 'C']);
|
|
606
681
|
export const v2 = Linear(['O'], ['=']);
|
|
607
682
|
export const v3 = v1.attach(4, v2);
|
|
@@ -697,6 +772,17 @@ exports[`Tetracaine Integration Test parses tetracaine 1`] = `
|
|
|
697
772
|
`;
|
|
698
773
|
|
|
699
774
|
exports[`Tetracaine Integration Test generates valid code via toCode() 1`] = `
|
|
775
|
+
"export const v1 = Fragment('CCCCN');
|
|
776
|
+
export const v2 = Fragment('C1=CC=CC=C1');
|
|
777
|
+
export const v3 = Fragment('COCCNC');
|
|
778
|
+
export const v4 = Linear(['O'], ['=']);
|
|
779
|
+
export const v5 = v3.attach(1, v4);
|
|
780
|
+
export const v6 = Fragment('C');
|
|
781
|
+
export const v7 = v5.attach(5, v6);
|
|
782
|
+
export const v8 = Molecule([v1, v2, v7]);"
|
|
783
|
+
`;
|
|
784
|
+
|
|
785
|
+
exports[`Tetracaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
700
786
|
"export const v1 = Linear(['C', 'C', 'C', 'C', 'N']);
|
|
701
787
|
export const v2 = Ring({ atoms: 'C', size: 6, bonds: ['=', null, '=', null, '=', null] });
|
|
702
788
|
export const v3 = Linear(['C', 'O', 'C', 'C', 'N', 'C']);
|
|
@@ -789,6 +875,17 @@ exports[`Procaine Integration Test parses procaine 1`] = `
|
|
|
789
875
|
`;
|
|
790
876
|
|
|
791
877
|
exports[`Procaine Integration Test generates valid code via toCode() 1`] = `
|
|
878
|
+
"export const v1 = Fragment('CCNCCOC');
|
|
879
|
+
export const v2 = Fragment('CC');
|
|
880
|
+
export const v3 = v1.attach(3, v2);
|
|
881
|
+
export const v4 = Linear(['O'], ['=']);
|
|
882
|
+
export const v5 = v3.attach(7, v4);
|
|
883
|
+
export const v6 = Fragment('C1=CC=CC=C1');
|
|
884
|
+
export const v7 = Fragment('N');
|
|
885
|
+
export const v8 = Molecule([v5, v6, v7]);"
|
|
886
|
+
`;
|
|
887
|
+
|
|
888
|
+
exports[`Procaine Integration Test generates valid verbose code via toCode() 1`] = `
|
|
792
889
|
"export const v1 = Linear(['C', 'C', 'N', 'C', 'C', 'O', 'C']);
|
|
793
890
|
export const v2 = Linear(['C', 'C']);
|
|
794
891
|
export const v3 = v1.attach(3, v2);
|
|
@@ -76,6 +76,17 @@ exports[`Aspirin Integration Test parses aspirin 1`] = `
|
|
|
76
76
|
`;
|
|
77
77
|
|
|
78
78
|
exports[`Aspirin Integration Test generates valid code via toCode() 1`] = `
|
|
79
|
+
"export const v1 = Fragment('CCO');
|
|
80
|
+
export const v2 = Linear(['O'], ['=']);
|
|
81
|
+
export const v3 = v1.attach(2, v2);
|
|
82
|
+
export const v4 = Fragment('c1ccccc1');
|
|
83
|
+
export const v5 = Fragment('CO');
|
|
84
|
+
export const v6 = Linear(['O'], ['=']);
|
|
85
|
+
export const v7 = v5.attach(1, v6);
|
|
86
|
+
export const v8 = Molecule([v3, v4, v7]);"
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
exports[`Aspirin Integration Test generates valid verbose code via toCode() 1`] = `
|
|
79
90
|
"export const v1 = Linear(['C', 'C', 'O']);
|
|
80
91
|
export const v2 = Linear(['O'], ['=']);
|
|
81
92
|
export const v3 = v1.attach(2, v2);
|
|
@@ -176,6 +187,19 @@ exports[`Ibuprofen Integration Test parses ibuprofen 1`] = `
|
|
|
176
187
|
`;
|
|
177
188
|
|
|
178
189
|
exports[`Ibuprofen Integration Test generates valid code via toCode() 1`] = `
|
|
190
|
+
"export const v1 = Fragment('CCC');
|
|
191
|
+
export const v2 = Fragment('C');
|
|
192
|
+
export const v3 = v1.attach(2, v2);
|
|
193
|
+
export const v4 = Fragment('c1ccccc1');
|
|
194
|
+
export const v5 = Fragment('CCO');
|
|
195
|
+
export const v6 = Fragment('C');
|
|
196
|
+
export const v7 = v5.attach(1, v6);
|
|
197
|
+
export const v8 = Linear(['O'], ['=']);
|
|
198
|
+
export const v9 = v7.attach(2, v8);
|
|
199
|
+
export const v10 = Molecule([v3, v4, v9]);"
|
|
200
|
+
`;
|
|
201
|
+
|
|
202
|
+
exports[`Ibuprofen Integration Test generates valid verbose code via toCode() 1`] = `
|
|
179
203
|
"export const v1 = Linear(['C', 'C', 'C']);
|
|
180
204
|
export const v2 = Linear(['C']);
|
|
181
205
|
export const v3 = v1.attach(2, v2);
|
|
@@ -285,10 +309,23 @@ exports[`Naproxen Integration Test parses naproxen 1`] = `
|
|
|
285
309
|
`;
|
|
286
310
|
|
|
287
311
|
exports[`Naproxen Integration Test generates valid code via toCode() 1`] = `
|
|
312
|
+
"export const v1 = Fragment('CO');
|
|
313
|
+
export const v2 = Fragment('c1ccc(cc1)');
|
|
314
|
+
export const v3 = Fragment('c2cc(ccc2)');
|
|
315
|
+
export const v4 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 11, atoms: [{ position: 2, depth: 0, value: 'c', rings: [1, 1] }, { position: 3, depth: 0, value: 'c', rings: [1] }, { position: 4, depth: 0, value: 'c', rings: [1] }, { position: 5, depth: 0, value: 'c', rings: [2, 2, 1] }, { position: 10, depth: 1, value: 'c', rings: [2, 1], branchId: 10 }, { position: 11, depth: 1, value: 'c', rings: [1], branchId: 10 }] }, { ring: v3, start: 5, end: 10, atoms: [{ position: 5, depth: 0, value: 'c', rings: [2, 2, 1] }, { position: 6, depth: 0, value: 'c', rings: [2] }, { position: 7, depth: 0, value: 'c', rings: [2] }, { position: 8, depth: 1, value: 'c', rings: [2], branchId: 10 }, { position: 9, depth: 1, value: 'c', rings: [2], branchId: 10 }, { position: 10, depth: 1, value: 'c', rings: [2, 1], branchId: 10 }] }] } });
|
|
316
|
+
export const v5 = Fragment('CCO');
|
|
317
|
+
export const v6 = Fragment('C');
|
|
318
|
+
export const v7 = v5.attach(1, v6);
|
|
319
|
+
export const v8 = Linear(['O'], ['=']);
|
|
320
|
+
export const v9 = v7.attach(2, v8);
|
|
321
|
+
export const v10 = Molecule([v1, v4, v9]);"
|
|
322
|
+
`;
|
|
323
|
+
|
|
324
|
+
exports[`Naproxen Integration Test generates valid verbose code via toCode() 1`] = `
|
|
288
325
|
"export const v1 = Linear(['C', 'O']);
|
|
289
326
|
export const v2 = Ring({ atoms: 'c', size: 6, branchDepths: [0, 0, 0, 0, 1, 1] });
|
|
290
327
|
export const v3 = Ring({ atoms: 'c', size: 6, ringNumber: 2, offset: 3, branchDepths: [0, 0, 0, 1, 1, 1] });
|
|
291
|
-
export const v4 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 11, atoms: [{ position: 2, depth: 0, value: 'c', rings: [1, 1] }, { position: 3, depth: 0, value: 'c', rings: [1] }, { position: 4, depth: 0, value: 'c', rings: [1] }, { position: 5, depth: 0, value: 'c', rings: [2, 2, 1] }, { position: 10, depth: 1, value: 'c', rings: [2, 1] }, { position: 11, depth: 1, value: 'c', rings: [1] }] }, { ring: v3, start: 5, end: 10, atoms: [{ position: 5, depth: 0, value: 'c', rings: [2, 2, 1] }, { position: 6, depth: 0, value: 'c', rings: [2] }, { position: 7, depth: 0, value: 'c', rings: [2] }, { position: 8, depth: 1, value: 'c', rings: [2] }, { position: 9, depth: 1, value: 'c', rings: [2] }, { position: 10, depth: 1, value: 'c', rings: [2, 1] }] }] } });
|
|
328
|
+
export const v4 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 11, atoms: [{ position: 2, depth: 0, value: 'c', rings: [1, 1] }, { position: 3, depth: 0, value: 'c', rings: [1] }, { position: 4, depth: 0, value: 'c', rings: [1] }, { position: 5, depth: 0, value: 'c', rings: [2, 2, 1] }, { position: 10, depth: 1, value: 'c', rings: [2, 1], branchId: 10 }, { position: 11, depth: 1, value: 'c', rings: [1], branchId: 10 }] }, { ring: v3, start: 5, end: 10, atoms: [{ position: 5, depth: 0, value: 'c', rings: [2, 2, 1] }, { position: 6, depth: 0, value: 'c', rings: [2] }, { position: 7, depth: 0, value: 'c', rings: [2] }, { position: 8, depth: 1, value: 'c', rings: [2], branchId: 10 }, { position: 9, depth: 1, value: 'c', rings: [2], branchId: 10 }, { position: 10, depth: 1, value: 'c', rings: [2, 1], branchId: 10 }] }] } });
|
|
292
329
|
export const v5 = Linear(['C', 'C', 'O']);
|
|
293
330
|
export const v6 = Linear(['C']);
|
|
294
331
|
export const v7 = v5.attach(1, v6);
|
|
@@ -353,6 +390,16 @@ exports[`Ketoprofen Integration Test parses ketoprofen 1`] = `
|
|
|
353
390
|
`;
|
|
354
391
|
|
|
355
392
|
exports[`Ketoprofen Integration Test generates valid code via toCode() 1`] = `
|
|
393
|
+
"export const v1 = Fragment('CCCO');
|
|
394
|
+
export const v2 = Fragment('c1ccccc1');
|
|
395
|
+
export const v3 = Fragment('c2ccccc2');
|
|
396
|
+
export const v4 = v2.addSequentialRings([{ ring: v3 }]);
|
|
397
|
+
export const v5 = v1.attach(2, v4);
|
|
398
|
+
export const v6 = Linear(['O'], ['=']);
|
|
399
|
+
export const v7 = v5.attach(3, v6);"
|
|
400
|
+
`;
|
|
401
|
+
|
|
402
|
+
exports[`Ketoprofen Integration Test generates valid verbose code via toCode() 1`] = `
|
|
356
403
|
"export const v1 = Linear(['C', 'C', 'C', 'O']);
|
|
357
404
|
export const v2 = Ring({ atoms: 'c', size: 6 });
|
|
358
405
|
export const v3 = Ring({ atoms: 'c', size: 6, ringNumber: 2 });
|
|
@@ -460,6 +507,19 @@ exports[`Diclofenac Integration Test parses diclofenac 1`] = `
|
|
|
460
507
|
`;
|
|
461
508
|
|
|
462
509
|
exports[`Diclofenac Integration Test generates valid code via toCode() 1`] = `
|
|
510
|
+
"export const v1 = Fragment('OCC');
|
|
511
|
+
export const v2 = Linear(['O'], ['=']);
|
|
512
|
+
export const v3 = v1.attach(2, v2);
|
|
513
|
+
export const v4 = Fragment('c1ccccc1');
|
|
514
|
+
export const v5 = Fragment('N');
|
|
515
|
+
export const v6 = Fragment('c2ccccc2');
|
|
516
|
+
export const v7 = Fragment('Cl');
|
|
517
|
+
export const v8 = v6.attach(2, v7);
|
|
518
|
+
export const v9 = Fragment('Cl');
|
|
519
|
+
export const v10 = Molecule([v3, v4, v5, v8, v9]);"
|
|
520
|
+
`;
|
|
521
|
+
|
|
522
|
+
exports[`Diclofenac Integration Test generates valid verbose code via toCode() 1`] = `
|
|
463
523
|
"export const v1 = Linear(['O', 'C', 'C']);
|
|
464
524
|
export const v2 = Linear(['O'], ['=']);
|
|
465
525
|
export const v3 = v1.attach(2, v2);
|
|
@@ -87,6 +87,19 @@ exports[`Celecoxib Integration Test parses celecoxib 1`] = `
|
|
|
87
87
|
`;
|
|
88
88
|
|
|
89
89
|
exports[`Celecoxib Integration Test generates valid code via toCode() 1`] = `
|
|
90
|
+
"export const v1 = Fragment('C');
|
|
91
|
+
export const v2 = Fragment('C1=CC=CC=C1');
|
|
92
|
+
export const v3 = Fragment('C2=CC=CC2');
|
|
93
|
+
export const v4 = Fragment('C2=CC=NN2');
|
|
94
|
+
export const v5 = Fragment('CF');
|
|
95
|
+
export const v6 = Fragment('F');
|
|
96
|
+
export const v7 = v5.attach(1, v6);
|
|
97
|
+
export const v8 = Fragment('F');
|
|
98
|
+
export const v9 = v7.attach(1, v8);
|
|
99
|
+
export const v10 = Molecule([v1, v2, v4, v9]);"
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
exports[`Celecoxib Integration Test generates valid verbose code via toCode() 1`] = `
|
|
90
103
|
"export const v1 = Linear(['C']);
|
|
91
104
|
export const v2 = Ring({ atoms: 'C', size: 6, bonds: ['=', null, '=', null, '=', null] });
|
|
92
105
|
export const v3 = Ring({ atoms: 'C', size: 5, ringNumber: 2, bonds: ['=', null, '=', null, null] });
|
|
@@ -144,6 +157,14 @@ exports[`Meloxicam Integration Test parses meloxicam 1`] = `
|
|
|
144
157
|
`;
|
|
145
158
|
|
|
146
159
|
exports[`Meloxicam Integration Test generates valid code via toCode() 1`] = `
|
|
160
|
+
"export const v1 = Fragment('C');
|
|
161
|
+
export const v2 = Fragment('C1=CC=CC1');
|
|
162
|
+
export const v3 = Fragment('C1=CN=CS1');
|
|
163
|
+
export const v4 = Fragment('C');
|
|
164
|
+
export const v5 = Molecule([v1, v3, v4]);"
|
|
165
|
+
`;
|
|
166
|
+
|
|
167
|
+
exports[`Meloxicam Integration Test generates valid verbose code via toCode() 1`] = `
|
|
147
168
|
"export const v1 = Linear(['C']);
|
|
148
169
|
export const v2 = Ring({ atoms: 'C', size: 5, bonds: ['=', null, '=', null, null] });
|
|
149
170
|
export const v3 = v2.substitute(3, 'N');
|
|
@@ -238,6 +259,18 @@ exports[`Piroxicam Integration Test parses piroxicam 1`] = `
|
|
|
238
259
|
`;
|
|
239
260
|
|
|
240
261
|
exports[`Piroxicam Integration Test generates valid code via toCode() 1`] = `
|
|
262
|
+
"export const v1 = Fragment('C');
|
|
263
|
+
export const v2 = Fragment('C1C=CC=CC=CC=CC=C1');
|
|
264
|
+
export const v3 = Fragment('N1C=CC=CC=CC=CS=O1');
|
|
265
|
+
export const v4 = Fragment('CN');
|
|
266
|
+
export const v5 = Linear(['O'], ['=']);
|
|
267
|
+
export const v6 = v4.attach(1, v5);
|
|
268
|
+
export const v7 = Fragment('C3=CC=CC=C3');
|
|
269
|
+
export const v8 = Fragment('C3=CC=CC=N3');
|
|
270
|
+
export const v9 = Molecule([v1, v3, v6, v8]);"
|
|
271
|
+
`;
|
|
272
|
+
|
|
273
|
+
exports[`Piroxicam Integration Test generates valid verbose code via toCode() 1`] = `
|
|
241
274
|
"export const v1 = Linear(['C']);
|
|
242
275
|
export const v2 = Ring({ atoms: 'C', size: 11, bonds: [null, '=', null, '=', null, '=', null, '=', null, '=', null] });
|
|
243
276
|
export const v3 = v2.substitute(1, 'N');
|
|
@@ -356,6 +389,21 @@ exports[`Etodolac Integration Test parses etodolac 1`] = `
|
|
|
356
389
|
`;
|
|
357
390
|
|
|
358
391
|
exports[`Etodolac Integration Test generates valid code via toCode() 1`] = `
|
|
392
|
+
"export const v1 = Fragment('CC');
|
|
393
|
+
export const v2 = Fragment('C1=CC=C(C=C1)');
|
|
394
|
+
export const v3 = Fragment('C2=CCC=C2');
|
|
395
|
+
export const v4 = Fragment('C2=CNC=C2');
|
|
396
|
+
export const v5 = Fragment('C3=CCCCC3');
|
|
397
|
+
export const v6 = Fragment('C3=CCCOC3');
|
|
398
|
+
export const v7 = Fragment('CC');
|
|
399
|
+
export const v8 = v6.attach(6, v7);
|
|
400
|
+
export const v9 = Linear(['O'], ['=']);
|
|
401
|
+
export const v10 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 7, atoms: [{ position: 2, depth: 0, value: 'C', rings: [1, 1] }, { position: 3, depth: 0, value: 'C', bond: '=', rings: [1] }, { position: 4, depth: 0, value: 'C', rings: [2, 1, 2] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [1, 2] }, { position: 6, depth: 1, value: 'C', rings: [1], branchId: 10 }, { position: 7, depth: 1, value: 'C', bond: '=', rings: [1], branchId: 10 }] }, { ring: v4, start: 4, end: 14, atoms: [{ position: 4, depth: 0, value: 'C', rings: [2, 1, 2] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [1, 2] }, { position: 12, depth: 0, value: 'N', rings: [2] }, { position: 13, depth: 0, value: 'C', rings: [3, 2, 3] }, { position: 14, depth: 0, value: 'C', bond: '=', rings: [2, 3] }] }, { ring: v8, start: 13, end: 18, atoms: [{ position: 13, depth: 0, value: 'C', rings: [3, 2, 3] }, { position: 14, depth: 0, value: 'C', bond: '=', rings: [2, 3] }, { position: 15, depth: 0, value: 'C', rings: [3] }, { position: 16, depth: 0, value: 'C', rings: [3] }, { position: 17, depth: 0, value: 'O', rings: [3] }, { position: 18, depth: 0, value: 'C', rings: [3] }] }], atoms: [{ position: 8, depth: 1, value: 'C', branchId: 10 }, { position: 9, depth: 1, value: 'C', branchId: 10, attachments: [v9] }, { position: 11, depth: 1, value: 'O', branchId: 10 }] } });
|
|
402
|
+
export const v11 = Fragment('CC');
|
|
403
|
+
export const v12 = Molecule([v1, v10, v11]);"
|
|
404
|
+
`;
|
|
405
|
+
|
|
406
|
+
exports[`Etodolac Integration Test generates valid verbose code via toCode() 1`] = `
|
|
359
407
|
"export const v1 = Linear(['C', 'C']);
|
|
360
408
|
export const v2 = Ring({ atoms: 'C', size: 6, bonds: ['=', null, '=', null, '=', null], branchDepths: [0, 0, 0, 0, 1, 1] });
|
|
361
409
|
export const v3 = Ring({ atoms: 'C', size: 5, ringNumber: 2, offset: 2, bonds: ['=', null, null, '=', null] });
|
|
@@ -365,7 +413,7 @@ export const v6 = v5.substitute(5, 'O');
|
|
|
365
413
|
export const v7 = Linear(['C', 'C']);
|
|
366
414
|
export const v8 = v6.attach(6, v7);
|
|
367
415
|
export const v9 = Linear(['O'], ['=']);
|
|
368
|
-
export const v10 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 7, atoms: [{ position: 2, depth: 0, value: 'C', rings: [1, 1] }, { position: 3, depth: 0, value: 'C', bond: '=', rings: [1] }, { position: 4, depth: 0, value: 'C', rings: [2, 1, 2] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [1, 2] }, { position: 6, depth: 1, value: 'C', rings: [1] }, { position: 7, depth: 1, value: 'C', bond: '=', rings: [1] }] }, { ring: v4, start: 4, end: 14, atoms: [{ position: 4, depth: 0, value: 'C', rings: [2, 1, 2] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [1, 2] }, { position: 12, depth: 0, value: 'N', rings: [2] }, { position: 13, depth: 0, value: 'C', rings: [3, 2, 3] }, { position: 14, depth: 0, value: 'C', bond: '=', rings: [2, 3] }] }, { ring: v8, start: 13, end: 18, atoms: [{ position: 13, depth: 0, value: 'C', rings: [3, 2, 3] }, { position: 14, depth: 0, value: 'C', bond: '=', rings: [2, 3] }, { position: 15, depth: 0, value: 'C', rings: [3] }, { position: 16, depth: 0, value: 'C', rings: [3] }, { position: 17, depth: 0, value: 'O', rings: [3] }, { position: 18, depth: 0, value: 'C', rings: [3] }] }], atoms: [{ position: 8, depth: 1, value: 'C' }, { position: 9, depth: 1, value: 'C', attachments: [v9] }, { position: 11, depth: 1, value: 'O' }] } });
|
|
416
|
+
export const v10 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 7, atoms: [{ position: 2, depth: 0, value: 'C', rings: [1, 1] }, { position: 3, depth: 0, value: 'C', bond: '=', rings: [1] }, { position: 4, depth: 0, value: 'C', rings: [2, 1, 2] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [1, 2] }, { position: 6, depth: 1, value: 'C', rings: [1], branchId: 10 }, { position: 7, depth: 1, value: 'C', bond: '=', rings: [1], branchId: 10 }] }, { ring: v4, start: 4, end: 14, atoms: [{ position: 4, depth: 0, value: 'C', rings: [2, 1, 2] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [1, 2] }, { position: 12, depth: 0, value: 'N', rings: [2] }, { position: 13, depth: 0, value: 'C', rings: [3, 2, 3] }, { position: 14, depth: 0, value: 'C', bond: '=', rings: [2, 3] }] }, { ring: v8, start: 13, end: 18, atoms: [{ position: 13, depth: 0, value: 'C', rings: [3, 2, 3] }, { position: 14, depth: 0, value: 'C', bond: '=', rings: [2, 3] }, { position: 15, depth: 0, value: 'C', rings: [3] }, { position: 16, depth: 0, value: 'C', rings: [3] }, { position: 17, depth: 0, value: 'O', rings: [3] }, { position: 18, depth: 0, value: 'C', rings: [3] }] }], atoms: [{ position: 8, depth: 1, value: 'C', branchId: 10 }, { position: 9, depth: 1, value: 'C', branchId: 10, attachments: [v9] }, { position: 11, depth: 1, value: 'O', branchId: 10 }] } });
|
|
369
417
|
export const v11 = Linear(['C', 'C']);
|
|
370
418
|
export const v12 = Molecule([v1, v10, v11]);"
|
|
371
419
|
`;
|
|
@@ -482,6 +530,21 @@ exports[`Ketorolac Integration Test parses ketorolac 1`] = `
|
|
|
482
530
|
`;
|
|
483
531
|
|
|
484
532
|
exports[`Ketorolac Integration Test generates valid code via toCode() 1`] = `
|
|
533
|
+
"export const v1 = Fragment('OC');
|
|
534
|
+
export const v2 = Linear(['O'], ['=']);
|
|
535
|
+
export const v3 = v1.attach(2, v2);
|
|
536
|
+
export const v4 = Fragment('C1CCCC1');
|
|
537
|
+
export const v5 = Fragment('C1CCNC1');
|
|
538
|
+
export const v6 = Fragment('C2C=CC=C2');
|
|
539
|
+
export const v7 = v5.fuse(3, v6);
|
|
540
|
+
export const v8 = Fragment('C');
|
|
541
|
+
export const v9 = Linear(['O'], ['=']);
|
|
542
|
+
export const v10 = v8.attach(1, v9);
|
|
543
|
+
export const v11 = Fragment('C3=CC=CC=C3');
|
|
544
|
+
export const v12 = Molecule([v3, v7, v10, v11]);"
|
|
545
|
+
`;
|
|
546
|
+
|
|
547
|
+
exports[`Ketorolac Integration Test generates valid verbose code via toCode() 1`] = `
|
|
485
548
|
"export const v1 = Linear(['O', 'C']);
|
|
486
549
|
export const v2 = Linear(['O'], ['=']);
|
|
487
550
|
export const v3 = v1.attach(2, v2);
|
|
@@ -604,6 +667,21 @@ exports[`Rofecoxib Integration Test parses rofecoxib 1`] = `
|
|
|
604
667
|
`;
|
|
605
668
|
|
|
606
669
|
exports[`Rofecoxib Integration Test generates valid code via toCode() 1`] = `
|
|
670
|
+
"export const v1 = Fragment('CS');
|
|
671
|
+
export const v2 = Linear(['O'], ['=']);
|
|
672
|
+
export const v3 = v1.attach(2, v2);
|
|
673
|
+
export const v4 = Linear(['O'], ['=']);
|
|
674
|
+
export const v5 = v3.attach(2, v4);
|
|
675
|
+
export const v6 = Fragment('C1=CC=CC=C1');
|
|
676
|
+
export const v7 = Fragment('C2=CCCC2');
|
|
677
|
+
export const v8 = Fragment('C2=CCOC2');
|
|
678
|
+
export const v9 = Linear(['O'], ['=']);
|
|
679
|
+
export const v10 = v8.attach(3, v9);
|
|
680
|
+
export const v11 = Fragment('C3=CC=CC=C3');
|
|
681
|
+
export const v12 = Molecule([v5, v6, v10, v11]);"
|
|
682
|
+
`;
|
|
683
|
+
|
|
684
|
+
exports[`Rofecoxib Integration Test generates valid verbose code via toCode() 1`] = `
|
|
607
685
|
"export const v1 = Linear(['C', 'S']);
|
|
608
686
|
export const v2 = Linear(['O'], ['=']);
|
|
609
687
|
export const v3 = v1.attach(2, v2);
|
|
@@ -719,6 +797,20 @@ exports[`Etoricoxib Integration Test parses etoricoxib 1`] = `
|
|
|
719
797
|
`;
|
|
720
798
|
|
|
721
799
|
exports[`Etoricoxib Integration Test generates valid code via toCode() 1`] = `
|
|
800
|
+
"export const v1 = Fragment('C');
|
|
801
|
+
export const v2 = Fragment('C1=CC=CC=C1');
|
|
802
|
+
export const v3 = Fragment('C1=NC=CC=C1');
|
|
803
|
+
export const v4 = Fragment('C2=CC=CC=C2');
|
|
804
|
+
export const v5 = Fragment('S');
|
|
805
|
+
export const v6 = Linear(['O'], ['=']);
|
|
806
|
+
export const v7 = v5.attach(1, v6);
|
|
807
|
+
export const v8 = Linear(['O'], ['=']);
|
|
808
|
+
export const v9 = v7.attach(1, v8);
|
|
809
|
+
export const v10 = Fragment('C3=CC=CC=C3');
|
|
810
|
+
export const v11 = Molecule([v1, v3, v4, v9, v10]);"
|
|
811
|
+
`;
|
|
812
|
+
|
|
813
|
+
exports[`Etoricoxib Integration Test generates valid verbose code via toCode() 1`] = `
|
|
722
814
|
"export const v1 = Linear(['C']);
|
|
723
815
|
export const v2 = Ring({ atoms: 'C', size: 6, bonds: ['=', null, '=', null, '=', null] });
|
|
724
816
|
export const v3 = v2.substitute(2, 'N');
|
|
@@ -819,10 +911,21 @@ exports[`Nabumetone Integration Test parses nabumetone 1`] = `
|
|
|
819
911
|
`;
|
|
820
912
|
|
|
821
913
|
exports[`Nabumetone Integration Test generates valid code via toCode() 1`] = `
|
|
914
|
+
"export const v1 = Fragment('CO');
|
|
915
|
+
export const v2 = Fragment('C1=CC(=CC=C1)');
|
|
916
|
+
export const v3 = Fragment('C2=CC(CC=C2)');
|
|
917
|
+
export const v4 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 11, atoms: [{ position: 2, depth: 0, value: 'C', rings: [1, 1] }, { position: 3, depth: 0, value: 'C', bond: '=', rings: [1] }, { position: 4, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 9, depth: 1, value: 'C', bond: '=', rings: [2, 1], branchId: 11 }, { position: 10, depth: 1, value: 'C', rings: [1], branchId: 11 }, { position: 11, depth: 1, value: 'C', bond: '=', rings: [1], branchId: 11 }] }, { ring: v3, start: 4, end: 9, atoms: [{ position: 4, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [2] }, { position: 6, depth: 0, value: 'C', rings: [2] }, { position: 7, depth: 1, value: 'C', rings: [2], branchId: 11 }, { position: 8, depth: 1, value: 'C', rings: [2], branchId: 11 }, { position: 9, depth: 1, value: 'C', bond: '=', rings: [2, 1], branchId: 11 }] }] } });
|
|
918
|
+
export const v5 = Fragment('CCCC');
|
|
919
|
+
export const v6 = Linear(['O'], ['=']);
|
|
920
|
+
export const v7 = v5.attach(3, v6);
|
|
921
|
+
export const v8 = Molecule([v1, v4, v7]);"
|
|
922
|
+
`;
|
|
923
|
+
|
|
924
|
+
exports[`Nabumetone Integration Test generates valid verbose code via toCode() 1`] = `
|
|
822
925
|
"export const v1 = Linear(['C', 'O']);
|
|
823
926
|
export const v2 = Ring({ atoms: 'C', size: 6, bonds: ['=', null, '=', null, '=', null], branchDepths: [0, 0, 0, 1, 1, 1] });
|
|
824
927
|
export const v3 = Ring({ atoms: 'C', size: 6, ringNumber: 2, offset: 2, bonds: ['=', null, null, null, '=', null], branchDepths: [0, 0, 0, 1, 1, 1] });
|
|
825
|
-
export const v4 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 11, atoms: [{ position: 2, depth: 0, value: 'C', rings: [1, 1] }, { position: 3, depth: 0, value: 'C', bond: '=', rings: [1] }, { position: 4, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 9, depth: 1, value: 'C', bond: '=', rings: [2, 1] }, { position: 10, depth: 1, value: 'C', rings: [1] }, { position: 11, depth: 1, value: 'C', bond: '=', rings: [1] }] }, { ring: v3, start: 4, end: 9, atoms: [{ position: 4, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [2] }, { position: 6, depth: 0, value: 'C', rings: [2] }, { position: 7, depth: 1, value: 'C', rings: [2] }, { position: 8, depth: 1, value: 'C', rings: [2] }, { position: 9, depth: 1, value: 'C', bond: '=', rings: [2, 1] }] }] } });
|
|
928
|
+
export const v4 = FusedRing({ metadata: { rings: [{ ring: v2, start: 2, end: 11, atoms: [{ position: 2, depth: 0, value: 'C', rings: [1, 1] }, { position: 3, depth: 0, value: 'C', bond: '=', rings: [1] }, { position: 4, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 9, depth: 1, value: 'C', bond: '=', rings: [2, 1], branchId: 11 }, { position: 10, depth: 1, value: 'C', rings: [1], branchId: 11 }, { position: 11, depth: 1, value: 'C', bond: '=', rings: [1], branchId: 11 }] }, { ring: v3, start: 4, end: 9, atoms: [{ position: 4, depth: 0, value: 'C', rings: [2, 2, 1] }, { position: 5, depth: 0, value: 'C', bond: '=', rings: [2] }, { position: 6, depth: 0, value: 'C', rings: [2] }, { position: 7, depth: 1, value: 'C', rings: [2], branchId: 11 }, { position: 8, depth: 1, value: 'C', rings: [2], branchId: 11 }, { position: 9, depth: 1, value: 'C', bond: '=', rings: [2, 1], branchId: 11 }] }] } });
|
|
826
929
|
export const v5 = Linear(['C', 'C', 'C', 'C']);
|
|
827
930
|
export const v6 = Linear(['O'], ['=']);
|
|
828
931
|
export const v7 = v5.attach(3, v6);
|
|
@@ -902,6 +1005,16 @@ exports[`Oxaprozin Integration Test parses oxaprozin 1`] = `
|
|
|
902
1005
|
`;
|
|
903
1006
|
|
|
904
1007
|
exports[`Oxaprozin Integration Test generates valid code via toCode() 1`] = `
|
|
1008
|
+
"export const v1 = Fragment('OCCC');
|
|
1009
|
+
export const v2 = Linear(['O'], ['=']);
|
|
1010
|
+
export const v3 = v1.attach(2, v2);
|
|
1011
|
+
export const v4 = Fragment('C1=CC=CC1');
|
|
1012
|
+
export const v5 = Fragment('C1=NC=CO1');
|
|
1013
|
+
export const v6 = Fragment('C3=CC=CC=C3');
|
|
1014
|
+
export const v7 = Molecule([v3, v5, v6]);"
|
|
1015
|
+
`;
|
|
1016
|
+
|
|
1017
|
+
exports[`Oxaprozin Integration Test generates valid verbose code via toCode() 1`] = `
|
|
905
1018
|
"export const v1 = Linear(['O', 'C', 'C', 'C']);
|
|
906
1019
|
export const v2 = Linear(['O'], ['=']);
|
|
907
1020
|
export const v3 = v1.attach(2, v2);
|