From 59a08b4d5105f22da04378ca81908eef973d6cd6 Mon Sep 17 00:00:00 2001 From: FNTwin Date: Fri, 9 Aug 2024 20:49:01 +0000 Subject: [PATCH] Deployed e052bf6 to 0.1.2 with MkDocs 1.6.0 and mike 2.1.2 --- 0.1.2/404.html | 1875 +++++ 0.1.2/API/basedataset.html | 5923 +++++++++++++++ 0.1.2/API/datasets/alchemy.html | 2223 ++++++ 0.1.2/API/datasets/ani.html | 2945 ++++++++ 0.1.2/API/datasets/comp6.html | 2382 ++++++ 0.1.2/API/datasets/des.html | 2766 +++++++ 0.1.2/API/datasets/gdml.html | 2278 ++++++ 0.1.2/API/datasets/geom.html | 2162 ++++++ 0.1.2/API/datasets/iso_17.html | 2295 ++++++ 0.1.2/API/datasets/l7.html | 2191 ++++++ 0.1.2/API/datasets/md22.html | 2190 ++++++ 0.1.2/API/datasets/metcalf.html | 2220 ++++++ 0.1.2/API/datasets/molecule3d.html | 2360 ++++++ 0.1.2/API/datasets/multixcqm9.html | 3152 ++++++++ 0.1.2/API/datasets/nabladft.html | 2242 ++++++ 0.1.2/API/datasets/orbnet_denali.html | 2219 ++++++ 0.1.2/API/datasets/pcqm.html | 2444 ++++++ 0.1.2/API/datasets/proteinfragments.html | 2416 ++++++ 0.1.2/API/datasets/qm1b.html | 2336 ++++++ 0.1.2/API/datasets/qm7x.html | 2316 ++++++ 0.1.2/API/datasets/qmugs.html | 2294 ++++++ 0.1.2/API/datasets/qmx.html | 3126 ++++++++ 0.1.2/API/datasets/revmd17.html | 2245 ++++++ 0.1.2/API/datasets/sn2_rxn.html | 2217 ++++++ 0.1.2/API/datasets/solvated_peptides.html | 2284 ++++++ 0.1.2/API/datasets/spice.html | 2619 +++++++ 0.1.2/API/datasets/splinter.html | 2485 ++++++ 0.1.2/API/datasets/tmqm.html | 2203 ++++++ 0.1.2/API/datasets/transition1x.html | 2205 ++++++ 0.1.2/API/datasets/vqm24.html | 2200 ++++++ 0.1.2/API/datasets/waterclusters.html | 2275 ++++++ 0.1.2/API/datasets/waterclusters3_30.html | 2221 ++++++ 0.1.2/API/datasets/x40.html | 2206 ++++++ 0.1.2/API/e0_dispatcher.html | 4007 ++++++++++ 0.1.2/API/formats.html | 3703 +++++++++ 0.1.2/API/methods.html | 3276 ++++++++ 0.1.2/API/properties.html | 2598 +++++++ 0.1.2/API/regressor.html | 3521 +++++++++ 0.1.2/API/statistics.html | 4982 ++++++++++++ 0.1.2/API/units.html | 3212 ++++++++ 0.1.2/API/utils.html | 2822 +++++++ 0.1.2/assets/StorageView.png | Bin 0 -> 111109 bytes 0.1.2/assets/_mkdocstrings.css | 119 + 0.1.2/assets/images/favicon.png | Bin 0 -> 1870 bytes .../assets/javascripts/bundle.fe8b6f2b.min.js | 29 + .../javascripts/bundle.fe8b6f2b.min.js.map | 7 + .../javascripts/lunr/min/lunr.ar.min.js | 1 + .../javascripts/lunr/min/lunr.da.min.js | 18 + .../javascripts/lunr/min/lunr.de.min.js | 18 + .../javascripts/lunr/min/lunr.du.min.js | 18 + .../javascripts/lunr/min/lunr.el.min.js | 1 + .../javascripts/lunr/min/lunr.es.min.js | 18 + .../javascripts/lunr/min/lunr.fi.min.js | 18 + .../javascripts/lunr/min/lunr.fr.min.js | 18 + .../javascripts/lunr/min/lunr.he.min.js | 1 + .../javascripts/lunr/min/lunr.hi.min.js | 1 + .../javascripts/lunr/min/lunr.hu.min.js | 18 + .../javascripts/lunr/min/lunr.hy.min.js | 1 + .../javascripts/lunr/min/lunr.it.min.js | 18 + .../javascripts/lunr/min/lunr.ja.min.js | 1 + .../javascripts/lunr/min/lunr.jp.min.js | 1 + .../javascripts/lunr/min/lunr.kn.min.js | 1 + .../javascripts/lunr/min/lunr.ko.min.js | 1 + .../javascripts/lunr/min/lunr.multi.min.js | 1 + .../javascripts/lunr/min/lunr.nl.min.js | 18 + .../javascripts/lunr/min/lunr.no.min.js | 18 + .../javascripts/lunr/min/lunr.pt.min.js | 18 + .../javascripts/lunr/min/lunr.ro.min.js | 18 + .../javascripts/lunr/min/lunr.ru.min.js | 18 + .../javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + .../javascripts/lunr/min/lunr.sv.min.js | 18 + .../javascripts/lunr/min/lunr.ta.min.js | 1 + .../javascripts/lunr/min/lunr.te.min.js | 1 + .../javascripts/lunr/min/lunr.th.min.js | 1 + .../javascripts/lunr/min/lunr.tr.min.js | 18 + .../javascripts/lunr/min/lunr.vi.min.js | 1 + .../javascripts/lunr/min/lunr.zh.min.js | 1 + 0.1.2/assets/javascripts/lunr/tinyseg.js | 206 + 0.1.2/assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.b8dbb3d2.min.js | 42 + .../workers/search.b8dbb3d2.min.js.map | 7 + 0.1.2/assets/logo-title.png | Bin 0 -> 3371899 bytes 0.1.2/assets/qdc_logo.png | Bin 0 -> 256743 bytes .../assets/stylesheets/main.3cba04c6.min.css | 1 + .../stylesheets/main.3cba04c6.min.css.map | 1 + .../stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + 0.1.2/cli.html | 2214 ++++++ 0.1.2/contribute.html | 2166 ++++++ 0.1.2/css/custom-openqdc.css | 92 + 0.1.2/css/custom.css | 33 + 0.1.2/data_storage.html | 2057 +++++ 0.1.2/dataset_upload.html | 2152 ++++++ 0.1.2/datasets.html | 2106 ++++++ 0.1.2/index.html | 2118 ++++++ 0.1.2/licensing.html | 2303 ++++++ 0.1.2/normalization_e0s.html | 2107 ++++++ 0.1.2/objects.inv | Bin 0 -> 3647 bytes 0.1.2/search/search_index.json | 1 + 0.1.2/sitemap.xml | 253 + 0.1.2/sitemap.xml.gz | Bin 0 -> 581 bytes 0.1.2/tutorials/usage.html | 3615 +++++++++ 0.1.2/usage.html | 2087 +++++ versions.json | 5 + 105 files changed, 140354 insertions(+) create mode 100644 0.1.2/404.html create mode 100644 0.1.2/API/basedataset.html create mode 100644 0.1.2/API/datasets/alchemy.html create mode 100644 0.1.2/API/datasets/ani.html create mode 100644 0.1.2/API/datasets/comp6.html create mode 100644 0.1.2/API/datasets/des.html create mode 100644 0.1.2/API/datasets/gdml.html create mode 100644 0.1.2/API/datasets/geom.html create mode 100644 0.1.2/API/datasets/iso_17.html create mode 100644 0.1.2/API/datasets/l7.html create mode 100644 0.1.2/API/datasets/md22.html create mode 100644 0.1.2/API/datasets/metcalf.html create mode 100644 0.1.2/API/datasets/molecule3d.html create mode 100644 0.1.2/API/datasets/multixcqm9.html create mode 100644 0.1.2/API/datasets/nabladft.html create mode 100644 0.1.2/API/datasets/orbnet_denali.html create mode 100644 0.1.2/API/datasets/pcqm.html create mode 100644 0.1.2/API/datasets/proteinfragments.html create mode 100644 0.1.2/API/datasets/qm1b.html create mode 100644 0.1.2/API/datasets/qm7x.html create mode 100644 0.1.2/API/datasets/qmugs.html create mode 100644 0.1.2/API/datasets/qmx.html create mode 100644 0.1.2/API/datasets/revmd17.html create mode 100644 0.1.2/API/datasets/sn2_rxn.html create mode 100644 0.1.2/API/datasets/solvated_peptides.html create mode 100644 0.1.2/API/datasets/spice.html create mode 100644 0.1.2/API/datasets/splinter.html create mode 100644 0.1.2/API/datasets/tmqm.html create mode 100644 0.1.2/API/datasets/transition1x.html create mode 100644 0.1.2/API/datasets/vqm24.html create mode 100644 0.1.2/API/datasets/waterclusters.html create mode 100644 0.1.2/API/datasets/waterclusters3_30.html create mode 100644 0.1.2/API/datasets/x40.html create mode 100644 0.1.2/API/e0_dispatcher.html create mode 100644 0.1.2/API/formats.html create mode 100644 0.1.2/API/methods.html create mode 100644 0.1.2/API/properties.html create mode 100644 0.1.2/API/regressor.html create mode 100644 0.1.2/API/statistics.html create mode 100644 0.1.2/API/units.html create mode 100644 0.1.2/API/utils.html create mode 100644 0.1.2/assets/StorageView.png create mode 100644 0.1.2/assets/_mkdocstrings.css create mode 100644 0.1.2/assets/images/favicon.png create mode 100644 0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js create mode 100644 0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js.map create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 0.1.2/assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 0.1.2/assets/javascripts/lunr/tinyseg.js create mode 100644 0.1.2/assets/javascripts/lunr/wordcut.js create mode 100644 0.1.2/assets/javascripts/workers/search.b8dbb3d2.min.js create mode 100644 0.1.2/assets/javascripts/workers/search.b8dbb3d2.min.js.map create mode 100644 0.1.2/assets/logo-title.png create mode 100644 0.1.2/assets/qdc_logo.png create mode 100644 0.1.2/assets/stylesheets/main.3cba04c6.min.css create mode 100644 0.1.2/assets/stylesheets/main.3cba04c6.min.css.map create mode 100644 0.1.2/assets/stylesheets/palette.06af60db.min.css create mode 100644 0.1.2/assets/stylesheets/palette.06af60db.min.css.map create mode 100644 0.1.2/cli.html create mode 100644 0.1.2/contribute.html create mode 100644 0.1.2/css/custom-openqdc.css create mode 100644 0.1.2/css/custom.css create mode 100644 0.1.2/data_storage.html create mode 100644 0.1.2/dataset_upload.html create mode 100644 0.1.2/datasets.html create mode 100644 0.1.2/index.html create mode 100644 0.1.2/licensing.html create mode 100644 0.1.2/normalization_e0s.html create mode 100644 0.1.2/objects.inv create mode 100644 0.1.2/search/search_index.json create mode 100644 0.1.2/sitemap.xml create mode 100644 0.1.2/sitemap.xml.gz create mode 100644 0.1.2/tutorials/usage.html create mode 100644 0.1.2/usage.html diff --git a/0.1.2/404.html b/0.1.2/404.html new file mode 100644 index 00000000..f7c5080f --- /dev/null +++ b/0.1.2/404.html @@ -0,0 +1,1875 @@ + + + + + + + + + + + + + + + + + + + + + OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ +

404 - Not found

+ +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/basedataset.html b/0.1.2/API/basedataset.html new file mode 100644 index 00000000..2962daff --- /dev/null +++ b/0.1.2/API/basedataset.html @@ -0,0 +1,5923 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + BaseDataset - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + + + + + +
+
+ + + + + + + +

BaseDataset

+ +
+ + + + +
+ +

The BaseDataset defining shared functionality between all datasets.

+ + + +
+ + + + + + + + +
+ + + +

+ BaseDataset + + +

+ + +
+

+ Bases: DatasetPropertyMixIn

+ + +

Base class for datasets in the openQDC package.

+ +
+ Source code in openqdc/datasets/base.py +
 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
class BaseDataset(DatasetPropertyMixIn):
+    """
+    Base class for datasets in the openQDC package.
+    """
+
+    energy_target_names = []
+    force_target_names = []
+    read_as_zarr = False
+    __energy_methods__ = []
+    __force_mask__ = []
+    __isolated_atom_energies__ = []
+    _fn_energy = lambda x: x
+    _fn_distance = lambda x: x
+    _fn_forces = lambda x: x
+
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+    __average_nb_atoms__ = None
+    __links__ = {}
+
+    def __init__(
+        self,
+        energy_unit: Optional[str] = None,
+        distance_unit: Optional[str] = None,
+        array_format: str = "numpy",
+        energy_type: Optional[str] = "formation",
+        overwrite_local_cache: bool = False,
+        cache_dir: Optional[str] = None,
+        recompute_statistics: bool = False,
+        transform: Optional[Callable] = None,
+        skip_statistics: bool = False,
+        read_as_zarr: bool = False,
+        regressor_kwargs: Dict = {
+            "solver_type": "linear",
+            "sub_sample": None,
+            "stride": 1,
+        },
+    ) -> None:
+        """
+
+        Parameters:
+            energy_unit:
+                Energy unit to convert dataset to. Supported units: ["kcal/mol", "kj/mol", "hartree", "ev"]
+            distance_unit:
+                Distance unit to convert dataset to. Supported units: ["ang", "nm", "bohr"]
+            array_format:
+                Format to return arrays in. Supported formats: ["numpy", "torch", "jax"]
+            energy_type:
+                Type of isolated atom energy to use for the dataset. Default: "formation"
+                Supported types: ["formation", "regression", "null", None]
+            overwrite_local_cache:
+                Whether to overwrite the locally cached dataset.
+            cache_dir:
+                Cache directory location. Defaults to "~/.cache/openqdc"
+            recompute_statistics:
+                Whether to recompute the statistics of the dataset.
+            transform:
+                transformation to apply to the __getitem__ calls
+            regressor_kwargs:
+                Dictionary of keyword arguments to pass to the regressor.
+                Default: {"solver_type": "linear", "sub_sample": None, "stride": 1}
+                solver_type can be one of ["linear", "ridge"]
+        """
+        set_cache_dir(cache_dir)
+        # self._init_lambda_fn()
+        self.data = None
+        self._original_unit = self.energy_unit
+        self.recompute_statistics = recompute_statistics
+        self.regressor_kwargs = regressor_kwargs
+        self.transform = transform
+        self.read_as_zarr = read_as_zarr
+        self.energy_type = energy_type if energy_type is not None else "null"
+        self.refit_e0s = recompute_statistics or overwrite_local_cache
+        self.skip_statistics = skip_statistics
+        if not self.is_preprocessed():
+            raise DatasetNotAvailableError(self.__name__)
+        else:
+            self.read_preprocess(overwrite_local_cache=overwrite_local_cache)
+        self.set_array_format(array_format)
+        self._post_init(overwrite_local_cache, energy_unit, distance_unit)
+
+    def _init_lambda_fn(self):
+        self._fn_energy = lambda x: x
+        self._fn_distance = lambda x: x
+        self._fn_forces = lambda x: x
+
+    @property
+    def dataset_wrapper(self):
+        if not hasattr(self, "_dataset_wrapper"):
+            self._dataset_wrapper = ZarrDataset() if self.read_as_zarr else MemMapDataset()
+        return self._dataset_wrapper
+
+    @property
+    def config(self):
+        assert len(self.__links__) > 0, "No links provided for fetching"
+        return dict(dataset_name=self.__name__, links=self.__links__)
+
+    @classmethod
+    def fetch(cls, cache_path: Optional[str] = None, overwrite: bool = False) -> None:
+        from openqdc.utils.download_api import DataDownloader
+
+        DataDownloader(cache_path, overwrite).from_config(cls.no_init().config)
+
+    def _post_init(
+        self,
+        overwrite_local_cache: bool = False,
+        energy_unit: Optional[str] = None,
+        distance_unit: Optional[str] = None,
+    ) -> None:
+        self._set_units(None, None)
+        self._set_isolated_atom_energies()
+        if not self.skip_statistics:
+            self._precompute_statistics(overwrite_local_cache=overwrite_local_cache)
+        self._set_units(energy_unit, distance_unit)
+        self._convert_data()
+        self._set_isolated_atom_energies()
+
+    def _precompute_statistics(self, overwrite_local_cache: bool = False):
+        # if self.recompute_statistics or overwrite_local_cache:
+        self.statistics = StatisticManager(
+            self,
+            self.recompute_statistics or overwrite_local_cache,  # check if we need to recompute
+            # Add the common statistics (Forces, TotalE, FormE, PerAtomE)
+            ForcesCalculatorStats,
+            TotalEnergyStats,
+            FormationEnergyStats,
+            PerAtomFormationEnergyStats,
+        )
+        self.statistics.run_calculators()  # run the calculators
+        self._compute_average_nb_atoms()
+
+    @classmethod
+    def no_init(cls):
+        """
+        Class method to avoid the __init__ method to be called when the class is instanciated.
+        Useful for debugging purposes or preprocessing data.
+        """
+        return cls.__new__(cls)
+
+    @property
+    def __force_methods__(self):
+        """
+        For backward compatibility. To be removed in the future.
+        """
+        return self.force_methods
+
+    @property
+    def energy_methods(self) -> List[str]:
+        """Return the string version of the energy methods"""
+        return [str(i) for i in self.__energy_methods__]
+
+    @property
+    def force_mask(self):
+        if len(self.__class__.__force_mask__) == 0:
+            self.__class__.__force_mask__ = [False] * len(self.__energy_methods__)
+        return self.__class__.__force_mask__
+
+    @property
+    def force_methods(self):
+        return list(compress(self.energy_methods, self.force_mask))
+
+    @property
+    def e0s_dispatcher(self) -> AtomEnergies:
+        """
+        Property to get the object that dispatched the isolated atom energies of the QM methods.
+
+        Returns:
+            Object wrapping the isolated atom energies of the QM methods.
+        """
+        if not hasattr(self, "_e0s_dispatcher"):
+            # Automatically fetch/compute formation or regression energies
+            self._e0s_dispatcher = AtomEnergies(self, **self.regressor_kwargs)
+        return self._e0s_dispatcher
+
+    def _convert_data(self):
+        logger.info(
+            f"Converting {self.__name__} data to the following units:\n\
+                     Energy: {str(self.energy_unit)},\n\
+                     Distance: {str(self.distance_unit)},\n\
+                     Forces: {str(self.force_unit) if self.__force_methods__ else 'None'}"
+        )
+        for key in self.data_keys:
+            self.data[key] = self._convert_on_loading(self.data[key], key)
+
+    @property
+    def energy_unit(self):
+        return EnergyTypeConversion(self.__energy_unit__)
+
+    @property
+    def distance_unit(self):
+        return DistanceTypeConversion(self.__distance_unit__)
+
+    @property
+    def force_unit(self):
+        units = self.__forces_unit__.split("/")
+        if len(units) > 2:
+            units = ["/".join(units[:2]), units[-1]]
+        return ForceTypeConversion(tuple(units))  # < 3.12 compatibility
+
+    @property
+    def root(self):
+        return p_join(get_local_cache(), self.__name__)
+
+    @property
+    def preprocess_path(self):
+        path = p_join(self.root, "preprocessed")
+        os.makedirs(path, exist_ok=True)
+        return path
+
+    @property
+    def data_keys(self):
+        keys = list(self.data_types.keys())
+        if len(self.__force_methods__) == 0:
+            keys.remove("forces")
+        return keys
+
+    @property
+    def pkl_data_keys(self):
+        return list(self.pkl_data_types.keys())
+
+    @property
+    def pkl_data_types(self):
+        return {"name": str, "subset": str, "n_atoms": np.int32}
+
+    @property
+    def atom_energies(self):
+        return self._e0s_dispatcher
+
+    @property
+    def data_types(self):
+        return {
+            "atomic_inputs": np.float32,
+            "position_idx_range": np.int32,
+            "energies": np.float64,
+            "forces": np.float32,
+        }
+
+    @property
+    def data_shapes(self):
+        return {
+            "atomic_inputs": (-1, NB_ATOMIC_FEATURES),
+            "position_idx_range": (-1, 2),
+            "energies": (-1, len(self.energy_methods)),
+            "forces": (-1, 3, len(self.force_methods)),
+        }
+
+    def _set_units(self, en: Optional[str] = None, ds: Optional[str] = None):
+        old_en, old_ds = self.energy_unit, self.distance_unit
+        en = en if en is not None else old_en
+        ds = ds if ds is not None else old_ds
+        self.set_energy_unit(en)
+        self.set_distance_unit(ds)
+        if self.__force_methods__:
+            self._fn_forces = self.force_unit.to(str(self.energy_unit), str(self.distance_unit))
+            self.__forces_unit__ = str(self.energy_unit) + "/" + str(self.distance_unit)
+
+    def _set_isolated_atom_energies(self):
+        if self.__energy_methods__ is None:
+            logger.error("No energy methods defined for this dataset.")
+        if self.energy_type == "formation":
+            f = get_conversion("hartree", self.__energy_unit__)
+        else:
+            # regression are calculated on the original unit of the dataset
+            f = self._original_unit.to(self.energy_unit)
+        self.__isolated_atom_energies__ = f(self.e0s_dispatcher.e0s_matrix)
+
+    def convert_energy(self, x):
+        return self._fn_energy(x)
+
+    def convert_distance(self, x):
+        return self._fn_distance(x)
+
+    def convert_forces(self, x):
+        return self._fn_forces(x)
+
+    def set_energy_unit(self, value: str):
+        """
+        Set a new energy unit for the dataset.
+
+        Parameters:
+            value:
+                New energy unit to set.
+        """
+        # old_unit = self.energy_unit
+        # self.__energy_unit__ = value
+        self._fn_energy = self.energy_unit.to(value)  # get_conversion(old_unit, value)
+        self.__energy_unit__ = value
+
+    def set_distance_unit(self, value: str):
+        """
+        Set a new distance unit for the dataset.
+
+        Parameters:
+            value:
+                New distance unit to set.
+        """
+        # old_unit = self.distance_unit
+        # self.__distance_unit__ = value
+        self._fn_distance = self.distance_unit.to(value)  # get_conversion(old_unit, value)
+        self.__distance_unit__ = value
+
+    def set_array_format(self, format: str):
+        assert format in ["numpy", "torch", "jax"], f"Format {format} not supported."
+        self.array_format = format
+
+    def read_raw_entries(self):
+        """
+        Preprocess the raw (aka from the fetched source) into a list of dictionaries.
+        """
+        raise NotImplementedError
+
+    def collate_list(self, list_entries: List[Dict]) -> Dict:
+        """
+        Collate a list of entries into a single dictionary.
+
+        Parameters:
+            list_entries:
+                List of dictionaries containing the entries to collate.
+
+        Returns:
+            Dictionary containing the collated entries.
+        """
+        # concatenate entries
+        res = {key: np.concatenate([r[key] for r in list_entries if r is not None], axis=0) for key in list_entries[0]}
+
+        csum = np.cumsum(res.get("n_atoms"))
+        x = np.zeros((csum.shape[0], 2), dtype=np.int32)
+        x[1:, 0], x[:, 1] = csum[:-1], csum
+        res["position_idx_range"] = x
+
+        return res
+
+    def save_preprocess(
+        self, data_dict: Dict[str, np.ndarray], upload: bool = False, overwrite: bool = True, as_zarr: bool = False
+    ):
+        """
+        Save the preprocessed data to the cache directory and optionally upload it to the remote storage.
+
+        Parameters:
+            data_dict:
+                Dictionary containing the preprocessed data.
+            upload:
+                Whether to upload the preprocessed data to the remote storage or only saving it locally.
+            overwrite:
+                Whether to overwrite the preprocessed data if it already exists.
+                Only used if upload is True. Cache is always overwritten locally.
+        """
+        # save memmaps
+        logger.info("Preprocessing data and saving it to cache.")
+        paths = self.dataset_wrapper.save_preprocess(
+            self.preprocess_path, self.data_keys, data_dict, self.pkl_data_keys, self.pkl_data_types
+        )
+        if upload:
+            for local_path in paths:
+                push_remote(local_path, overwrite=overwrite)  # make it async?
+
+    def read_preprocess(self, overwrite_local_cache=False):
+        logger.info("Reading preprocessed data.")
+        logger.info(
+            f"Dataset {self.__name__} with the following units:\n\
+                     Energy: {self.energy_unit},\n\
+                     Distance: {self.distance_unit},\n\
+                     Forces: {self.force_unit if self.force_methods else 'None'}"
+        )
+
+        self.data = self.dataset_wrapper.load_data(
+            self.preprocess_path,
+            self.data_keys,
+            self.data_types,
+            self.data_shapes,
+            self.pkl_data_keys,
+            overwrite_local_cache,
+        )  # this should be async if possible
+        for key in self.data:
+            logger.info(f"Loaded {key} with shape {self.data[key].shape}, dtype {self.data[key].dtype}")
+
+    def _convert_on_loading(self, x, key):
+        if key == "energies":
+            return self.convert_energy(x)
+        elif key == "forces":
+            return self.convert_forces(x)
+        elif key == "atomic_inputs":
+            x = np.array(x, dtype=np.float32)
+            x[:, -3:] = self.convert_distance(x[:, -3:])
+            return x
+        else:
+            return x
+
+    def is_preprocessed(self) -> bool:
+        """
+        Check if the dataset is preprocessed and available online or locally.
+
+        Returns:
+            True if the dataset is available remotely or locally, False otherwise.
+        """
+        predicats = [
+            copy_exists(p_join(self.preprocess_path, self.dataset_wrapper.add_extension(f"{key}")))
+            for key in self.data_keys
+        ]
+        predicats += [copy_exists(p_join(self.preprocess_path, file)) for file in self.dataset_wrapper._extra_files]
+        return all(predicats)
+
+    def is_cached(self) -> bool:
+        """
+        Check if the dataset is cached locally.
+
+        Returns:
+            True if the dataset is cached locally, False otherwise.
+        """
+        predicats = [
+            os.path.exists(p_join(self.preprocess_path, self.dataset_wrapper.add_extension(f"{key}")))
+            for key in self.data_keys
+        ]
+        predicats += [copy_exists(p_join(self.preprocess_path, file)) for file in self.dataset_wrapper._extra_files]
+        return all(predicats)
+
+    def preprocess(self, upload: bool = False, overwrite: bool = True, as_zarr: bool = True):
+        """
+        Preprocess the dataset and save it.
+
+        Parameters:
+            upload:
+                Whether to upload the preprocessed data to the remote storage or only saving it locally.
+            overwrite:
+                hether to overwrite the preprocessed data if it already exists.
+                Only used if upload is True. Cache is always overwritten locally.
+            as_zarr:
+                Whether to save the data as zarr files
+        """
+        if overwrite or not self.is_preprocessed():
+            entries = self.read_raw_entries()
+            res = self.collate_list(entries)
+            self.save_preprocess(res, upload, overwrite, as_zarr)
+
+    def upload(self, overwrite: bool = False, as_zarr: bool = False):
+        """
+        Upload the preprocessed data to the remote storage. Must be called after preprocess and
+        need to have write privileges.
+
+        Parameters:
+            overwrite:
+                Whether to overwrite the remote data if it already exists
+            as_zarr:
+                Whether to upload the data as zarr files
+        """
+        for key in self.data_keys:
+            local_path = p_join(self.preprocess_path, f"{key}.mmap" if not as_zarr else f"{key}.zip")
+            push_remote(local_path, overwrite=overwrite)
+        local_path = p_join(self.preprocess_path, "props.pkl" if not as_zarr else "metadata.zip")
+        push_remote(local_path, overwrite=overwrite)
+
+    def save_xyz(self, idx: int, energy_method: int = 0, path: Optional[str] = None, ext: bool = True):
+        """
+        Save a single entry at index idx as an extxyz file.
+
+        Parameters:
+            idx:
+                Index of the entry
+            energy_method:
+                Index of the energy method to use
+            path:
+                Path to save the xyz file. If None, the current working directory is used.
+            ext:
+                Whether to include additional informations like forces and other metadatas (extxyz format)
+        """
+        if path is None:
+            path = os.getcwd()
+        at = self.get_ase_atoms(idx, ext=ext, energy_method=energy_method)
+        write_extxyz(p_join(path, f"mol_{idx}.xyz"), at, plain=not ext)
+
+    def to_xyz(self, energy_method: int = 0, path: Optional[str] = None):
+        """
+        Save dataset as single xyz file (extended xyz format).
+
+        Parameters:
+            energy_method:
+                Index of the energy method to use
+            path:
+                Path to save the xyz file
+        """
+        with open(p_join(path if path else os.getcwd(), f"{self.__name__}.xyz"), "w") as f:
+            for atoms in tqdm(
+                self.as_iter(atoms=True, energy_method=energy_method),
+                total=len(self),
+                desc=f"Saving {self.__name__} as xyz file",
+            ):
+                write_extxyz(f, atoms, append=True)
+
+    def get_ase_atoms(self, idx: int, energy_method: int = 0, ext: bool = True) -> Atoms:
+        """
+        Get the ASE atoms object for the entry at index idx.
+
+        Parameters:
+            idx:
+                Index of the entry.
+            energy_method:
+                Index of the energy method to use
+            ext:
+                Whether to include additional informations
+
+        Returns:
+            ASE atoms object
+        """
+        entry = self[idx]
+        at = dict_to_atoms(entry, ext=ext, energy_method=energy_method)
+        return at
+
+    def subsample(
+        self, n_samples: Optional[Union[List[int], int, float]] = None, replace: bool = False, seed: int = 42
+    ):
+        np.random.seed(seed)
+        if n_samples is None:
+            return list(range(len(self)))
+        try:
+            if 0 < n_samples < 1:
+                n_samples = int(n_samples * len(self))
+            if isinstance(n_samples, int):
+                idxs = np.random.choice(len(self), size=n_samples, replace=replace)
+        except (ValueError, TypeError):  # list, set, np.ndarray
+            idxs = n_samples
+        return idxs
+
+    @requires_package("datamol")
+    def calculate_descriptors(
+        self,
+        descriptor_name: str = "soap",
+        chemical_species: Optional[List[str]] = None,
+        n_samples: Optional[Union[List[int], int, float]] = None,
+        progress: bool = True,
+        **descriptor_kwargs,
+    ) -> Dict[str, np.ndarray]:
+        """
+        Compute the descriptors for the dataset.
+
+        Parameters:
+            descriptor_name:
+                Name of the descriptor to use. Supported descriptors are ["soap"]
+            chemical_species:
+                List of chemical species to use for the descriptor computation, by default None.
+                If None, the chemical species of the dataset are used.
+            n_samples:
+                Number of samples to use for the computation, by default None.
+                If None, all the dataset is used.
+                If a list of integers is provided, the descriptors are computed for
+                each of the specified idx of samples.
+            progress:
+                Whether to show a progress bar, by default True.
+            **descriptor_kwargs : dict
+                Keyword arguments to pass to the descriptor instantiation of the model.
+
+        Returns:
+            Dictionary containing the following keys:
+                - values : np.ndarray of shape (N, M) containing the descriptors for the dataset
+                - idxs : np.ndarray of shape (N,) containing the indices of the samples used
+
+        """
+        import datamol as dm
+
+        datum = {}
+        idxs = self.subsample(n_samples)
+        model = get_descriptor(descriptor_name.lower())(
+            species=self.chemical_species if chemical_species is None else chemical_species, **descriptor_kwargs
+        )
+
+        def wrapper(idx):
+            entry = self.get_ase_atoms(idx, ext=False)
+            return model.calculate(entry)
+
+        descr = dm.parallelized(wrapper, idxs, progress=progress, scheduler="threads", n_jobs=-1)
+        datum["values"] = np.vstack(descr)
+        datum["idxs"] = idxs
+        return datum
+
+    def as_iter(self, atoms: bool = False, energy_method: int = 0) -> Iterable:
+        """
+        Return the dataset as an iterator.
+
+        Parameters:
+            atoms:
+                Whether to return the items as ASE atoms object, by default False
+            energy_method:
+                Index of the energy method to use
+
+        Returns:
+            Iterator of the dataset
+        """
+
+        func = partial(self.get_ase_atoms, energy_method=energy_method) if atoms else self.__getitem__
+
+        for i in range(len(self)):
+            yield func(i)
+
+    def __iter__(self):
+        for idxs in range(len(self)):
+            yield self[idxs]
+
+    def get_statistics(self, return_none: bool = True) -> Dict:
+        """
+        Get the converted statistics of the dataset.
+
+        Parameters:
+            return_none :
+                Whether to return None if the statistics for the forces are not available, by default True
+                Otherwise, the statistics for the forces are set to 0.0
+
+        Returns:
+            Dictionary containing the statistics of the dataset
+        """
+        selected_stats = self.statistics.get_results()
+        if len(selected_stats) == 0:
+            raise StatisticsNotAvailableError(self.__name__)
+        if not return_none:
+            selected_stats.update(
+                {
+                    "ForcesCalculatorStats": {
+                        "mean": np.array([0.0]),
+                        "std": np.array([0.0]),
+                        "component_mean": np.array([[0.0], [0.0], [0.0]]),
+                        "component_std": np.array([[0.0], [0.0], [0.0]]),
+                        "component_rms": np.array([[0.0], [0.0], [0.0]]),
+                    }
+                }
+            )
+        # cycle trough dict to convert units
+        for key, result in selected_stats.items():
+            if isinstance(result, ForcesCalculatorStats):
+                result.transform(self.convert_forces)
+            else:
+                result.transform(self.convert_energy)
+            result.transform(self._convert_array)
+        return {k: result.to_dict() for k, result in selected_stats.items()}
+
+    def __str__(self):
+        return f"{self.__name__}"
+
+    def __repr__(self):
+        return f"{self.__name__}"
+
+    def __len__(self):
+        return self.data["energies"].shape[0]
+
+    def __smiles_converter__(self, x):
+        """util function to convert string to smiles: useful if the smiles is
+        encoded in a different format than its display format
+        """
+        return x
+
+    def _convert_array(self, x: np.ndarray):
+        return _CONVERT_DICT.get(self.array_format)(x)
+
+    def __getitem__(self, idx: int):
+        shift = MAX_CHARGE
+        p_start, p_end = self.data["position_idx_range"][idx]
+        input = self.data["atomic_inputs"][p_start:p_end]
+        z, c, positions, energies = (
+            self._convert_array(np.array(input[:, 0], dtype=np.int32)),
+            self._convert_array(np.array(input[:, 1], dtype=np.int32)),
+            self._convert_array(np.array(input[:, -3:], dtype=np.float32)),
+            self._convert_array(np.array(self.data["energies"][idx], dtype=np.float64)),
+        )
+        name = self.__smiles_converter__(self.data["name"][idx])
+        subset = self.data["subset"][idx]
+        e0s = self._convert_array(self.__isolated_atom_energies__[..., z, c + shift].T)
+        formation_energies = energies - e0s.sum(axis=0)
+        forces = None
+        if "forces" in self.data:
+            forces = self._convert_array(np.array(self.data["forces"][p_start:p_end], dtype=np.float32))
+
+        bunch = Bunch(
+            positions=positions,
+            atomic_numbers=z,
+            charges=c,
+            e0=e0s,
+            energies=energies,
+            formation_energies=formation_energies,
+            per_atom_formation_energies=formation_energies / len(z),
+            name=name,
+            subset=subset,
+            forces=forces,
+        )
+
+        if self.transform is not None:
+            bunch = self.transform(bunch)
+
+        return bunch
+
+
+ + + +
+ + + + + + + +
+ + + +

+ __force_methods__ + + + property + + +

+ + +
+ +

For backward compatibility. To be removed in the future.

+
+ +
+ +
+ + + +

+ e0s_dispatcher: AtomEnergies + + + property + + +

+ + +
+ +

Property to get the object that dispatched the isolated atom energies of the QM methods.

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ AtomEnergies + +
+

Object wrapping the isolated atom energies of the QM methods.

+
+
+
+ +
+ +
+ + + +

+ energy_methods: List[str] + + + property + + +

+ + +
+ +

Return the string version of the energy methods

+
+ +
+ + + +
+ + +

+ __init__(energy_unit=None, distance_unit=None, array_format='numpy', energy_type='formation', overwrite_local_cache=False, cache_dir=None, recompute_statistics=False, transform=None, skip_statistics=False, read_as_zarr=False, regressor_kwargs={'solver_type': 'linear', 'sub_sample': None, 'stride': 1}) + +

+ + +
+ + + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
energy_unit + Optional[str] + +
+

Energy unit to convert dataset to. Supported units: ["kcal/mol", "kj/mol", "hartree", "ev"]

+
+
+ None +
distance_unit + Optional[str] + +
+

Distance unit to convert dataset to. Supported units: ["ang", "nm", "bohr"]

+
+
+ None +
array_format + str + +
+

Format to return arrays in. Supported formats: ["numpy", "torch", "jax"]

+
+
+ 'numpy' +
energy_type + Optional[str] + +
+

Type of isolated atom energy to use for the dataset. Default: "formation" +Supported types: ["formation", "regression", "null", None]

+
+
+ 'formation' +
overwrite_local_cache + bool + +
+

Whether to overwrite the locally cached dataset.

+
+
+ False +
cache_dir + Optional[str] + +
+

Cache directory location. Defaults to "~/.cache/openqdc"

+
+
+ None +
recompute_statistics + bool + +
+

Whether to recompute the statistics of the dataset.

+
+
+ False +
transform + Optional[Callable] + +
+

transformation to apply to the getitem calls

+
+
+ None +
regressor_kwargs + Dict + +
+

Dictionary of keyword arguments to pass to the regressor. +Default: {"solver_type": "linear", "sub_sample": None, "stride": 1} +solver_type can be one of ["linear", "ridge"]

+
+
+ {'solver_type': 'linear', 'sub_sample': None, 'stride': 1} +
+ +
+ Source code in openqdc/datasets/base.py +
 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
def __init__(
+    self,
+    energy_unit: Optional[str] = None,
+    distance_unit: Optional[str] = None,
+    array_format: str = "numpy",
+    energy_type: Optional[str] = "formation",
+    overwrite_local_cache: bool = False,
+    cache_dir: Optional[str] = None,
+    recompute_statistics: bool = False,
+    transform: Optional[Callable] = None,
+    skip_statistics: bool = False,
+    read_as_zarr: bool = False,
+    regressor_kwargs: Dict = {
+        "solver_type": "linear",
+        "sub_sample": None,
+        "stride": 1,
+    },
+) -> None:
+    """
+
+    Parameters:
+        energy_unit:
+            Energy unit to convert dataset to. Supported units: ["kcal/mol", "kj/mol", "hartree", "ev"]
+        distance_unit:
+            Distance unit to convert dataset to. Supported units: ["ang", "nm", "bohr"]
+        array_format:
+            Format to return arrays in. Supported formats: ["numpy", "torch", "jax"]
+        energy_type:
+            Type of isolated atom energy to use for the dataset. Default: "formation"
+            Supported types: ["formation", "regression", "null", None]
+        overwrite_local_cache:
+            Whether to overwrite the locally cached dataset.
+        cache_dir:
+            Cache directory location. Defaults to "~/.cache/openqdc"
+        recompute_statistics:
+            Whether to recompute the statistics of the dataset.
+        transform:
+            transformation to apply to the __getitem__ calls
+        regressor_kwargs:
+            Dictionary of keyword arguments to pass to the regressor.
+            Default: {"solver_type": "linear", "sub_sample": None, "stride": 1}
+            solver_type can be one of ["linear", "ridge"]
+    """
+    set_cache_dir(cache_dir)
+    # self._init_lambda_fn()
+    self.data = None
+    self._original_unit = self.energy_unit
+    self.recompute_statistics = recompute_statistics
+    self.regressor_kwargs = regressor_kwargs
+    self.transform = transform
+    self.read_as_zarr = read_as_zarr
+    self.energy_type = energy_type if energy_type is not None else "null"
+    self.refit_e0s = recompute_statistics or overwrite_local_cache
+    self.skip_statistics = skip_statistics
+    if not self.is_preprocessed():
+        raise DatasetNotAvailableError(self.__name__)
+    else:
+        self.read_preprocess(overwrite_local_cache=overwrite_local_cache)
+    self.set_array_format(array_format)
+    self._post_init(overwrite_local_cache, energy_unit, distance_unit)
+
+
+
+ +
+ +
+ + +

+ __smiles_converter__(x) + +

+ + +
+ +

util function to convert string to smiles: useful if the smiles is +encoded in a different format than its display format

+ +
+ Source code in openqdc/datasets/base.py +
719
+720
+721
+722
+723
def __smiles_converter__(self, x):
+    """util function to convert string to smiles: useful if the smiles is
+    encoded in a different format than its display format
+    """
+    return x
+
+
+
+ +
+ +
+ + +

+ as_iter(atoms=False, energy_method=0) + +

+ + +
+ +

Return the dataset as an iterator.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
atoms + bool + +
+

Whether to return the items as ASE atoms object, by default False

+
+
+ False +
energy_method + int + +
+

Index of the energy method to use

+
+
+ 0 +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Iterable + +
+

Iterator of the dataset

+
+
+ +
+ Source code in openqdc/datasets/base.py +
651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
def as_iter(self, atoms: bool = False, energy_method: int = 0) -> Iterable:
+    """
+    Return the dataset as an iterator.
+
+    Parameters:
+        atoms:
+            Whether to return the items as ASE atoms object, by default False
+        energy_method:
+            Index of the energy method to use
+
+    Returns:
+        Iterator of the dataset
+    """
+
+    func = partial(self.get_ase_atoms, energy_method=energy_method) if atoms else self.__getitem__
+
+    for i in range(len(self)):
+        yield func(i)
+
+
+
+ +
+ +
+ + +

+ calculate_descriptors(descriptor_name='soap', chemical_species=None, n_samples=None, progress=True, **descriptor_kwargs) + +

+ + +
+ +

Compute the descriptors for the dataset.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
descriptor_name + str + +
+

Name of the descriptor to use. Supported descriptors are ["soap"]

+
+
+ 'soap' +
chemical_species + Optional[List[str]] + +
+

List of chemical species to use for the descriptor computation, by default None. +If None, the chemical species of the dataset are used.

+
+
+ None +
n_samples + Optional[Union[List[int], int, float]] + +
+

Number of samples to use for the computation, by default None. +If None, all the dataset is used. +If a list of integers is provided, the descriptors are computed for +each of the specified idx of samples.

+
+
+ None +
progress + bool + +
+

Whether to show a progress bar, by default True.

+
+
+ True +
**descriptor_kwargs + +
+

dict +Keyword arguments to pass to the descriptor instantiation of the model.

+
+
+ {} +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Dict[str, ndarray] + +
+

Dictionary containing the following keys: +- values : np.ndarray of shape (N, M) containing the descriptors for the dataset +- idxs : np.ndarray of shape (N,) containing the indices of the samples used

+
+
+ +
+ Source code in openqdc/datasets/base.py +
600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
@requires_package("datamol")
+def calculate_descriptors(
+    self,
+    descriptor_name: str = "soap",
+    chemical_species: Optional[List[str]] = None,
+    n_samples: Optional[Union[List[int], int, float]] = None,
+    progress: bool = True,
+    **descriptor_kwargs,
+) -> Dict[str, np.ndarray]:
+    """
+    Compute the descriptors for the dataset.
+
+    Parameters:
+        descriptor_name:
+            Name of the descriptor to use. Supported descriptors are ["soap"]
+        chemical_species:
+            List of chemical species to use for the descriptor computation, by default None.
+            If None, the chemical species of the dataset are used.
+        n_samples:
+            Number of samples to use for the computation, by default None.
+            If None, all the dataset is used.
+            If a list of integers is provided, the descriptors are computed for
+            each of the specified idx of samples.
+        progress:
+            Whether to show a progress bar, by default True.
+        **descriptor_kwargs : dict
+            Keyword arguments to pass to the descriptor instantiation of the model.
+
+    Returns:
+        Dictionary containing the following keys:
+            - values : np.ndarray of shape (N, M) containing the descriptors for the dataset
+            - idxs : np.ndarray of shape (N,) containing the indices of the samples used
+
+    """
+    import datamol as dm
+
+    datum = {}
+    idxs = self.subsample(n_samples)
+    model = get_descriptor(descriptor_name.lower())(
+        species=self.chemical_species if chemical_species is None else chemical_species, **descriptor_kwargs
+    )
+
+    def wrapper(idx):
+        entry = self.get_ase_atoms(idx, ext=False)
+        return model.calculate(entry)
+
+    descr = dm.parallelized(wrapper, idxs, progress=progress, scheduler="threads", n_jobs=-1)
+    datum["values"] = np.vstack(descr)
+    datum["idxs"] = idxs
+    return datum
+
+
+
+ +
+ +
+ + +

+ collate_list(list_entries) + +

+ + +
+ +

Collate a list of entries into a single dictionary.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
list_entries + List[Dict] + +
+

List of dictionaries containing the entries to collate.

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Dict + +
+

Dictionary containing the collated entries.

+
+
+ +
+ Source code in openqdc/datasets/base.py +
389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
def collate_list(self, list_entries: List[Dict]) -> Dict:
+    """
+    Collate a list of entries into a single dictionary.
+
+    Parameters:
+        list_entries:
+            List of dictionaries containing the entries to collate.
+
+    Returns:
+        Dictionary containing the collated entries.
+    """
+    # concatenate entries
+    res = {key: np.concatenate([r[key] for r in list_entries if r is not None], axis=0) for key in list_entries[0]}
+
+    csum = np.cumsum(res.get("n_atoms"))
+    x = np.zeros((csum.shape[0], 2), dtype=np.int32)
+    x[1:, 0], x[:, 1] = csum[:-1], csum
+    res["position_idx_range"] = x
+
+    return res
+
+
+
+ +
+ +
+ + +

+ get_ase_atoms(idx, energy_method=0, ext=True) + +

+ + +
+ +

Get the ASE atoms object for the entry at index idx.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
idx + int + +
+

Index of the entry.

+
+
+ required +
energy_method + int + +
+

Index of the energy method to use

+
+
+ 0 +
ext + bool + +
+

Whether to include additional informations

+
+
+ True +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Atoms + +
+

ASE atoms object

+
+
+ +
+ Source code in openqdc/datasets/base.py +
566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
def get_ase_atoms(self, idx: int, energy_method: int = 0, ext: bool = True) -> Atoms:
+    """
+    Get the ASE atoms object for the entry at index idx.
+
+    Parameters:
+        idx:
+            Index of the entry.
+        energy_method:
+            Index of the energy method to use
+        ext:
+            Whether to include additional informations
+
+    Returns:
+        ASE atoms object
+    """
+    entry = self[idx]
+    at = dict_to_atoms(entry, ext=ext, energy_method=energy_method)
+    return at
+
+
+
+ +
+ +
+ + +

+ get_statistics(return_none=True) + +

+ + +
+ +

Get the converted statistics of the dataset.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
return_none + +
+

Whether to return None if the statistics for the forces are not available, by default True +Otherwise, the statistics for the forces are set to 0.0

+
+
+ True +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Dict + +
+

Dictionary containing the statistics of the dataset

+
+
+ +
+ Source code in openqdc/datasets/base.py +
674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
def get_statistics(self, return_none: bool = True) -> Dict:
+    """
+    Get the converted statistics of the dataset.
+
+    Parameters:
+        return_none :
+            Whether to return None if the statistics for the forces are not available, by default True
+            Otherwise, the statistics for the forces are set to 0.0
+
+    Returns:
+        Dictionary containing the statistics of the dataset
+    """
+    selected_stats = self.statistics.get_results()
+    if len(selected_stats) == 0:
+        raise StatisticsNotAvailableError(self.__name__)
+    if not return_none:
+        selected_stats.update(
+            {
+                "ForcesCalculatorStats": {
+                    "mean": np.array([0.0]),
+                    "std": np.array([0.0]),
+                    "component_mean": np.array([[0.0], [0.0], [0.0]]),
+                    "component_std": np.array([[0.0], [0.0], [0.0]]),
+                    "component_rms": np.array([[0.0], [0.0], [0.0]]),
+                }
+            }
+        )
+    # cycle trough dict to convert units
+    for key, result in selected_stats.items():
+        if isinstance(result, ForcesCalculatorStats):
+            result.transform(self.convert_forces)
+        else:
+            result.transform(self.convert_energy)
+        result.transform(self._convert_array)
+    return {k: result.to_dict() for k, result in selected_stats.items()}
+
+
+
+ +
+ +
+ + +

+ is_cached() + +

+ + +
+ +

Check if the dataset is cached locally.

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ bool + +
+

True if the dataset is cached locally, False otherwise.

+
+
+ +
+ Source code in openqdc/datasets/base.py +
480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
def is_cached(self) -> bool:
+    """
+    Check if the dataset is cached locally.
+
+    Returns:
+        True if the dataset is cached locally, False otherwise.
+    """
+    predicats = [
+        os.path.exists(p_join(self.preprocess_path, self.dataset_wrapper.add_extension(f"{key}")))
+        for key in self.data_keys
+    ]
+    predicats += [copy_exists(p_join(self.preprocess_path, file)) for file in self.dataset_wrapper._extra_files]
+    return all(predicats)
+
+
+
+ +
+ +
+ + +

+ is_preprocessed() + +

+ + +
+ +

Check if the dataset is preprocessed and available online or locally.

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ bool + +
+

True if the dataset is available remotely or locally, False otherwise.

+
+
+ +
+ Source code in openqdc/datasets/base.py +
466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
def is_preprocessed(self) -> bool:
+    """
+    Check if the dataset is preprocessed and available online or locally.
+
+    Returns:
+        True if the dataset is available remotely or locally, False otherwise.
+    """
+    predicats = [
+        copy_exists(p_join(self.preprocess_path, self.dataset_wrapper.add_extension(f"{key}")))
+        for key in self.data_keys
+    ]
+    predicats += [copy_exists(p_join(self.preprocess_path, file)) for file in self.dataset_wrapper._extra_files]
+    return all(predicats)
+
+
+
+ +
+ +
+ + +

+ no_init() + + + classmethod + + +

+ + +
+ +

Class method to avoid the init method to be called when the class is instanciated. +Useful for debugging purposes or preprocessing data.

+ +
+ Source code in openqdc/datasets/base.py +
209
+210
+211
+212
+213
+214
+215
@classmethod
+def no_init(cls):
+    """
+    Class method to avoid the __init__ method to be called when the class is instanciated.
+    Useful for debugging purposes or preprocessing data.
+    """
+    return cls.__new__(cls)
+
+
+
+ +
+ +
+ + +

+ preprocess(upload=False, overwrite=True, as_zarr=True) + +

+ + +
+ +

Preprocess the dataset and save it.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
upload + bool + +
+

Whether to upload the preprocessed data to the remote storage or only saving it locally.

+
+
+ False +
overwrite + bool + +
+

hether to overwrite the preprocessed data if it already exists. +Only used if upload is True. Cache is always overwritten locally.

+
+
+ True +
as_zarr + bool + +
+

Whether to save the data as zarr files

+
+
+ True +
+ +
+ Source code in openqdc/datasets/base.py +
494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
def preprocess(self, upload: bool = False, overwrite: bool = True, as_zarr: bool = True):
+    """
+    Preprocess the dataset and save it.
+
+    Parameters:
+        upload:
+            Whether to upload the preprocessed data to the remote storage or only saving it locally.
+        overwrite:
+            hether to overwrite the preprocessed data if it already exists.
+            Only used if upload is True. Cache is always overwritten locally.
+        as_zarr:
+            Whether to save the data as zarr files
+    """
+    if overwrite or not self.is_preprocessed():
+        entries = self.read_raw_entries()
+        res = self.collate_list(entries)
+        self.save_preprocess(res, upload, overwrite, as_zarr)
+
+
+
+ +
+ +
+ + +

+ read_raw_entries() + +

+ + +
+ +

Preprocess the raw (aka from the fetched source) into a list of dictionaries.

+ +
+ Source code in openqdc/datasets/base.py +
383
+384
+385
+386
+387
def read_raw_entries(self):
+    """
+    Preprocess the raw (aka from the fetched source) into a list of dictionaries.
+    """
+    raise NotImplementedError
+
+
+
+ +
+ +
+ + +

+ save_preprocess(data_dict, upload=False, overwrite=True, as_zarr=False) + +

+ + +
+ +

Save the preprocessed data to the cache directory and optionally upload it to the remote storage.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
data_dict + Dict[str, ndarray] + +
+

Dictionary containing the preprocessed data.

+
+
+ required +
upload + bool + +
+

Whether to upload the preprocessed data to the remote storage or only saving it locally.

+
+
+ False +
overwrite + bool + +
+

Whether to overwrite the preprocessed data if it already exists. +Only used if upload is True. Cache is always overwritten locally.

+
+
+ True +
+ +
+ Source code in openqdc/datasets/base.py +
410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
def save_preprocess(
+    self, data_dict: Dict[str, np.ndarray], upload: bool = False, overwrite: bool = True, as_zarr: bool = False
+):
+    """
+    Save the preprocessed data to the cache directory and optionally upload it to the remote storage.
+
+    Parameters:
+        data_dict:
+            Dictionary containing the preprocessed data.
+        upload:
+            Whether to upload the preprocessed data to the remote storage or only saving it locally.
+        overwrite:
+            Whether to overwrite the preprocessed data if it already exists.
+            Only used if upload is True. Cache is always overwritten locally.
+    """
+    # save memmaps
+    logger.info("Preprocessing data and saving it to cache.")
+    paths = self.dataset_wrapper.save_preprocess(
+        self.preprocess_path, self.data_keys, data_dict, self.pkl_data_keys, self.pkl_data_types
+    )
+    if upload:
+        for local_path in paths:
+            push_remote(local_path, overwrite=overwrite)  # make it async?
+
+
+
+ +
+ +
+ + +

+ save_xyz(idx, energy_method=0, path=None, ext=True) + +

+ + +
+ +

Save a single entry at index idx as an extxyz file.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
idx + int + +
+

Index of the entry

+
+
+ required +
energy_method + int + +
+

Index of the energy method to use

+
+
+ 0 +
path + Optional[str] + +
+

Path to save the xyz file. If None, the current working directory is used.

+
+
+ None +
ext + bool + +
+

Whether to include additional informations like forces and other metadatas (extxyz format)

+
+
+ True +
+ +
+ Source code in openqdc/datasets/base.py +
529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
def save_xyz(self, idx: int, energy_method: int = 0, path: Optional[str] = None, ext: bool = True):
+    """
+    Save a single entry at index idx as an extxyz file.
+
+    Parameters:
+        idx:
+            Index of the entry
+        energy_method:
+            Index of the energy method to use
+        path:
+            Path to save the xyz file. If None, the current working directory is used.
+        ext:
+            Whether to include additional informations like forces and other metadatas (extxyz format)
+    """
+    if path is None:
+        path = os.getcwd()
+    at = self.get_ase_atoms(idx, ext=ext, energy_method=energy_method)
+    write_extxyz(p_join(path, f"mol_{idx}.xyz"), at, plain=not ext)
+
+
+
+ +
+ +
+ + +

+ set_distance_unit(value) + +

+ + +
+ +

Set a new distance unit for the dataset.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
value + str + +
+

New distance unit to set.

+
+
+ required +
+ +
+ Source code in openqdc/datasets/base.py +
366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
def set_distance_unit(self, value: str):
+    """
+    Set a new distance unit for the dataset.
+
+    Parameters:
+        value:
+            New distance unit to set.
+    """
+    # old_unit = self.distance_unit
+    # self.__distance_unit__ = value
+    self._fn_distance = self.distance_unit.to(value)  # get_conversion(old_unit, value)
+    self.__distance_unit__ = value
+
+
+
+ +
+ +
+ + +

+ set_energy_unit(value) + +

+ + +
+ +

Set a new energy unit for the dataset.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
value + str + +
+

New energy unit to set.

+
+
+ required +
+ +
+ Source code in openqdc/datasets/base.py +
353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
def set_energy_unit(self, value: str):
+    """
+    Set a new energy unit for the dataset.
+
+    Parameters:
+        value:
+            New energy unit to set.
+    """
+    # old_unit = self.energy_unit
+    # self.__energy_unit__ = value
+    self._fn_energy = self.energy_unit.to(value)  # get_conversion(old_unit, value)
+    self.__energy_unit__ = value
+
+
+
+ +
+ +
+ + +

+ to_xyz(energy_method=0, path=None) + +

+ + +
+ +

Save dataset as single xyz file (extended xyz format).

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
energy_method + int + +
+

Index of the energy method to use

+
+
+ 0 +
path + Optional[str] + +
+

Path to save the xyz file

+
+
+ None +
+ +
+ Source code in openqdc/datasets/base.py +
548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
def to_xyz(self, energy_method: int = 0, path: Optional[str] = None):
+    """
+    Save dataset as single xyz file (extended xyz format).
+
+    Parameters:
+        energy_method:
+            Index of the energy method to use
+        path:
+            Path to save the xyz file
+    """
+    with open(p_join(path if path else os.getcwd(), f"{self.__name__}.xyz"), "w") as f:
+        for atoms in tqdm(
+            self.as_iter(atoms=True, energy_method=energy_method),
+            total=len(self),
+            desc=f"Saving {self.__name__} as xyz file",
+        ):
+            write_extxyz(f, atoms, append=True)
+
+
+
+ +
+ +
+ + +

+ upload(overwrite=False, as_zarr=False) + +

+ + +
+ +

Upload the preprocessed data to the remote storage. Must be called after preprocess and +need to have write privileges.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
overwrite + bool + +
+

Whether to overwrite the remote data if it already exists

+
+
+ False +
as_zarr + bool + +
+

Whether to upload the data as zarr files

+
+
+ False +
+ +
+ Source code in openqdc/datasets/base.py +
512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
def upload(self, overwrite: bool = False, as_zarr: bool = False):
+    """
+    Upload the preprocessed data to the remote storage. Must be called after preprocess and
+    need to have write privileges.
+
+    Parameters:
+        overwrite:
+            Whether to overwrite the remote data if it already exists
+        as_zarr:
+            Whether to upload the data as zarr files
+    """
+    for key in self.data_keys:
+        local_path = p_join(self.preprocess_path, f"{key}.mmap" if not as_zarr else f"{key}.zip")
+        push_remote(local_path, overwrite=overwrite)
+    local_path = p_join(self.preprocess_path, "props.pkl" if not as_zarr else "metadata.zip")
+    push_remote(local_path, overwrite=overwrite)
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/alchemy.html b/0.1.2/API/datasets/alchemy.html new file mode 100644 index 00000000..c8a74088 --- /dev/null +++ b/0.1.2/API/datasets/alchemy.html @@ -0,0 +1,2223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Alchemy - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Alchemy

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ Alchemy + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Alchemy comprises of 119,487 organic molecules with up to 14 heavy atoms, sampled from the GDB MedChem database. +Molecular properties are calculated using PySCF's implementation of the DFT Kohn-Sham method at the B3LYP level +with the basis set 6-31G(2df,p). The equilibrium geometry is optimized in three passes. First, OpenBabel is used +to parse SMILES string and build the Cartesian coordinates with MMFF94 force field optimization. Second, HF/STO3G +is used to generate the preliminary geometry. Third, for the final pass of geometry relaxation, the +B3LYP/6-31G(2df,p) model with the density fittting approximation for electron repulsion integrals is used. The +auxillary basis cc-pVDZ-jkfit is employed in density fitting to build the Coulomb matrix and the HF exchange +matrix.

+

Usage: +

from openqdc.datasets import Alchemy
+dataset = Alchemy()
+

+ + +
+ Reference +

https://arxiv.org/abs/1906.09427 +https://alchemy.tencent.com/

+
+
+ Source code in openqdc/datasets/potential/alchemy.py +
46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
class Alchemy(BaseDataset):
+    """
+    Alchemy comprises of 119,487 organic molecules with up to 14 heavy atoms, sampled from the GDB MedChem database.
+    Molecular properties are calculated using PySCF's implementation of the DFT Kohn-Sham method at the B3LYP level
+    with the basis set 6-31G(2df,p). The equilibrium geometry is optimized in three passes. First, OpenBabel is used
+    to parse SMILES string and build the Cartesian coordinates with MMFF94 force field optimization. Second, HF/STO3G
+    is used to generate the preliminary geometry. Third, for the final pass of geometry relaxation, the
+    B3LYP/6-31G(2df,p) model with the density fittting approximation for electron repulsion integrals is used. The
+    auxillary basis cc-pVDZ-jkfit is employed in density fitting to build the Coulomb matrix and the HF exchange
+    matrix.
+
+    Usage:
+    ```python
+    from openqdc.datasets import Alchemy
+    dataset = Alchemy()
+    ```
+
+    Reference:
+        https://arxiv.org/abs/1906.09427
+        https://alchemy.tencent.com/
+    """
+
+    __name__ = "alchemy"
+
+    __energy_methods__ = [
+        PotentialMethod.WB97X_6_31G_D,  # "wb97x/6-31g(d)"
+    ]
+
+    energy_target_names = [
+        "ωB97x:6-31G(d) Energy",
+    ]
+
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+    __links__ = {"alchemy.zip": "https://alchemy.tencent.com/data/alchemy-v20191129.zip"}
+
+    def read_raw_entries(self):
+        dir_path = p_join(self.root, "Alchemy-v20191129")
+        full_csv = pd.read_csv(p_join(dir_path, "final_version.csv"))
+        energies = full_csv["U0\n(Ha, internal energy at 0 K)"].tolist()
+        atom_folder = full_csv["atom number"]
+        gdb_idx = full_csv["gdb_idx"]
+        idxs = full_csv.index.tolist()
+        samples = []
+        for i in tqdm(idxs):
+            sdf_file = p_join(dir_path, f"atom_{atom_folder[i]}", f"{gdb_idx[i]}.sdf")
+            energy = energies[i]
+            samples.append(read_mol(sdf_file, energy))
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/ani.html b/0.1.2/API/datasets/ani.html new file mode 100644 index 00000000..b1f3024f --- /dev/null +++ b/0.1.2/API/datasets/ani.html @@ -0,0 +1,2945 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ANI - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ANI

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ ANI1 + + +

+ + +
+

+ Bases: BaseDataset

+ + +

The ANI-1 dataset is a collection of 22 x 10^6 structural conformations from 57,000 distinct small organic +molecules. The molecules contain 4 distinct atoms, C, N, O and H. Electronic structure calculations use the +wB97x density functional and the 6-31G(d) basis set. For generating structures, smiles strings for molecules +are used for generating 3D conformations using RDKit. These 3D structures are then pre-optimized to a stationary +point using the MMFF94 force field. Finally, geometries are optimized until energy minima using the chosen DFT +level.

+

Usage: +

from openqdc.datasets import ANI1
+dataset = ANI1()
+

+ + +
+ References +

https://www.nature.com/articles/sdata2017193

+

https://github.com/aiqm/ANI1x_datasets

+
+
+ Source code in openqdc/datasets/potential/ani.py +
40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
class ANI1(BaseDataset):
+    """
+    The ANI-1 dataset is a collection of 22 x 10^6 structural conformations from 57,000 distinct small organic
+    molecules. The molecules contain 4 distinct atoms, C, N, O and H. Electronic structure calculations use the
+    wB97x density functional and the 6-31G(d) basis set. For generating structures, smiles strings for molecules
+    are used for generating 3D conformations using RDKit. These 3D structures are then pre-optimized to a stationary
+    point using the MMFF94 force field. Finally, geometries are optimized until energy minima using the chosen DFT
+    level.
+
+    Usage:
+    ```python
+    from openqdc.datasets import ANI1
+    dataset = ANI1()
+    ```
+
+    References:
+        https://www.nature.com/articles/sdata2017193\n
+        https://github.com/aiqm/ANI1x_datasets
+    """
+
+    __name__ = "ani1"
+
+    __energy_methods__ = [
+        PotentialMethod.WB97X_6_31G_D,
+    ]
+
+    energy_target_names = [
+        "ωB97x:6-31G(d) Energy",
+    ]
+
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "bohr"
+    __forces_unit__ = "hartree/bohr"
+    __links__ = {"ani1.hdf5.gz": "https://zenodo.org/record/3585840/files/214.hdf5.gz"}
+
+    @property
+    def root(self):
+        return p_join(get_local_cache(), "ani")
+
+    @property
+    def config(self):
+        assert len(self.__links__) > 0, "No links provided for fetching"
+        return dict(dataset_name="ani", links=self.__links__)
+
+    def __smiles_converter__(self, x):
+        return "-".join(x.decode("ascii").split("-")[:-1])
+
+    @property
+    def preprocess_path(self):
+        path = p_join(self.root, "preprocessed", self.__name__)
+        os.makedirs(path, exist_ok=True)
+        return path
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, f"{self.__name__}.h5.gz")
+        samples = read_qc_archive_h5(raw_path, self.__name__, self.energy_target_names, self.force_target_names)
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ ANI1CCX + + +

+ + +
+

+ Bases: ANI1

+ + +

ANI1-CCX is a dataset of 500k conformers subsampled from the 5.5M conformers of ANI-1X dataset using active +learning. The conformations are labelled using a high accuracy CCSD(T)*/CBS method.

+

Usage: +

from openqdc.datasets import ANI1CCX
+dataset = ANI1CCX()
+

+ + +
+ References +

https://doi.org/10.1038/s41467-019-10827-4

+

https://github.com/aiqm/ANI1x_datasets

+
+
+ Source code in openqdc/datasets/potential/ani.py +
160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
class ANI1CCX(ANI1):
+    """
+    ANI1-CCX is a dataset of 500k conformers subsampled from the 5.5M conformers of ANI-1X dataset using active
+    learning. The conformations are labelled using a high accuracy CCSD(T)*/CBS method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import ANI1CCX
+    dataset = ANI1CCX()
+    ```
+
+    References:
+        https://doi.org/10.1038/s41467-019-10827-4\n
+        https://github.com/aiqm/ANI1x_datasets
+    """
+
+    __name__ = "ani1ccx"
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+
+    __energy_methods__ = [
+        PotentialMethod.CCSD_T_CBS,  # "ccsd(t)/cbs",
+        PotentialMethod.CCSD_T_CC_PVDZ,  # "ccsd(t)/cc-pvdz",
+        PotentialMethod.CCSD_T_CC_PVTZ,  # "ccsd(t)/cc-pvtz",
+        PotentialMethod.TCSSD_T_CC_PVDZ,  # "tccsd(t)/cc-pvdz",
+    ]
+
+    energy_target_names = [
+        "CCSD(T)*:CBS Total Energy",
+        "NPNO-CCSD(T):cc-pVDZ Correlation Energy",
+        "NPNO-CCSD(T):cc-pVTZ Correlation Energy",
+        "TPNO-CCSD(T):cc-pVDZ Correlation Energy",
+    ]
+    force_target_names = []
+    __links__ = {"ani1x.hdf5.gz": "https://zenodo.org/record/4081694/files/292.hdf5.gz"}
+
+    def __smiles_converter__(self, x):
+        """util function to convert string to smiles: useful if the smiles is
+        encoded in a different format than its display format
+        """
+        return x
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ __smiles_converter__(x) + +

+ + +
+ +

util function to convert string to smiles: useful if the smiles is +encoded in a different format than its display format

+ +
+ Source code in openqdc/datasets/potential/ani.py +
197
+198
+199
+200
+201
def __smiles_converter__(self, x):
+    """util function to convert string to smiles: useful if the smiles is
+    encoded in a different format than its display format
+    """
+    return x
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ ANI1CCX_V2 + + +

+ + +
+

+ Bases: ANI1CCX

+ + +

ANI1CCX_V2 is an extension of the ANI1CCX dataset with additional PM6 and GFN2_xTB labels +for each conformation.

+

Usage: +

from openqdc.datasets import ANI1CCX_V2
+dataset = ANI1CCX_V2()
+

+ + +
+ References +

https://doi.org/10.1038/s41467-019-10827-4

+

https://github.com/aiqm/ANI1x_datasets

+
+
+ Source code in openqdc/datasets/potential/ani.py +
204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
class ANI1CCX_V2(ANI1CCX):
+    """
+    ANI1CCX_V2 is an extension of the ANI1CCX dataset with additional PM6 and GFN2_xTB labels
+    for each conformation.
+
+    Usage:
+    ```python
+    from openqdc.datasets import ANI1CCX_V2
+    dataset = ANI1CCX_V2()
+    ```
+
+    References:
+        https://doi.org/10.1038/s41467-019-10827-4\n
+        https://github.com/aiqm/ANI1x_datasets
+    """
+
+    __name__ = "ani1ccx_v2"
+
+    __energy_methods__ = ANI1CCX.__energy_methods__ + [PotentialMethod.PM6, PotentialMethod.GFN2_XTB]
+    energy_target_names = ANI1CCX.energy_target_names + ["PM6", "GFN2"]
+    __force_mask__ = ANI1CCX.__force_mask__ + [False, False]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ ANI1X + + +

+ + +
+

+ Bases: ANI1

+ + +

The ANI-1X dataset consists of ANI-1 molecules + some molecules added using active learning, which leads to +a total of 5,496,771 conformers with 63,865 unique molecules. Databases of molecules like GDB-11, ChEMBL, +generated amino acids and 2-amino acid peptides are used for sampling new molecules. One of the techniques +are used for sampling conformations, (1) molecular dynamics, (2) normal mode sampling, (3) dimer sampling and +(4) torsion sampling.

+

Usage: +

from openqdc.datasets import ANI1X
+dataset = ANI1X()
+

+ + +
+ References +

https://doi.org/10.1063/1.5023802

+

https://github.com/aiqm/ANI1x_datasets

+
+
+ Source code in openqdc/datasets/potential/ani.py +
 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
class ANI1X(ANI1):
+    """
+    The ANI-1X dataset consists of ANI-1 molecules + some molecules added using active learning, which leads to
+    a total of 5,496,771 conformers with 63,865 unique molecules. Databases of molecules like GDB-11, ChEMBL,
+    generated amino acids and 2-amino acid peptides are used for sampling new molecules. One of the techniques
+    are used for sampling conformations, (1) molecular dynamics, (2) normal mode sampling, (3) dimer sampling and
+    (4) torsion sampling.
+
+    Usage:
+    ```python
+    from openqdc.datasets import ANI1X
+    dataset = ANI1X()
+    ```
+
+    References:
+        https://doi.org/10.1063/1.5023802\n
+        https://github.com/aiqm/ANI1x_datasets
+    """
+
+    __name__ = "ani1x"
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+
+    __energy_methods__ = [
+        PotentialMethod.HF_CC_PVDZ,
+        PotentialMethod.HF_CC_PVQZ,
+        PotentialMethod.HF_CC_PVTZ,
+        PotentialMethod.MP2_CC_PVDZ,
+        PotentialMethod.MP2_CC_PVQZ,
+        PotentialMethod.MP2_CC_PVTZ,
+        PotentialMethod.WB97X_6_31G_D,
+        PotentialMethod.WB97X_CC_PVTZ,
+    ]
+
+    energy_target_names = [
+        "HF:cc-pVDZ Total Energy",
+        "HF:cc-pVQZ Total Energy",
+        "HF:cc-pVTZ Total Energy",
+        "MP2:cc-pVDZ Correlation Energy",
+        "MP2:cc-pVQZ Correlation Energy",
+        "MP2:cc-pVTZ Correlation Energy",
+        "wB97x:6-31G(d) Total Energy",
+        "wB97x:def2-TZVPP Total Energy",
+    ]
+
+    force_target_names = [
+        "wB97x:6-31G(d) Atomic Forces",
+        "wB97x:def2-TZVPP Atomic Forces",
+    ]
+
+    __force_mask__ = [False, False, False, False, False, False, True, True]
+    __links__ = {"ani1ccx.hdf5.gz": "https://zenodo.org/record/4081692/files/293.hdf5.gz"}
+
+    def convert_forces(self, x):
+        return super().convert_forces(x) * 0.529177249  # correct the Dataset error
+
+    def __smiles_converter__(self, x):
+        return x
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ ANI2X + + +

+ + +
+

+ Bases: ANI1

+ + +

The ANI-2X dataset was constructed using active learning from modified versions of GDB-11, CheMBL, and s66x8. +It adds three new elements (F, Cl, S) resulting in 4.6 million conformers from 13k chemical isomers, optimized +using the LBFGS algorithm and labeled with ωB97X/6-31G*. The same sampling techniques as done in ANI-1X are +used for generating geometries.

+

Usage: +

from openqdc.datasets import ANI2X
+dataset = ANI2X()
+

+ + +
+ References +

https://doi.org/10.1021/acs.jctc.0c00121 +https://github.com/aiqm/ANI1x_datasets

+
+
+ Source code in openqdc/datasets/potential/ani.py +
227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
class ANI2X(ANI1):
+    """
+    The ANI-2X dataset was constructed using active learning from modified versions of GDB-11, CheMBL, and s66x8.
+    It adds three new elements (F, Cl, S) resulting in 4.6 million conformers from 13k chemical isomers, optimized
+    using the LBFGS algorithm and labeled with ωB97X/6-31G*. The same sampling techniques as done in ANI-1X are
+    used for generating geometries.
+
+    Usage:
+    ```python
+    from openqdc.datasets import ANI2X
+    dataset = ANI2X()
+    ```
+
+    References:
+        https://doi.org/10.1021/acs.jctc.0c00121
+        https://github.com/aiqm/ANI1x_datasets
+    """
+
+    __name__ = "ani2x"
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+
+    __energy_methods__ = [
+        # PotentialMethod.NONE,  # "b973c/def2mtzvp",
+        PotentialMethod.WB97X_6_31G_D,  # "wb97x/631gd", # PAPER DATASET
+        # PotentialMethod.NONE,  # "wb97md3bj/def2tzvpp",
+        # PotentialMethod.NONE,  # "wb97mv/def2tzvpp",
+        # PotentialMethod.NONE,  # "wb97x/def2tzvpp",
+    ]
+
+    energy_target_names = [
+        # "b973c/def2mtzvp",
+        "wb97x/631gd",
+        # "wb97md3bj/def2tzvpp",
+        # "wb97mv/def2tzvpp",
+        # "wb97x/def2tzvpp",
+    ]
+
+    force_target_names = ["wb97x/631gd"]  # "b973c/def2mtzvp",
+
+    __force_mask__ = [True]
+    __links__ = {  # "ANI-2x-B973c-def2mTZVP.tar.gz": "https://zenodo.org/records/10108942/files/ANI-2x-B973c-def2mTZVP.tar.gz?download=1",  # noqa
+        # "ANI-2x-wB97MD3BJ-def2TZVPP.tar.gz": "https://zenodo.org/records/10108942/files/ANI-2x-wB97MD3BJ-def2TZVPP.tar.gz?download=1", # noqa
+        # "ANI-2x-wB97MV-def2TZVPP.tar.gz": "https://zenodo.org/records/10108942/files/ANI-2x-wB97MV-def2TZVPP.tar.gz?download=1", # noqa
+        "ANI-2x-wB97X-631Gd.tar.gz": "https://zenodo.org/records/10108942/files/ANI-2x-wB97X-631Gd.tar.gz?download=1",  # noqa
+        # "ANI-2x-wB97X-def2TZVPP.tar.gz": "https://zenodo.org/records/10108942/files/ANI-2x-wB97X-def2TZVPP.tar.gz?download=1", # noqa
+    }
+
+    def __smiles_converter__(self, x):
+        return x
+
+    def read_raw_entries(self):
+        samples = []
+        for lvl_theory in self.__links__.keys():
+            raw_path = p_join(self.root, "final_h5", f"{lvl_theory.split('.')[0]}.h5")
+            samples.extend(read_ani2_h5(raw_path))
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/comp6.html b/0.1.2/API/datasets/comp6.html new file mode 100644 index 00000000..d4c519a8 --- /dev/null +++ b/0.1.2/API/datasets/comp6.html @@ -0,0 +1,2382 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Comp6 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Comp6

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ COMP6 + + +

+ + +
+

+ Bases: BaseDataset

+ + +

COMP6 is a benchmark suite consisting of broad regions of bio-chemical and organic space developed for testing the +ANI-1x potential. It is curated from 6 benchmark sets: S66x8, ANI-MD, GDB7to9, GDB10to13, DrugBank, and +Tripeptides. Energies and forces for all non-equilibrium molecular conformations are calculated using +the wB97x density functional with the 6-31G(d) basis set. The dataset also includes Hirshfield charges and +molecular dipoles.

+ + +
+ Details of the benchmark sets are as follows +

S66x8: Consists of 66 dimeric systems involving hydrogen bonding, pi-pi stacking, London interactions and

+

mixed influence interactions.

+
ANI Molecular Dynamics (ANI-MD): Forces from the ANI-1x potential are used for running 1ns vacuum molecular
+
+

dynamics with a 0.25fs time step at 300K using the Langevin thermostat of 14 well-known drug molecules and 2 small +proteins. A random subsample of 128 frames from each 1ns trajectory is selected, and reference DFT single point +calculations are performed to calculate energies and forces.

+
GDB7to9: Consists of 1500 molecules where 500 per 7, 8 and 9 heavy atoms subsampled from the GDB-11 dataset.
+
+

The intial structure are randomly embedded into 3D space using RDKit and are optimized with tight convergence +criteria. Normal modes/force constants are computer using the reference DFT model. Finally, Diverse normal +mode sampling (DNMS) is carried out to generate non-equilibrium conformations.

+
GDB10to13: Consists of 3000 molecules where 500 molecules per 10 and 11 heavy atoms are subsampled from GDB-11
+
+

and 1000 molecules per 12 and 13 heavy atom are subsampled from GDB-13. Non-equilibrium conformations are +generated via DNMS.

+
Tripeptide: Consists of 248 random tripeptides. Structures are optimized similar to GDB7to9.
+
+DrugBank: Consists of 837 molecules subsampled from the original DrugBank database of real drug molecules.
+
+

Structures are optimized similar to GDB7to9.

+

Usage: +

from openqdc.datasets import COMP6
+dataset = COMP6()
+

+ + +
+ References +

https://aip.scitation.org/doi/abs/10.1063/1.5023802

+

https://github.com/isayev/COMP6

+

S66x8: https://pubs.rsc.org/en/content/articlehtml/2016/cp/c6cp00688d

+

GDB-11: https://pubmed.ncbi.nlm.nih.gov/15674983/

+

GDB-13: https://pubmed.ncbi.nlm.nih.gov/19505099/

+

DrugBank: https://pubs.acs.org/doi/10.1021/ja902302h

+
+
+ Source code in openqdc/datasets/potential/comp6.py +
 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
class COMP6(BaseDataset):
+    """
+    COMP6 is a benchmark suite consisting of broad regions of bio-chemical and organic space developed for testing the
+    ANI-1x potential. It is curated from 6 benchmark sets: S66x8, ANI-MD, GDB7to9, GDB10to13, DrugBank, and
+    Tripeptides. Energies and forces for all non-equilibrium molecular conformations are calculated using
+    the wB97x density functional with the 6-31G(d) basis set. The dataset also includes Hirshfield charges and
+    molecular dipoles.
+
+    Details of the benchmark sets are as follows:
+        S66x8: Consists of 66 dimeric systems involving hydrogen bonding, pi-pi stacking, London interactions and
+    mixed influence interactions.\n
+        ANI Molecular Dynamics (ANI-MD): Forces from the ANI-1x potential are used for running 1ns vacuum molecular
+    dynamics with a 0.25fs time step at 300K using the Langevin thermostat of 14 well-known drug molecules and 2 small
+    proteins. A random subsample of 128 frames from each 1ns trajectory is selected, and reference DFT single point
+    calculations are performed to calculate energies and forces.\n
+        GDB7to9: Consists of 1500 molecules where 500 per 7, 8 and 9 heavy atoms subsampled from the GDB-11 dataset.
+    The intial structure are randomly embedded into 3D space using RDKit and are optimized with tight convergence
+    criteria. Normal modes/force constants are computer using the reference DFT model. Finally, Diverse normal
+    mode sampling (DNMS) is carried out to generate non-equilibrium conformations.\n
+        GDB10to13: Consists of 3000 molecules where 500 molecules per 10 and 11 heavy atoms are subsampled from GDB-11
+    and 1000 molecules per 12 and 13 heavy atom are subsampled from GDB-13. Non-equilibrium conformations are
+    generated via DNMS.\n
+        Tripeptide: Consists of 248 random tripeptides. Structures are optimized similar to GDB7to9.\n
+        DrugBank: Consists of 837 molecules subsampled from the original DrugBank database of real drug molecules.
+    Structures are optimized similar to GDB7to9.
+
+    Usage:
+    ```python
+    from openqdc.datasets import COMP6
+    dataset = COMP6()
+    ```
+
+    References:
+        https://aip.scitation.org/doi/abs/10.1063/1.5023802\n
+        https://github.com/isayev/COMP6\n
+        S66x8: https://pubs.rsc.org/en/content/articlehtml/2016/cp/c6cp00688d\n
+        GDB-11: https://pubmed.ncbi.nlm.nih.gov/15674983/\n
+        GDB-13: https://pubmed.ncbi.nlm.nih.gov/19505099/\n
+        DrugBank: https://pubs.acs.org/doi/10.1021/ja902302h
+    """
+
+    __name__ = "comp6"
+
+    # watchout that forces are stored as -grad(E)
+    __energy_unit__ = "kcal/mol"
+    __distance_unit__ = "ang"  # angstorm
+    __forces_unit__ = "kcal/mol/ang"
+
+    __energy_methods__ = [
+        PotentialMethod.WB97X_6_31G_D,  # "wb97x/6-31g*",
+        PotentialMethod.B3LYP_D3_BJ_DEF2_TZVP,  # "b3lyp-d3(bj)/def2-tzvp",
+        PotentialMethod.B3LYP_DEF2_TZVP,  # "b3lyp/def2-tzvp",
+        PotentialMethod.HF_DEF2_TZVP,  # "hf/def2-tzvp",
+        PotentialMethod.PBE_D3_BJ_DEF2_TZVP,  # "pbe-d3(bj)/def2-tzvp",
+        PotentialMethod.PBE_DEF2_TZVP,  # "pbe/def2-tzvp",
+        PotentialMethod.SVWN_DEF2_TZVP,  # "svwn/def2-tzvp",
+    ]
+
+    energy_target_names = [
+        "Energy",
+        "B3LYP-D3M(BJ):def2-tzvp",
+        "B3LYP:def2-tzvp",
+        "HF:def2-tzvp",
+        "PBE-D3M(BJ):def2-tzvp",
+        "PBE:def2-tzvp",
+        "SVWN:def2-tzvp",
+    ]
+    __force_mask__ = [True, False, False, False, False, False, False]
+
+    force_target_names = [
+        "Gradient",
+    ]
+
+    def __smiles_converter__(self, x):
+        """util function to convert string to smiles: useful if the smiles is
+        encoded in a different format than its display format
+        """
+        return "-".join(x.decode("ascii").split("_")[:-1])
+
+    def read_raw_entries(self):
+        samples = []
+        for subset in ["ani_md", "drugbank", "gdb7_9", "gdb10_13", "s66x8", "tripeptides"]:
+            raw_path = p_join(self.root, f"{subset}.h5.gz")
+            samples += read_qc_archive_h5(raw_path, subset, self.energy_target_names, self.force_target_names)
+
+        return samples
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ __smiles_converter__(x) + +

+ + +
+ +

util function to convert string to smiles: useful if the smiles is +encoded in a different format than its display format

+ +
+ Source code in openqdc/datasets/potential/comp6.py +
81
+82
+83
+84
+85
def __smiles_converter__(self, x):
+    """util function to convert string to smiles: useful if the smiles is
+    encoded in a different format than its display format
+    """
+    return "-".join(x.decode("ascii").split("_")[:-1])
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/des.html b/0.1.2/API/datasets/des.html new file mode 100644 index 00000000..024928be --- /dev/null +++ b/0.1.2/API/datasets/des.html @@ -0,0 +1,2766 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + DES - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

DES

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ DES370K + + +

+ + +
+

+ Bases: BaseInteractionDataset, IDES

+ + +

DE Shaw 370K (DES370K) is a dataset of 3,691 distinct dimers with 370K unique geometries with interaction energies +computed at CCSD(T)/CBS level of theory. It consists of 392 closed-shell chemical species (both neutral molecules +and ions) including water and functional groups found in proteins. Dimer geometries are generated using +QM-based optimization with DF-LMP2/aVDZ level of theory and MD-based from condensed phase MD simulations.

+

Usage: +

from openqdc.datasets import DES370K
+dataset = DES370K()
+

+ + +
+ Reference +

https://www.nature.com/articles/s41597-021-00833-x

+
+
+ Source code in openqdc/datasets/interaction/des.py +
 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
class DES370K(BaseInteractionDataset, IDES):
+    """
+    DE Shaw 370K (DES370K) is a dataset of 3,691 distinct dimers with 370K unique geometries with interaction energies
+    computed at CCSD(T)/CBS level of theory. It consists of 392 closed-shell chemical species (both neutral molecules
+    and ions) including water and functional groups found in proteins. Dimer geometries are generated using
+    QM-based optimization with DF-LMP2/aVDZ level of theory and MD-based from condensed phase MD simulations.
+
+    Usage:
+    ```python
+    from openqdc.datasets import DES370K
+    dataset = DES370K()
+    ```
+
+    Reference:
+        https://www.nature.com/articles/s41597-021-00833-x
+    """
+
+    __name__ = "des370k_interaction"
+    __filename__ = "DES370K.csv"
+    __energy_unit__ = "kcal/mol"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "kcal/mol/ang"
+    __energy_methods__ = [
+        InteractionMethod.MP2_CC_PVDZ,
+        InteractionMethod.MP2_CC_PVQZ,
+        InteractionMethod.MP2_CC_PVTZ,
+        InteractionMethod.MP2_CBS,
+        InteractionMethod.CCSD_T_CC_PVDZ,
+        InteractionMethod.CCSD_T_CBS,
+        InteractionMethod.CCSD_T_NN,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+    ]
+
+    __energy_type__ = [
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.ES,
+        InterEnergyType.EX,
+        InterEnergyType.EX_S2,
+        InterEnergyType.IND,
+        InterEnergyType.EX_IND,
+        InterEnergyType.DISP,
+        InterEnergyType.EX_DISP_OS,
+        InterEnergyType.EX_DISP_SS,
+        InterEnergyType.DELTA_HF,
+    ]
+
+    energy_target_names = [
+        "cc_MP2_all",
+        "qz_MP2_all",
+        "tz_MP2_all",
+        "cbs_MP2_all",
+        "cc_CCSD(T)_all",
+        "cbs_CCSD(T)_all",
+        "nn_CCSD(T)_all",
+        "sapt_all",
+        "sapt_es",
+        "sapt_ex",
+        "sapt_exs2",
+        "sapt_ind",
+        "sapt_exind",
+        "sapt_disp",
+        "sapt_exdisp_os",
+        "sapt_exdisp_ss",
+        "sapt_delta_HF",
+    ]
+    __links__ = {
+        "DES370K.zip": "https://zenodo.org/record/5676266/files/DES370K.zip",
+    }
+
+    @property
+    def csv_path(self):
+        return os.path.join(self.root, self.__filename__)
+
+    def _create_subsets(self, **kwargs):
+        return create_subset(kwargs["smiles0"], kwargs["smiles1"])
+
+    def read_raw_entries(self) -> List[Dict]:
+        filepath = self.csv_path
+        logger.info(f"Reading {self.__name__} interaction data from {filepath}")
+        df = pd.read_csv(filepath)
+        data = []
+        for idx, row in tqdm(df.iterrows(), total=df.shape[0]):
+            item = parse_des_df(row, self.energy_target_names)
+            item["subset"] = self._create_subsets(row=row, **item)
+            item = convert_to_record(item)
+            data.append(item)
+        return data
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ DES5M + + +

+ + +
+

+ Bases: DES370K

+ + +

DE Shaw 5M (DES5M) is a dataset of 3,691 distinct dimers with 5,000,000 unique geometries with interaction energies +computed using SNS-MP2, a machine learning approach. The unique geometries are generated similar to DES370K using +QM based optimization and MD simulations.

+

Usage: +

from openqdc.datasets import DES5M
+dataset = DES5M()
+

+ + +
+ Reference +

https://www.nature.com/articles/s41597-021-00833-x

+
+
+ Source code in openqdc/datasets/interaction/des.py +
180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
class DES5M(DES370K):
+    """
+    DE Shaw 5M (DES5M) is a dataset of 3,691 distinct dimers with 5,000,000 unique geometries with interaction energies
+    computed using SNS-MP2, a machine learning approach. The unique geometries are generated similar to DES370K using
+    QM based optimization and MD simulations.
+
+    Usage:
+    ```python
+    from openqdc.datasets import DES5M
+    dataset = DES5M()
+    ```
+
+    Reference:
+        https://www.nature.com/articles/s41597-021-00833-x
+    """
+
+    __name__ = "des5m_interaction"
+    __filename__ = "DES5M.csv"
+
+    __energy_methods__ = [
+        InteractionMethod.MP2_CC_PVQZ,
+        InteractionMethod.MP2_CC_PVTZ,
+        InteractionMethod.MP2_CBS,
+        InteractionMethod.CCSD_T_NN,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+        InteractionMethod.SAPT0_AUG_CC_PWCVXZ,
+    ]
+
+    __energy_type__ = [
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.TOTAL,
+        InterEnergyType.ES,
+        InterEnergyType.EX,
+        InterEnergyType.EX_S2,
+        InterEnergyType.IND,
+        InterEnergyType.EX_IND,
+        InterEnergyType.DISP,
+        InterEnergyType.EX_DISP_OS,
+        InterEnergyType.EX_DISP_SS,
+        InterEnergyType.DELTA_HF,
+    ]
+
+    energy_target_names = [
+        "qz_MP2_all",
+        "tz_MP2_all",
+        "cbs_MP2_all",
+        "nn_CCSD(T)_all",
+        "sapt_all",
+        "sapt_es",
+        "sapt_ex",
+        "sapt_exs2",
+        "sapt_ind",
+        "sapt_exind",
+        "sapt_disp",
+        "sapt_exdisp_os",
+        "sapt_exdisp_ss",
+        "sapt_delta_HF",
+    ]
+    __links__ = {
+        "DES5M.zip": "https://zenodo.org/records/5706002/files/DESS5M.zip?download=1",
+    }
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ DESS66 + + +

+ + +
+

+ Bases: DES370K

+ + +

DESS66 is a dataset consisting of 66 molecular complexes from the S66 dataset with CCSD(T)/CBS +dimer interaction energies with 1 equilibrium geometry giving 66 conformers in total. +The protocol for estimating energies is based on the DES370K paper.

+

Usage: +

from openqdc.datasets import DESS66
+dataset = DESS66()
+

+ + +
+ Reference +

https://www.nature.com/articles/s41597-021-00833-x

+

S66: https://pubs.acs.org/doi/10.1021/ct2002946

+
+
+ Source code in openqdc/datasets/interaction/des.py +
254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
class DESS66(DES370K):
+    """
+    DESS66 is a dataset consisting of 66 molecular complexes from the S66 dataset with CCSD(T)/CBS
+    dimer interaction energies with 1 equilibrium geometry giving 66 conformers in total.
+    The protocol for estimating energies is based on the DES370K paper.
+
+    Usage:
+    ```python
+    from openqdc.datasets import DESS66
+    dataset = DESS66()
+    ```
+
+    Reference:
+        https://www.nature.com/articles/s41597-021-00833-x\n
+        S66: https://pubs.acs.org/doi/10.1021/ct2002946
+    """
+
+    __name__ = "des_s66"
+    __filename__ = "DESS66.csv"
+    __links__ = {"DESS66.zip": "https://zenodo.org/records/5676284/files/DESS66.zip?download=1"}
+
+    def _create_subsets(self, **kwargs):
+        return kwargs["row"]["system_name"]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ DESS66x8 + + +

+ + +
+

+ Bases: DESS66

+ + +

DESS66x8 is a dataset consisting of 66 molecular complexes from the S66 dataset with CCSD(T)/CBS +dimer interaction energies with 1 equilibrium geometry and 8 geometries along the dissociation curve +giving 592 conformers in total. The protocol for estimating energies is based on the DES370K paper.

+

Usage: +

from openqdc.datasets import DESS66x8
+dataset = DESS66x8()
+

+ + +
+ Reference +

https://www.nature.com/articles/s41597-021-00833-x

+
+
+ Source code in openqdc/datasets/interaction/des.py +
279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
class DESS66x8(DESS66):
+    """
+    DESS66x8 is a dataset consisting of 66 molecular complexes from the S66 dataset with CCSD(T)/CBS
+    dimer interaction energies with 1 equilibrium geometry and 8 geometries along the dissociation curve
+    giving 592 conformers in total. The protocol for estimating energies is based on the DES370K paper.
+
+    Usage:
+    ```python
+    from openqdc.datasets import DESS66x8
+    dataset = DESS66x8()
+    ```
+
+    Reference:
+        https://www.nature.com/articles/s41597-021-00833-x
+    """
+
+    __name__ = "des_s66x8"
+    __filename__ = "DESS66x8.csv"
+    __links__ = {"DESS66x8.zip": "https://zenodo.org/records/5676284/files/DESS66x8.zip?download=1"}
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/gdml.html b/0.1.2/API/datasets/gdml.html new file mode 100644 index 00000000..5dace78b --- /dev/null +++ b/0.1.2/API/datasets/gdml.html @@ -0,0 +1,2278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + GDML - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

GDML

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ GDML + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Gradient Domain Machine Learning (GDML) is a dataset consisting of samples from ab initio +molecular dynamics (AIMD) trajectories at a resolution of 0.5fs. The dataset consists of, Benzene +(627000 conformations), Uracil (133000 conformations), Naptalene (326000 conformations), Aspirin +(211000 conformations) Salicylic Acid (320000 conformations), Malonaldehyde (993000 conformations), +Ethanol (555000 conformations) and Toluene (100000 conformations). Energy and force labels for +each conformation are computed using the PBE + vdW-TS electronic structure method. +molecular dynamics (AIMD) trajectories.

+ + +
+ The dataset consists of the following trajectories +

Benzene: 627000 samples

+

Uracil: 133000 samples

+

Naptalene: 326000 samples

+

Aspirin: 211000 samples

+

Salicylic Acid: 320000 samples

+

Malonaldehyde: 993000 samples

+

Ethanol: 555000 samples

+

Toluene: 100000 samples

+

Usage: +

from openqdc.datasets import GDML
+dataset = GDML()
+

+ + +
+ References +

https://www.science.org/doi/10.1126/sciadv.1603015 +http://www.sgdml.org/#datasets

+
+
+ Source code in openqdc/datasets/potential/gdml.py +
 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
class GDML(BaseDataset):
+    """
+    Gradient Domain Machine Learning (GDML) is a dataset consisting of samples from ab initio
+    molecular dynamics (AIMD) trajectories at a resolution of 0.5fs. The dataset consists of, Benzene
+    (627000 conformations), Uracil (133000 conformations), Naptalene (326000 conformations), Aspirin
+    (211000 conformations) Salicylic Acid (320000 conformations), Malonaldehyde (993000 conformations),
+    Ethanol (555000 conformations) and Toluene (100000 conformations). Energy and force labels for
+    each conformation are computed using the PBE + vdW-TS electronic structure method.
+    molecular dynamics (AIMD) trajectories.
+
+    The dataset consists of the following trajectories:
+        Benzene: 627000 samples\n
+        Uracil: 133000 samples\n
+        Naptalene: 326000 samples\n
+        Aspirin: 211000 samples\n
+        Salicylic Acid: 320000 samples\n
+        Malonaldehyde: 993000 samples\n
+        Ethanol: 555000 samples\n
+        Toluene: 100000 samples\n
+
+    Usage:
+    ```python
+    from openqdc.datasets import GDML
+    dataset = GDML()
+    ```
+
+    References:
+        https://www.science.org/doi/10.1126/sciadv.1603015
+        http://www.sgdml.org/#datasets
+    """
+
+    __name__ = "gdml"
+
+    __energy_methods__ = [
+        PotentialMethod.CCSD_CC_PVDZ,  # "ccsd/cc-pvdz",
+        PotentialMethod.CCSD_T_CC_PVDZ,  # "ccsd(t)/cc-pvdz",
+        # TODO: verify if basis set vdw-ts == def2-tzvp and
+        # it is the same in ISO17 and revmd17
+        PotentialMethod.PBE_DEF2_TZVP,  # "pbe/def2-tzvp",  # MD17
+    ]
+
+    energy_target_names = [
+        "CCSD Energy",
+        "CCSD(T) Energy",
+        "PBE-TS Energy",
+    ]
+
+    __force_mask__ = [True, True, True]
+
+    force_target_names = [
+        "CCSD Gradient",
+        "CCSD(T) Gradient",
+        "PBE-TS Gradient",
+    ]
+
+    __energy_unit__ = "kcal/mol"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "kcal/mol/ang"
+    __links__ = {
+        "gdb7_9.hdf5.gz": "https://zenodo.org/record/3588361/files/208.hdf5.gz",
+        "gdb10_13.hdf5.gz": "https://zenodo.org/record/3588364/files/209.hdf5.gz",
+        "drugbank.hdf5.gz": "https://zenodo.org/record/3588361/files/207.hdf5.gz",
+        "tripeptides.hdf5.gz": "https://zenodo.org/record/3588368/files/211.hdf5.gz",
+        "ani_md.hdf5.gz": "https://zenodo.org/record/3588341/files/205.hdf5.gz",
+        "s66x8.hdf5.gz": "https://zenodo.org/record/3588367/files/210.hdf5.gz",
+    }
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "gdml.h5.gz")
+        samples = read_qc_archive_h5(raw_path, "gdml", self.energy_target_names, self.force_target_names)
+
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/geom.html b/0.1.2/API/datasets/geom.html new file mode 100644 index 00000000..adb04afb --- /dev/null +++ b/0.1.2/API/datasets/geom.html @@ -0,0 +1,2162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + GEOM - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

GEOM

+ +
+ + + + +
+

+ Bases: BaseDataset

+ + +

Geometric Ensemble Of Molecules (GEOM) dataset contains 37 million conformers for 133,000 molecules +from QM9, and 317,000 molecules with experimental data related to biophysics, physiology, and physical chemistry. +For each molecule, the initial structure is generated with RDKit, optimized with the GFN2-xTB energy method and +the lowest energy conformer is fed to the CREST software. CREST software uses metadynamics for exploring the +conformational space for each molecule. Energies in the dataset are computed using semi-empirical method GFN2-xTB.

+

Usage: +

from openqdc.datasets import GEOM
+dataset = GEOM()
+

+ + +
+ References +

https://www.nature.com/articles/s41597-022-01288-4

+

https://github.com/learningmatter-mit/geom

+

CREST Software: https://pubs.rsc.org/en/content/articlelanding/2020/cp/c9cp06869d

+
+
+ Source code in openqdc/datasets/potential/geom.py +
 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
class GEOM(BaseDataset):
+    """
+    Geometric Ensemble Of Molecules (GEOM) dataset contains 37 million conformers for 133,000 molecules
+    from QM9, and 317,000 molecules with experimental data related to biophysics, physiology, and physical chemistry.
+    For each molecule, the initial structure is generated with RDKit, optimized with the GFN2-xTB energy method and
+    the lowest energy conformer is fed to the CREST software. CREST software uses metadynamics for exploring the
+    conformational space for each molecule. Energies in the dataset are computed using semi-empirical method GFN2-xTB.
+
+    Usage:
+    ```python
+    from openqdc.datasets import GEOM
+    dataset = GEOM()
+    ```
+
+    References:
+        https://www.nature.com/articles/s41597-022-01288-4\n
+        https://github.com/learningmatter-mit/geom\n
+        CREST Software: https://pubs.rsc.org/en/content/articlelanding/2020/cp/c9cp06869d
+    """
+
+    __name__ = "geom"
+    __energy_methods__ = [PotentialMethod.GFN2_XTB]
+
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+
+    energy_target_names = ["gfn2_xtb.energy"]
+    force_target_names = []
+
+    partitions = ["qm9", "drugs"]
+    __links__ = {"rdkit_folder.tar.gz": "https://dataverse.harvard.edu/api/access/datafile/4327252"}
+
+    def _read_raw_(self, partition):
+        raw_path = p_join(self.root, "rdkit_folder")
+
+        mols = load_json(p_join(raw_path, f"summary_{partition}.json"))
+        mols = list(mols.items())
+
+        fn = lambda x: read_mol(x[0], x[1], raw_path, partition)  # noqa E731
+        samples = dm.parallelized(fn, mols, n_jobs=1, progress=True)  # don't use more than 1 job
+        return samples
+
+    def read_raw_entries(self):
+        samples = sum([self._read_raw_(partition) for partition in self.partitions], [])
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/iso_17.html b/0.1.2/API/datasets/iso_17.html new file mode 100644 index 00000000..ad824900 --- /dev/null +++ b/0.1.2/API/datasets/iso_17.html @@ -0,0 +1,2295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ISO_17 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ISO_17

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ ISO17 + + +

+ + +
+

+ Bases: BaseDataset

+ + +

ISO17 dataset consists of the largest set of isomers from the QM9 dataset that consists of a fixed composition of +atoms (C7O2H10) arranged in different chemically valid structures. It consist of 129 molecules, each containing +5,000 conformational geometries, energies and forces with a resolution of 1 fs in the molecular dynamics +trajectories. The simulations were carried out using density functional theory (DFT) in the generalized gradient +approximation (GGA) with the Perdew-Burke-Ernzerhof (PBE) functional and the Tkatchenko-Scheffler (TS) van der +Waals correction method.

+

Usage: +

from openqdc.datasets import ISO17
+dataset = ISO17()
+

+ + +
+ References +

https://arxiv.org/abs/1706.08566

+

https://arxiv.org/abs/1609.08259

+

https://www.nature.com/articles/sdata201422

+

https://pubmed.ncbi.nlm.nih.gov/10062328/

+

https://pubmed.ncbi.nlm.nih.gov/19257665/

+
+
+ Source code in openqdc/datasets/potential/iso_17.py +
 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
class ISO17(BaseDataset):
+    """
+    ISO17 dataset consists of the largest set of isomers from the QM9 dataset that consists of a fixed composition of
+    atoms (C7O2H10) arranged in different chemically valid structures. It consist of 129 molecules, each containing
+    5,000 conformational geometries, energies and forces with a resolution of 1 fs in the molecular dynamics
+    trajectories. The simulations were carried out using density functional theory (DFT) in the generalized gradient
+    approximation (GGA) with the Perdew-Burke-Ernzerhof (PBE) functional and the Tkatchenko-Scheffler (TS) van der
+    Waals correction method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import ISO17
+    dataset = ISO17()
+    ```
+
+    References:
+        https://arxiv.org/abs/1706.08566\n
+        https://arxiv.org/abs/1609.08259\n
+        https://www.nature.com/articles/sdata201422\n
+        https://pubmed.ncbi.nlm.nih.gov/10062328/\n
+        https://pubmed.ncbi.nlm.nih.gov/19257665/
+    """
+
+    __name__ = "iso_17"
+
+    __energy_methods__ = [
+        PotentialMethod.PBE_DEF2_TZVP,  # "pbe/def2-tzvp",
+    ]
+
+    energy_target_names = [
+        "PBE-TS Energy",
+    ]
+
+    __force_mask__ = [True]
+
+    force_target_names = [
+        "PBE-TS Gradient",
+    ]
+
+    __energy_unit__ = "ev"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "ev/ang"
+    __links__ = {"iso_17.hdf5.gz": "https://zenodo.org/record/3585907/files/216.hdf5.gz"}
+
+    def __smiles_converter__(self, x):
+        """util function to convert string to smiles: useful if the smiles is
+        encoded in a different format than its display format
+        """
+        return "-".join(x.decode("ascii").split("_")[:-1])
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "iso_17.h5.gz")
+        samples = read_qc_archive_h5(raw_path, "iso_17", self.energy_target_names, self.force_target_names)
+
+        return samples
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ __smiles_converter__(x) + +

+ + +
+ +

util function to convert string to smiles: useful if the smiles is +encoded in a different format than its display format

+ +
+ Source code in openqdc/datasets/potential/iso_17.py +
52
+53
+54
+55
+56
def __smiles_converter__(self, x):
+    """util function to convert string to smiles: useful if the smiles is
+    encoded in a different format than its display format
+    """
+    return "-".join(x.decode("ascii").split("_")[:-1])
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/l7.html b/0.1.2/API/datasets/l7.html new file mode 100644 index 00000000..b9c140e8 --- /dev/null +++ b/0.1.2/API/datasets/l7.html @@ -0,0 +1,2191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + L7 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

L7

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ L7 + + +

+ + +
+

+ Bases: YamlDataset

+ + +

The L7 interaction energy dataset consists of 7 dispersion stabilized non-covalent complexes with +energies labelled using semi-empirical and quantum mechanical methods. The intial geometries are +taken from crystal X-ray data and optimized with a DFT method specific to the complex.

+

Usage: +

from openqdc.datasets import L7
+dataset = L7()
+

+ + +
+ Reference +

https://pubs.acs.org/doi/10.1021/ct400036b

+
+
+ Source code in openqdc/datasets/interaction/l7.py +
 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
class L7(YamlDataset):
+    """
+    The L7 interaction energy dataset consists of 7 dispersion stabilized non-covalent complexes with
+    energies labelled using semi-empirical and quantum mechanical methods. The intial geometries are
+    taken from crystal X-ray data and optimized with a DFT method specific to the complex.
+
+    Usage:
+    ```python
+    from openqdc.datasets import L7
+    dataset = L7()
+    ```
+
+    Reference:
+        https://pubs.acs.org/doi/10.1021/ct400036b
+    """
+
+    __name__ = "l7"
+    __energy_methods__ = [
+        InteractionMethod.QCISDT_CBS,  # "QCISD(T)/CBS",
+        InteractionMethod.DLPNO_CCSDT,  # "DLPNO-CCSD(T)",
+        InteractionMethod.MP2_CBS,  # "MP2/CBS",
+        InteractionMethod.MP2C_CBS,  # "MP2C/CBS",
+        InteractionMethod.FIXED,  # "fixed", TODO: we should remove this level of theory because unless we have a pro
+        InteractionMethod.DLPNO_CCSDT0,  # "DLPNO-CCSD(T0)",
+        InteractionMethod.LNO_CCSDT,  # "LNO-CCSD(T)",
+        InteractionMethod.FN_DMC,  # "FN-DMC",
+    ]
+    __links__ = {
+        "l7.yaml": "http://cuby4.molecular.cz/download_datasets/l7.yaml",
+        "geometries.tar.gz": "http://cuby4.molecular.cz/download_geometries/L7.tar",
+    }
+
+    def _process_name(self, item):
+        return item.geometry.split(":")[1]
+
+    def get_n_atoms_ptr(self, item, root, filename):
+        return np.array([int(item.setup["molecule_a"]["selection"].split("-")[1])], dtype=np.int32)
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/md22.html b/0.1.2/API/datasets/md22.html new file mode 100644 index 00000000..4a6ffc79 --- /dev/null +++ b/0.1.2/API/datasets/md22.html @@ -0,0 +1,2190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + MD22 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

MD22

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ MD22 + + +

+ + +
+

+ Bases: RevMD17

+ + +

MD22 consists of molecular dynamics (MD) trajectories of four major classes of biomolecules and supramolecules, +ranging from a small peptide with 42 atoms to a double-walled nanotube with 370 atoms. The simulation trajectories +are sampled at 400K and 500K with a resolution of 1fs. Potential energy and forces are computed using the PBE+MBD +level of theory.

+

Usage: +

from openqdc.datasets import MD22
+dataset = MD22()
+

+ + +
+ Reference +

https://arxiv.org/abs/2209.14865

+
+
+ Source code in openqdc/datasets/potential/md22.py +
42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
class MD22(RevMD17):
+    """
+    MD22 consists of molecular dynamics (MD) trajectories of four major classes of biomolecules and supramolecules,
+    ranging from a small peptide with 42 atoms to a double-walled nanotube with 370 atoms. The simulation trajectories
+    are sampled at 400K and 500K with a resolution of 1fs. Potential energy and forces are computed using the PBE+MBD
+    level of theory.
+
+    Usage:
+    ```python
+    from openqdc.datasets import MD22
+    dataset = MD22()
+    ```
+
+    Reference:
+        https://arxiv.org/abs/2209.14865
+    """
+
+    __name__ = "md22"
+    __links__ = {
+        f"{x}.npz": f"http://www.quantum-machine.org/gdml/repo/datasets/md22_{x}.npz"
+        for x in [
+            "Ac-Ala3-NHMe",
+            "DHA",
+            "stachyose",
+            "AT-AT",
+            "AT-AT-CG-CG",
+            "double-walled_nanotube",
+            "buckyball-catcher",
+        ]
+    }
+
+    def read_raw_entries(self):
+        entries_list = []
+        for trajectory in trajectories:
+            entries_list.append(read_npz_entry(trajectory, self.root))
+        return entries_list
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/metcalf.html b/0.1.2/API/datasets/metcalf.html new file mode 100644 index 00000000..b9b804e0 --- /dev/null +++ b/0.1.2/API/datasets/metcalf.html @@ -0,0 +1,2220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Metcalf - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Metcalf

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ Metcalf + + +

+ + +
+

+ Bases: BaseInteractionDataset

+ + +

Metcalf is a dataset consisting of 126 hydrogen-bonded dimers involving N-methylacetamide (NMA) with 14,744 to +156,704 geometries/configurations for each complex. The geometries are optimized using the RI-MP2 method and +the cc-pVTZ basis set. SAPT(0) calculations are performed for computing interaction energies and the various +components.

+

Usage: +

from openqdc.datasets import Metcalf
+dataset = Metcalf()
+

+ + +
+ Reference +

https://doi.org/10.1063/1.5142636

+
+
+ Source code in openqdc/datasets/interaction/metcalf.py +
 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
class Metcalf(BaseInteractionDataset):
+    """
+    Metcalf is a dataset consisting of 126 hydrogen-bonded dimers involving N-methylacetamide (NMA) with 14,744 to
+    156,704 geometries/configurations for each complex. The geometries are optimized using the RI-MP2 method and
+    the cc-pVTZ basis set. SAPT(0) calculations are performed for computing interaction energies and the various
+    components.
+
+    Usage:
+    ```python
+    from openqdc.datasets import Metcalf
+    dataset = Metcalf()
+    ```
+
+    Reference:
+        https://doi.org/10.1063/1.5142636
+    """
+
+    __name__ = "metcalf"
+    __energy_unit__ = "kcal/mol"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "kcal/mol/ang"
+    __energy_methods__ = [
+        InteractionMethod.SAPT0_JUN_CC_PVDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDZ,
+    ]
+    __energy_type__ = [
+        InterEnergyType.TOTAL,
+        InterEnergyType.ES,
+        InterEnergyType.EX,
+        InterEnergyType.IND,
+        InterEnergyType.DISP,
+    ]
+    energy_target_names = [
+        "total energy",
+        "electrostatic energy",
+        "exchange energy",
+        "induction energy",
+        "dispersion energy",
+    ]
+    __links__ = {"model-data.tar.gz": "https://zenodo.org/records/10934211/files/model-data.tar?download=1"}
+
+    def read_raw_entries(self) -> List[Dict]:
+        # extract in folders
+        extract_raw_tar_gz(self.root)
+        data = []
+        for filename in glob(self.root + f"{os.sep}*.xyz"):
+            data.extend(read_xyz(filename, self.__name__))
+        return data
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/molecule3d.html b/0.1.2/API/datasets/molecule3d.html new file mode 100644 index 00000000..92f9dd76 --- /dev/null +++ b/0.1.2/API/datasets/molecule3d.html @@ -0,0 +1,2360 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Molecule3D - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Molecule3D

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ Molecule3D + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Molecule3D dataset consists of 3,899,647 molecules with equilibrium geometries and energies calculated at the +B3LYP/6-31G* level of theory. The molecules are extracted from the PubChem database and cleaned by removing +molecules with invalid molecule files, with SMILES conversion error, RDKIT warnings, sanitization problems, +or with damaged log files.

+

Usage: +

from openqdc.datasets import Molecule3D
+dataset = Molecule3D()
+

+ + +
+ References +

https://arxiv.org/abs/2110.01717

+

https://github.com/divelab/MoleculeX

+
+
+ Source code in openqdc/datasets/potential/molecule3d.py +
 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
class Molecule3D(BaseDataset):
+    """
+    Molecule3D dataset consists of 3,899,647 molecules with equilibrium geometries and energies calculated at the
+    B3LYP/6-31G* level of theory. The molecules are extracted from the PubChem database and cleaned by removing
+    molecules with invalid molecule files, with SMILES conversion error, RDKIT warnings, sanitization problems,
+    or with damaged log files.
+
+    Usage:
+    ```python
+    from openqdc.datasets import Molecule3D
+    dataset = Molecule3D()
+    ```
+
+    References:
+        https://arxiv.org/abs/2110.01717\n
+        https://github.com/divelab/MoleculeX
+    """
+
+    __name__ = "molecule3d"
+    __energy_methods__ = [PotentialMethod.B3LYP_6_31G_D]  # "b3lyp/6-31g*",
+    # UNITS MOST LIKELY WRONG, MUST CHECK THEM MANUALLY
+    __energy_unit__ = "ev"  # CALCULATED
+    __distance_unit__ = "ang"
+    __forces_unit__ = "ev/ang"
+    __links__ = {"molecule3d.zip": "https://drive.google.com/uc?id=1C_KRf8mX-gxny7kL9ACNCEV4ceu_fUGy"}
+
+    energy_target_names = ["b3lyp/6-31g*.energy"]
+
+    def read_raw_entries(self):
+        raw = p_join(self.root, "data", "raw")
+        sdf_paths = glob(p_join(raw, "*.sdf"))
+        properties_path = p_join(raw, "properties.csv")
+
+        fn = lambda x: _read_sdf(x, properties_path)
+        res = dm.parallelized(fn, sdf_paths, n_jobs=1)  # don't use more than 1 job
+        samples = sum(res, [])
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + +
+ + +

+ read_mol(mol, energy) + +

+ + +
+ +

Read molecule (Chem.rdchem.Mol) and energy (float) and return dict with conformers and energies

+

Parameters

+

mol: Chem.rdchem.Mol + RDKit molecule +energy: float + Energy of the molecule

+

Returns

+

res: dict + Dictionary containing the following keys: + - name: np.ndarray of shape (N,) containing the smiles of the molecule + - atomic_inputs: flatten np.ndarray of shape (M, 5) containing the atomic numbers, charges and positions + - energies: np.ndarray of shape (1,) containing the energy of the conformer + - n_atoms: np.ndarray of shape (1) containing the number of atoms in the conformer + - subset: np.ndarray of shape (1) containing "molecule3d"

+ +
+ Source code in openqdc/datasets/potential/molecule3d.py +
16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
def read_mol(mol: Chem.rdchem.Mol, energy: float) -> Dict[str, np.ndarray]:
+    """Read molecule (Chem.rdchem.Mol) and energy (float) and return dict with conformers and energies
+
+    Parameters
+    ----------
+    mol: Chem.rdchem.Mol
+        RDKit molecule
+    energy: float
+        Energy of the molecule
+
+    Returns
+    -------
+    res: dict
+        Dictionary containing the following keys:
+        - name: np.ndarray of shape (N,) containing the smiles of the molecule
+        - atomic_inputs: flatten np.ndarray of shape (M, 5) containing the atomic numbers, charges and positions
+        - energies: np.ndarray of shape (1,) containing the energy of the conformer
+        - n_atoms: np.ndarray of shape (1) containing the number of atoms in the conformer
+        - subset: np.ndarray of shape (1) containing "molecule3d"
+    """
+    smiles = dm.to_smiles(mol, explicit_hs=False)
+    # subset = dm.to_smiles(dm.to_scaffold_murcko(mol, make_generic=True), explicit_hs=False)
+    x = get_atomic_number_and_charge(mol)
+    positions = mol.GetConformer().GetPositions()
+
+    res = dict(
+        name=np.array([smiles]),
+        subset=np.array(["molecule3d"]),
+        energies=np.array([energy]).astype(np.float64)[:, None],
+        atomic_inputs=np.concatenate((x, positions), axis=-1, dtype=np.float32),
+        n_atoms=np.array([x.shape[0]], dtype=np.int32),
+    )
+
+    return res
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/multixcqm9.html b/0.1.2/API/datasets/multixcqm9.html new file mode 100644 index 00000000..db565979 --- /dev/null +++ b/0.1.2/API/datasets/multixcqm9.html @@ -0,0 +1,3152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + MultixcQM9 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

MultixcQM9

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ MultixcQM9 + + +

+ + +
+

+ Bases: BaseDataset

+ + +

MultixcQM9 is a dataset of molecular and reaction energies from multi-level quantum chemical methods consisting +of 133K QM9 molecules geometries calculated with 76 different DFT functionals and three different basis sets +resulting in 228 energy values for each molecule along with semi-empirical method GFN2-xTB. Geometries for the +molecules are used directly from Kim et al. which uses G4MP2 method.

+

Usage: +

from openqdc.datasets import MultixcQM9
+dataset = MultixcQM9()
+

+ + +
+ References +

https://www.nature.com/articles/s41597-023-02690-2

+

https://github.com/chemsurajit/largeDFTdata

+

https://www.nature.com/articles/s41597-019-0121-7

+
+
+ Source code in openqdc/datasets/potential/multixcqm9.py +
 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
class MultixcQM9(BaseDataset):
+    """
+    MultixcQM9 is a dataset of molecular and reaction energies from multi-level quantum chemical methods consisting
+    of 133K QM9 molecules geometries calculated with 76 different DFT functionals and three different basis sets
+    resulting in 228 energy values for each molecule along with semi-empirical method GFN2-xTB. Geometries for the
+    molecules are used directly from Kim et al. which uses G4MP2 method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import MultixcQM9
+    dataset = MultixcQM9()
+    ```
+
+    References:
+        https://www.nature.com/articles/s41597-023-02690-2\n
+        https://github.com/chemsurajit/largeDFTdata\n
+        https://www.nature.com/articles/s41597-019-0121-7\n
+    """
+
+    __name__ = "multixcqm9"
+
+    __energy_methods__ = [
+        PotentialMethod.KCIS_MODIFIED_DZP,
+        PotentialMethod.KCIS_ORIGINAL_DZP,
+        PotentialMethod.PKZB_DZP,
+        PotentialMethod.VS98_DZP,
+        PotentialMethod.LDA_VWN_DZP,
+        PotentialMethod.PW91_DZP,
+        PotentialMethod.BLYP_DZP,
+        PotentialMethod.BP_DZP,
+        PotentialMethod.PBE_DZP,
+        PotentialMethod.RPBE_DZP,
+        PotentialMethod.REVPBE_DZP,
+        PotentialMethod.OLYP_DZP,
+        PotentialMethod.FT97_DZP,
+        PotentialMethod.BLAP3_DZP,
+        PotentialMethod.HCTH_93_DZP,
+        PotentialMethod.HCTH_120_DZP,
+        PotentialMethod.HCTH_147_DZP,
+        PotentialMethod.HCTH_407_DZP,
+        PotentialMethod.BMTAU1_DZP,
+        PotentialMethod.BOP_DZP,
+        PotentialMethod.PKZBX_KCISCOR_DZP,
+        PotentialMethod.VS98_X_XC_DZP,
+        PotentialMethod.VS98_X_ONLY_DZP,
+        PotentialMethod.BECKE00_DZP,
+        PotentialMethod.BECKE00X_XC_DZP,
+        PotentialMethod.BECKE00_X_ONLY_DZP,
+        PotentialMethod.BECKE88X_BR89C_DZP,
+        PotentialMethod.OLAP3_DZP,
+        PotentialMethod.TPSS_DZP,
+        PotentialMethod.MPBE_DZP,
+        PotentialMethod.OPBE_DZP,
+        PotentialMethod.OPERDEW_DZP,
+        PotentialMethod.MPBEKCIS_DZP,
+        PotentialMethod.MPW_DZP,
+        PotentialMethod.TAU_HCTH_DZP,
+        PotentialMethod.XLYP_DZP,
+        PotentialMethod.KT1_DZP,
+        PotentialMethod.KT2_DZP,
+        PotentialMethod.M06_L_DZP,
+        PotentialMethod.BLYP_D_DZP,
+        PotentialMethod.BP86_D_DZP,
+        PotentialMethod.PBE_D_DZP,
+        PotentialMethod.TPSSD_DZP,
+        PotentialMethod.B97_D_DZP,
+        PotentialMethod.REVTPSS_DZP,
+        PotentialMethod.PBESOL_DZP,
+        PotentialMethod.RGE2_DZP,
+        PotentialMethod.SSB_D_DZP,
+        PotentialMethod.MVS_DZP,
+        PotentialMethod.MVSX_DZP,
+        PotentialMethod.TMGGA_DZP,
+        PotentialMethod.TPSSH_DZP,
+        PotentialMethod.B3LYP_VWN5_DZP,
+        PotentialMethod.O3LYP_VWN5_DZP,
+        PotentialMethod.KMLYP_VWN5_DZP,
+        PotentialMethod.PBE0_DZP,
+        PotentialMethod.B3LYP_S_VWN5_DZP,
+        PotentialMethod.BHANDH_DZP,
+        PotentialMethod.BHANDHLYP_DZP,
+        PotentialMethod.B97_DZP,
+        PotentialMethod.B97_1_DZP,
+        PotentialMethod.B97_2_DZP,
+        PotentialMethod.MPBE0KCIS_DZP,
+        PotentialMethod.MPBE1KCIS_DZP,
+        PotentialMethod.B1LYP_VWN5_DZP,
+        PotentialMethod.B1PW91_VWN5_DZP,
+        PotentialMethod.MPW1PW_DZP,
+        PotentialMethod.MPW1K_DZP,
+        PotentialMethod.TAU_HCTH_HYBRID_DZP,
+        PotentialMethod.X3LYP_VWN5_DZP,
+        PotentialMethod.OPBE0_DZP,
+        PotentialMethod.M05_DZP,
+        PotentialMethod.M05_2X_DZP,
+        PotentialMethod.M06_DZP,
+        PotentialMethod.M06_2X_DZP,
+        PotentialMethod.B3LYP_D_DZP,
+        PotentialMethod.KCIS_MODIFIED_TZP,
+        PotentialMethod.KCIS_ORIGINAL_TZP,
+        PotentialMethod.PKZB_TZP,
+        PotentialMethod.VS98_TZP,
+        PotentialMethod.LDA_VWN_TZP,
+        PotentialMethod.PW91_TZP,
+        PotentialMethod.BLYP_TZP,
+        PotentialMethod.BP_TZP,
+        PotentialMethod.PBE_TZP,
+        PotentialMethod.RPBE_TZP,
+        PotentialMethod.REVPBE_TZP,
+        PotentialMethod.OLYP_TZP,
+        PotentialMethod.FT97_TZP,
+        PotentialMethod.BLAP3_TZP,
+        PotentialMethod.HCTH_93_TZP,
+        PotentialMethod.HCTH_120_TZP,
+        PotentialMethod.HCTH_147_TZP,
+        PotentialMethod.HCTH_407_TZP,
+        PotentialMethod.BMTAU1_TZP,
+        PotentialMethod.BOP_TZP,
+        PotentialMethod.PKZBX_KCISCOR_TZP,
+        PotentialMethod.VS98_X_XC_TZP,
+        PotentialMethod.VS98_X_ONLY_TZP,
+        PotentialMethod.BECKE00_TZP,
+        PotentialMethod.BECKE00X_XC_TZP,
+        PotentialMethod.BECKE00_X_ONLY_TZP,
+        PotentialMethod.BECKE88X_BR89C_TZP,
+        PotentialMethod.OLAP3_TZP,
+        PotentialMethod.TPSS_TZP,
+        PotentialMethod.MPBE_TZP,
+        PotentialMethod.OPBE_TZP,
+        PotentialMethod.OPERDEW_TZP,
+        PotentialMethod.MPBEKCIS_TZP,
+        PotentialMethod.MPW_TZP,
+        PotentialMethod.TAU_HCTH_TZP,
+        PotentialMethod.XLYP_TZP,
+        PotentialMethod.KT1_TZP,
+        PotentialMethod.KT2_TZP,
+        PotentialMethod.M06_L_TZP,
+        PotentialMethod.BLYP_D_TZP,
+        PotentialMethod.BP86_D_TZP,
+        PotentialMethod.PBE_D_TZP,
+        PotentialMethod.TPSSD_TZP,
+        PotentialMethod.B97_D_TZP,
+        PotentialMethod.REVTPSS_TZP,
+        PotentialMethod.PBESOL_TZP,
+        PotentialMethod.RGE2_TZP,
+        PotentialMethod.SSB_D_TZP,
+        PotentialMethod.MVS_TZP,
+        PotentialMethod.MVSX_TZP,
+        PotentialMethod.TMGGA_TZP,
+        PotentialMethod.TPSSH_TZP,
+        PotentialMethod.B3LYP_VWN5_TZP,
+        PotentialMethod.O3LYP_VWN5_TZP,
+        PotentialMethod.KMLYP_VWN5_TZP,
+        PotentialMethod.PBE0_TZP,
+        PotentialMethod.B3LYP_S_VWN5_TZP,
+        PotentialMethod.BHANDH_TZP,
+        PotentialMethod.BHANDHLYP_TZP,
+        PotentialMethod.B97_TZP,
+        PotentialMethod.B97_1_TZP,
+        PotentialMethod.B97_2_TZP,
+        PotentialMethod.MPBE0KCIS_TZP,
+        PotentialMethod.MPBE1KCIS_TZP,
+        PotentialMethod.B1LYP_VWN5_TZP,
+        PotentialMethod.B1PW91_VWN5_TZP,
+        PotentialMethod.MPW1PW_TZP,
+        PotentialMethod.MPW1K_TZP,
+        PotentialMethod.TAU_HCTH_HYBRID_TZP,
+        PotentialMethod.X3LYP_VWN5_TZP,
+        PotentialMethod.OPBE0_TZP,
+        PotentialMethod.M05_TZP,
+        PotentialMethod.M05_2X_TZP,
+        PotentialMethod.M06_TZP,
+        PotentialMethod.M06_2X_TZP,
+        PotentialMethod.B3LYP_D_TZP,
+        PotentialMethod.KCIS_MODIFIED_SZ,
+        PotentialMethod.KCIS_ORIGINAL_SZ,
+        PotentialMethod.PKZB_SZ,
+        PotentialMethod.VS98_SZ,
+        PotentialMethod.LDA_VWN_SZ,
+        PotentialMethod.PW91_SZ,
+        PotentialMethod.BLYP_SZ,
+        PotentialMethod.BP_SZ,
+        PotentialMethod.PBE_SZ,
+        PotentialMethod.RPBE_SZ,
+        PotentialMethod.REVPBE_SZ,
+        PotentialMethod.OLYP_SZ,
+        PotentialMethod.FT97_SZ,
+        PotentialMethod.BLAP3_SZ,
+        PotentialMethod.HCTH_93_SZ,
+        PotentialMethod.HCTH_120_SZ,
+        PotentialMethod.HCTH_147_SZ,
+        PotentialMethod.HCTH_407_SZ,
+        PotentialMethod.BMTAU1_SZ,
+        PotentialMethod.BOP_SZ,
+        PotentialMethod.PKZBX_KCISCOR_SZ,
+        PotentialMethod.VS98_X_XC_SZ,
+        PotentialMethod.VS98_X_ONLY_SZ,
+        PotentialMethod.BECKE00_SZ,
+        PotentialMethod.BECKE00X_XC_SZ,
+        PotentialMethod.BECKE00_X_ONLY_SZ,
+        PotentialMethod.BECKE88X_BR89C_SZ,
+        PotentialMethod.OLAP3_SZ,
+        PotentialMethod.TPSS_SZ,
+        PotentialMethod.MPBE_SZ,
+        PotentialMethod.OPBE_SZ,
+        PotentialMethod.OPERDEW_SZ,
+        PotentialMethod.MPBEKCIS_SZ,
+        PotentialMethod.MPW_SZ,
+        PotentialMethod.TAU_HCTH_SZ,
+        PotentialMethod.XLYP_SZ,
+        PotentialMethod.KT1_SZ,
+        PotentialMethod.KT2_SZ,
+        PotentialMethod.M06_L_SZ,
+        PotentialMethod.BLYP_D_SZ,
+        PotentialMethod.BP86_D_SZ,
+        PotentialMethod.PBE_D_SZ,
+        PotentialMethod.TPSSD_SZ,
+        PotentialMethod.B97_D_SZ,
+        PotentialMethod.REVTPSS_SZ,
+        PotentialMethod.PBESOL_SZ,
+        PotentialMethod.RGE2_SZ,
+        PotentialMethod.SSB_D_SZ,
+        PotentialMethod.MVS_SZ,
+        PotentialMethod.MVSX_SZ,
+        PotentialMethod.TMGGA_SZ,
+        PotentialMethod.TPSSH_SZ,
+        PotentialMethod.B3LYP_VWN5_SZ,
+        PotentialMethod.O3LYP_VWN5_SZ,
+        PotentialMethod.KMLYP_VWN5_SZ,
+        PotentialMethod.PBE0_SZ,
+        PotentialMethod.B3LYP_S_VWN5_SZ,
+        PotentialMethod.BHANDH_SZ,
+        PotentialMethod.BHANDHLYP_SZ,
+        PotentialMethod.B97_SZ,
+        PotentialMethod.B97_1_SZ,
+        PotentialMethod.B97_2_SZ,
+        PotentialMethod.MPBE0KCIS_SZ,
+        PotentialMethod.MPBE1KCIS_SZ,
+        PotentialMethod.B1LYP_VWN5_SZ,
+        PotentialMethod.B1PW91_VWN5_SZ,
+        PotentialMethod.MPW1PW_SZ,
+        PotentialMethod.MPW1K_SZ,
+        PotentialMethod.TAU_HCTH_HYBRID_SZ,
+        PotentialMethod.X3LYP_VWN5_SZ,
+        PotentialMethod.OPBE0_SZ,
+        PotentialMethod.M05_SZ,
+        PotentialMethod.M05_2X_SZ,
+        PotentialMethod.M06_SZ,
+        PotentialMethod.M06_2X_SZ,
+        PotentialMethod.B3LYP_D_SZ,
+        PotentialMethod.GFN2_XTB,
+    ]
+
+    energy_target_names = [
+        "KCIS-MODIFIED/DZP",
+        "KCIS-ORIGINAL/DZP",
+        "PKZB/DZP",
+        "VS98/DZP",
+        "LDA(VWN)/DZP",
+        "PW91/DZP",
+        "BLYP/DZP",
+        "BP/DZP",
+        "PBE/DZP",
+        "RPBE/DZP",
+        "REVPBE/DZP",
+        "OLYP/DZP",
+        "FT97/DZP",
+        "BLAP3/DZP",
+        "HCTH/93/DZP",
+        "HCTH/120/DZP",
+        "HCTH/147/DZP",
+        "HCTH/407/DZP",
+        "BMTAU1/DZP",
+        "BOP/DZP",
+        "PKZBX-KCISCOR/DZP",
+        "VS98-X(XC)/DZP",
+        "VS98-X-ONLY/DZP",
+        "BECKE00/DZP",
+        "BECKE00X(XC)/DZP",
+        "BECKE00-X-ONLY/DZP",
+        "BECKE88X+BR89C/DZP",
+        "OLAP3/DZP",
+        "TPSS/DZP",
+        "MPBE/DZP",
+        "OPBE/DZP",
+        "OPERDEW/DZP",
+        "MPBEKCIS/DZP",
+        "MPW/DZP",
+        "TAU-HCTH/DZP",
+        "XLYP/DZP",
+        "KT1/DZP",
+        "KT2/DZP",
+        "M06-L/DZP",
+        "BLYP-D/DZP",
+        "BP86-D/DZP",
+        "PBE-D/DZP",
+        "TPSS-D/DZP",
+        "B97-D/DZP",
+        "REVTPSS/DZP",
+        "PBESOL/DZP",
+        "RGE2/DZP",
+        "SSB-D/DZP",
+        "MVS/DZP",
+        "MVSX/DZP",
+        "T-MGGA/DZP",
+        "TPSSH/DZP",
+        "B3LYP(VWN5)/DZP",
+        "O3LYP(VWN5)/DZP",
+        "KMLYP(VWN5)/DZP",
+        "PBE0/DZP",
+        "B3LYP*(VWN5)/DZP",
+        "BHANDH/DZP",
+        "BHANDHLYP/DZP",
+        "B97/DZP",
+        "B97-1/DZP",
+        "B97-2/DZP",
+        "MPBE0KCIS/DZP",
+        "MPBE1KCIS/DZP",
+        "B1LYP(VWN5)/DZP",
+        "B1PW91(VWN5)/DZP",
+        "MPW1PW/DZP",
+        "MPW1K/DZP",
+        "TAU-HCTH-HYBRID/DZP",
+        "X3LYP(VWN5)/DZP",
+        "OPBE0/DZP",
+        "M05/DZP",
+        "M05-2X/DZP",
+        "M06/DZP",
+        "M06-2X/DZP",
+        "B3LYP-D/DZP",
+        "KCIS-MODIFIED/TZP",
+        "KCIS-ORIGINAL/TZP",
+        "PKZB/TZP",
+        "VS98/TZP",
+        "LDA(VWN)/TZP",
+        "PW91/TZP",
+        "BLYP/TZP",
+        "BP/TZP",
+        "PBE/TZP",
+        "RPBE/TZP",
+        "REVPBE/TZP",
+        "OLYP/TZP",
+        "FT97/TZP",
+        "BLAP3/TZP",
+        "HCTH/93/TZP",
+        "HCTH/120/TZP",
+        "HCTH/147/TZP",
+        "HCTH/407/TZP",
+        "BMTAU1/TZP",
+        "BOP/TZP",
+        "PKZBX-KCISCOR/TZP",
+        "VS98-X(XC)/TZP",
+        "VS98-X-ONLY/TZP",
+        "BECKE00/TZP",
+        "BECKE00X(XC)/TZP",
+        "BECKE00-X-ONLY/TZP",
+        "BECKE88X+BR89C/TZP",
+        "OLAP3/TZP",
+        "TPSS/TZP",
+        "MPBE/TZP",
+        "OPBE/TZP",
+        "OPERDEW/TZP",
+        "MPBEKCIS/TZP",
+        "MPW/TZP",
+        "TAU-HCTH/TZP",
+        "XLYP/TZP",
+        "KT1/TZP",
+        "KT2/TZP",
+        "M06-L/TZP",
+        "BLYP-D/TZP",
+        "BP86-D/TZP",
+        "PBE-D/TZP",
+        "TPSS-D/TZP",
+        "B97-D/TZP",
+        "REVTPSS/TZP",
+        "PBESOL/TZP",
+        "RGE2/TZP",
+        "SSB-D/TZP",
+        "MVS/TZP",
+        "MVSX/TZP",
+        "T-MGGA/TZP",
+        "TPSSH/TZP",
+        "B3LYP(VWN5)/TZP",
+        "O3LYP(VWN5)/TZP",
+        "KMLYP(VWN5)/TZP",
+        "PBE0/TZP",
+        "B3LYP*(VWN5)/TZP",
+        "BHANDH/TZP",
+        "BHANDHLYP/TZP",
+        "B97/TZP",
+        "B97-1/TZP",
+        "B97-2/TZP",
+        "MPBE0KCIS/TZP",
+        "MPBE1KCIS/TZP",
+        "B1LYP(VWN5)/TZP",
+        "B1PW91(VWN5)/TZP",
+        "MPW1PW/TZP",
+        "MPW1K/TZP",
+        "TAU-HCTH-HYBRID/TZP",
+        "X3LYP(VWN5)/TZP",
+        "OPBE0/TZP",
+        "M05/TZP",
+        "M05-2X/TZP",
+        "M06/TZP",
+        "M06-2X/TZP",
+        "B3LYP-D/TZP",
+        "KCIS-MODIFIED/SZ",
+        "KCIS-ORIGINAL/SZ",
+        "PKZB/SZ",
+        "VS98/SZ",
+        "LDA(VWN)/SZ",
+        "PW91/SZ",
+        "BLYP/SZ",
+        "BP/SZ",
+        "PBE/SZ",
+        "RPBE/SZ",
+        "REVPBE/SZ",
+        "OLYP/SZ",
+        "FT97/SZ",
+        "BLAP3/SZ",
+        "HCTH/93/SZ",
+        "HCTH/120/SZ",
+        "HCTH/147/SZ",
+        "HCTH/407/SZ",
+        "BMTAU1/SZ",
+        "BOP/SZ",
+        "PKZBX-KCISCOR/SZ",
+        "VS98-X(XC)/SZ",
+        "VS98-X-ONLY/SZ",
+        "BECKE00/SZ",
+        "BECKE00X(XC)/SZ",
+        "BECKE00-X-ONLY/SZ",
+        "BECKE88X+BR89C/SZ",
+        "OLAP3/SZ",
+        "TPSS/SZ",
+        "MPBE/SZ",
+        "OPBE/SZ",
+        "OPERDEW/SZ",
+        "MPBEKCIS/SZ",
+        "MPW/SZ",
+        "TAU-HCTH/SZ",
+        "XLYP/SZ",
+        "KT1/SZ",
+        "KT2/SZ",
+        "M06-L/SZ",
+        "BLYP-D/SZ",
+        "BP86-D/SZ",
+        "PBE-D/SZ",
+        "TPSS-D/SZ",
+        "B97-D/SZ",
+        "REVTPSS/SZ",
+        "PBESOL/SZ",
+        "RGE2/SZ",
+        "SSB-D/SZ",
+        "MVS/SZ",
+        "MVSX/SZ",
+        "T-MGGA/SZ",
+        "TPSSH/SZ",
+        "B3LYP(VWN5)/SZ",
+        "O3LYP(VWN5)/SZ",
+        "KMLYP(VWN5)/SZ",
+        "PBE0/SZ",
+        "B3LYP*(VWN5)/SZ",
+        "BHANDH/SZ",
+        "BHANDHLYP/SZ",
+        "B97/SZ",
+        "B97-1/SZ",
+        "B97-2/SZ",
+        "MPBE0KCIS/SZ",
+        "MPBE1KCIS/SZ",
+        "B1LYP(VWN5)/SZ",
+        "B1PW91(VWN5)/SZ",
+        "MPW1PW/SZ",
+        "MPW1K/SZ",
+        "TAU-HCTH-HYBRID/SZ",
+        "X3LYP(VWN5)/SZ",
+        "OPBE0/SZ",
+        "M05/SZ",
+        "M05-2X/SZ",
+        "M06/SZ",
+        "M06-2X/SZ",
+        "B3LYP-D/SZ",
+        "GFNXTB",
+    ]
+
+    __energy_unit__ = "ev"  # to fix
+    __distance_unit__ = "ang"  # to fix
+    __forces_unit__ = "ev/ang"  # to fix
+    __links__ = {
+        "xyz.zip": "https://data.dtu.dk/ndownloader/files/35143624",
+        "xtb.zip": "https://data.dtu.dk/ndownloader/files/42444300",
+        "dzp.zip": "https://data.dtu.dk/ndownloader/files/42443925",
+        "tzp.zip": "https://data.dtu.dk/ndownloader/files/42444129",
+        "sz.zip": "https://data.dtu.dk/ndownloader/files/42441345",
+        "failed_indices.dat": "https://data.dtu.dk/ndownloader/files/37337677",
+    }
+
+    def _read_molecules_energies(self):
+        d = {"DZP": None, "TZP": None, "SZ": None, "XTB": None}
+        for basis in d.keys():
+            d[basis] = pd.read_csv(p_join(self.root, basis, "molecules/molecules.csv"), index_col=False).drop(
+                columns=["index"]
+            )
+        return pd.concat([d["DZP"], d["TZP"], d["SZ"], d["XTB"]], axis=1, ignore_index=False)
+
+    def _read_all_xyzs(self):
+        xyz_list = read_xyz_files(self.root)
+        return pd.DataFrame(xyz_list)
+
+    def read_raw_entries(self):
+        df_energies = self._read_molecules_energies()
+        df_xyz = self._read_all_xyzs()
+        return [
+            {"energies": np.atleast_2d(en), **xyz_dict}
+            for xyz_dict, en in zip(df_xyz.to_dict("records"), df_energies.values.astype(np.float64))
+        ]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/nabladft.html b/0.1.2/API/datasets/nabladft.html new file mode 100644 index 00000000..04f87598 --- /dev/null +++ b/0.1.2/API/datasets/nabladft.html @@ -0,0 +1,2242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + NablaDFT - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

NablaDFT

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ NablaDFT + + +

+ + +
+

+ Bases: BaseDataset

+ + +

NablaDFT is a dataset constructed from a subset of the +Molecular Sets (MOSES) dataset consisting of 1 million molecules +with 5,340,152 unique conformations. Conformations for each molecule are generated in 2 steps. First, a set of +conformations are generated using RDKit. Second, using Butina Clustering Method on conformations, clusters that +cover 95% of the conformations are selected and the centroids of those clusters are selected as the final set. +This results in 1-62 conformations per molecule. For generating quantum properties, Kohn-Sham method at +wB97X-D/def2-XVP levels are used to generate the energy.

+

Usage: +

from openqdc.datasets import NablaDFT
+dataset = NablaDFT()
+

+ + +
+ References +

https://pubs.rsc.org/en/content/articlelanding/2022/CP/D2CP03966D

+

https://github.com/AIRI-Institute/nablaDFT

+
+
+ Source code in openqdc/datasets/potential/nabladft.py +
 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
class NablaDFT(BaseDataset):
+    """
+    NablaDFT is a dataset constructed from a subset of the
+    [Molecular Sets (MOSES) dataset](https://github.com/molecularsets/moses) consisting of 1 million molecules
+    with 5,340,152 unique conformations. Conformations for each molecule are generated in 2 steps. First, a set of
+    conformations are generated using RDKit. Second, using Butina Clustering Method on conformations, clusters that
+    cover 95% of the conformations are selected and the centroids of those clusters are selected as the final set.
+    This results in 1-62 conformations per molecule. For generating quantum properties, Kohn-Sham method at
+    wB97X-D/def2-XVP levels are used to generate the energy.
+
+    Usage:
+    ```python
+    from openqdc.datasets import NablaDFT
+    dataset = NablaDFT()
+    ```
+
+    References:
+        https://pubs.rsc.org/en/content/articlelanding/2022/CP/D2CP03966D\n
+        https://github.com/AIRI-Institute/nablaDFT
+    """
+
+    __name__ = "nabladft"
+    __energy_methods__ = [
+        PotentialMethod.WB97X_D_DEF2_SVP,
+    ]  # "wb97x-d/def2-svp"
+
+    energy_target_names = ["wb97x-d/def2-svp"]
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "bohr"
+    __forces_unit__ = "hartree/bohr"
+    __links__ = {"nabladft.db": "https://n-usr-31b1j.s3pd12.sbercloud.ru/b-usr-31b1j-qz9/data/moses_db/dataset_full.db"}
+
+    @property
+    def data_types(self):
+        return {
+            "atomic_inputs": np.float32,
+            "position_idx_range": np.int32,
+            "energies": np.float32,
+            "forces": np.float32,
+        }
+
+    @requires_package("nablaDFT")
+    def read_raw_entries(self):
+        from nablaDFT.dataset import HamiltonianDatabase
+
+        label_path = p_join(self.root, "summary.csv")
+        df = pd.read_csv(label_path, usecols=["MOSES id", "CONFORMER id", "SMILES", "DFT TOTAL ENERGY"])
+        labels = df.set_index(keys=["MOSES id", "CONFORMER id"]).to_dict("index")
+
+        raw_path = p_join(self.root, "dataset_full.db")
+        train = HamiltonianDatabase(raw_path)
+        n, c = len(train), 20
+        step_size = int(np.ceil(n / os.cpu_count()))
+
+        fn = lambda i: read_chunk_from_db(raw_path, i * step_size, min((i + 1) * step_size, n), labels=labels)
+        samples = dm.parallelized(
+            fn, list(range(c)), n_jobs=c, progress=False, scheduler="threads"
+        )  # don't use more than 1 job
+
+        return sum(samples, [])
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/orbnet_denali.html b/0.1.2/API/datasets/orbnet_denali.html new file mode 100644 index 00000000..38a16e61 --- /dev/null +++ b/0.1.2/API/datasets/orbnet_denali.html @@ -0,0 +1,2219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Orbnet Denali - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Orbnet Denali

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ OrbnetDenali + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Orbnet Denali is a collection of 2.3 million conformers from 212,905 unique molecules. Molecules include a range +of organic molecules with protonation and tautomeric states, non-covalent interactions, common salts, and +counterions, spanning the most common elements in bio and organic chemistry. Geometries are generated in 2 steps. +First, four energy-minimized conformations are generated for each molecule using the ENTOS BREEZE conformer +generator. Second, using the four energy-minimized conformers, non-equilibrium geometries are generated using +normal mode sampling at 300K or ab initio molecular dynamics (AIMD) for 200fs at 500K; using GFN1-xTB level of +theory. Energies are calculated using DFT method wB97X-D3/def2-TZVP and semi-empirical method GFN1-xTB level of +theory.

+

Usage: +

from openqdc.datasets import OrbnetDenali
+dataset = OrbnetDenali()
+

+ + +
+ References +

https://arxiv.org/abs/2107.00299

+

https://figshare.com/articles/dataset/OrbNet_Denali_Training_Data/14883867

+
+
+ Source code in openqdc/datasets/potential/orbnet_denali.py +
37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
class OrbnetDenali(BaseDataset):
+    """
+    Orbnet Denali is a collection of 2.3 million conformers from 212,905 unique molecules. Molecules include a range
+    of organic molecules with protonation and tautomeric states, non-covalent interactions, common salts, and
+    counterions, spanning the most common elements in bio and organic chemistry. Geometries are generated in 2 steps.
+    First, four energy-minimized conformations are generated for each molecule using the ENTOS BREEZE conformer
+    generator. Second, using the four energy-minimized conformers, non-equilibrium geometries are generated using
+    normal mode sampling at 300K or ab initio molecular dynamics (AIMD) for 200fs at 500K; using GFN1-xTB level of
+    theory. Energies are calculated using DFT method wB97X-D3/def2-TZVP and semi-empirical method GFN1-xTB level of
+    theory.
+
+    Usage:
+    ```python
+    from openqdc.datasets import OrbnetDenali
+    dataset = OrbnetDenali()
+    ```
+
+    References:
+        https://arxiv.org/abs/2107.00299\n
+        https://figshare.com/articles/dataset/OrbNet_Denali_Training_Data/14883867
+    """
+
+    __name__ = "orbnet_denali"
+    __energy_methods__ = [
+        PotentialMethod.WB97X_D3_DEF2_TZVP,
+        PotentialMethod.GFN1_XTB,
+    ]  # ["wb97x-d3/def2-tzvp", "gfn1_xtb"]
+    energy_target_names = ["dft_energy", "xtb1_energy"]
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+    __links__ = {
+        "orbnet_denali.tar.gz": "https://figshare.com/ndownloader/files/28672287",
+        "orbnet_denali_targets.tar.gz": "https://figshare.com/ndownloader/files/28672248",
+    }
+
+    def read_raw_entries(self):
+        label_path = p_join(self.root, "denali_labels.csv")
+        df = pd.read_csv(label_path, usecols=["sample_id", "mol_id", "subset", "dft_energy", "xtb1_energy"])
+        labels = {
+            mol_id: group.drop(["mol_id"], axis=1).drop_duplicates("sample_id").set_index("sample_id").to_dict("index")
+            for mol_id, group in df.groupby("mol_id")
+        }
+
+        fn = lambda x: read_archive(x[0], x[1], self.root, self.energy_target_names)
+        res = dm.parallelized(fn, list(labels.items()), scheduler="threads", n_jobs=-1, progress=True)
+        samples = sum(res, [])
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/pcqm.html b/0.1.2/API/datasets/pcqm.html new file mode 100644 index 00000000..551bc65b --- /dev/null +++ b/0.1.2/API/datasets/pcqm.html @@ -0,0 +1,2444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + PCQM - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

PCQM

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ PCQM_B3LYP + + +

+ + +
+

+ Bases: PCQM_PM6

+ + +

PubChemQC B3LYP/6-31G (PCQM_B3LYP) comprises of 85 million molecules ranging from essential compounds to +biomolecules. The geometries for the molecule are optimized using PM6. Using the optimized geometry, +the electronic structure and properties are calculated using B3LIP/6-31G method.

+

Usage: +

from openqdc.datasets import PCQM_B3LYP
+dataset = PCQM_B3LYP()
+

+ + +
+ References +

https://arxiv.org/abs/2305.18454

+
+
+ Source code in openqdc/datasets/potential/pcqm.py +
178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
class PCQM_B3LYP(PCQM_PM6):
+    """
+    PubChemQC B3LYP/6-31G* (PCQM_B3LYP) comprises of 85 million molecules ranging from essential compounds to
+    biomolecules. The geometries for the molecule are optimized using PM6. Using the optimized geometry,
+    the electronic structure and properties are calculated using B3LIP/6-31G* method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import PCQM_B3LYP
+    dataset = PCQM_B3LYP()
+    ```
+
+    References:
+        https://arxiv.org/abs/2305.18454
+    """
+
+    __name__ = "pubchemqc_b3lyp"
+    __energy_methods__ = ["b3lyp/6-31g*"]
+    energy_target_names = ["b3lyp"]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ PCQM_PM6 + + +

+ + +
+

+ Bases: BaseDataset

+ + +

PubChemQC PM6 (PCQM_PM6) is an exhaustive dataset containing 221 million organic molecules with optimized +molecular geometries and electronic properties. To generate the dataset, only molecules with weights less +than 1000g/mol are considered from the PubChem ftp site. The initial structure is generated using OpenBabel +and then is optimized using geometry optimization with the semi-empirical method PM6. The energies are also +computed using the PM6 method.

+

Usage: +

from openqdc.datasets import PCQM_PM6
+dataset = PCQM_PM6()
+

+ + +
+ References +

https://pubs.acs.org/doi/abs/10.1021/acs.jcim.0c00740

+
+
+ Source code in openqdc/datasets/potential/pcqm.py +
 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
class PCQM_PM6(BaseDataset):
+    """
+    PubChemQC PM6 (PCQM_PM6) is an exhaustive dataset containing 221 million organic molecules with optimized
+    molecular geometries and electronic properties. To generate the dataset, only molecules with weights less
+    than 1000g/mol are considered from the PubChem ftp site. The initial structure is generated using OpenBabel
+    and then is optimized using geometry optimization with the semi-empirical method PM6. The energies are also
+    computed using the PM6 method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import PCQM_PM6
+    dataset = PCQM_PM6()
+    ```
+
+    References:
+        https://pubs.acs.org/doi/abs/10.1021/acs.jcim.0c00740
+    """
+
+    __name__ = "pubchemqc_pm6"
+    __energy_methods__ = [PotentialMethod.PM6]
+
+    energy_target_names = ["pm6"]
+
+    __force_methods__ = []
+    force_target_names = []
+
+    @property
+    def root(self):
+        return p_join(get_local_cache(), "pubchemqc")
+
+    @property
+    def preprocess_path(self):
+        path = p_join(self.root, "preprocessed", self.__name__)
+        os.makedirs(path, exist_ok=True)
+        return path
+
+    def collate_list(self, list_entries):
+        predicat = list_entries is not None and len(list_entries) > 0
+        list_entries = [x for x in list_entries if x is not None]
+        if predicat:
+            res = super().collate_list(list_entries)
+        else:
+            res = None
+        return res
+
+    @property
+    def data_types(self):
+        return {
+            "atomic_inputs": np.float32,
+            "position_idx_range": np.int32,
+            "energies": np.float32,
+            "forces": np.float32,
+        }
+
+    def read_raw_entries(self):
+        arxiv_paths = glob(p_join(self.root, f"{self.__energy_methods__[0]}", "*.pkl"))
+        f = lambda x: self.collate_list(read_preprocessed_archive(x))
+        samples = dm.parallelized(f, arxiv_paths, n_jobs=1, progress=True)
+        samples = [x for x in samples if x is not None]
+        return samples
+
+    def preprocess(self, overwrite=False):
+        if overwrite or not self.is_preprocessed():
+            logger.info("Preprocessing data and saving it to cache.")
+            logger.info(
+                f"Dataset {self.__name__} data with the following units:\n"
+                f"Energy: {self.energy_unit}, Distance: {self.distance_unit}, "
+                f"Forces: {self.force_unit if self.__force_methods__ else 'None'}"
+            )
+            entries = self.read_raw_entries()
+            self.collate_and_save_list(entries)
+
+    def collate_and_save_list(self, list_entries):
+        n_molecules, n_atoms = 0, 0
+        for i in range(len(list_entries)):
+            list_entries[i]["position_idx_range"] += n_atoms
+            n_atoms += list_entries[i]["position_idx_range"].max()
+            n_molecules += list_entries[i]["position_idx_range"].shape[0]
+
+        for key in self.data_keys:
+            first = list_entries[0][key]
+            shape = (n_molecules, *first.shape[1:])
+            local_path = p_join(self.preprocess_path, f"{key}.mmap")
+            out = np.memmap(local_path, mode="w+", dtype=first.dtype, shape=shape)
+
+            start = 0
+            for i in range(len(list_entries)):
+                x = list_entries[i].pop(key)
+                n = x.shape[0]
+                out[start : start + n] = x
+                out.flush()
+            push_remote(local_path, overwrite=True)
+
+        # save smiles and subset
+        tmp, n = dict(name=[]), len(list_entries)
+        local_path = p_join(self.preprocess_path, "props.pkl")
+        names = [list_entries[i].pop("name") for i in range(n)]
+        f = lambda xs: [dm.to_inchikey(x) for x in xs]
+        res = dm.parallelized(f, names, n_jobs=-1, progress=False)
+        for x in res:
+            tmp["name"] += x
+        for key in ["subset", "n_atoms"]:
+            tmp[key] = []
+            for i in range(n):
+                tmp[key] += list(list_entries[i].pop(key))
+        with open(local_path, "wb") as f:
+            pkl.dump(tmp, f)
+        push_remote(local_path, overwrite=True)
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/proteinfragments.html b/0.1.2/API/datasets/proteinfragments.html new file mode 100644 index 00000000..2ff1623d --- /dev/null +++ b/0.1.2/API/datasets/proteinfragments.html @@ -0,0 +1,2416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Protein Fragments - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Protein Fragments

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ MDDataset + + +

+ + +
+

+ Bases: ProteinFragments

+ + +

MDDataset is a subset of the proteinfragments dataset that +generated from the molecular dynamics with their model. +The sampling was done with Molecular Dynamics +at room temperature 300K in various solvent phase:

+ + +
+ Subsets +

Polyalanine: + All the polyalanine are sampled in gas phase. AceAla15Lys is + a polyalanine peptides capped with an N-terminal acetyl group + and a protonated lysine residue at the C-terminus, + Acela15nme is polyalanine peptide capped with an N-terminal acetyl group + and a C-terminal N-methyl amide group

+

Crambin: 46-residue protein crambin in aqueous solution (25,257 atoms)

+

Usage: +

from openqdc.datasets import MDDataset
+dataset = MDDataset()
+

+ + +
+ References +

https://www.science.org/doi/10.1126/sciadv.adn4397

+
+
+ Source code in openqdc/datasets/potential/proteinfragments.py +
161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
class MDDataset(ProteinFragments):
+    """
+    MDDataset is a subset of the proteinfragments dataset that
+    generated from the molecular dynamics with their model.
+    The sampling was done with Molecular Dynamics
+    at room temperature 300K in various solvent phase:
+
+    Subsets:
+        Polyalanine:
+            All the polyalanine are sampled in gas phase. AceAla15Lys is
+            a polyalanine peptides capped with an N-terminal acetyl group
+            and a protonated lysine residue at the C-terminus,
+            Acela15nme is polyalanine peptide capped with an N-terminal acetyl group
+            and a C-terminal N-methyl amide group\n
+        Crambin: 46-residue protein crambin in aqueous solution (25,257 atoms)
+
+    Usage:
+    ```python
+    from openqdc.datasets import MDDataset
+    dataset = MDDataset()
+    ```
+
+    References:
+        https://www.science.org/doi/10.1126/sciadv.adn4397
+    """
+
+    __name__ = "mddataset"
+
+    __links__ = {
+        f"{name}.db": f"https://zenodo.org/records/10720941/files/{name}.db?download=1"
+        for name in ["acala15nme_folding_clusters", "crambin", "minimahopping_acala15lysh", "minimahopping_acala15nme"]
+    }
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ ProteinFragments + + +

+ + +
+

+ Bases: BaseDataset

+ + +

ProteinFragments is a dataset constructed from a subset of the +the data was generated from a top-down and bottom-up approach:

+ + +
+ Top-down +

Fragments are generated by cutting out a spherical +region around an atom (including solvent molecules) +and saturating all dangling bonds. +Sampling was done with the Molecular Dynamics (MD) method from +conventional FF at room temperature.

+
+ +
+ Bottom-up +

Fragments are generated by constructing chemical graphs +of one to eight nonhydrogen atoms. +Sampling of multiple conformers per fragments was done with +MD simulations at high temperatures or normal mode sampling.

+

Usage: +

from openqdc.datasets import ProteinFragments
+dataset = ProteinFragments()
+

+ + +
+ References +

https://www.science.org/doi/10.1126/sciadv.adn4397

+
+
+ Source code in openqdc/datasets/potential/proteinfragments.py +
 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
class ProteinFragments(BaseDataset):
+    """
+    ProteinFragments is a dataset constructed from a subset of the
+    the data was generated from a top-down and bottom-up approach:
+
+    Top-down:
+        Fragments are generated by cutting out a spherical
+        region around an atom (including solvent molecules)
+        and saturating all dangling bonds.
+        Sampling was done with the Molecular Dynamics (MD) method from
+        conventional FF at room temperature.
+
+    Bottom-up:
+        Fragments are generated by constructing chemical graphs
+        of one to eight nonhydrogen atoms.
+        Sampling of multiple conformers per fragments was done with
+        MD simulations at high temperatures or normal mode sampling.
+
+
+    Usage:
+    ```python
+    from openqdc.datasets import ProteinFragments
+    dataset = ProteinFragments()
+    ```
+
+    References:
+        https://www.science.org/doi/10.1126/sciadv.adn4397
+    """
+
+    __name__ = "proteinfragments"
+    # PBE0/def2-TZVPP+MBD
+    __energy_methods__ = [
+        PotentialMethod.PBE0_MBD_DEF2_TZVPP,
+    ]
+
+    energy_target_names = [
+        "PBE0+MBD/def2-TZVPP",
+    ]
+
+    __energy_unit__ = "ev"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "ev/ang"
+    __links__ = {
+        f"{name}.db": f"https://zenodo.org/records/10720941/files/{name}.db?download=1"
+        for name in ["general_protein_fragments"]
+    }
+
+    @property
+    def root(self):
+        return p_join(get_local_cache(), "proteinfragments")
+
+    @property
+    def config(self):
+        assert len(self.__links__) > 0, "No links provided for fetching"
+        return dict(dataset_name="proteinfragments", links=self.__links__)
+
+    @property
+    def preprocess_path(self):
+        path = p_join(self.root, "preprocessed", self.__name__)
+        os.makedirs(path, exist_ok=True)
+        return path
+
+    def read_raw_entries(self):
+        samples = []
+        for name in self.__links__:
+            raw_path = p_join(self.root, f"{name}")
+            samples.extend(read_db(raw_path))
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/qm1b.html b/0.1.2/API/datasets/qm1b.html new file mode 100644 index 00000000..7f95be15 --- /dev/null +++ b/0.1.2/API/datasets/qm1b.html @@ -0,0 +1,2336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + QM1B - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

QM1B

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ QM1B + + +

+ + +
+

+ Bases: BaseDataset

+ + +

QM1B is a dataset containing 1 billion conformations for 1.09M small molecules generated using a custom +PySCF library that incorporates hardware acceleration via IPUs. The molecules contain 9-11 heavy atoms and are +subsampled from the Generated Data Bank (GDB). For each molecule, 1000 geometries are generated using RDKit. +Electronic properties for each conformation are then calculated using the density functional B3LYP +and the basis set STO-3G.

+

Usage: +

from openqdc.datasets import QM1B
+dataset = QM1B()
+

+ + +
+ References +

https://arxiv.org/pdf/2311.01135

+

https://github.com/graphcore-research/qm1b-dataset/

+
+
+ Source code in openqdc/datasets/potential/qm1b.py +
 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
class QM1B(BaseDataset):
+    """
+    QM1B is a dataset containing 1 billion conformations for 1.09M small molecules generated using a custom
+    PySCF library that incorporates hardware acceleration via IPUs. The molecules contain 9-11 heavy atoms and are
+    subsampled from the Generated Data Bank (GDB). For each molecule, 1000 geometries are generated using RDKit.
+    Electronic properties for each conformation are then calculated using the density functional B3LYP
+    and the basis set STO-3G.
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM1B
+    dataset = QM1B()
+    ```
+
+    References:
+        https://arxiv.org/pdf/2311.01135\n
+        https://github.com/graphcore-research/qm1b-dataset/
+    """
+
+    __name__ = "qm1b"
+
+    __energy_methods__ = [PotentialMethod.B3LYP_STO3G]
+    __force_methods__ = []
+
+    energy_target_names = ["b3lyp/sto-3g"]
+    force_target_names = []
+
+    __energy_unit__ = "ev"
+    __distance_unit__ = "bohr"
+    __forces_unit__ = "ev/bohr"
+    __links__ = {
+        "qm1b_validation.parquet": "https://ndownloader.figshare.com/files/43005175",
+        **{f"part_{i:03d}.parquet": f"https://ndownloader.figshare.com/files/{FILE_NUM[i]}" for i in range(0, 256)},
+    }
+
+    @property
+    def root(self):
+        return p_join(get_local_cache(), "qm1b")
+
+    @property
+    def preprocess_path(self):
+        path = p_join(self.root, "preprocessed", self.__name__)
+        os.makedirs(path, exist_ok=True)
+        return path
+
+    def read_raw_entries(self):
+        filenames = list(map(lambda x: p_join(self.root, f"part_{x:03d}.parquet"), list(range(0, 256)))) + [
+            p_join(self.root, "qm1b_validation.parquet")
+        ]
+
+        def read_entries_parallel(filename):
+            df = pd.read_parquet(filename)
+
+            def extract_parallel(df, i):
+                return extract_from_row(df.iloc[i])
+
+            fn = partial(extract_parallel, df)
+            list_of_idxs = list(range(len(df)))
+            results = dm.utils.parallelized(fn, list_of_idxs, scheduler="threads", progress=False)
+            return results
+
+        list_of_list = dm.utils.parallelized(read_entries_parallel, filenames, scheduler="processes", progress=True)
+
+        return [x for xs in list_of_list for x in xs]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ QM1B_SMALL + + +

+ + +
+

+ Bases: QM1B

+ + +

QM1B_SMALL is a subset of the QM1B dataset containing a maximum of 15 random conformers per molecule.

+

Usage: +

from openqdc.datasets import QM1B_SMALL
+dataset = QM1B_SMALL()
+

+ +
+ Source code in openqdc/datasets/potential/qm1b.py +
145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
class QM1B_SMALL(QM1B):
+    """
+    QM1B_SMALL is a subset of the QM1B dataset containing a maximum of 15 random conformers per molecule.
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM1B_SMALL
+    dataset = QM1B_SMALL()
+    ```
+    """
+
+    __name__ = "qm1b_small"
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/qm7x.html b/0.1.2/API/datasets/qm7x.html new file mode 100644 index 00000000..2440b41e --- /dev/null +++ b/0.1.2/API/datasets/qm7x.html @@ -0,0 +1,2316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + QM7X - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

QM7X

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ QM7X + + +

+ + +
+

+ Bases: BaseDataset

+ + +

QM7X is a collection of almost 4.2 million conformers from 6,950 unique organic molecules. The molecules with +up to seven heavy (C, N, O, S, Cl) atoms are considered from the GDB13 database. For generating conformations, +OpenBabel is utilized to get an initial structure using the MMFF94 force field. Using the initial structure, meta- +stable conformational isomers are generated using the Confab tool along with the MMFF94 force field. The structure +is then re-optimized with density-functional tight binding (DFTB) supplemented with many-body dispersion (MBD) +interactions. The lowest energy structure is then considered as the final equilibrium conformer. Additionally, non +-equilibrium conformations are generated by displacing the equilibrium geometry along a linear combination of +normal mode coordinates computed at the DFTB3-MBD level within the harmonic approximation. The dataset has +energy values for each geometry computed at PBE0-MBD and DFTB3-MBD method.

+

Usage: +

from openqdc.datasets import QM7X
+dataset = QM7X()
+

+ + +
+ References +

https://arxiv.org/abs/2006.15139

+

https://zenodo.org/records/4288677

+
+
+ Source code in openqdc/datasets/potential/qm7x.py +
36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
class QM7X(BaseDataset):
+    """
+    QM7X is a collection of almost 4.2 million conformers from 6,950 unique organic molecules. The molecules with
+    up to seven heavy (C, N, O, S, Cl) atoms are considered from the GDB13 database. For generating conformations,
+    OpenBabel is utilized to get an initial structure using the MMFF94 force field. Using the initial structure, meta-
+    stable conformational isomers are generated using the Confab tool along with the MMFF94 force field. The structure
+    is then re-optimized with density-functional tight binding (DFTB) supplemented with many-body dispersion (MBD)
+    interactions. The lowest energy structure is then considered as the final equilibrium conformer. Additionally, non
+    -equilibrium conformations are generated by displacing the equilibrium geometry along a linear combination of
+    normal mode coordinates computed at the DFTB3-MBD level within the harmonic approximation. The dataset has
+    energy values for each geometry computed at PBE0-MBD and DFTB3-MBD method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM7X
+    dataset = QM7X()
+    ```
+
+    References:
+        https://arxiv.org/abs/2006.15139\n
+        https://zenodo.org/records/4288677
+    """
+
+    __name__ = "qm7x"
+
+    __energy_methods__ = [PotentialMethod.PBE0_DEF2_TZVP, PotentialMethod.DFT3B]  # "pbe0/def2-tzvp", "dft3b"]
+
+    energy_target_names = ["ePBE0+MBD", "eDFTB+MBD"]
+
+    __force_mask__ = [True, False]
+
+    force_target_names = ["pbe0FOR"]
+
+    __energy_unit__ = "ev"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "ev/ang"
+    __links__ = {f"{i}000.xz": f"https://zenodo.org/record/4288677/files/{i}000.xz" for i in range(1, 9)}
+
+    def read_raw_entries(self):
+        samples = []
+        for i in range(1, 9):
+            raw_path = p_join(self.root, f"{i}000")
+            data = load_hdf5_file(raw_path)
+            samples += [
+                read_mol(data[k], k, self.energy_target_names, self.force_target_names) for k in tqdm(data.keys())
+            ]
+
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ QM7X_V2 + + +

+ + +
+

+ Bases: QM7X

+ + +

QM7X_V2 is an extension of the QM7X dataset containing PM6 labels for each of the 4.2M geometries.

+

Usage: +

from openqdc.datasets import QM7X_V2
+dataset = QM7X_V2()
+

+ +
+ Source code in openqdc/datasets/potential/qm7x.py +
 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
class QM7X_V2(QM7X):
+    """
+    QM7X_V2 is an extension of the QM7X dataset containing PM6 labels for each of the 4.2M geometries.
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM7X_V2
+    dataset = QM7X_V2()
+    ```
+    """
+
+    __name__ = "qm7x_v2"
+    __energy_methods__ = QM7X.__energy_methods__ + [PotentialMethod.PM6]
+    __force_mask__ = QM7X.__force_mask__ + [False]
+    energy_target_names = QM7X.energy_target_names + ["PM6"]
+    force_target_names = QM7X.force_target_names
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/qmugs.html b/0.1.2/API/datasets/qmugs.html new file mode 100644 index 00000000..7f38b90d --- /dev/null +++ b/0.1.2/API/datasets/qmugs.html @@ -0,0 +1,2294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Qmugs - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Qmugs

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ QMugs + + +

+ + +
+

+ Bases: BaseDataset

+ + +

The QMugs dataset contains 2 million conformers for 665k biologically and pharmacologically relevant molecules +extracted from the ChEMBL database. Three geometries per molecule are generated and optimized using the GFN2-xTB +method. Using the optimized geometry, the atomic and molecular properties are calculated using both, semi-empirical +method (GFN2-xTB) and DFT method (ωB97X-D/def2-SVP).

+

Usage: +

from openqdc.datasets import QMugs
+dataset = QMugs()
+

+ + +
+ References +

https://arxiv.org/abs/2107.00367

+

https://www.nature.com/articles/s41597-022-01390-7#ethics

+

https://www.research-collection.ethz.ch/handle/20.500.11850/482129

+
+
+ Source code in openqdc/datasets/potential/qmugs.py +
38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
class QMugs(BaseDataset):
+    """
+    The QMugs dataset contains 2 million conformers for 665k biologically and pharmacologically relevant molecules
+    extracted from the ChEMBL database. Three geometries per molecule are generated and optimized using the GFN2-xTB
+    method. Using the optimized geometry, the atomic and molecular properties are calculated using both, semi-empirical
+    method (GFN2-xTB) and DFT method (ωB97X-D/def2-SVP).
+
+    Usage:
+    ```python
+    from openqdc.datasets import QMugs
+    dataset = QMugs()
+    ```
+
+    References:
+        https://arxiv.org/abs/2107.00367\n
+        https://www.nature.com/articles/s41597-022-01390-7#ethics\n
+        https://www.research-collection.ethz.ch/handle/20.500.11850/482129
+    """
+
+    __name__ = "qmugs"
+    __energy_methods__ = [PotentialMethod.GFN2_XTB, PotentialMethod.WB97X_D_DEF2_SVP]  # "gfn2_xtb", "wb97x-d/def2-svp"
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+    __links__ = {
+        "summary.csv": "https://libdrive.ethz.ch/index.php/s/X5vOBNSITAG5vzM/download?path=%2F&files=summary.csv",
+        "structures.tar.gz": "https://libdrive.ethz.ch/index.php/s/X5vOBNSITAG5vzM/download?path=%2F&files=structures.tar.gz",  # noqa
+    }
+
+    energy_target_names = [
+        "GFN2:TOTAL_ENERGY",
+        "DFT:TOTAL_ENERGY",
+    ]
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "structures")
+        mol_dirs = [p_join(raw_path, d) for d in os.listdir(raw_path)]
+
+        samples = dm.parallelized(read_mol, mol_dirs, n_jobs=-1, progress=True, scheduler="threads")
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ QMugs_V2 + + +

+ + +
+

+ Bases: QMugs

+ + +

QMugs_V2 is an extension of the QMugs dataset containing PM6 labels for each of the 4.2M geometries.

+

Usage: +

from openqdc.datasets import QMugs_V2
+dataset = QMugs_V2()
+

+ +
+ Source code in openqdc/datasets/potential/qmugs.py +
80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
class QMugs_V2(QMugs):
+    """
+    QMugs_V2 is an extension of the QMugs dataset containing PM6 labels for each of the 4.2M geometries.
+
+    Usage:
+    ```python
+    from openqdc.datasets import QMugs_V2
+    dataset = QMugs_V2()
+    ```
+    """
+
+    __name__ = "qmugs_v2"
+    __energy_methods__ = QMugs.__energy_methods__ + [PotentialMethod.PM6]
+    energy_target_names = QMugs.energy_target_names + ["PM6"]
+    __force_mask__ = QMugs.__force_mask__ + [False]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/qmx.html b/0.1.2/API/datasets/qmx.html new file mode 100644 index 00000000..809b3e14 --- /dev/null +++ b/0.1.2/API/datasets/qmx.html @@ -0,0 +1,3126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + QMX - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

QMX

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ QM7 + + +

+ + +
+

+ Bases: QMX

+ + +

QM7 is a dataset constructed from subsets of the GDB-13 database ( +stable and synthetically accessible organic molecules), +containing up to seven “heavy” atoms. +The molecules conformation are optimized using DFT at the +PBE0/def2-TZVP level of theory.

+ + +
+ Chemical species +

[C, N, O, S, H]

+

Usage: +

from openqdc.datasets import QM7
+dataset = QM7()
+

+ + +
+ References +

https://arxiv.org/pdf/1703.00564

+
+
+ Source code in openqdc/datasets/potential/qmx.py +
 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
class QM7(QMX):
+    """
+    QM7 is a dataset constructed from subsets of the GDB-13 database (
+    stable and synthetically accessible organic molecules),
+    containing up to seven “heavy” atoms.
+    The molecules conformation are optimized using DFT at the
+    PBE0/def2-TZVP level of theory.
+
+    Chemical species:
+        [C, N, O, S, H]
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM7
+    dataset = QM7()
+    ```
+
+    References:
+        https://arxiv.org/pdf/1703.00564
+    """
+
+    __links__ = {"qm7.hdf5.gz": "https://zenodo.org/record/3588337/files/150.hdf5.gz?download=1"}
+    __name__ = "qm7"
+
+    energy_target_names = [
+        "B2PLYP-D3(BJ):aug-cc-pvdz",
+        "B2PLYP-D3(BJ):aug-cc-pvtz",
+        "B2PLYP-D3(BJ):def2-svp",
+        "B2PLYP-D3(BJ):def2-tzvp",
+        "B2PLYP-D3(BJ):sto-3g",
+        "B2PLYP-D3:aug-cc-pvdz",
+        "B2PLYP-D3:aug-cc-pvtz",
+        "B2PLYP-D3:def2-svp",
+        "B2PLYP-D3:def2-tzvp",
+        "B2PLYP-D3:sto-3g",
+        "B2PLYP-D3M(BJ):aug-cc-pvdz",
+        "B2PLYP-D3M(BJ):aug-cc-pvtz",
+        "B2PLYP-D3M(BJ):def2-svp",
+        "B2PLYP-D3M(BJ):def2-tzvp",
+        "B2PLYP-D3M(BJ):sto-3g",
+        "B2PLYP-D3M:aug-cc-pvdz",
+        "B2PLYP-D3M:aug-cc-pvtz",
+        "B2PLYP-D3M:def2-svp",
+        "B2PLYP-D3M:def2-tzvp",
+        "B2PLYP-D3M:sto-3g",
+        "B2PLYP:aug-cc-pvdz",
+        "B2PLYP:aug-cc-pvtz",
+        "B2PLYP:def2-svp",
+        "B2PLYP:def2-tzvp",
+        "B2PLYP:sto-3g",
+        "B3LYP-D3(BJ):aug-cc-pvdz",
+        "B3LYP-D3(BJ):aug-cc-pvtz",
+        "B3LYP-D3(BJ):def2-svp",
+        "B3LYP-D3(BJ):def2-tzvp",
+        "B3LYP-D3(BJ):sto-3g",
+        "B3LYP-D3:aug-cc-pvdz",
+        "B3LYP-D3:aug-cc-pvtz",
+        "B3LYP-D3:def2-svp",
+        "B3LYP-D3:def2-tzvp",
+        "B3LYP-D3:sto-3g",
+        "B3LYP-D3M(BJ):aug-cc-pvdz",
+        "B3LYP-D3M(BJ):aug-cc-pvtz",
+        "B3LYP-D3M(BJ):def2-svp",
+        "B3LYP-D3M(BJ):def2-tzvp",
+        "B3LYP-D3M(BJ):sto-3g",
+        "B3LYP-D3M:aug-cc-pvdz",
+        "B3LYP-D3M:aug-cc-pvtz",
+        "B3LYP-D3M:def2-svp",
+        "B3LYP-D3M:def2-tzvp",
+        "B3LYP-D3M:sto-3g",
+        "B3LYP:aug-cc-pvdz",
+        "B3LYP:aug-cc-pvtz",
+        "B3LYP:def2-svp",
+        "B3LYP:def2-tzvp",
+        "B3LYP:sto-3g",
+        "HF:aug-cc-pvdz",
+        "HF:aug-cc-pvtz",
+        "HF:def2-svp",
+        "HF:def2-tzvp",
+        "HF:sto-3g",
+        "MP2:aug-cc-pvdz",
+        "MP2:aug-cc-pvtz",
+        "MP2:def2-svp",
+        "MP2:def2-tzvp",
+        "MP2:sto-3g",
+        "PBE0:aug-cc-pvdz",
+        "PBE0:aug-cc-pvtz",
+        "PBE0:def2-svp",
+        "PBE0:def2-tzvp",
+        "PBE0:sto-3g",
+        "PBE:aug-cc-pvdz",
+        "PBE:aug-cc-pvtz",
+        "PBE:def2-svp",
+        "PBE:def2-tzvp",
+        "PBE:sto-3g",
+        "WB97M-V:aug-cc-pvdz",
+        "WB97M-V:aug-cc-pvtz",
+        "WB97M-V:def2-svp",
+        "WB97M-V:def2-tzvp",
+        "WB97M-V:sto-3g",
+        "WB97X-D:aug-cc-pvdz",
+        "WB97X-D:aug-cc-pvtz",
+        "WB97X-D:def2-svp",
+        "WB97X-D:def2-tzvp",
+        "WB97X-D:sto-3g",
+    ]
+
+    __energy_methods__ = [PotentialMethod.NONE for _ in range(len(energy_target_names))]  # "wb97x/6-31g(d)"
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ QM7b + + +

+ + +
+

+ Bases: QMX

+ + +

QM7b is a dataset constructed from subsets of the GDB-13 database ( +stable and synthetically accessible organic molecules), +containing up to seven “heavy” atoms. +The molecules conformation are optimized using DFT at the +PBE0/def2-TZVP level of theory.

+ + +
+ Chemical species +

[C, N, O, S, Cl, H]

+

Usage: +

from openqdc.datasets import QM7b
+dataset = QM7b()
+

+ + +
+ References +

https://arxiv.org/pdf/1703.00564

+
+
+ Source code in openqdc/datasets/potential/qmx.py +
189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
class QM7b(QMX):
+    """
+    QM7b is a dataset constructed from subsets of the GDB-13 database (
+    stable and synthetically accessible organic molecules),
+    containing up to seven “heavy” atoms.
+    The molecules conformation are optimized using DFT at the
+    PBE0/def2-TZVP level of theory.
+
+    Chemical species:
+        [C, N, O, S, Cl, H]
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM7b
+    dataset = QM7b()
+    ```
+
+    References:
+        https://arxiv.org/pdf/1703.00564
+    """
+
+    __links__ = {"qm7b.hdf5.gz": "https://zenodo.org/record/3588335/files/200.hdf5.gz?download=1"}
+    __name__ = "qm7b"
+    energy_target_names = [
+        "CCSD(T0):cc-pVDZ",
+        "HF:cc-pVDZ",
+        "HF:cc-pVTZ",
+        "MP2:cc-pVTZ",
+        "B2PLYP-D3:aug-cc-pvdz",
+        "B2PLYP-D3:aug-cc-pvtz",
+        "B2PLYP-D3:def2-svp",
+        "B2PLYP-D3:def2-tzvp",
+        "B2PLYP-D3:sto-3g",
+        "B2PLYP-D3M(BJ):aug-cc-pvdz",
+        "B2PLYP-D3M(BJ):aug-cc-pvtz",
+        "B2PLYP-D3M(BJ):def2-svp",
+        "B2PLYP-D3M(BJ):def2-tzvp",
+        "B2PLYP-D3M(BJ):sto-3g",
+        "B2PLYP-D3M:aug-cc-pvdz",
+        "B2PLYP-D3M:aug-cc-pvtz",
+        "B2PLYP-D3M:def2-svp",
+        "B2PLYP-D3M:def2-tzvp",
+        "B2PLYP-D3M:sto-3g",
+        "B2PLYP:aug-cc-pvdz",
+        "B2PLYP:aug-cc-pvtz",
+        "B2PLYP:def2-svp",
+        "B2PLYP:def2-tzvp",
+        "B2PLYP:sto-3g",
+        "B3LYP-D3(BJ):aug-cc-pvdz",
+        "B3LYP-D3(BJ):aug-cc-pvtz",
+        "B3LYP-D3(BJ):def2-svp",
+        "B3LYP-D3(BJ):def2-tzvp",
+        "B3LYP-D3(BJ):sto-3g",
+        "B3LYP-D3:aug-cc-pvdz",
+        "B3LYP-D3:aug-cc-pvtz",
+        "B3LYP-D3:def2-svp",
+        "B3LYP-D3:def2-tzvp",
+        "B3LYP-D3:sto-3g",
+        "B3LYP-D3M(BJ):aug-cc-pvdz",
+        "B3LYP-D3M(BJ):aug-cc-pvtz",
+        "B3LYP-D3M(BJ):def2-svp",
+        "B3LYP-D3M(BJ):def2-tzvp",
+        "B3LYP-D3M(BJ):sto-3g",
+        "B3LYP-D3M:aug-cc-pvdz",
+        "B3LYP-D3M:aug-cc-pvtz",
+        "B3LYP-D3M:def2-svp",
+        "B3LYP-D3M:def2-tzvp",
+        "B3LYP-D3M:sto-3g",
+        "B3LYP:aug-cc-pvdz",
+        "B3LYP:aug-cc-pvtz",
+        "B3LYP:def2-svp",
+        "B3LYP:def2-tzvp",
+        "B3LYP:sto-3g",
+        "HF:aug-cc-pvdz",
+        "HF:aug-cc-pvtz",
+        "HF:cc-pvtz",
+        "HF:def2-svp",
+        "HF:def2-tzvp",
+        "HF:sto-3g",
+        "PBE0:aug-cc-pvdz",
+        "PBE0:aug-cc-pvtz",
+        "PBE0:def2-svp",
+        "PBE0:def2-tzvp",
+        "PBE0:sto-3g",
+        "PBE:aug-cc-pvdz",
+        "PBE:aug-cc-pvtz",
+        "PBE:def2-svp",
+        "PBE:def2-tzvp",
+        "PBE:sto-3g",
+        "SVWN:sto-3g",
+        "WB97M-V:aug-cc-pvdz",
+        "WB97M-V:aug-cc-pvtz",
+        "WB97M-V:def2-svp",
+        "WB97M-V:def2-tzvp",
+        "WB97M-V:sto-3g",
+        "WB97X-D:aug-cc-pvdz",
+        "WB97X-D:aug-cc-pvtz",
+        "WB97X-D:def2-svp",
+        "WB97X-D:def2-tzvp",
+        "WB97X-D:sto-3g",
+    ]
+    __energy_methods__ = [PotentialMethod.NONE for _ in range(len(energy_target_names))]  # "wb97x/6-31g(d)"]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ QM8 + + +

+ + +
+

+ Bases: QMX

+ + +

QM8 is the subset of QM9 used in a study on modeling quantum +mechanical calculations of electronic spectra and excited +state energy (a increase of energy from the ground states) of small molecules +up to eight heavy atoms. +Multiple methods were used, including +time-dependent density functional theories (TDDFT) and +second-order approximate coupled-cluster (CC2). +The molecules conformations are relaxed geometries computed using +the DFT B3LYP with basis set 6-31G(2df,p). +For more information about the sampling, check QM9 dataset.

+

Usage: +

from openqdc.datasets import QM8
+dataset = QM8()
+

+ + +
+ References +

https://arxiv.org/pdf/1504.01966

+
+
+ Source code in openqdc/datasets/potential/qmx.py +
293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
class QM8(QMX):
+    """QM8 is the subset of QM9 used in a study on modeling quantum
+    mechanical calculations of electronic spectra and excited
+    state energy (a increase of energy from the ground states) of small molecules
+    up to eight heavy atoms.
+    Multiple methods were used, including
+    time-dependent density functional theories (TDDFT) and
+    second-order approximate coupled-cluster (CC2).
+    The molecules conformations are relaxed geometries computed using
+    the DFT B3LYP with basis set 6-31G(2df,p).
+    For more information about the sampling, check QM9 dataset.
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM8
+    dataset = QM8()
+    ```
+
+    References:
+        https://arxiv.org/pdf/1504.01966
+    """
+
+    __name__ = "qm8"
+
+    __energy_methods__ = [
+        PotentialMethod.NONE,  # "wb97x/6-31g(d)"
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+    ]
+
+    __links__ = {
+        "qm8.csv": "https://deepchemdata.s3-us-west-1.amazonaws.com/datasets/qm8.csv",
+        "qm8.tar.gz": "https://deepchemdata.s3-us-west-1.amazonaws.com/datasets/gdb8.tar.gz",
+    }
+
+    def read_raw_entries(self):
+        df = pd.read_csv(p_join(self.root, "qm8.csv"))
+        mols = dm.read_sdf(p_join(self.root, "qm8.sdf"), sanitize=False, remove_hs=False)
+        samples = []
+        for idx_row, mol in zip(df.iterrows(), mols):
+            _, row = idx_row
+            positions = mol.GetConformer().GetPositions()
+            x = get_atomic_number_and_charge(mol)
+            n_atoms = positions.shape[0]
+            samples.append(
+                dict(
+                    atomic_inputs=np.concatenate((x, positions), axis=-1, dtype=np.float32).reshape(-1, 5),
+                    name=np.array([row["smiles"]]),
+                    energies=np.array(
+                        [
+                            row[
+                                ["E1-CC2", "E2-CC2", "E1-PBE0", "E2-PBE0", "E1-PBE0.1", "E2-PBE0.1", "E1-CAM", "E2-CAM"]
+                            ].tolist()
+                        ],
+                        dtype=np.float64,
+                    ).reshape(1, -1),
+                    n_atoms=np.array([n_atoms], dtype=np.int32),
+                    subset=np.array([f"{self.__name__}"]),
+                )
+            )
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ QM9 + + +

+ + +
+

+ Bases: QMX

+ + +

QM7b is a dataset constructed containing 134k molecules from subsets of the GDB-17 database, +containing up to 9 “heavy” atoms. All molecular properties are calculated at B3LUP/6-31G(2df,p) +level of quantum chemistry. For each of the 134k molecules, equilibrium geometries are computed +by relaxing geometries with quantum mechanical method B3LYP.

+

Usage: +

from openqdc.datasets import QM9
+dataset = QM9()
+

+ + +
+ Reference +

https://www.nature.com/articles/sdata201422

+
+
+ Source code in openqdc/datasets/potential/qmx.py +
361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
class QM9(QMX):
+    """
+    QM7b is a dataset constructed containing 134k molecules from subsets of the GDB-17 database,
+    containing up to 9 “heavy” atoms. All molecular properties are calculated at B3LUP/6-31G(2df,p)
+    level of quantum chemistry. For each of the 134k molecules, equilibrium geometries are computed
+    by relaxing geometries with quantum mechanical method B3LYP.
+
+    Usage:
+    ```python
+    from openqdc.datasets import QM9
+    dataset = QM9()
+    ```
+
+    Reference:
+        https://www.nature.com/articles/sdata201422
+    """
+
+    __links__ = {"qm9.hdf5.gz": "https://zenodo.org/record/3588339/files/155.hdf5.gz?download=1"}
+    __name__ = "qm9"
+    energy_target_names = [
+        "Internal energy at 0 K",
+        "B3LYP:def2-svp",
+        "HF:cc-pvtz",
+        "HF:sto-3g",
+        "PBE:sto-3g",
+        "SVWN:sto-3g",
+        "WB97X-D:aug-cc-pvtz",
+        "WB97X-D:def2-svp",
+        "WB97X-D:def2-tzvp",
+    ]
+
+    __energy_methods__ = [
+        PotentialMethod.NONE,  # "wb97x/6-31g(d)"
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+        PotentialMethod.NONE,
+    ]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ QMX + + +

+ + +
+

+ Bases: ABC, BaseDataset

+ + +

QMX dataset base abstract class

+ +
+ Source code in openqdc/datasets/potential/qmx.py +
36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
class QMX(ABC, BaseDataset):
+    """
+    QMX dataset base abstract class
+    """
+
+    __name__ = "qm9"
+
+    __energy_methods__ = [
+        PotentialMethod.WB97X_6_31G_D,  # "wb97x/6-31g(d)"
+    ]
+
+    energy_target_names = [
+        "ωB97x:6-31G(d) Energy",
+    ]
+
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "bohr"
+    __forces_unit__ = "hartree/bohr"
+    __links__ = {}
+
+    @property
+    def root(self):
+        return p_join(get_local_cache(), "qmx")
+
+    @property
+    def preprocess_path(self):
+        path = p_join(self.root, "preprocessed", self.__name__)
+        os.makedirs(path, exist_ok=True)
+        return path
+
+    @property
+    def config(self):
+        assert len(self.__links__) > 0, "No links provided for fetching"
+        return dict(dataset_name="qmx", links=self.__links__)
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, f"{self.__name__}.h5.gz")
+        samples = read_qc_archive_h5(raw_path, self.__name__, self.energy_target_names, None)
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/revmd17.html b/0.1.2/API/datasets/revmd17.html new file mode 100644 index 00000000..e4b2270b --- /dev/null +++ b/0.1.2/API/datasets/revmd17.html @@ -0,0 +1,2245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + RevMD17 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

RevMD17

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ RevMD17 + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Revised MD (RevMD17) improves upon the MD17 dataset by removing all the numerical noise present in the original +dataset. The data is generated from an ab-initio molecular dynamics (AIMD) simulation where forces and energies +are computed at the PBE/def2-SVP level of theory using very tigh SCF convergence and very dense DFT integration +grid. The dataset contains the following molecules: + Benzene: 627000 samples

+
Uracil: 133000 samples
+
+Naptalene: 326000 samples
+
+Aspirin: 211000 samples
+
+Salicylic Acid: 320000 samples
+
+Malonaldehyde: 993000 samples
+
+Ethanol: 555000 samples
+
+Toluene: 100000 samples
+
+

Usage: +

from openqdc.datasets import RevMD17
+dataset = RevMD17()
+

+ + +
+ References +

https://arxiv.org/abs/2007.09593

+
+
+ Source code in openqdc/datasets/potential/revmd17.py +
 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
class RevMD17(BaseDataset):
+    """
+    Revised MD (RevMD17) improves upon the MD17 dataset by removing all the numerical noise present in the original
+    dataset. The data is generated from an ab-initio molecular dynamics (AIMD) simulation where forces and energies
+    are computed at the PBE/def2-SVP level of theory using very tigh SCF convergence and very dense DFT integration
+    grid. The dataset contains the following molecules:
+        Benzene: 627000 samples\n
+        Uracil: 133000 samples\n
+        Naptalene: 326000 samples\n
+        Aspirin: 211000 samples\n
+        Salicylic Acid: 320000 samples\n
+        Malonaldehyde: 993000 samples\n
+        Ethanol: 555000 samples\n
+        Toluene: 100000 samples\n
+
+    Usage:
+    ```python
+    from openqdc.datasets import RevMD17
+    dataset = RevMD17()
+    ```
+
+    References:
+        https://arxiv.org/abs/2007.09593
+    """
+
+    __name__ = "revmd17"
+
+    __energy_methods__ = [
+        PotentialMethod.PBE_DEF2_TZVP
+        # "pbe/def2-tzvp",
+    ]
+    __force_mask__ = [True]
+
+    energy_target_names = [
+        "PBE-TS Energy",
+    ]
+
+    __force_methods__ = [
+        "pbe/def2-tzvp",
+    ]
+
+    force_target_names = [
+        "PBE-TS Gradient",
+    ]
+    __links__ = {"revmd17.zip": "https://figshare.com/ndownloader/articles/12672038/versions/3"}
+
+    __energy_unit__ = "kcal/mol"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "kcal/mol/ang"
+
+    def read_raw_entries(self):
+        entries_list = []
+        decompress_tar_gz(p_join(self.root, "rmd17.tar.bz2"))
+        for trajectory in trajectories:
+            entries_list.append(read_npz_entry(trajectory, self.root))
+        return entries_list
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/sn2_rxn.html b/0.1.2/API/datasets/sn2_rxn.html new file mode 100644 index 00000000..e891e560 --- /dev/null +++ b/0.1.2/API/datasets/sn2_rxn.html @@ -0,0 +1,2217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + SN2 RXN - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

SN2 RXN

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ SN2RXN + + +

+ + +
+

+ Bases: BaseDataset

+ + +

This dataset probes chemical reactions of methyl halides with halide anions, i.e. X- + CH3Y -> CH3X + Y-, and +contains structures for all possible combinations of X,Y = F, Cl, Br, I. The conformations are generated by +running MD simulations at a temperature of 5000K with a time step of 0.1 fs using Atomic Simulation Environment +(ASE). The forces are derived using semi-empirical method PM7 and the structures are saved every 10 steps, and +for each of them, energy and forces are calculated at the DSD-BLYP-D3(BJ)/def2-TZVP level of theory. The dataset +contains 452,709 structures along with the energy, force and dipole moments.

+

Usage: +

from openqdc.datasets import SN2RXN
+dataset = SN2RXN()
+

+ + +
+ References +

https://doi.org/10.1021/acs.jctc.9b00181

+

https://zenodo.org/records/2605341

+
+
+ Source code in openqdc/datasets/potential/sn2_rxn.py +
40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
class SN2RXN(BaseDataset):
+    """
+    This dataset probes chemical reactions of methyl halides with halide anions, i.e. X- + CH3Y -> CH3X +  Y-, and
+    contains structures for all possible combinations of X,Y = F, Cl, Br, I. The conformations are generated by
+    running MD simulations at a temperature of 5000K with a time step of 0.1 fs using Atomic Simulation Environment
+    (ASE). The forces are derived using semi-empirical method PM7 and the structures are saved every 10 steps, and
+    for each of them, energy and forces are calculated at the DSD-BLYP-D3(BJ)/def2-TZVP level of theory. The dataset
+    contains 452,709 structures along with the energy, force and dipole moments.
+
+    Usage:
+    ```python
+    from openqdc.datasets import SN2RXN
+    dataset = SN2RXN()
+    ```
+
+    References:
+        https://doi.org/10.1021/acs.jctc.9b00181\n
+        https://zenodo.org/records/2605341
+    """
+
+    __name__ = "sn2_rxn"
+
+    __energy_methods__ = [
+        PotentialMethod.DSD_BLYP_D3_BJ_DEF2_TZVP
+        # "dsd-blyp-d3(bj)/def2-tzvp",
+    ]
+    __energy_unit__ = "ev"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "ev/ang"
+    __links__ = {"sn2_rxn.npz": "https://zenodo.org/records/2605341/files/sn2_reactions.npz"}
+
+    energy_target_names = [
+        # TODO: We need to revalidate this to make sure that is not atomization energies.
+        "DSD-BLYP-D3(BJ):def2-TZVP Atomization Energy",
+    ]
+
+    __force_mask__ = [True]
+
+    force_target_names = [
+        "DSD-BLYP-D3(BJ):def2-TZVP Gradient",
+    ]
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "sn2_rxn.npz")
+        data = np.load(raw_path)
+        samples = extract_npz_entry(data)
+
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/solvated_peptides.html b/0.1.2/API/datasets/solvated_peptides.html new file mode 100644 index 00000000..e48f572e --- /dev/null +++ b/0.1.2/API/datasets/solvated_peptides.html @@ -0,0 +1,2284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Solvated Peptides - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Solvated Peptides

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ SolvatedPeptides + + +

+ + +
+

+ Bases: BaseDataset

+ + +

The solvated protein fragments dataset probes many-body intermolecular interactions between "protein fragments" +and water molecules. Geometries are first optimized with the semi-empirical method PM7 and then MD simulations are +run at 1000K with a time-step of 0.1fs using Atomic Simulations Environment (ASE). Structures are saved every 10 +steps, where energies, forces and dipole moments are calculated at revPBE-D3(BJ)/def2-TZVP level of theory.

+

Usage: +

from openqdc.datasets import SolvatedPeptides
+dataset = SolvatedPeptides()
+

+ + +
+ References +

https://doi.org/10.1021/acs.jctc.9b00181

+

https://zenodo.org/records/2605372

+
+
+ Source code in openqdc/datasets/potential/solvated_peptides.py +
 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
class SolvatedPeptides(BaseDataset):
+    """
+    The solvated protein fragments dataset probes many-body intermolecular interactions between "protein fragments"
+    and water molecules. Geometries are first optimized with the semi-empirical method PM7 and then MD simulations are
+    run at 1000K with a time-step of 0.1fs using Atomic Simulations Environment (ASE). Structures are saved every 10
+    steps, where energies, forces and dipole moments are calculated at revPBE-D3(BJ)/def2-TZVP level of theory.
+
+    Usage:
+    ```python
+    from openqdc.datasets import SolvatedPeptides
+    dataset = SolvatedPeptides()
+    ```
+
+    References:
+        https://doi.org/10.1021/acs.jctc.9b00181\n
+        https://zenodo.org/records/2605372
+    """
+
+    __name__ = "solvated_peptides"
+
+    __energy_methods__ = [
+        PotentialMethod.REVPBE_D3_BJ_DEF2_TZVP
+        # "revpbe-d3(bj)/def2-tzvp",
+    ]
+
+    energy_target_names = [
+        "revPBE-D3(BJ):def2-TZVP Atomization Energy",
+    ]
+
+    __force_mask__ = [True]
+
+    force_target_names = [
+        "revPBE-D3(BJ):def2-TZVP Gradient",
+    ]
+
+    # TO CHECK
+    __energy_unit__ = "ev"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "ev/ang"
+    __links__ = {"solvated_peptides.hdf5.gz": "https://zenodo.org/record/3585804/files/213.hdf5.gz"}
+
+    def __smiles_converter__(self, x):
+        """util function to convert string to smiles: useful if the smiles is
+        encoded in a different format than its display format
+        """
+        return "_".join(x.decode("ascii").split("_")[:-1])
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "solvated_peptides.h5.gz")
+        samples = read_qc_archive_h5(raw_path, "solvated_peptides", self.energy_target_names, self.force_target_names)
+
+        return samples
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ __smiles_converter__(x) + +

+ + +
+ +

util function to convert string to smiles: useful if the smiles is +encoded in a different format than its display format

+ +
+ Source code in openqdc/datasets/potential/solvated_peptides.py +
49
+50
+51
+52
+53
def __smiles_converter__(self, x):
+    """util function to convert string to smiles: useful if the smiles is
+    encoded in a different format than its display format
+    """
+    return "_".join(x.decode("ascii").split("_")[:-1])
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/spice.html b/0.1.2/API/datasets/spice.html new file mode 100644 index 00000000..55ad7c57 --- /dev/null +++ b/0.1.2/API/datasets/spice.html @@ -0,0 +1,2619 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Spice - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Spice

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ Spice + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Spice dataset consists of 1.1 million conformations for a diverse set of 19k unique molecules consisting of +small molecules, dimers, dipeptides, and solvated amino acids. Conformations are first generated with RDKit, +and then molecular dynamics simulations at 100ps and 500K using OpenMM and Amber force field are used to generate +100 high energy conformations. Low-energy conformations are then generated by L-BFGS energy minimization and +molecular dynamics at 1ps and 100K. Forces and energies for conformations are calculated at the +wB97M-D3(BJ)/def2-TZVPPD level of theory.

+

Usage: +

from openqdc.datasets import Spice
+dataset = Spice()
+

+ + +
+ References +

https://arxiv.org/abs/2209.10702

+

https://github.com/openmm/spice-dataset

+
+
+ Source code in openqdc/datasets/potential/spice.py +
41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
class Spice(BaseDataset):
+    """
+    Spice dataset consists of 1.1 million conformations for a diverse set of 19k unique molecules consisting of
+    small molecules, dimers, dipeptides, and solvated amino acids. Conformations are first generated with RDKit,
+    and then molecular dynamics simulations at 100ps and 500K using OpenMM and Amber force field are used to generate
+    100 high energy conformations. Low-energy conformations are then generated by L-BFGS energy minimization and
+    molecular dynamics at 1ps and 100K. Forces and energies for conformations are calculated at the
+    wB97M-D3(BJ)/def2-TZVPPD level of theory.
+
+    Usage:
+    ```python
+    from openqdc.datasets import Spice
+    dataset = Spice()
+    ```
+
+    References:
+        https://arxiv.org/abs/2209.10702\n
+        https://github.com/openmm/spice-dataset
+    """
+
+    __name__ = "spice"
+    __energy_methods__ = [PotentialMethod.WB97M_D3BJ_DEF2_TZVPPD]
+    __force_mask__ = [True]
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "bohr"
+    __forces_unit__ = "hartree/bohr"
+
+    energy_target_names = ["dft_total_energy"]
+
+    force_target_names = ["dft_total_gradient"]
+
+    subset_mapping = {
+        "SPICE Solvated Amino Acids Single Points Dataset v1.1": "Solvated Amino Acids",
+        "SPICE Dipeptides Single Points Dataset v1.2": "Dipeptides",
+        "SPICE DES Monomers Single Points Dataset v1.1": "DES370K Monomers",
+        "SPICE DES370K Single Points Dataset v1.0": "DES370K Dimers",
+        "SPICE DES370K Single Points Dataset Supplement v1.0": "DES370K Dimers",
+        "SPICE PubChem Set 1 Single Points Dataset v1.2": "PubChem",
+        "SPICE PubChem Set 2 Single Points Dataset v1.2": "PubChem",
+        "SPICE PubChem Set 3 Single Points Dataset v1.2": "PubChem",
+        "SPICE PubChem Set 4 Single Points Dataset v1.2": "PubChem",
+        "SPICE PubChem Set 5 Single Points Dataset v1.2": "PubChem",
+        "SPICE PubChem Set 6 Single Points Dataset v1.2": "PubChem",
+        "SPICE Ion Pairs Single Points Dataset v1.1": "Ion Pairs",
+    }
+    __links__ = {"SPICE-1.1.4.hdf5": "https://zenodo.org/record/8222043/files/SPICE-1.1.4.hdf5"}
+
+    def convert_forces(self, x):
+        return (-1.0) * super().convert_forces(x)
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "SPICE-1.1.4.hdf5")
+
+        data = load_hdf5_file(raw_path)
+        tmp = [read_record(data[mol_name], self) for mol_name in tqdm(data)]  # don't use parallelized here
+
+        return tmp
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ SpiceV2 + + +

+ + +
+

+ Bases: Spice

+ + +

SpiceV2 dataset augments the Spice data with amino acids complexes, water boxes, pubchem solvated molecules. +The main changes include, (1) over 13,000 new PubChem molecules, out of which 1500 contain boron and 1900 contain +silicon, (2) 194,000 conformations of dimers containing amino acid and ligands, (3) 1000 water clusters to improve +sampling interactions in bulk water, (4) 1397 PubChem molecules solvated with a shell of water molecules, and +(5) Fixing bad calculations from the Spice dataset. The data generation process is the same as the Spice dataset.

+

Usage: +

from openqdc.datasets import SpiceV2
+dataset = SpiceV2()
+

+ + +
+ References +

https://github.com/openmm/spice-dataset/releases/tag/2.0.0

+

https://github.com/openmm/spice-dataset

+
+
+ Source code in openqdc/datasets/potential/spice.py +
100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
class SpiceV2(Spice):
+    """
+    SpiceV2 dataset augments the Spice data with amino acids complexes, water boxes, pubchem solvated molecules.
+    The main changes include, (1) over 13,000 new PubChem molecules, out of which 1500 contain boron and 1900 contain
+    silicon, (2) 194,000 conformations of dimers containing amino acid and ligands, (3) 1000 water clusters to improve
+    sampling interactions in bulk water, (4) 1397 PubChem molecules solvated with a shell of water molecules, and
+    (5) Fixing bad calculations from the Spice dataset. The data generation process is the same as the Spice dataset.
+
+    Usage:
+    ```python
+    from openqdc.datasets import SpiceV2
+    dataset = SpiceV2()
+    ```
+
+    References:
+        https://github.com/openmm/spice-dataset/releases/tag/2.0.0\n
+        https://github.com/openmm/spice-dataset
+    """
+
+    __name__ = "spicev2"
+
+    subset_mapping = {
+        "SPICE Dipeptides Single Points Dataset v1.3": "Dipeptides",
+        "SPICE Solvated Amino Acids Single Points Dataset v1.1": "Solvated Amino Acids",
+        "SPICE Water Clusters v1.0": "Water Clusters",
+        "SPICE Solvated PubChem Set 1 v1.0": "Solvated PubChem",
+        "SPICE Amino Acid Ligand v1.0": "Amino Acid Ligand",
+        "SPICE PubChem Set 1 Single Points Dataset v1.3": "PubChem",
+        "SPICE PubChem Set 2 Single Points Dataset v1.3": "PubChem",
+        "SPICE PubChem Set 3 Single Points Dataset v1.3": "PubChem",
+        "SPICE PubChem Set 4 Single Points Dataset v1.3": "PubChem",
+        "SPICE PubChem Set 5 Single Points Dataset v1.3": "PubChem",
+        "SPICE PubChem Set 6 Single Points Dataset v1.3": "PubChem",
+        "SPICE PubChem Set 7 Single Points Dataset v1.0": "PubChemv2",
+        "SPICE PubChem Set 8 Single Points Dataset v1.0": "PubChemv2",
+        "SPICE PubChem Set 9 Single Points Dataset v1.0": "PubChemv2",
+        "SPICE PubChem Set 10 Single Points Dataset v1.0": "PubChemv2",
+        "SPICE DES Monomers Single Points Dataset v1.1": "DES370K Monomers",
+        "SPICE DES370K Single Points Dataset v1.0": "DES370K Dimers",
+        "SPICE DES370K Single Points Dataset Supplement v1.1": "DES370K Dimers",
+        "SPICE PubChem Boron Silicon v1.0": "PubChem Boron Silicon",
+        "SPICE Ion Pairs Single Points Dataset v1.2": "Ion Pairs",
+    }
+    __links__ = {"spice-2.0.0.hdf5": "https://zenodo.org/records/10835749/files/SPICE-2.0.0.hdf5?download=1"}
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "spice-2.0.0.hdf5")
+
+        data = load_hdf5_file(raw_path)
+        # Entry 40132 without positions, skip it
+        # don't use parallelized here
+        tmp = [read_record(data[mol_name], self) for i, mol_name in enumerate(tqdm(data)) if i != 40132]
+
+        return tmp
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ SpiceVL2 + + +

+ + +
+

+ Bases: SpiceV2

+ + +

SpiceVL2 is an extension of the SpiceV2 dataset with additional semi-empirical GFN2-xTB and PM6 energy methods.

+

Usage: +

from openqdc.datasets import SpiceVL2
+dataset = SpiceVL2()
+

+ + +
+ References +

https://github.com/openmm/spice-dataset/releases/tag/2.0.0

+

https://github.com/openmm/spice-dataset

+
+
+ Source code in openqdc/datasets/potential/spice.py +
156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
class SpiceVL2(SpiceV2):
+    """
+    SpiceVL2 is an extension of the SpiceV2 dataset with additional semi-empirical GFN2-xTB and PM6 energy methods.
+
+    Usage:
+    ```python
+    from openqdc.datasets import SpiceVL2
+    dataset = SpiceVL2()
+    ```
+
+    References:
+        https://github.com/openmm/spice-dataset/releases/tag/2.0.0\n
+        https://github.com/openmm/spice-dataset
+    """
+
+    __name__ = "spice_vl2"
+
+    __energy_methods__ = SpiceV2.__energy_methods__ + [PotentialMethod.GFN2_XTB, PotentialMethod.PM6]
+    energy_target_names = SpiceV2.energy_target_names + ["GFN2," "PM6"]
+    __force_mask__ = SpiceV2.__force_mask__ + [False, False]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + +
+ + +

+ read_record(r, obj) + +

+ + +
+ +

Read record from hdf5 file. + r : hdf5 record + obj : Spice class object used to grab subset and names

+ +
+ Source code in openqdc/datasets/potential/spice.py +
13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
def read_record(r, obj):
+    """
+    Read record from hdf5 file.
+        r : hdf5 record
+        obj : Spice class object used to grab subset and names
+    """
+    smiles = r["smiles"].asstr()[0]
+    subset = r["subset"][0].decode("utf-8")
+    n_confs = r["conformations"].shape[0]
+    x = get_atomic_number_and_charge(dm.to_mol(smiles, remove_hs=False, ordered=True))
+    positions = r["conformations"][:]
+
+    res = dict(
+        name=np.array([smiles] * n_confs),
+        subset=np.array([obj.subset_mapping[subset]] * n_confs),
+        energies=r[obj.energy_target_names[0]][:][:, None].astype(np.float64),
+        forces=r[obj.force_target_names[0]][:].reshape(
+            -1, 3, 1
+        ),  # forces -ve of energy gradient but the -1.0 is done in the convert_forces method
+        atomic_inputs=np.concatenate(
+            (x[None, ...].repeat(n_confs, axis=0), positions), axis=-1, dtype=np.float32
+        ).reshape(-1, 5),
+        n_atoms=np.array([x.shape[0]] * n_confs, dtype=np.int32),
+    )
+
+    return res
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/splinter.html b/0.1.2/API/datasets/splinter.html new file mode 100644 index 00000000..d43a1a5b --- /dev/null +++ b/0.1.2/API/datasets/splinter.html @@ -0,0 +1,2485 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Splinter - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Splinter

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ Splinter + + +

+ + +
+

+ Bases: BaseInteractionDataset

+ + +

Splinter consists of 30,416A dimer pairs with over 1.5 million geometries. The geometries are generated +by quantum mechanical optimization with B3LYP-D3/aug-cc-pV(D+d)Z level of theory. The interaction energies +and the various components are computed using SAPT0/qug-cc-pV(D=d)Z method.

+

Usage: +

from openqdc.datasets import Splinter
+dataset = Splinter()
+

+ + +
+ Reference +

https://doi.org/10.1038/s41597-023-02443-1

+
+
+ Source code in openqdc/datasets/interaction/splinter.py +
 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
class Splinter(BaseInteractionDataset):
+    """
+    Splinter consists of 30,416A dimer pairs with over 1.5 million geometries. The geometries are generated
+    by quantum mechanical optimization with B3LYP-D3/aug-cc-pV(D+d)Z level of theory. The interaction energies
+    and the various components are computed using SAPT0/qug-cc-pV(D=d)Z method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import Splinter
+    dataset = Splinter()
+    ```
+
+    Reference:
+        https://doi.org/10.1038/s41597-023-02443-1
+    """
+
+    __energy_unit__ = "kcal/mol"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "kcal/mol/ang"
+
+    __name__ = "splinter"
+    __energy_methods__ = [
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_JUN_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        InteractionMethod.SAPT0_AUG_CC_PVDDZ,
+        # "sapt0/jun-cc-pV(D+d)Z_unscaled", #TODO: we need to pick the unscaled version only here
+        # "sapt0/jun-cc-pV(D+d)Z_es_unscaled",
+        # "sapt0/jun-cc-pV(D+d)Z_ex_unscaled",
+        # "sapt0/jun-cc-pV(D+d)Z_ind_unscaled",
+        # "sapt0/jun-cc-pV(D+d)Z_disp_unscaled",
+        # "sapt0/jun-cc-pV(D+d)Z_scaled",
+        # "sapt0/jun-cc-pV(D+d)Z_es_scaled",
+        # "sapt0/jun-cc-pV(D+d)Z_ex_scaled",
+        # "sapt0/jun-cc-pV(D+d)Z_ind_scaled",
+        # "sapt0/jun-cc-pV(D+d)Z_disp_scaled",
+        # "sapt0/aug-cc-pV(D+d)Z_unscaled",
+        # "sapt0/aug-cc-pV(D+d)Z_es_unscaled",
+        # "sapt0/aug-cc-pV(D+d)Z_ex_unscaled",
+        # "sapt0/aug-cc-pV(D+d)Z_ind_unscaled",
+        # "sapt0/aug-cc-pV(D+d)Z_disp_unscaled",
+        # "sapt0/aug-cc-pV(D+d)Z_scaled",
+        # "sapt0/aug-cc-pV(D+d)Z_es_scaled",
+        # "sapt0/aug-cc-pV(D+d)Z_ex_scaled",
+        # "sapt0/aug-cc-pV(D+d)Z_ind_scaled",
+        # "sapt0/aug-cc-pV(D+d)Z_disp_scaled",
+    ]
+
+    __energy_type__ = [
+        InterEnergyType.TOTAL,
+        InterEnergyType.ES,
+        InterEnergyType.EX,
+        InterEnergyType.IND,
+        InterEnergyType.DISP,
+        InterEnergyType.TOTAL,
+        InterEnergyType.ES,
+        InterEnergyType.EX,
+        InterEnergyType.IND,
+        InterEnergyType.DISP,
+        InterEnergyType.TOTAL,
+        InterEnergyType.ES,
+        InterEnergyType.EX,
+        InterEnergyType.IND,
+        InterEnergyType.DISP,
+        InterEnergyType.TOTAL,
+        InterEnergyType.ES,
+        InterEnergyType.EX,
+        InterEnergyType.IND,
+        InterEnergyType.DISP,
+    ]
+    energy_target_names = []
+    __links__ = {
+        "dimerpairs.0.tar.gz": "https://figshare.com/ndownloader/files/39449167",
+        "dimerpairs.1.tar.gz": "https://figshare.com/ndownloader/files/40271983",
+        "dimerpairs.2.tar.gz": "https://figshare.com/ndownloader/files/40271989",
+        "dimerpairs.3.tar.gz": "https://figshare.com/ndownloader/files/40272001",
+        "dimerpairs.4.tar.gz": "https://figshare.com/ndownloader/files/40272022",
+        "dimerpairs.5.tar.gz": "https://figshare.com/ndownloader/files/40552931",
+        "dimerpairs.6.tar.gz": "https://figshare.com/ndownloader/files/40272040",
+        "dimerpairs.7.tar.gz": "https://figshare.com/ndownloader/files/40272052",
+        "dimerpairs.8.tar.gz": "https://figshare.com/ndownloader/files/40272061",
+        "dimerpairs.9.tar.gz": "https://figshare.com/ndownloader/files/40272064",
+        "dimerpairs_nonstandard.tar.gz": "https://figshare.com/ndownloader/files/40272067",
+        "lig_interaction_sites.sdf": "https://figshare.com/ndownloader/files/40272070",
+        "lig_monomers.sdf": "https://figshare.com/ndownloader/files/40272073",
+        "prot_interaction_sites.sdf": "https://figshare.com/ndownloader/files/40272076",
+        "prot_monomers.sdf": "https://figshare.com/ndownloader/files/40272079",
+        "merge_monomers.py": "https://figshare.com/ndownloader/files/41807682",
+    }
+
+    def read_raw_entries(self) -> List[Dict]:
+        logger.info(f"Reading Splinter interaction data from {self.root}")
+        data = []
+        i = 0
+        with tqdm(total=1680022) as progress_bar:
+            for root, dirs, files in os.walk(self.root):  # total is currently an approximation
+                for filename in files:
+                    if not filename.endswith(".xyz"):
+                        continue
+                    i += 1
+                    filepath = os.path.join(root, filename)
+                    filein = open(filepath, "r")
+                    lines = list(map(lambda x: x.strip(), filein.readlines()))
+                    n_atoms = np.array([int(lines[0])], dtype=np.int32)
+                    metadata = lines[1].split(",")
+                    try:
+                        (
+                            protein_monomer_name,
+                            protein_interaction_site_type,
+                            ligand_monomer_name,
+                            ligand_interaction_site_type,
+                            index,
+                            r,
+                            theta_P,
+                            tau_P,
+                            theta_L,
+                            tau_L,
+                            tau_PL,
+                        ) = metadata[0].split("_")
+                        index, r, theta_P, tau_P, theta_L, tau_L, tau_PL = list(
+                            map(float, [index, r, theta_P, tau_P, theta_L, tau_L, tau_PL])
+                        )
+                    except ValueError:
+                        (
+                            protein_monomer_name,
+                            protein_interaction_site_type,
+                            ligand_monomer_name,
+                            ligand_interaction_site_type,
+                            index,
+                            _,
+                        ) = metadata[0].split("_")
+                        r, theta_P, tau_P, theta_L, tau_L, tau_PL = [np.nan] * 6
+                    energies = np.array([list(map(float, metadata[4:-1]))]).astype(np.float32)
+                    n_atoms_ptr = np.array([int(metadata[-1])], dtype=np.int32)
+                    total_charge, charge0, charge1 = list(map(int, metadata[1:4]))
+                    lines = list(map(lambda x: x.split(), lines[2:]))
+                    pos = np.array(lines)[:, 1:].astype(np.float32)
+                    elems = np.array(lines)[:, 0]
+                    atomic_nums = np.expand_dims(np.array([ATOM_TABLE.GetAtomicNumber(x) for x in elems]), axis=1)
+                    natoms0 = n_atoms_ptr[0]
+                    natoms1 = n_atoms[0] - natoms0
+                    charges = np.expand_dims(np.array([charge0] * natoms0 + [charge1] * natoms1), axis=1)
+                    atomic_inputs = np.concatenate((atomic_nums, charges, pos), axis=-1, dtype=np.float32)
+                    subset = np.array([root.split("/")[-1]])
+
+                    item = dict(
+                        energies=energies,
+                        subset=subset,
+                        n_atoms=n_atoms,
+                        n_atoms_ptr=n_atoms_ptr,
+                        atomic_inputs=atomic_inputs,
+                        protein_monomer_name=np.array([protein_monomer_name]),
+                        protein_interaction_site_type=np.array([protein_interaction_site_type]),
+                        ligand_monomer_name=np.array([ligand_monomer_name]),
+                        ligand_interaction_site_type=np.array([ligand_interaction_site_type]),
+                        index=np.array([index], dtype=np.float32),
+                        r=np.array([r], dtype=np.float32),
+                        theta_P=np.array([theta_P], dtype=np.float32),
+                        tau_P=np.array([tau_P], dtype=np.float32),
+                        theta_L=np.array([theta_L], dtype=np.float32),
+                        tau_L=np.array([tau_L], dtype=np.float32),
+                        tau_PL=np.array([tau_PL], dtype=np.float32),
+                        name=np.array([protein_monomer_name + "." + ligand_monomer_name]),
+                    )
+                    data.append(item)
+                    progress_bar.update(1)
+        logger.info(f"Processed {i} files in total")
+        return data
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/tmqm.html b/0.1.2/API/datasets/tmqm.html new file mode 100644 index 00000000..f4cff776 --- /dev/null +++ b/0.1.2/API/datasets/tmqm.html @@ -0,0 +1,2203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + TMQM - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

TMQM

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ TMQM + + +

+ + +
+

+ Bases: BaseDataset

+ + +

tmQM dataset contains the geometries of a large transition metal-organic compound space with a large variety of +organic ligands and 30 transition metals. It contains energy labels for 86,665 mononuclear complexes calculated +at the TPSSh-D3BJ/def2-SV DFT level of theory. Structures are first extracted from Cambridge Structure Database +and then optimized in gas phase with the extended tight-binding GFN2-xTB method.

+

Usage: +

from openqdc.datasets import TMQM
+dataset = TMQM()
+

+ + +
+ References +

https://pubs.acs.org/doi/10.1021/acs.jcim.0c01041

+

https://github.com/bbskjelstad/tmqm

+
+
+ Source code in openqdc/datasets/potential/tmqm.py +
48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
class TMQM(BaseDataset):
+    """
+    tmQM dataset contains the geometries of a large transition metal-organic compound space with a large variety of
+    organic ligands and 30 transition metals. It contains energy labels for 86,665 mononuclear complexes calculated
+    at the TPSSh-D3BJ/def2-SV DFT level of theory. Structures are first extracted from Cambridge Structure Database
+    and then optimized in gas phase with the extended tight-binding GFN2-xTB method.
+
+    Usage:
+    ```python
+    from openqdc.datasets import TMQM
+    dataset = TMQM()
+    ```
+
+    References:
+        https://pubs.acs.org/doi/10.1021/acs.jcim.0c01041\n
+        https://github.com/bbskjelstad/tmqm
+    """
+
+    __name__ = "tmqm"
+
+    __energy_methods__ = [PotentialMethod.TPSSH_DEF2_TZVP]  # "tpssh/def2-tzvp"]
+
+    energy_target_names = ["TPSSh/def2TZVP level"]
+
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+    __links__ = {
+        x: f"https://raw.githubusercontent.com/bbskjelstad/tmqm/master/data/{x}"
+        for x in ["tmQM_X1.xyz.gz", "tmQM_X2.xyz.gz", "tmQM_y.csv", "Benchmark2_TPSSh_Opt.xyz"]
+    }
+
+    def read_raw_entries(self):
+        df = pd.read_csv(p_join(self.root, "tmQM_y.csv"), sep=";", usecols=["CSD_code", "Electronic_E"])
+        e_map = dict(zip(df["CSD_code"], df["Electronic_E"]))
+        raw_fnames = ["tmQM_X1.xyz", "tmQM_X2.xyz", "Benchmark2_TPSSh_Opt.xyz"]
+        samples = []
+        for fname in raw_fnames:
+            data = read_xyz(p_join(self.root, fname), e_map)
+            samples += data
+
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/transition1x.html b/0.1.2/API/datasets/transition1x.html new file mode 100644 index 00000000..72dc8830 --- /dev/null +++ b/0.1.2/API/datasets/transition1x.html @@ -0,0 +1,2205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Transition1X - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Transition1X

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ Transition1X + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Transition1x dataset contains structures from 10k organic reaction pathways of various types. It contains energy +and force labels for 9.6 mio. conformers calculated at the wB97x/6-31-G(d) level of theory. The geometries and +the transition states are generated by running Nudged Elastic Band (NEB) with DFT.

+

Usage: +

from openqdc.datasets import Transition1X
+dataset = Transition1X()
+

+

References: +- https://www.nature.com/articles/s41597-022-01870-w

+ + +
+ Source code in openqdc/datasets/potential/transition1x.py +
40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
class Transition1X(BaseDataset):
+    """
+    Transition1x dataset contains structures from 10k organic reaction pathways of various types. It contains energy
+    and force labels for 9.6 mio. conformers calculated at the wB97x/6-31-G(d) level of theory. The geometries and
+    the transition states are generated by running Nudged Elastic Band (NEB) with DFT.
+
+    Usage:
+    ```python
+    from openqdc.datasets import Transition1X
+    dataset = Transition1X()
+    ```
+
+    References:
+    - https://www.nature.com/articles/s41597-022-01870-w\n
+    - https://gitlab.com/matschreiner/Transition1x\n
+    """
+
+    __name__ = "transition1x"
+
+    __energy_methods__ = [
+        PotentialMethod.WB97X_6_31G_D
+        # "wb97x/6-31G(d)",
+    ]
+
+    energy_target_names = [
+        "wB97x_6-31G(d).energy",
+    ]
+
+    __force_mask__ = [True]
+    force_target_names = [
+        "wB97x_6-31G(d).forces",
+    ]
+
+    __energy_unit__ = "ev"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "ev/ang"
+    __links__ = {"Transition1x.h5": "https://figshare.com/ndownloader/files/36035789"}
+
+    def read_raw_entries(self):
+        raw_path = p_join(self.root, "Transition1x.h5")
+        f = load_hdf5_file(raw_path)["data"]
+
+        res = sum([read_record(f[g], group=g) for g in tqdm(f)], [])  # don't use parallelized here
+        return res
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/vqm24.html b/0.1.2/API/datasets/vqm24.html new file mode 100644 index 00000000..099adc54 --- /dev/null +++ b/0.1.2/API/datasets/vqm24.html @@ -0,0 +1,2200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + VQM24 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

VQM24

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ VQM24 + + +

+ + +
+

+ Bases: BaseDataset

+ + +

Vector-QM24 (VQM24) dataset consists of small organic and inorganic molecules with quantum mechanical +properties calculated at wB97x-D3//cc-pVDZ level of theory. This leads to 258,242 unique constitutional +isomers and 577,705 conformers of varying stoichiometries. Geometries are generated using GFN2-xTB, and +relaxed with DFT method wB97x-D3/cc-pVDZ. The energy values are calculated with DFT method wB97x-D3/cc-pVDZ.

+

Usage: +

from openqdc.datasets import VQM24
+dataset = VQM24()
+

+ + +
+ Reference +

https://arxiv.org/abs/2405.05961

+
+
+ Source code in openqdc/datasets/potential/vqm24.py +
42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
class VQM24(BaseDataset):
+    """
+    Vector-QM24 (VQM24) dataset consists of small organic and inorganic molecules with quantum mechanical
+    properties calculated at wB97x-D3//cc-pVDZ level of theory. This leads to 258,242 unique constitutional
+    isomers and 577,705 conformers of varying stoichiometries. Geometries are generated using GFN2-xTB, and
+    relaxed with DFT method wB97x-D3/cc-pVDZ. The energy values are calculated with DFT method wB97x-D3/cc-pVDZ.
+
+    Usage:
+    ```python
+    from openqdc.datasets import VQM24
+    dataset = VQM24()
+    ```
+
+    Reference:
+        https://arxiv.org/abs/2405.05961
+    """
+
+    __name__ = "vqm24"
+
+    __energy_methods__ = [
+        PotentialMethod.WB97X_D3_CC_PVDZ,  # "wB97x-D3/cc-pVDZ."
+    ]
+
+    energy_target_names = [
+        "wB97x-D3/cc-pVDZ",
+    ]
+    # ωB97X-D3/cc-pVDZ
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+    __links__ = {
+        f"{name}.npz": f"https://zenodo.org/records/11164951/files/{name}.npz?download=1"
+        for name in ["DFT_all", "DFT_saddles", "DFT_uniques", "DMC"]
+    }
+
+    def read_raw_entries(self):
+        samples = []
+        for name in self.__links__:
+            raw_path = p_join(self.root, f"{name}")
+            samples.append(read_npz_entry(raw_path))
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/waterclusters.html b/0.1.2/API/datasets/waterclusters.html new file mode 100644 index 00000000..0b7dc0db --- /dev/null +++ b/0.1.2/API/datasets/waterclusters.html @@ -0,0 +1,2275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + SCAN Waterclusters - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

SCAN Waterclusters

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ SCANWaterClusters + + +

+ + +
+

+ Bases: BaseDataset

+ + +

The SCAN Water Clusters dataset contains conformations of +neutral water clusters containing up to 20 monomers, charged water clusters, +and alkali- and halide-water clusters. This dataset consists of our data sets of water clusters: +the benchmark energy and geometry database (BEGDB) neutral water cluster subset; the WATER2723 set of 14 +neutral, 5 protonated, 7 deprotonated, and one auto-ionized water cluster; and two sets of +ion-water clusters M...(H2O)n, where M = Li+, Na+, K+, F−, Cl−, or Br−. +Water clusters were obtained from 10 nanosecond gas-phase molecular dynamics +simulations using AMBER 9 and optimized to obtain +lowest energy isomers were determined using MP2/aug-cc-pVDZ//MP2/6-31G* Gibbs free energies.

+ + +
+ Chemical Species +

[H, O, Li, Na, K, F, Cl, Br]

+

Usage: +

from openqdc.datasets import SCANWaterClusters
+dataset = SCANWaterClusters()
+

+ + +
+ References +

https://chemrxiv.org/engage/chemrxiv/article-details/662aaff021291e5d1db7d8ec

+

https://github.com/esoteric-ephemera/water_cluster_density_errors

+
+
+ Source code in openqdc/datasets/potential/waterclusters.py +
103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
class SCANWaterClusters(BaseDataset):
+    """
+    The SCAN Water Clusters dataset contains conformations of
+    neutral water clusters containing up to 20 monomers, charged water clusters,
+    and alkali- and halide-water clusters. This dataset consists of our data sets of water clusters:
+    the benchmark energy and geometry database (BEGDB) neutral water cluster subset; the WATER2723 set of 14
+    neutral, 5 protonated, 7 deprotonated, and one auto-ionized water cluster; and two sets of
+    ion-water clusters M...(H2O)n, where M = Li+, Na+, K+, F−, Cl−, or Br−.
+    Water clusters were obtained from  10 nanosecond gas-phase molecular dynamics
+    simulations using AMBER 9 and optimized to obtain
+    lowest energy isomers were determined using MP2/aug-cc-pVDZ//MP2/6-31G* Gibbs free energies.
+
+
+    Chemical Species:
+        [H, O, Li, Na, K, F, Cl, Br]
+
+    Usage:
+    ```python
+    from openqdc.datasets import SCANWaterClusters
+    dataset = SCANWaterClusters()
+    ```
+
+    References:
+        https://chemrxiv.org/engage/chemrxiv/article-details/662aaff021291e5d1db7d8ec\n
+        https://github.com/esoteric-ephemera/water_cluster_density_errors
+    """
+
+    __name__ = "scanwaterclusters"
+
+    __energy_unit__ = "hartree"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "hartree/ang"
+    energy_target_names = [
+        "HF",
+        "HF-r2SCAN-DC4",
+        "SCAN",
+        "SCAN@HF",
+        "SCAN@r2SCAN50",
+        "r2SCAN",
+        "r2SCAN@HF",
+        "r2SCAN@r2SCAN50",
+        "r2SCAN50",
+        "r2SCAN100",
+        "r2SCAN10",
+        "r2SCAN20",
+        "r2SCAN25",
+        "r2SCAN30",
+        "r2SCAN40",
+        "r2SCAN60",
+        "r2SCAN70",
+        "r2SCAN80",
+        "r2SCAN90",
+    ]
+    __energy_methods__ = [PotentialMethod.NONE for _ in range(len(energy_target_names))]
+    force_target_names = []
+    # 27            # 9 level
+    subsets = ["BEGDB_H2O", "WATER27", "H2O_alkali_clusters", "H2O_halide_clusters"]
+    __links__ = {
+        "geometries.json.gz": "https://github.com/esoteric-ephemera/water_cluster_density_errors/blob/main/data_files/geometries.json.gz?raw=True",  # noqa
+        "total_energies.json.gz": "https://github.com/esoteric-ephemera/water_cluster_density_errors/blob/main/data_files/total_energies.json.gz?raw=True",  # noqa
+    }
+
+    def read_raw_entries(self):
+        entries = []  # noqa
+        for i, subset in enumerate(self.subsets):
+            geometries = read_geometries(p_join(self.root, "geometries.json.gz"), subset)
+            energies = read_energies(p_join(self.root, "total_energies.json.gz"), subset)
+            datum = {}
+            for k in energies:
+                _ = energies[k].pop("metadata")
+                datum[k] = energies[k]["total_energies"]
+            entries.extend(format_geometry_and_entries(geometries, datum, subset))
+        return entries
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/waterclusters3_30.html b/0.1.2/API/datasets/waterclusters3_30.html new file mode 100644 index 00000000..5dff6324 --- /dev/null +++ b/0.1.2/API/datasets/waterclusters3_30.html @@ -0,0 +1,2221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Waterclusters3_30 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Waterclusters3_30

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ WaterClusters + + +

+ + +
+

+ Bases: BaseDataset

+ + +

The WaterClusters dataset contains putative minima and low energy networks for water +clusters of sizes n = 3 - 30. The cluster structures are derived and labeled with +the TTM2.1-F ab-initio based interaction potential for water. +It contains approximately 4.5 mil. structures. +Sampling was done with the Monte Carlo Temperature Basin Paving (MCTBP) method.

+ + +
+ Chemical Species +

["H", "O"]

+

Usage: +

from openqdc.datasets import WaterClusters
+dataset = WaterClusters()
+

+ + +
+ References +

https://doi.org/10.1063/1.5128378

+

https://sites.uw.edu/wdbase/database-of-water-clusters/

+
+
+ Source code in openqdc/datasets/potential/waterclusters3_30.py +
50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
class WaterClusters(BaseDataset):
+    """
+    The WaterClusters dataset contains putative minima and low energy networks for water
+    clusters of sizes n = 3 - 30. The cluster structures are derived and labeled with
+    the TTM2.1-F ab-initio based interaction potential for water.
+    It contains approximately 4.5 mil. structures.
+    Sampling was done with the Monte Carlo Temperature Basin Paving (MCTBP) method.
+
+    Chemical Species:
+        ["H", "O"]
+
+    Usage:
+    ```python
+    from openqdc.datasets import WaterClusters
+    dataset = WaterClusters()
+    ```
+
+    References:
+        https://doi.org/10.1063/1.5128378\n
+        https://sites.uw.edu/wdbase/database-of-water-clusters/\n
+    """
+
+    __name__ = "waterclusters3_30"
+
+    # Energy in hartree, all zeros by default
+    atomic_energies = np.zeros((MAX_ATOMIC_NUMBER,), dtype=np.float32)
+    __energy_unit__ = "kcal/mol"
+    __distance_unit__ = "ang"
+    __forces_unit__ = "kcal/mol/ang"
+
+    __energy_methods__ = [PotentialMethod.TTM2_1_F]  # "ttm2.1-f"
+    energy_target_names = ["TTM2.1-F Potential"]
+    __links__ = {"W3-W30_all_geoms_TTM2.1-F.zip": "https://drive.google.com/uc?id=18Y7OiZXSCTsHrQ83GCc4fyE_abbL6E_n"}
+
+    def read_raw_entries(self):
+        samples = []
+        parent_folder = p_join(self.root, "W3-W30_all_geoms_TTM2.1-F/")
+        for i in range(3, 31):
+            name = f"W{i}_geoms_all"
+            zip_path = p_join(parent_folder, f"{name}.zip")
+            xyz_path = p_join(parent_folder, f"{name}.xyz")
+            with zipfile.ZipFile(zip_path, "r") as zip_ref:
+                zip_ref.extractall(parent_folder)
+
+            data = read_xyz(xyz_path, i)
+            samples += data
+
+        return samples
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/datasets/x40.html b/0.1.2/API/datasets/x40.html new file mode 100644 index 00000000..74f85054 --- /dev/null +++ b/0.1.2/API/datasets/x40.html @@ -0,0 +1,2206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + X40 - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

X40

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ X40 + + +

+ + +
+

+ Bases: YamlDataset

+ + +

X40 interaction dataset of 40 noncovalent complexes of organic halides, halohydrides, and halogen molecules +where the halogens participate in various interaction types such as electrostatic interactions, london +dispersion, hydrogen bonds, halogen bonding, halogen-pi interactions and stacking of halogenated aromatic +molecules. For each complex 10 geometries are generated resulting in 400 geometries in the dataset. The geometries +are optimized using the MP2 level of theory with cc-pVTZ basis set whereas the interaction energies are +computed with CCSD(T)/CBS level of theory.

+

Usage: +

from openqdc.datasets import X40
+dataset = X40()
+

+ + +
+ Reference +

https://pubs.acs.org/doi/10.1021/ct300647k

+
+
+ Source code in openqdc/datasets/interaction/x40.py +
 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
class X40(YamlDataset):
+    """
+    X40 interaction dataset of 40 noncovalent complexes of organic halides, halohydrides, and halogen molecules
+    where the halogens participate in various interaction types such as electrostatic interactions, london
+    dispersion, hydrogen bonds, halogen bonding, halogen-pi interactions and stacking of halogenated aromatic
+    molecules. For each complex 10 geometries are generated resulting in 400 geometries in the dataset. The geometries
+    are optimized using the MP2 level of theory with cc-pVTZ basis set whereas the interaction energies are
+    computed with CCSD(T)/CBS level of theory.
+
+    Usage:
+    ```python
+    from openqdc.datasets import X40
+    dataset = X40()
+    ```
+
+    Reference:
+        https://pubs.acs.org/doi/10.1021/ct300647k
+    """
+
+    __name__ = "x40"
+    __energy_methods__ = [
+        InteractionMethod.CCSD_T_CBS,  # "CCSD(T)/CBS",
+        InteractionMethod.MP2_CBS,  # "MP2/CBS",
+        InteractionMethod.DCCSDT_HA_DZ,  # "dCCSD(T)/haDZ",
+        InteractionMethod.DCCSDT_HA_TZ,  # "dCCSD(T)/haTZ",
+        InteractionMethod.MP2_5_CBS_ADZ,  # "MP2.5/CBS(aDZ)",
+    ]
+    __links__ = {
+        "x40.yaml": "http://cuby4.molecular.cz/download_datasets/x40.yaml",
+        "geometries.tar.gz": "http://cuby4.molecular.cz/download_geometries/X40.tar",
+    }
+
+    def _process_name(self, item):
+        return item.shortname
+
+    def get_n_atoms_ptr(self, item, root, filename):
+        xyz_path = p_join(root, f"{filename}.xyz")
+        with open(xyz_path, "r") as xyz_file:  # avoid not closing the file
+            lines = list(map(lambda x: x.strip().split(), xyz_file.readlines()))
+            setup = lines.pop(1)
+            n_atoms_first = setup[0].split("-")[1]
+            n_atoms_ptr = np.array([int(n_atoms_first)], dtype=np.int32)
+            return n_atoms_ptr
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/e0_dispatcher.html b/0.1.2/API/e0_dispatcher.html new file mode 100644 index 00000000..9d818a30 --- /dev/null +++ b/0.1.2/API/e0_dispatcher.html @@ -0,0 +1,4007 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + e0 Dispatcher - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

e0 Dispatcher

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ AtomEnergies + + +

+ + +
+ + +

Manager class for interface with the isolated atom energies classes +and providing the generals function to retrieve the data

+ +
+ Source code in openqdc/datasets/energies.py +
 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
class AtomEnergies:
+    """
+    Manager class for interface with the isolated atom energies classes
+    and providing the generals function to retrieve the data
+    """
+
+    def __init__(self, data, **kwargs) -> None:
+        self.atom_energies = data.energy_type
+        self.factory = dispatch_factory(data, **kwargs)
+
+    @property
+    def e0s_matrix(self) -> np.ndarray:
+        """
+        Return the isolated atom energies dictionary
+
+        Returns:
+            Matrix Array with the isolated atom energies
+        """
+        return self.factory.e0_matrix
+
+    @property
+    def e0s_dict(self) -> Dict[AtomSpecies, AtomEnergy]:
+        """
+        Return the isolated atom energies dictionary
+
+        Returns:
+            Dictionary with the isolated atom energies
+        """
+        return self.factory.e0_dict
+
+    def __str__(self):
+        return f"Atoms: { list(set(map(lambda x : x.symbol, self.e0s_dict.keys())))}"
+
+    def __repr__(self):
+        return str(self)
+
+    def __getitem__(self, item: AtomSpecies) -> AtomEnergy:
+        """
+        Retrieve a key from the isolated atom dictionary.
+        Item can be written as tuple(Symbol, charge),
+        tuple(Chemical number, charge). If no charge is passed,
+        it will be automatically set to 0.
+
+        Examples:
+            AtomEnergies[6], AtomEnergies[6,1], \n
+            AtomEnergies["C",1], AtomEnergies[(6,1)], \n
+            AtomEnergies[("C,1)]
+
+        Parameters:
+            item:
+                AtomSpecies object or tuple with the atom symbol and charge
+
+        Returns:
+            AtomEnergy object with the isolated atom energy
+        """
+        try:
+            atom, charge = item[0], item[1]
+        except TypeError:
+            atom = item
+            charge = 0
+        except IndexError:
+            atom = item[0]
+            charge = 0
+        if not isinstance(atom, str):
+            atom = ATOM_SYMBOLS[atom]
+        return self.e0s_dict[(atom, charge)]
+
+
+ + + +
+ + + + + + + +
+ + + +

+ e0s_dict: Dict[AtomSpecies, AtomEnergy] + + + property + + +

+ + +
+ +

Return the isolated atom energies dictionary

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Dict[AtomSpecies, AtomEnergy] + +
+

Dictionary with the isolated atom energies

+
+
+
+ +
+ +
+ + + +

+ e0s_matrix: np.ndarray + + + property + + +

+ + +
+ +

Return the isolated atom energies dictionary

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ ndarray + +
+

Matrix Array with the isolated atom energies

+
+
+
+ +
+ + + +
+ + +

+ __getitem__(item) + +

+ + +
+ +

Retrieve a key from the isolated atom dictionary. +Item can be written as tuple(Symbol, charge), +tuple(Chemical number, charge). If no charge is passed, +it will be automatically set to 0.

+ + +

Examples:

+

AtomEnergies[6], AtomEnergies[6,1],

+

AtomEnergies["C",1], AtomEnergies[(6,1)],

+

AtomEnergies[("C,1)]

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
item + AtomSpecies + +
+

AtomSpecies object or tuple with the atom symbol and charge

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ AtomEnergy + +
+

AtomEnergy object with the isolated atom energy

+
+
+ +
+ Source code in openqdc/datasets/energies.py +
134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
def __getitem__(self, item: AtomSpecies) -> AtomEnergy:
+    """
+    Retrieve a key from the isolated atom dictionary.
+    Item can be written as tuple(Symbol, charge),
+    tuple(Chemical number, charge). If no charge is passed,
+    it will be automatically set to 0.
+
+    Examples:
+        AtomEnergies[6], AtomEnergies[6,1], \n
+        AtomEnergies["C",1], AtomEnergies[(6,1)], \n
+        AtomEnergies[("C,1)]
+
+    Parameters:
+        item:
+            AtomSpecies object or tuple with the atom symbol and charge
+
+    Returns:
+        AtomEnergy object with the isolated atom energy
+    """
+    try:
+        atom, charge = item[0], item[1]
+    except TypeError:
+        atom = item
+        charge = 0
+    except IndexError:
+        atom = item[0]
+        charge = 0
+    if not isinstance(atom, str):
+        atom = ATOM_SYMBOLS[atom]
+    return self.e0s_dict[(atom, charge)]
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ AtomEnergy + + + + dataclass + + +

+ + +
+ + +

Datastructure to store isolated atom energies +and the std deviation associated to the value. +By default the std will be 1 if no value was calculated +or not available (formation energy case)

+ +
+ Source code in openqdc/datasets/energies.py +
74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
@dataclass
+class AtomEnergy:
+    """
+    Datastructure to store isolated atom energies
+    and the std deviation associated to the value.
+    By default the std will be 1 if no value was calculated
+    or not available (formation energy case)
+    """
+
+    mean: np.array
+    std: np.array = field(default_factory=lambda: np.array([1], dtype=np.float32))
+
+    def __post_init__(self):
+        if not isinstance(self.mean, np.ndarray):
+            self.mean = np.array([self.mean], dtype=np.float32)
+
+    def append(self, other: "AtomEnergy"):
+        """
+        Append the mean and std of another atom energy
+        """
+        self.mean = np.append(self.mean, other.mean)
+        self.std = np.append(self.std, other.std)
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ append(other) + +

+ + +
+ +

Append the mean and std of another atom energy

+ +
+ Source code in openqdc/datasets/energies.py +
90
+91
+92
+93
+94
+95
def append(self, other: "AtomEnergy"):
+    """
+    Append the mean and std of another atom energy
+    """
+    self.mean = np.append(self.mean, other.mean)
+    self.std = np.append(self.std, other.std)
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ AtomSpecies + + + + dataclass + + +

+ + +
+ + +

Structure that defines a tuple of chemical specie and charge +and provide hash and automatic conversion from atom number to +checmical symbol

+ +
+ Source code in openqdc/datasets/energies.py +
48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
@dataclass(frozen=False, eq=True)
+class AtomSpecies:
+    """
+    Structure that defines a tuple of chemical specie and charge
+    and provide hash and automatic conversion from atom number to
+    checmical symbol
+    """
+
+    symbol: Union[str, int]
+    charge: int = 0
+
+    def __post_init__(self):
+        if not isinstance(self.symbol, str):
+            self.symbol = ATOM_SYMBOLS[self.symbol]
+        self.number = ATOMIC_NUMBERS[self.symbol]
+
+    def __hash__(self):
+        return hash((self.symbol, self.charge))
+
+    def __eq__(self, other):
+        if not isinstance(other, AtomSpecies):
+            symbol, charge = other[0], other[1]
+            other = AtomSpecies(symbol=symbol, charge=charge)
+        return (self.number, self.charge) == (other.number, other.charge)
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ IsolatedEnergyInterface + + +

+ + +
+

+ Bases: ABC

+ + +

Abstract class that defines the interface for the +different implementation of an isolated atom energy value

+ +
+ Source code in openqdc/datasets/energies.py +
166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
class IsolatedEnergyInterface(ABC):
+    """
+    Abstract class that defines the interface for the
+    different implementation of an isolated atom energy value
+    """
+
+    def __init__(self, data, **kwargs):
+        """
+        Parameters:
+            data : openqdc.datasets.Dataset
+                Dataset object that contains the information
+                about the isolated atom energies. Info will be passed
+                by references
+            kwargs : dict
+                Additional arguments that will be passed to the
+                selected energy class. Mostly used for regression
+                to pass the regressor_kwargs.
+        """
+        self._e0_matrixs = []
+        self._e0_dict = None
+        self.kwargs = kwargs
+        self.data = data
+        self._post_init()
+
+    @property
+    def refit(self) -> bool:
+        return self.data.refit_e0s
+
+    @abstractmethod
+    def _post_init(self):
+        """
+        Main method to fetch/compute/recomputed the isolated atom energies.
+        Need to be implemented in all child classes.
+        """
+        pass
+
+    def __len__(self):
+        return len(self.data.energy_methods)
+
+    @property
+    def e0_matrix(self) -> np.ndarray:
+        """
+        Return the isolated atom energies matrixes
+
+        Returns:
+            Matrix Array with the isolated atom energies
+        """
+        return np.array(self._e0_matrixs)
+
+    @property
+    def e0_dict(self) -> Dict:
+        """
+        Return the isolated atom energies dict
+
+        Returns:
+            Dictionary with the isolated atom energies
+        """
+
+        return self._e0s_dict
+
+    def __str__(self) -> str:
+        return self.__class__.__name__.lower()
+
+
+ + + +
+ + + + + + + +
+ + + +

+ e0_dict: Dict + + + property + + +

+ + +
+ +

Return the isolated atom energies dict

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Dict + +
+

Dictionary with the isolated atom energies

+
+
+
+ +
+ +
+ + + +

+ e0_matrix: np.ndarray + + + property + + +

+ + +
+ +

Return the isolated atom energies matrixes

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ ndarray + +
+

Matrix Array with the isolated atom energies

+
+
+
+ +
+ + + +
+ + +

+ __init__(data, **kwargs) + +

+ + +
+ + + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
data + +
+

openqdc.datasets.Dataset +Dataset object that contains the information +about the isolated atom energies. Info will be passed +by references

+
+
+ required +
kwargs + +
+

dict +Additional arguments that will be passed to the +selected energy class. Mostly used for regression +to pass the regressor_kwargs.

+
+
+ {} +
+ +
+ Source code in openqdc/datasets/energies.py +
172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
def __init__(self, data, **kwargs):
+    """
+    Parameters:
+        data : openqdc.datasets.Dataset
+            Dataset object that contains the information
+            about the isolated atom energies. Info will be passed
+            by references
+        kwargs : dict
+            Additional arguments that will be passed to the
+            selected energy class. Mostly used for regression
+            to pass the regressor_kwargs.
+    """
+    self._e0_matrixs = []
+    self._e0_dict = None
+    self.kwargs = kwargs
+    self.data = data
+    self._post_init()
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ NullEnergy + + +

+ + +
+

+ Bases: IsolatedEnergyInterface

+ + +

Class that returns a null (zeros) matrix for the isolated atom energies in case +of no energies are available.

+ +
+ Source code in openqdc/datasets/energies.py +
252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
class NullEnergy(IsolatedEnergyInterface):
+    """
+    Class that returns a null (zeros) matrix for the isolated atom energies in case
+    of no energies are available.
+    """
+
+    def _assembly_e0_dict(self):
+        datum = {}
+        for _ in self.data.__energy_methods__:
+            for key, values in PotentialMethod.NONE.atom_energies_dict.items():
+                atm = AtomSpecies(*key)
+                ens = AtomEnergy(values)
+                if atm not in datum:
+                    datum[atm] = ens
+                else:
+                    datum[atm].append(ens)
+        self._e0s_dict = datum
+
+    def _post_init(self):
+        self._e0_matrixs = [PotentialMethod.NONE.atom_energies_matrix for _ in range(len(self.data.energy_methods))]
+        self._assembly_e0_dict()
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ PhysicalEnergy + + +

+ + +
+

+ Bases: IsolatedEnergyInterface

+ + +

Class that returns a physical (SE,DFT,etc) isolated atom energies.

+ +
+ Source code in openqdc/datasets/energies.py +
230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
class PhysicalEnergy(IsolatedEnergyInterface):
+    """
+    Class that returns a physical (SE,DFT,etc) isolated atom energies.
+    """
+
+    def _assembly_e0_dict(self):
+        datum = {}
+        for method in self.data.__energy_methods__:
+            for key, values in method.atom_energies_dict.items():
+                atm = AtomSpecies(*key)
+                ens = AtomEnergy(values)
+                if atm not in datum:
+                    datum[atm] = ens
+                else:
+                    datum[atm].append(ens)
+        self._e0s_dict = datum
+
+    def _post_init(self):
+        self._e0_matrixs = [energy_method.atom_energies_matrix for energy_method in self.data.__energy_methods__]
+        self._assembly_e0_dict()
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ RegressionEnergy + + +

+ + +
+

+ Bases: IsolatedEnergyInterface

+ + +

Class that compute and returns the regressed isolated atom energies.

+ +
+ Source code in openqdc/datasets/energies.py +
275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
class RegressionEnergy(IsolatedEnergyInterface):
+    """
+    Class that compute and returns the regressed isolated atom energies.
+    """
+
+    def _post_init(self):
+        if not self.attempt_load() or self.refit:
+            self.regressor = Regressor.from_openqdc_dataset(self.data, **self.kwargs)
+            E0s, cov = self._compute_regression_e0s()
+            self._set_lin_atom_species_dict(E0s, cov)
+        self._set_linear_e0s()
+
+    def _compute_regression_e0s(self) -> Tuple[np.ndarray, Optional[np.ndarray]]:
+        """
+        Try to compute the regressed isolated atom energies.
+        raise an error if the regression fails.
+        return the regressed isolated atom energies and the uncertainty values.
+
+        Returns:
+            Tuple with the regressed isolated atom energies and the uncertainty values of the regression
+            if available.
+        """
+        try:
+            E0s, cov = self.regressor.solve()
+        except np.linalg.LinAlgError:
+            logger.warning(f"Failed to compute E0s using {self.regressor.solver_type} regression.")
+            raise np.linalg.LinAlgError
+        return E0s, cov
+
+    def _set_lin_atom_species_dict(self, E0s, covs) -> None:
+        """
+        Set the regressed isolated atom energies in a dictionary format
+        and Save the values in a pickle file to easy loading.
+        """
+        atomic_energies_dict = {}
+        for i, z in enumerate(self.regressor.numbers):
+            for charge in range(-10, 11):
+                atomic_energies_dict[AtomSpecies(z, charge)] = AtomEnergy(E0s[i], 1 if covs is None else covs[i])
+            # atomic_energies_dict[z] = E0s[i]
+        self._e0s_dict = atomic_energies_dict
+        self.save_e0s()
+
+    def _set_linear_e0s(self) -> None:
+        """
+        Transform the e0s dictionary into the correct e0s
+        matrix format.
+        """
+        new_e0s = [np.zeros((max(self.data.numbers) + 1, MAX_CHARGE_NUMBER)) for _ in range(len(self))]
+        for z, e0 in self._e0s_dict.items():
+            for i in range(len(self)):
+                # new_e0s[i][z, :] = e0[i]
+                new_e0s[i][z.number, z.charge] = e0.mean[i]
+            # for atom_sp, values in
+        self._e0_matrixs = new_e0s
+
+    def save_e0s(self) -> None:
+        """
+        Save the regressed isolated atom energies in a pickle file.
+        """
+        save_pkl(self._e0s_dict, self.preprocess_path)
+
+    def attempt_load(self) -> bool:
+        """
+        Try to load the regressed isolated atom energies from the
+        object pickle file and return the success of the operation.
+        """
+        try:
+            self._e0s_dict = load_pkl(self.preprocess_path)
+            logger.info(f"Found energy file for {str(self)}.")
+            return True
+        except FileNotFoundError:
+            logger.warning(f"Energy file for {str(self)} not found.")
+            return False
+
+    @property
+    def preprocess_path(self):
+        """
+        Return the path to the object pickle file.
+        """
+        path = p_join(self.data.root, "preprocessed", str(self) + ".pkl")
+        return path
+
+
+ + + +
+ + + + + + + +
+ + + +

+ preprocess_path + + + property + + +

+ + +
+ +

Return the path to the object pickle file.

+
+ +
+ + + +
+ + +

+ attempt_load() + +

+ + +
+ +

Try to load the regressed isolated atom energies from the +object pickle file and return the success of the operation.

+ +
+ Source code in openqdc/datasets/energies.py +
336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
def attempt_load(self) -> bool:
+    """
+    Try to load the regressed isolated atom energies from the
+    object pickle file and return the success of the operation.
+    """
+    try:
+        self._e0s_dict = load_pkl(self.preprocess_path)
+        logger.info(f"Found energy file for {str(self)}.")
+        return True
+    except FileNotFoundError:
+        logger.warning(f"Energy file for {str(self)} not found.")
+        return False
+
+
+
+ +
+ +
+ + +

+ save_e0s() + +

+ + +
+ +

Save the regressed isolated atom energies in a pickle file.

+ +
+ Source code in openqdc/datasets/energies.py +
330
+331
+332
+333
+334
def save_e0s(self) -> None:
+    """
+    Save the regressed isolated atom energies in a pickle file.
+    """
+    save_pkl(self._e0s_dict, self.preprocess_path)
+
+
+
+ +
+ + + +
+ +
+ +
+ + +
+ + +

+ dispatch_factory(data, **kwargs) + +

+ + +
+ +

Factory function that select the correct +energy class for the fetching/calculation +of isolated atom energies.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
data + +
+

openqdc.datasets.Dataset +Dataset object that contains the information +about the isolated atom energies. Info will be passed +by references

+
+
+ required +
kwargs + +
+

dict +Additional arguments that will be passed to the +selected energy class. Mostly used for regression +to pass the regressor_kwargs.

+
+
+ {} +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ IsolatedEnergyInterface + +
+

Initialized IsolatedEnergyInterface-like object

+
+
+ +
+ Source code in openqdc/datasets/energies.py +
17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
def dispatch_factory(data: Any, **kwargs: Dict) -> "IsolatedEnergyInterface":
+    """
+    Factory function that select the correct
+    energy class for the fetching/calculation
+    of isolated atom energies.
+
+    Parameters:
+        data : openqdc.datasets.Dataset
+            Dataset object that contains the information
+            about the isolated atom energies. Info will be passed
+            by references
+        kwargs : dict
+            Additional arguments that will be passed to the
+            selected energy class. Mostly used for regression
+            to pass the regressor_kwargs.
+
+    Returns:
+        Initialized IsolatedEnergyInterface-like object
+    """
+    if data.energy_type == "formation":
+        return PhysicalEnergy(data, **kwargs)
+    elif data.energy_type == "regression":
+        try:
+            return RegressionEnergy(data, **kwargs)
+        except np.linalg.LinAlgError:
+            logger.warning("Error! Using physical energies instead.")
+            return PhysicalEnergy(data, **kwargs)
+    elif data.energy_type == "null":
+        return NullEnergy(data, **kwargs)
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/formats.html b/0.1.2/API/formats.html new file mode 100644 index 00000000..c9ababf1 --- /dev/null +++ b/0.1.2/API/formats.html @@ -0,0 +1,3703 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Format loading - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Format loading

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ GeneralStructure + + +

+ + +
+

+ Bases: ABC

+ + +

Abstract Factory class for datasets type in the openQDC package.

+ +
+ Source code in openqdc/datasets/structure.py +
 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
class GeneralStructure(ABC):
+    """
+    Abstract Factory class for datasets type in the openQDC package.
+    """
+
+    _ext: Optional[str] = None
+    _extra_files: Optional[List[str]] = None
+
+    @property
+    def ext(self):
+        return self._ext
+
+    @property
+    @abstractmethod
+    def load_fn(self) -> Callable:
+        """
+        Function to use for loading the data.
+        Must be implemented by the child class.
+
+        Returns:
+            the function to use for loading the data
+        """
+        raise NotImplementedError
+
+    def add_extension(self, filename: str) -> str:
+        """
+        Add the correct extension to a filename
+
+        Parameters:
+            filename:  the filename to add the extension to
+
+        Returns:
+            the filename with the extension
+        """
+        return filename + self.ext
+
+    @abstractmethod
+    def save_preprocess(
+        self,
+        preprocess_path: Union[str, PathLike],
+        data_keys: List[str],
+        data_dict: Dict[str, np.ndarray],
+        extra_data_keys: List[str],
+        extra_data_types: Dict[str, type],
+    ) -> List[str]:
+        """
+        Save the preprocessed data to the cache directory and optionally upload it to the remote storage.
+        Must be implemented by the child class.
+
+        Parameters:
+            preprocess_path:  path to the preprocessed data file
+            data_keys:        list of keys to load from the data file
+            data_dict:        dictionary of data to save
+            extra_data_keys:  list of keys to load from the extra data file
+            extra_data_types: dictionary of data types for each key
+        """
+        raise NotImplementedError
+
+    @abstractmethod
+    def load_extra_files(
+        self,
+        data: Dict[str, np.ndarray],
+        preprocess_path: Union[str, PathLike],
+        data_keys: List[str],
+        pkl_data_keys: List[str],
+        overwrite: bool,
+    ):
+        """
+        Load extra files required to define other types of data.
+        Must be implemented by the child class.
+
+        Parameters:
+            data:  dictionary of data to load
+            preprocess_path:  path to the preprocessed data file
+            data_keys:    list of keys to load from the data file
+            pkl_data_keys:   list of keys to load from the extra files
+            overwrite:   whether to overwrite the local cache
+        """
+        raise NotImplementedError
+
+    def join_and_ext(self, path: Union[str, PathLike], filename: str) -> Union[str, PathLike]:
+        """
+        Join a path and a filename and add the correct extension.
+
+        Parameters:
+            path:  the path to join
+            filename:  the filename to join
+
+        Returns:
+            the joined path with the correct extension
+        """
+        return p_join(path, self.add_extension(filename))
+
+    def load_data(
+        self,
+        preprocess_path: Union[str, PathLike],
+        data_keys: List[str],
+        data_types: Dict[str, np.dtype],
+        data_shapes: Dict[str, Tuple[int, int]],
+        extra_data_keys: List[str],
+        overwrite: bool,
+    ):
+        """
+        Main method to load the data from a filetype structure like memmap or zarr.
+
+        Parameters:
+            preprocess_path:  path to the preprocessed data file
+            data_keys:        list of keys to load from the data file
+            data_types:       dictionary of data types for each key
+            data_shapes:      dictionary of shapes for each key
+            extra_data_keys:  list of keys to load from the extra data file
+            overwrite:        whether to overwrite the local cache
+        """
+        data = {}
+        for key in data_keys:
+            filename = self.join_and_ext(preprocess_path, key)
+            pull_locally(filename, overwrite=overwrite)
+            data[key] = self.load_fn(filename, mode="r", dtype=data_types[key])
+            data[key] = self.unpack(data[key])
+            data[key] = data[key].reshape(*data_shapes[key])
+
+        data = self.load_extra_files(data, preprocess_path, data_keys, extra_data_keys, overwrite)
+        return data
+
+    def unpack(self, data: any) -> any:
+        """
+        Unpack the data from the loaded file.
+
+        Parameters:
+            data:  the data to unpack
+
+        Returns:
+            the unpacked data
+        """
+        return data
+
+
+ + + +
+ + + + + + + +
+ + + +

+ load_fn: Callable + + + abstractmethod + property + + +

+ + +
+ +

Function to use for loading the data. +Must be implemented by the child class.

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Callable + +
+

the function to use for loading the data

+
+
+
+ +
+ + + +
+ + +

+ add_extension(filename) + +

+ + +
+ +

Add the correct extension to a filename

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
filename + str + +
+

the filename to add the extension to

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ str + +
+

the filename with the extension

+
+
+ +
+ Source code in openqdc/datasets/structure.py +
37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
def add_extension(self, filename: str) -> str:
+    """
+    Add the correct extension to a filename
+
+    Parameters:
+        filename:  the filename to add the extension to
+
+    Returns:
+        the filename with the extension
+    """
+    return filename + self.ext
+
+
+
+ +
+ +
+ + +

+ join_and_ext(path, filename) + +

+ + +
+ +

Join a path and a filename and add the correct extension.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
path + Union[str, PathLike] + +
+

the path to join

+
+
+ required +
filename + str + +
+

the filename to join

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Union[str, PathLike] + +
+

the joined path with the correct extension

+
+
+ +
+ Source code in openqdc/datasets/structure.py +
 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
def join_and_ext(self, path: Union[str, PathLike], filename: str) -> Union[str, PathLike]:
+    """
+    Join a path and a filename and add the correct extension.
+
+    Parameters:
+        path:  the path to join
+        filename:  the filename to join
+
+    Returns:
+        the joined path with the correct extension
+    """
+    return p_join(path, self.add_extension(filename))
+
+
+
+ +
+ +
+ + +

+ load_data(preprocess_path, data_keys, data_types, data_shapes, extra_data_keys, overwrite) + +

+ + +
+ +

Main method to load the data from a filetype structure like memmap or zarr.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
preprocess_path + Union[str, PathLike] + +
+

path to the preprocessed data file

+
+
+ required +
data_keys + List[str] + +
+

list of keys to load from the data file

+
+
+ required +
data_types + Dict[str, dtype] + +
+

dictionary of data types for each key

+
+
+ required +
data_shapes + Dict[str, Tuple[int, int]] + +
+

dictionary of shapes for each key

+
+
+ required +
extra_data_keys + List[str] + +
+

list of keys to load from the extra data file

+
+
+ required +
overwrite + bool + +
+

whether to overwrite the local cache

+
+
+ required +
+ +
+ Source code in openqdc/datasets/structure.py +
106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
def load_data(
+    self,
+    preprocess_path: Union[str, PathLike],
+    data_keys: List[str],
+    data_types: Dict[str, np.dtype],
+    data_shapes: Dict[str, Tuple[int, int]],
+    extra_data_keys: List[str],
+    overwrite: bool,
+):
+    """
+    Main method to load the data from a filetype structure like memmap or zarr.
+
+    Parameters:
+        preprocess_path:  path to the preprocessed data file
+        data_keys:        list of keys to load from the data file
+        data_types:       dictionary of data types for each key
+        data_shapes:      dictionary of shapes for each key
+        extra_data_keys:  list of keys to load from the extra data file
+        overwrite:        whether to overwrite the local cache
+    """
+    data = {}
+    for key in data_keys:
+        filename = self.join_and_ext(preprocess_path, key)
+        pull_locally(filename, overwrite=overwrite)
+        data[key] = self.load_fn(filename, mode="r", dtype=data_types[key])
+        data[key] = self.unpack(data[key])
+        data[key] = data[key].reshape(*data_shapes[key])
+
+    data = self.load_extra_files(data, preprocess_path, data_keys, extra_data_keys, overwrite)
+    return data
+
+
+
+ +
+ +
+ + +

+ load_extra_files(data, preprocess_path, data_keys, pkl_data_keys, overwrite) + + + abstractmethod + + +

+ + +
+ +

Load extra files required to define other types of data. +Must be implemented by the child class.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
data + Dict[str, ndarray] + +
+

dictionary of data to load

+
+
+ required +
preprocess_path + Union[str, PathLike] + +
+

path to the preprocessed data file

+
+
+ required +
data_keys + List[str] + +
+

list of keys to load from the data file

+
+
+ required +
pkl_data_keys + List[str] + +
+

list of keys to load from the extra files

+
+
+ required +
overwrite + bool + +
+

whether to overwrite the local cache

+
+
+ required +
+ +
+ Source code in openqdc/datasets/structure.py +
71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
@abstractmethod
+def load_extra_files(
+    self,
+    data: Dict[str, np.ndarray],
+    preprocess_path: Union[str, PathLike],
+    data_keys: List[str],
+    pkl_data_keys: List[str],
+    overwrite: bool,
+):
+    """
+    Load extra files required to define other types of data.
+    Must be implemented by the child class.
+
+    Parameters:
+        data:  dictionary of data to load
+        preprocess_path:  path to the preprocessed data file
+        data_keys:    list of keys to load from the data file
+        pkl_data_keys:   list of keys to load from the extra files
+        overwrite:   whether to overwrite the local cache
+    """
+    raise NotImplementedError
+
+
+
+ +
+ +
+ + +

+ save_preprocess(preprocess_path, data_keys, data_dict, extra_data_keys, extra_data_types) + + + abstractmethod + + +

+ + +
+ +

Save the preprocessed data to the cache directory and optionally upload it to the remote storage. +Must be implemented by the child class.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
preprocess_path + Union[str, PathLike] + +
+

path to the preprocessed data file

+
+
+ required +
data_keys + List[str] + +
+

list of keys to load from the data file

+
+
+ required +
data_dict + Dict[str, ndarray] + +
+

dictionary of data to save

+
+
+ required +
extra_data_keys + List[str] + +
+

list of keys to load from the extra data file

+
+
+ required +
extra_data_types + Dict[str, type] + +
+

dictionary of data types for each key

+
+
+ required +
+ +
+ Source code in openqdc/datasets/structure.py +
49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
@abstractmethod
+def save_preprocess(
+    self,
+    preprocess_path: Union[str, PathLike],
+    data_keys: List[str],
+    data_dict: Dict[str, np.ndarray],
+    extra_data_keys: List[str],
+    extra_data_types: Dict[str, type],
+) -> List[str]:
+    """
+    Save the preprocessed data to the cache directory and optionally upload it to the remote storage.
+    Must be implemented by the child class.
+
+    Parameters:
+        preprocess_path:  path to the preprocessed data file
+        data_keys:        list of keys to load from the data file
+        data_dict:        dictionary of data to save
+        extra_data_keys:  list of keys to load from the extra data file
+        extra_data_types: dictionary of data types for each key
+    """
+    raise NotImplementedError
+
+
+
+ +
+ +
+ + +

+ unpack(data) + +

+ + +
+ +

Unpack the data from the loaded file.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
data + any + +
+

the data to unpack

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ any + +
+

the unpacked data

+
+
+ +
+ Source code in openqdc/datasets/structure.py +
137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
def unpack(self, data: any) -> any:
+    """
+    Unpack the data from the loaded file.
+
+    Parameters:
+        data:  the data to unpack
+
+    Returns:
+        the unpacked data
+    """
+    return data
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ MemMapDataset + + +

+ + +
+

+ Bases: GeneralStructure

+ + +

Dataset structure for memory-mapped numpy arrays and props.pkl files.

+ +
+ Source code in openqdc/datasets/structure.py +
150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
class MemMapDataset(GeneralStructure):
+    """
+    Dataset structure for memory-mapped numpy arrays and props.pkl files.
+    """
+
+    _ext = ".mmap"
+    _extra_files = ["props.pkl"]
+
+    @property
+    def load_fn(self):
+        return np.memmap
+
+    def save_preprocess(self, preprocess_path, data_keys, data_dict, extra_data_keys, extra_data_types) -> List[str]:
+        local_paths = []
+        for key in data_keys:
+            local_path = self.join_and_ext(preprocess_path, key)
+            out = np.memmap(local_path, mode="w+", dtype=data_dict[key].dtype, shape=data_dict[key].shape)
+            out[:] = data_dict.pop(key)[:]
+            out.flush()
+            local_paths.append(local_path)
+
+        # save smiles and subset
+        local_path = p_join(preprocess_path, "props.pkl")
+
+        # assert that (required) pkl keys are present in data_dict
+        assert all([key in data_dict.keys() for key in extra_data_keys])
+
+        # store unique and inverse indices for str-based pkl keys
+        for key in extra_data_keys:
+            if extra_data_types[key] == str:
+                data_dict[key] = np.unique(data_dict[key], return_inverse=True)
+
+        with open(local_path, "wb") as f:
+            pkl.dump(data_dict, f)
+
+        local_paths.append(local_path)
+        return local_paths
+
+    def load_extra_files(self, data, preprocess_path, data_keys, pkl_data_keys, overwrite):
+        filename = p_join(preprocess_path, "props.pkl")
+        pull_locally(filename, overwrite=overwrite)
+        with open(filename, "rb") as f:
+            tmp = pkl.load(f)
+            all_pkl_keys = set(tmp.keys()) - set(data_keys)
+            # assert required pkl_keys are present in all_pkl_keys
+            assert all([key in all_pkl_keys for key in pkl_data_keys])
+            for key in all_pkl_keys:
+                x = tmp.pop(key)
+                if len(x) == 2:
+                    data[key] = x[0][x[1]]
+                else:
+                    data[key] = x
+        return data
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ ZarrDataset + + +

+ + +
+

+ Bases: GeneralStructure

+ + +

Dataset structure for zarr files.

+ +
+ Source code in openqdc/datasets/structure.py +
205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
class ZarrDataset(GeneralStructure):
+    """
+    Dataset structure for zarr files.
+    """
+
+    _ext = ".zip"
+    _extra_files = ["metadata.zip"]
+    _zarr_version = 2
+
+    @property
+    def load_fn(self):
+        return zarr.open
+
+    def unpack(self, data):
+        return data[:]
+
+    def save_preprocess(self, preprocess_path, data_keys, data_dict, extra_data_keys, extra_data_types) -> List[str]:
+        # os.makedirs(p_join(ds.root, "zips",  ds.__name__), exist_ok=True)
+        local_paths = []
+        for key, value in data_dict.items():
+            if key not in data_keys:
+                continue
+            zarr_path = self.join_and_ext(preprocess_path, key)
+            value = data_dict.pop(key)
+            z = zarr.open(
+                zarr.storage.ZipStore(zarr_path),
+                "w",
+                zarr_version=self._zarr_version,
+                shape=value.shape,
+                dtype=value.dtype,
+            )
+            z[:] = value[:]
+            local_paths.append(zarr_path)
+            # if key in attrs:
+            #    z.attrs.update(attrs[key])
+
+        metadata = p_join(preprocess_path, "metadata.zip")
+
+        group = zarr.group(zarr.storage.ZipStore(metadata))
+
+        for key in extra_data_keys:
+            if extra_data_types[key] == str:
+                data_dict[key] = np.unique(data_dict[key], return_inverse=True)
+
+        for key, value in data_dict.items():
+            # sub=group.create_group(key)
+            if key in ["name", "subset"]:
+                data = group.create_dataset(key, shape=value[0].shape, dtype=value[0].dtype)
+                data[:] = value[0][:]
+                data2 = group.create_dataset(key + "_ptr", shape=value[1].shape, dtype=np.int32)
+                data2[:] = value[1][:]
+            else:
+                data = group.create_dataset(key, shape=value.shape, dtype=value.dtype)
+                data[:] = value[:]
+        local_paths.append(metadata)
+        return local_paths
+
+    def load_extra_files(self, data, preprocess_path, data_keys, pkl_data_keys, overwrite):
+        filename = self.join_and_ext(preprocess_path, "metadata")
+        pull_locally(filename, overwrite=overwrite)
+        tmp = self.load_fn(filename)
+        all_pkl_keys = set(tmp.keys()) - set(data_keys)
+        # assert required pkl_keys are present in all_pkl_keys
+        assert all([key in all_pkl_keys for key in pkl_data_keys])
+        for key in all_pkl_keys:
+            if key not in pkl_data_keys:
+                data[key] = tmp[key][:][tmp[key][:]]
+            else:
+                data[key] = tmp[key][:]
+        return data
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/methods.html b/0.1.2/API/methods.html new file mode 100644 index 00000000..0638f251 --- /dev/null +++ b/0.1.2/API/methods.html @@ -0,0 +1,3276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + QM methods - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

QM Methods

+ + +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ InteractionMethod + + +

+ + +
+

+ Bases: QmMethod

+ + +
+ Source code in openqdc/methods/enums.py +
546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
class InteractionMethod(QmMethod):
+    CCSD_T_NN = Functional.CCSDT, BasisSet.NN
+    CCSD_T_CBS = Functional.CCSDT, BasisSet.CBS
+    CCSD_T_CC_PVDZ = Functional.CCSDT, BasisSet.CC_PVDZ
+    DCCSDT_HA_DZ = Functional.DCCSDT, BasisSet.HA_DZ
+    DCCSDT_HA_TZ = Functional.DCCSDT, BasisSet.HA_TZ
+    DLPNO_CCSDT = Functional.DLPNO_CCSDT, BasisSet.NONE
+    DLPNO_CCSDT0 = (
+        Functional.DLPNO_CCSDT0,
+        BasisSet.NONE,
+    )
+    FN_DMC = Functional.FN_DMC, BasisSet.NONE
+    FIXED = Functional.FIXED, BasisSet.NONE
+    LNO_CCSDT = Functional.LNO_CCSDT, BasisSet.NONE
+    MP2_CBS = Functional.MP2, BasisSet.CBS
+    MP2_CC_PVDZ = Functional.MP2, BasisSet.CC_PVDZ
+    MP2_CC_PVQZ = Functional.MP2, BasisSet.CC_PVQZ
+    MP2_CC_PVTZ = Functional.MP2, BasisSet.CC_PVTZ
+    MP2_5_CBS_ADZ = Functional.MP2_5, BasisSet.CBS_ADZ
+    MP2C_CBS = Functional.MP2C, BasisSet.CBS
+    QCISDT_CBS = Functional.QCISDT, BasisSet.CBS
+    SAPT0_AUG_CC_PWCVXZ = Functional.SAPT0, BasisSet.AUG_CC_PWCVXZ
+    SAPT0_JUN_CC_PVDZ = Functional.SAPT0, BasisSet.JUN_CC_PVDZ
+    SAPT0_JUN_CC_PVDDZ = Functional.SAPT0, BasisSet.JUN_CC_PVDDZ
+    SAPT0_AUG_CC_PVDDZ = Functional.SAPT0, BasisSet.AUG_CC_PVDDZ
+
+    @property
+    def atom_energies_dict(self):
+        """Get an empty atomization energy dictionary because Interaction methods don't require this"""
+        return {}
+
+
+ + + +
+ + + + + + + +
+ + + +

+ atom_energies_dict + + + property + + +

+ + +
+ +

Get an empty atomization energy dictionary because Interaction methods don't require this

+
+ +
+ + + + + +
+ +
+ +
+ +
+ + + +

+ PotentialMethod + + +

+ + +
+

+ Bases: QmMethod

+ + +
+ Source code in openqdc/methods/enums.py +
248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
class PotentialMethod(QmMethod):  # SPLIT FOR INTERACTIO ENERGIES AND FIX MD1
+    B1LYP_VWN5_DZP = Functional.B1LYP_VWN5, BasisSet.DZP
+    B1LYP_VWN5_SZ = Functional.B1LYP_VWN5, BasisSet.SZ
+    B1LYP_VWN5_TZP = Functional.B1LYP_VWN5, BasisSet.TZP
+    B1PW91_VWN5_DZP = Functional.B1PW91_VWN5, BasisSet.DZP
+    B1PW91_VWN5_SZ = Functional.B1PW91_VWN5, BasisSet.SZ
+    B1PW91_VWN5_TZP = Functional.B1PW91_VWN5, BasisSet.TZP
+    B3LYP_STO3G = Functional.B3LYP, BasisSet.STO3G  # TODO: calculate e0s
+    B3LYP_VWN5_DZP = Functional.B3LYP_VWN5, BasisSet.DZP
+    B3LYP_VWN5_SZ = Functional.B3LYP_VWN5, BasisSet.SZ
+    B3LYP_VWN5_TZP = Functional.B3LYP_VWN5, BasisSet.TZP
+    B3LYP_S_VWN5_DZP = Functional.B3LYP_S_VWN5, BasisSet.DZP
+    B3LYP_S_VWN5_SZ = Functional.B3LYP_S_VWN5, BasisSet.SZ
+    B3LYP_S_VWN5_TZP = Functional.B3LYP_S_VWN5, BasisSet.TZP
+    B3LYP_D_DZP = Functional.B3LYPD, BasisSet.DZP
+    B3LYP_D_SZ = Functional.B3LYPD, BasisSet.SZ
+    B3LYP_D_TZP = Functional.B3LYPD, BasisSet.TZP
+    B3LYP_D3_BJ_DEF2_TZVP = Functional.B3LYP_D3_BJ, BasisSet.DEF2_TZVP
+    B3LYP_6_31G_D = Functional.B3LYP, BasisSet.GSTAR
+    B3LYP_DEF2_TZVP = Functional.B3LYP, BasisSet.DEF2_TZVP
+    B97_1_DZP = Functional.B97_1, BasisSet.DZP
+    B97_1_SZ = Functional.B97_1, BasisSet.SZ
+    B97_1_TZP = Functional.B97_1, BasisSet.TZP
+    B97_2_DZP = Functional.B97_2, BasisSet.DZP
+    B97_2_SZ = Functional.B97_2, BasisSet.SZ
+    B97_2_TZP = Functional.B97_2, BasisSet.TZP
+    B97_D_DZP = Functional.B97_D, BasisSet.DZP
+    B97_D_SZ = Functional.B97_D, BasisSet.SZ
+    B97_D_TZP = Functional.B97_D, BasisSet.TZP
+    B97_DZP = Functional.B97, BasisSet.DZP
+    B97_SZ = Functional.B97, BasisSet.SZ
+    B97_TZP = Functional.B97, BasisSet.TZP
+    BECKE00_X_ONLY_DZP = Functional.BECKE00_X_ONLY, BasisSet.DZP
+    BECKE00_X_ONLY_SZ = Functional.BECKE00_X_ONLY, BasisSet.SZ
+    BECKE00_X_ONLY_TZP = Functional.BECKE00_X_ONLY, BasisSet.TZP
+    BECKE00_DZP = Functional.BECKE00, BasisSet.DZP
+    BECKE00_SZ = Functional.BECKE00, BasisSet.SZ
+    BECKE00_TZP = Functional.BECKE00, BasisSet.TZP
+    BECKE00X_XC_DZP = Functional.BECKE00X_XC, BasisSet.DZP
+    BECKE00X_XC_SZ = Functional.BECKE00X_XC, BasisSet.SZ
+    BECKE00X_XC_TZP = Functional.BECKE00X_XC, BasisSet.TZP
+    BECKE88X_BR89C_DZP = Functional.BECKE88X_BR89C, BasisSet.DZP
+    BECKE88X_BR89C_SZ = Functional.BECKE88X_BR89C, BasisSet.SZ
+    BECKE88X_BR89C_TZP = Functional.BECKE88X_BR89C, BasisSet.TZP
+    BHANDH_DZP = Functional.BHANDH, BasisSet.DZP
+    BHANDH_SZ = Functional.BHANDH, BasisSet.SZ
+    BHANDH_TZP = Functional.BHANDH, BasisSet.TZP
+    BHANDHLYP_DZP = Functional.BHANDHLYP, BasisSet.DZP
+    BHANDHLYP_SZ = Functional.BHANDHLYP, BasisSet.SZ
+    BHANDHLYP_TZP = Functional.BHANDHLYP, BasisSet.TZP
+    BLAP3_DZP = Functional.BLAP3, BasisSet.DZP
+    BLAP3_SZ = Functional.BLAP3, BasisSet.SZ
+    BLAP3_TZP = Functional.BLAP3, BasisSet.TZP
+    BLYP_D_DZP = Functional.BLYPD, BasisSet.DZP
+    BLYP_D_SZ = Functional.BLYPD, BasisSet.SZ
+    BLYP_D_TZP = Functional.BLYPD, BasisSet.TZP
+    BLYP_DZP = Functional.BLYP, BasisSet.DZP
+    BLYP_SZ = Functional.BLYP, BasisSet.SZ
+    BLYP_TZP = Functional.BLYP, BasisSet.TZP
+    BMTAU1_DZP = Functional.BMTAU1, BasisSet.DZP
+    BMTAU1_SZ = Functional.BMTAU1, BasisSet.SZ
+    BMTAU1_TZP = Functional.BMTAU1, BasisSet.TZP
+    BOP_DZP = Functional.BOP, BasisSet.DZP
+    BOP_SZ = Functional.BOP, BasisSet.SZ
+    BOP_TZP = Functional.BOP, BasisSet.TZP
+    BP_DZP = Functional.BP, BasisSet.DZP
+    BP_SZ = Functional.BP, BasisSet.SZ
+    BP_TZP = Functional.BP, BasisSet.TZP
+    BP86_D_DZP = Functional.BP86_D, BasisSet.DZP
+    BP86_D_SZ = Functional.BP86_D, BasisSet.SZ
+    BP86_D_TZP = Functional.BP86_D, BasisSet.TZP
+    CCSD_T_CBS = Functional.CCSDT, BasisSet.CBS
+    CCSD_T_CC_PVTZ = Functional.CCSDT, BasisSet.CC_PVDZ
+    CCSD_T_CC_PVDZ = Functional.CCSDT, BasisSet.CC_PVDZ
+    CCSD_CC_PVDZ = Functional.CCSD, BasisSet.CC_PVDZ
+
+    DFT3B = Functional.DFT3B, BasisSet.NONE
+    DSD_BLYP_D3_BJ_DEF2_TZVP = Functional.DSD_BLYP_D3_BJ, BasisSet.DEF2_TZVP
+    FT97_DZP = Functional.FT97, BasisSet.DZP
+    FT97_SZ = Functional.FT97, BasisSet.SZ
+    FT97_TZP = Functional.FT97, BasisSet.TZP
+    GFN1_XTB = Functional.GFN1_XTB, BasisSet.NONE
+    GFN2_XTB = Functional.GFN2_XTB, BasisSet.NONE
+    HCTH_120_DZP = Functional.HCTH_120, BasisSet.DZP
+    HCTH_120_SZ = Functional.HCTH_120, BasisSet.SZ
+    HCTH_120_TZP = Functional.HCTH_120, BasisSet.TZP
+    HCTH_147_DZP = Functional.HCTH_147, BasisSet.DZP
+    HCTH_147_SZ = Functional.HCTH_147, BasisSet.SZ
+    HCTH_147_TZP = Functional.HCTH_147, BasisSet.TZP
+    HCTH_407_DZP = Functional.HCTH_407, BasisSet.DZP
+    HCTH_407_SZ = Functional.HCTH_407, BasisSet.SZ
+    HCTH_407_TZP = Functional.HCTH_407, BasisSet.TZP
+    HCTH_93_DZP = Functional.HCTH_93, BasisSet.DZP
+    HCTH_93_SZ = Functional.HCTH_93, BasisSet.SZ
+    HCTH_93_TZP = Functional.HCTH_93, BasisSet.TZP
+    HF_DEF2_TZVP = Functional.HF, BasisSet.DEF2_TZVP
+    HF_CC_PVDZ = (
+        Functional.HF,
+        BasisSet.CC_PVDZ,
+    )
+    HF_CC_PVQZ = (
+        Functional.HF,
+        BasisSet.CC_PVQZ,
+    )
+    HF_CC_PVTZ = (
+        Functional.HF,
+        BasisSet.CC_PVTZ,
+    )
+    KCIS_MODIFIED_DZP = Functional.KCIS_MODIFIED, BasisSet.DZP
+    KCIS_MODIFIED_SZ = Functional.KCIS_MODIFIED, BasisSet.SZ
+    KCIS_MODIFIED_TZP = Functional.KCIS_MODIFIED, BasisSet.TZP
+    KCIS_ORIGINAL_DZP = Functional.KCIS_ORIGINAL, BasisSet.DZP
+    KCIS_ORIGINAL_SZ = Functional.KCIS_ORIGINAL, BasisSet.SZ
+    KCIS_ORIGINAL_TZP = Functional.KCIS_ORIGINAL, BasisSet.TZP
+    KMLYP_VWN5_DZP = Functional.KMLYP_VWN5, BasisSet.DZP
+    KMLYP_VWN5_SZ = Functional.KMLYP_VWN5, BasisSet.SZ
+    KMLYP_VWN5_TZP = Functional.KMLYP_VWN5, BasisSet.TZP
+    KT1_DZP = Functional.KT1, BasisSet.DZP
+    KT1_SZ = Functional.KT1, BasisSet.SZ
+    KT1_TZP = Functional.KT1, BasisSet.TZP
+    KT2_DZP = Functional.KT2, BasisSet.DZP
+    KT2_SZ = Functional.KT2, BasisSet.SZ
+    KT2_TZP = Functional.KT2, BasisSet.TZP
+    LDA_VWN_DZP = Functional.LDA_VWN, BasisSet.DZP
+    LDA_VWN_SZ = Functional.LDA_VWN, BasisSet.SZ
+    LDA_VWN_TZP = Functional.LDA_VWN, BasisSet.TZP
+    M05_2X_DZP = Functional.M05_2X, BasisSet.DZP
+    M05_2X_SZ = Functional.M05_2X, BasisSet.SZ
+    M05_2X_TZP = Functional.M05_2X, BasisSet.TZP
+    M05_DZP = Functional.M05, BasisSet.DZP
+    M05_SZ = Functional.M05, BasisSet.SZ
+    M05_TZP = Functional.M05, BasisSet.TZP
+    M06_2X_DZP = Functional.M06_2X, BasisSet.DZP
+    M06_2X_SZ = Functional.M06_2X, BasisSet.SZ
+    M06_2X_TZP = Functional.M06_2X, BasisSet.TZP
+    M06_L_DZP = Functional.M06_L, BasisSet.DZP
+    M06_L_SZ = Functional.M06_L, BasisSet.SZ
+    M06_L_TZP = Functional.M06_L, BasisSet.TZP
+    M06_DZP = Functional.M06, BasisSet.DZP
+    M06_SZ = Functional.M06, BasisSet.SZ
+    M06_TZP = Functional.M06, BasisSet.TZP
+    MP2_CC_PVDZ = Functional.MP2, BasisSet.CC_PVDZ
+    MP2_CC_PVQZ = Functional.MP2, BasisSet.CC_PVQZ
+    MP2_CC_PVTZ = Functional.MP2, BasisSet.CC_PVTZ
+    MPBE_DZP = Functional.MPBE, BasisSet.DZP
+    MPBE_SZ = Functional.MPBE, BasisSet.SZ
+    MPBE_TZP = Functional.MPBE, BasisSet.TZP
+    MPBE0KCIS_DZP = Functional.MPBE0KCIS, BasisSet.DZP
+    MPBE0KCIS_SZ = Functional.MPBE0KCIS, BasisSet.SZ
+    MPBE0KCIS_TZP = Functional.MPBE0KCIS, BasisSet.TZP
+    MPBE1KCIS_DZP = Functional.MPBE1KCIS, BasisSet.DZP
+    MPBE1KCIS_SZ = Functional.MPBE1KCIS, BasisSet.SZ
+    MPBE1KCIS_TZP = Functional.MPBE1KCIS, BasisSet.TZP
+    MPBEKCIS_DZP = Functional.MPBEKCIS, BasisSet.DZP
+    MPBEKCIS_SZ = Functional.MPBEKCIS, BasisSet.SZ
+    MPBEKCIS_TZP = Functional.MPBEKCIS, BasisSet.TZP
+    MPW_DZP = Functional.MPW, BasisSet.DZP
+    MPW_SZ = Functional.MPW, BasisSet.SZ
+    MPW_TZP = Functional.MPW, BasisSet.TZP
+    MPW1K_DZP = Functional.MPW1K, BasisSet.DZP
+    MPW1K_SZ = Functional.MPW1K, BasisSet.SZ
+    MPW1K_TZP = Functional.MPW1K, BasisSet.TZP
+    MPW1PW_DZP = Functional.MPW1PW, BasisSet.DZP
+    MPW1PW_SZ = Functional.MPW1PW, BasisSet.SZ
+    MPW1PW_TZP = Functional.MPW1PW, BasisSet.TZP
+    MVS_DZP = Functional.MVS, BasisSet.DZP
+    MVS_SZ = Functional.MVS, BasisSet.SZ
+    MVS_TZP = Functional.MVS, BasisSet.TZP
+    MVSX_DZP = Functional.MVSX, BasisSet.DZP
+    MVSX_SZ = Functional.MVSX, BasisSet.SZ
+    MVSX_TZP = Functional.MVSX, BasisSet.TZP
+    O3LYP_VWN5_DZP = Functional.O3LYP_VWN5, BasisSet.DZP
+    O3LYP_VWN5_SZ = Functional.O3LYP_VWN5, BasisSet.SZ
+    O3LYP_VWN5_TZP = Functional.O3LYP_VWN5, BasisSet.TZP
+    OLAP3_DZP = Functional.OLAP3, BasisSet.DZP
+    OLAP3_SZ = Functional.OLAP3, BasisSet.SZ
+    OLAP3_TZP = Functional.OLAP3, BasisSet.TZP
+    OLYP_DZP = Functional.OLYP, BasisSet.DZP
+    OLYP_SZ = Functional.OLYP, BasisSet.SZ
+    OLYP_TZP = Functional.OLYP, BasisSet.TZP
+    OPBE_DZP = Functional.OPBE, BasisSet.DZP
+    OPBE_SZ = Functional.OPBE, BasisSet.SZ
+    OPBE_TZP = Functional.OPBE, BasisSet.TZP
+    OPBE0_DZP = Functional.OPBE0, BasisSet.DZP
+    OPBE0_SZ = Functional.OPBE0, BasisSet.SZ
+    OPBE0_TZP = Functional.OPBE0, BasisSet.TZP
+    OPERDEW_DZP = Functional.OPERDEW, BasisSet.DZP
+    OPERDEW_SZ = Functional.OPERDEW, BasisSet.SZ
+    OPERDEW_TZP = Functional.OPERDEW, BasisSet.TZP
+    PBE_D_DZP = Functional.PBE_D, BasisSet.DZP
+    PBE_D_SZ = Functional.PBE_D, BasisSet.SZ
+    PBE_D_TZP = Functional.PBE_D, BasisSet.TZP
+    PBE_D3_BJ_DEF2_TZVP = Functional.PBE_D3_BJ, BasisSet.DEF2_TZVP
+    PBE_DEF2_TZVP = Functional.PBE, BasisSet.DEF2_TZVP
+    PBE_DZP = Functional.PBE, BasisSet.DZP
+    PBE_SZ = Functional.PBE, BasisSet.SZ
+    PBE_TZP = Functional.PBE, BasisSet.TZP
+    PBE0_DZP = Functional.PBE0, BasisSet.DZP
+    PBE0_DEF2_TZVP = Functional.PBE0, BasisSet.DEF2_TZVP
+    PBE0_SZ = Functional.PBE0, BasisSet.SZ
+    PBE0_TZP = Functional.PBE0, BasisSet.TZP
+    PBE0_MBD_DEF2_TZVPP = Functional.PBE0_MBD, BasisSet.DEF2_TZVPPD
+    PBESOL_DZP = Functional.PBESOL, BasisSet.DZP
+    PBESOL_SZ = Functional.PBESOL, BasisSet.SZ
+    PBESOL_TZP = Functional.PBESOL, BasisSet.TZP
+    PKZB_DZP = Functional.PKZB, BasisSet.DZP
+    PKZB_SZ = Functional.PKZB, BasisSet.SZ
+    PKZB_TZP = Functional.PKZB, BasisSet.TZP
+    PKZBX_KCISCOR_DZP = Functional.PKZBX_KCISCOR, BasisSet.DZP
+    PKZBX_KCISCOR_SZ = Functional.PKZBX_KCISCOR, BasisSet.SZ
+    PKZBX_KCISCOR_TZP = Functional.PKZBX_KCISCOR, BasisSet.TZP
+    PM6 = Functional.PM6, BasisSet.NONE
+    PW91_DZP = Functional.PW91, BasisSet.DZP
+    PW91_SZ = Functional.PW91, BasisSet.SZ
+    PW91_TZP = Functional.PW91, BasisSet.TZP
+    REVPBE_D3_BJ_DEF2_TZVP = Functional.REVPBE_D3_BJ, BasisSet.DEF2_TZVP
+    REVPBE_DZP = Functional.REVPBE, BasisSet.DZP
+    REVPBE_SZ = Functional.REVPBE, BasisSet.SZ
+    REVPBE_TZP = Functional.REVPBE, BasisSet.TZP
+    REVTPSS_DZP = Functional.REVTPSS, BasisSet.DZP
+    REVTPSS_SZ = Functional.REVTPSS, BasisSet.SZ
+    REVTPSS_TZP = Functional.REVTPSS, BasisSet.TZP
+    RGE2_DZP = Functional.RGE2, BasisSet.DZP
+    RGE2_SZ = Functional.RGE2, BasisSet.SZ
+    RGE2_TZP = Functional.RGE2, BasisSet.TZP
+    RPBE_DZP = Functional.RPBE, BasisSet.DZP
+    RPBE_SZ = Functional.RPBE, BasisSet.SZ
+    RPBE_TZP = Functional.RPBE, BasisSet.TZP
+    SSB_D_DZP = Functional.SSB_D, BasisSet.DZP
+    SSB_D_SZ = Functional.SSB_D, BasisSet.SZ
+    SSB_D_TZP = Functional.SSB_D, BasisSet.TZP
+    SVWN_DEF2_TZVP = Functional.SVWN, BasisSet.DEF2_TZVP
+    TMGGA_DZP = Functional.TMGGA, BasisSet.DZP
+    TMGGA_SZ = Functional.TMGGA, BasisSet.SZ
+    TMGGA_TZP = Functional.TMGGA, BasisSet.TZP
+    TAU_HCTH_HYBRID_DZP = Functional.TAU_HCTH_HYBRID, BasisSet.DZP
+    TAU_HCTH_HYBRID_SZ = Functional.TAU_HCTH_HYBRID, BasisSet.SZ
+    TAU_HCTH_HYBRID_TZP = Functional.TAU_HCTH_HYBRID, BasisSet.TZP
+    TAU_HCTH_DZP = Functional.TAU_HCTH, BasisSet.DZP
+    TAU_HCTH_SZ = Functional.TAU_HCTH, BasisSet.SZ
+    TAU_HCTH_TZP = Functional.TAU_HCTH, BasisSet.TZP
+    TCSSD_T_CC_PVDZ = Functional.TCSSD_T, BasisSet.CC_PVDZ
+    TPSSD_DZP = Functional.TPSSD, BasisSet.DZP
+    TPSSD_SZ = Functional.TPSSD, BasisSet.SZ
+    TPSSD_TZP = Functional.TPSSD, BasisSet.TZP
+    TPSS_DZP = Functional.TPSS, BasisSet.DZP
+    TPSS_SZ = Functional.TPSS, BasisSet.SZ
+    TPSS_TZP = Functional.TPSS, BasisSet.TZP
+    TPSSH_DEF2_TZVP = Functional.TPSSH, BasisSet.DEF2_TZVP
+    TPSSH_DZP = Functional.TPSSH, BasisSet.DZP
+    TPSSH_SZ = Functional.TPSSH, BasisSet.SZ
+    TPSSH_TZP = Functional.TPSSH, BasisSet.TZP
+    TTM2_1_F = Functional.TTM2_1_F, BasisSet.NONE
+    VS98_X_XC_DZP = Functional.VS98_X_XC, BasisSet.DZP
+    VS98_X_XC_SZ = Functional.VS98_X_XC, BasisSet.SZ
+    VS98_X_XC_TZP = Functional.VS98_X_XC, BasisSet.TZP
+    VS98_X_ONLY_DZP = Functional.VS98_X_ONLY, BasisSet.DZP
+    VS98_X_ONLY_SZ = Functional.VS98_X_ONLY, BasisSet.SZ
+    VS98_X_ONLY_TZP = Functional.VS98_X_ONLY, BasisSet.TZP
+    VS98_DZP = Functional.VS98, BasisSet.DZP
+    VS98_SZ = Functional.VS98, BasisSet.SZ
+    VS98_TZP = Functional.VS98, BasisSet.TZP
+    WB97M_D3BJ_DEF2_TZVPPD = Functional.WB97M_D3BJ, BasisSet.DEF2_TZVPPD
+    WB97X_D_DEF2_SVP = Functional.WB97X_D, BasisSet.DEF2_SVP
+    WB97X_D3_DEF2_TZVP = Functional.WB97X_D3, BasisSet.DEF2_TZVP
+    WB97X_D3_CC_PVDZ = Functional.WB97X_D3, BasisSet.CC_PVDZ
+    WB97X_6_31G_D = Functional.WB97X, BasisSet.GSTAR
+    WB97X_CC_PVTZ = Functional.WB97X, BasisSet.CC_PVTZ
+    X3LYP_VWN5_DZP = Functional.X3LYP_VWN5, BasisSet.DZP
+    X3LYP_VWN5_SZ = Functional.X3LYP_VWN5, BasisSet.SZ
+    X3LYP_VWN5_TZP = Functional.X3LYP_VWN5, BasisSet.TZP
+    XLYP_DZP = Functional.XLYP, BasisSet.DZP
+    XLYP_SZ = Functional.XLYP, BasisSet.SZ
+    XLYP_TZP = Functional.XLYP, BasisSet.TZP
+    NONE = Functional.NONE, BasisSet.NONE
+
+    def _build_default_dict(self):
+        e0_dict = {}
+        for SYMBOL in ATOM_SYMBOLS:
+            for CHARGE in range(-10, 11):
+                e0_dict[(SYMBOL, CHARGE)] = array([0], dtype=float32)
+        return e0_dict
+
+    @property
+    def atom_energies_dict(self):
+        """Get the atomization energy dictionary"""
+        key = str(self)
+        try:
+            # print(key)
+            energies = atom_energy_collection.get(key, {})
+            if len(energies) == 0:
+                raise
+        except:  # noqa
+            logger.info(f"No available atomization energy for the QM method {key}. All values are set to 0.")
+            energies = self._build_default_dict()
+        return energies
+
+
+ + + +
+ + + + + + + +
+ + + +

+ atom_energies_dict + + + property + + +

+ + +
+ +

Get the atomization energy dictionary

+
+ +
+ + + + + +
+ +
+ +
+ +
+ + + +

+ QmMethod + + +

+ + +
+

+ Bases: Enum

+ + +
+ Source code in openqdc/methods/enums.py +
221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
class QmMethod(Enum):
+    def __init__(self, functional: Functional, basis_set: BasisSet, cost: float = 0):
+        self.functional = functional
+        self.basis_set = basis_set
+        self.cost = cost
+
+    def __str__(self):
+        if self.basis_set != "":
+            s = "/".join([str(self.functional), str(self.basis_set)])
+        else:
+            s = str(self.functional)
+        return s
+
+    @property
+    def atom_energies_matrix(self):
+        """Get the atomization energy matrix"""
+        energies = self.atom_energies_dict
+        mat = to_e_matrix(energies)
+
+        return mat
+
+    @property
+    def atom_energies_dict(self):
+        """Get the atomization energy dictionary"""
+        raise NotImplementedError()
+
+
+ + + +
+ + + + + + + +
+ + + +

+ atom_energies_dict + + + property + + +

+ + +
+ +

Get the atomization energy dictionary

+
+ +
+ +
+ + + +

+ atom_energies_matrix + + + property + + +

+ + +
+ +

Get the atomization energy matrix

+
+ +
+ + + + + +
+ +
+ +
+ + + + +
+ +
+ +

Isolated Atom Energies

+ + +
+ + + + +
+ + + +
+ + + + + + + + + +
+ + +

+ to_e_matrix(atom_energies) + +

+ + +
+ +

Get the matrix of isolated atom energies for a dict of non-null values calculates

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
atom_energies + Dict + +
+

Dict of energies computed for a given QM method. +Keys are pairs of (atom, charge) and values are energy values

+
+
+ required +
+ + +

np.ndarray of shape (MAX_ATOMIC_NUMBER, 2 * MAX_CHARGE + 1)

+ + + + + + + + + + + + + +
TypeDescription
+ ndarray + +
+

Matrix containing the isolated atom energies for each atom and charge written in the form:

+
        |   | -2 | -1 | 0 | +1 | +2 | <- charges
+        |---|----|----|---|----|----|
+        | 0 |    |    |   |    |    |
+        | 1 |    |    |   |    |    |
+        | 2 |    |    |   |    |    |
+
+
+
+ +
+ Source code in openqdc/methods/atom_energies.py +
21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
def to_e_matrix(atom_energies: Dict) -> np.ndarray:
+    """
+    Get the matrix of isolated atom energies for a dict of non-null values calculates
+
+    Parameters:
+        atom_energies: Dict of energies computed for a given QM method.
+            Keys are pairs of (atom, charge) and values are energy values
+
+    Returns: np.ndarray of shape (MAX_ATOMIC_NUMBER, 2 * MAX_CHARGE + 1)
+        Matrix containing the isolated atom energies for each atom and charge written in the form:
+
+                        |   | -2 | -1 | 0 | +1 | +2 | <- charges
+                        |---|----|----|---|----|----|
+                        | 0 |    |    |   |    |    |
+                        | 1 |    |    |   |    |    |
+                        | 2 |    |    |   |    |    |
+    """
+
+    matrix = np.zeros((MAX_ATOMIC_NUMBER, MAX_CHARGE_NUMBER))
+    if len(atom_energies) > 0:
+        for key in atom_energies.keys():
+            try:
+                matrix[ATOMIC_NUMBERS[key[0]], key[1] + MAX_CHARGE] = atom_energies[key]
+            except KeyError:
+                logger.error(f"Isolated atom energies not found for {key}")
+    return matrix
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/properties.html b/0.1.2/API/properties.html new file mode 100644 index 00000000..d6db8038 --- /dev/null +++ b/0.1.2/API/properties.html @@ -0,0 +1,2598 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Available Properties - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Defined properties for datasets

+ + +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ DatasetPropertyMixIn + + +

+ + +
+ + +

Mixin class for BaseDataset class to add +properties that are common to all datasets.

+ +
+ Source code in openqdc/datasets/properties.py +
10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
class DatasetPropertyMixIn:
+    """
+    Mixin class for BaseDataset class to add
+    properties that are common to all datasets.
+    """
+
+    @property
+    def atoms_per_molecules(self):
+        try:
+            if hasattr(self, "_n_atoms"):
+                return self._n_atoms
+            self._n_atoms = self.data["n_atoms"]
+            return self._n_atoms
+        except:  # noqa
+            return None
+
+    @property
+    def _stats(self):
+        return self.__stats__
+
+    def _compute_average_nb_atoms(self):
+        self.__average_nb_atoms__ = np.mean(self.data["n_atoms"])
+
+    @property
+    def average_n_atoms(self) -> int:
+        """
+        Average number of atoms in a molecule in the dataset.
+
+        Returns:
+            Average number of atoms in a molecule in the dataset.
+        """
+        if self.__average_nb_atoms__ is None:
+            raise StatisticsNotAvailableError(self.__name__)
+        return self.__average_nb_atoms__
+
+    @property
+    def numbers(self) -> np.ndarray:
+        """
+        Unique atomic numbers in the dataset
+
+        Returns:
+            Array of the unique atomic numbers in the dataset
+        """
+        if hasattr(self, "_numbers"):
+            return self._numbers
+        self._numbers = pd.unique(self.data["atomic_inputs"][..., 0]).astype(np.int32)
+        return self._numbers
+
+    @property
+    def charges(self) -> np.ndarray:
+        """
+        Unique charges in the dataset
+
+        Returns:
+            Array of the unique charges in the dataset
+        """
+        if hasattr(self, "_charges"):
+            return self._charges
+        self._charges = np.unique(self.data["atomic_inputs"][..., :2], axis=0).astype(np.int32)
+        return self._charges
+
+    @property
+    def min_max_charges(self) -> Tuple[int, int]:
+        """
+        Minimum and maximum charges in the dataset
+
+        Returns:
+            (min_charge, max_charge)
+        """
+        if hasattr(self, "_min_max_charges"):
+            return self._min_max_charges
+        self._min_max_charges = np.min(self.charges[:, 1]), np.max(self.charges[:, 1])
+        return self._min_max_charges
+
+    @property
+    def chemical_species(self) -> np.ndarray:
+        """
+        Chemical symbols in the dataset
+
+        Returns:
+            Array of the chemical symbols in the dataset
+        """
+        return np.array(ATOM_SYMBOLS)[self.numbers]
+
+
+ + + +
+ + + + + + + +
+ + + +

+ average_n_atoms: int + + + property + + +

+ + +
+ +

Average number of atoms in a molecule in the dataset.

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ int + +
+

Average number of atoms in a molecule in the dataset.

+
+
+
+ +
+ +
+ + + +

+ charges: np.ndarray + + + property + + +

+ + +
+ +

Unique charges in the dataset

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ ndarray + +
+

Array of the unique charges in the dataset

+
+
+
+ +
+ +
+ + + +

+ chemical_species: np.ndarray + + + property + + +

+ + +
+ +

Chemical symbols in the dataset

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ ndarray + +
+

Array of the chemical symbols in the dataset

+
+
+
+ +
+ +
+ + + +

+ min_max_charges: Tuple[int, int] + + + property + + +

+ + +
+ +

Minimum and maximum charges in the dataset

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Tuple[int, int] + +
+

(min_charge, max_charge)

+
+
+
+ +
+ +
+ + + +

+ numbers: np.ndarray + + + property + + +

+ + +
+ +

Unique atomic numbers in the dataset

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ ndarray + +
+

Array of the unique atomic numbers in the dataset

+
+
+
+ +
+ + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/regressor.html b/0.1.2/API/regressor.html new file mode 100644 index 00000000..e43c5126 --- /dev/null +++ b/0.1.2/API/regressor.html @@ -0,0 +1,3521 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Normalization regressor - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Normalization regressor

+ +
+ + + + +
+ +

Linear Atom Energies regression utilities.

+ + + +
+ + + + + + + + +
+ + + +

+ LinearSolver + + +

+ + +
+

+ Bases: Solver

+ + +

Linear regression solver.

+ + +
+ Note +

No Uncertainty associated as it is quite small.

+
+
+ Source code in openqdc/utils/regressor.py +
216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
class LinearSolver(Solver):
+    """
+    Linear regression solver.
+
+    Note:
+        No Uncertainty associated as it is quite small.
+    """
+
+    _regr_str = "linear"
+
+    @staticmethod
+    def solve(X, y):
+        X, y, y_mean = atom_standardization(X, y)
+        E0s = np.linalg.lstsq(X, y, rcond=None)[0]
+        return E0s, None
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ Regressor + + +

+ + +
+ + +

Regressor class for preparing and solving regression problem for isolated atom energies. +A isolated atom energy regression problem is defined as:

+

X = [n_samples, n_species] (number of atoms of each species per sample)

+

Y = [n_samples, ] (energies)

+

The regression problem is solved by solving the linear system X E0 = Y.

+ + +
+ Example +

For a sytem of 2 samples (H20, CH4)

+
n_species = 3, n_samples = 2
+
+H20 = 2H , 1O -> X = [2, 1, 0]
+
+CH4 = 4C, 1H -> X = [1, 0, 4]
+
+X = [[2, 1, 0],
+    [ 1, 0, 4]]
+
+Y = [[10, 20]]
+
+X E0 = Y
+
+

Linear system to solve

+
[[2 eH, 1 eO, 0 eC],
+[ 1 eH, 0 eO, 4 eC]] = [[10, 20]]
+
+
+
+ Source code in openqdc/utils/regressor.py +
 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
class Regressor:
+    """
+    Regressor class for preparing and solving regression problem for isolated atom energies.
+    A isolated atom energy regression problem is defined as:\n
+    X = [n_samples, n_species] (number of atoms of each species per sample)\n
+    Y = [n_samples, ] (energies)\n
+    The regression problem is solved by solving the linear system X E0 = Y.
+
+    Example:
+        For a sytem of 2 samples (H20, CH4)\n
+            n_species = 3, n_samples = 2\n
+            H20 = 2H , 1O -> X = [2, 1, 0]\n
+            CH4 = 4C, 1H -> X = [1, 0, 4]\n
+            X = [[2, 1, 0],
+                [ 1, 0, 4]]\n
+            Y = [[10, 20]]\n
+            X E0 = Y\n
+        Linear system to solve\n
+            [[2 eH, 1 eO, 0 eC],
+            [ 1 eH, 0 eO, 4 eC]] = [[10, 20]]
+    """
+
+    solver: Solver
+
+    def __init__(
+        self,
+        energies: np.ndarray,
+        atomic_numbers: np.ndarray,
+        position_idx_range: np.ndarray,
+        solver_type: str = "linear",
+        stride: int = 1,
+        subsample: Optional[Union[float, int]] = None,
+        remove_nan: bool = True,
+        *args: any,
+        **kwargs: any,
+    ):
+        """
+        Regressor class for preparing and solving regression problem for isolated atom energies.
+
+        Parameters:
+            energies:
+                numpy array of energies in the shape (n_samples, n_energy_methods)
+            atomic_numbers:
+                numpy array of atomic numbers in the shape (n_atoms,)
+            position_idx_range:
+                array of shape (n_samples, 2) containing the start and end indices of the atoms in the dataset
+            solver_type: Type of solver to use. ["linear", "ridge"]
+            stride: Stride to use for the regression.
+            subsample: Sumsample the dataset.
+                If a float, it is interpreted as a fraction of the dataset to use.
+                If >1 it is interpreted as the number of samples to use.
+            remove_nan: Sanitize the dataset by removing energies samples with NaN values.
+            *args: Additional arguments to be passed to the regressor.
+            **kwargs: Additional keyword arguments to be passed to the regressor.
+        """
+        self.subsample = subsample
+        self.stride = stride
+        self.solver_type = solver_type.lower()
+        self.energies = energies
+        self.atomic_numbers = atomic_numbers
+        self.numbers = pd.unique(atomic_numbers)
+        self.position_idx_range = position_idx_range
+        self.remove_nan = remove_nan
+        self.hparams = {
+            "subsample": subsample,
+            "stride": stride,
+            "solver_type": solver_type,
+        }
+        self._post_init()
+
+    @classmethod
+    def from_openqdc_dataset(cls, dataset: any, *args: any, **kwargs: any) -> "Regressor":
+        """
+        Initialize the regressor object from an openqdc dataset. This is the default method.
+        *args and and **kwargs are passed to the __init__ method and depends on the specific regressor.
+
+        Parameters:
+            dataset: openqdc dataset object.
+            *args: Additional arguments to be passed to the regressor.
+            **kwargs: Additional keyword arguments to be passed to the regressor.
+
+        Returns:
+            Instance of the regressor class.
+        """
+        energies = dataset.data["energies"]
+        position_idx_range = dataset.data["position_idx_range"]
+        atomic_numbers = dataset.data["atomic_inputs"][:, 0].astype("int32")
+        return cls(energies, atomic_numbers, position_idx_range, *args, **kwargs)
+
+    def _post_init(self):
+        if self.subsample is not None:
+            self._downsample()
+        self._prepare_inputs()
+        self.solver = self._get_solver()
+
+    def update_hparams(self, hparams):
+        self.hparams.update(hparams)
+
+    def _downsample(self):
+        if self.subsample < 1:
+            idxs = np.arange(self.energies.shape[0])
+            np.random.shuffle(idxs)
+            idxs = idxs[: int(self.energies.shape[0] * self.subsample)]
+            self.energies = self.energies[:: int(1 / self.subsample)]
+            self.position_idx_range = self.position_idx_range[:: int(1 / self.subsample)]
+        else:
+            idxs = np.random.randint(0, self.energies.shape[0], int(self.subsample))
+            self.energies = self.energies[idxs]
+            self.position_idx_range = self.position_idx_range[idxs]
+        self.update_hparams({"idxs": idxs})
+
+    def _get_solver(self):
+        try:
+            return AVAILABLE_SOLVERS[self.solver_type]()
+        except KeyError:
+            logger.warning(f"Unknown solver type {self.solver_type}, defaulting to linear regression.")
+            return LinearSolver()
+
+    def _prepare_inputs(self) -> Tuple[np.ndarray, np.ndarray]:
+        logger.info("Preparing inputs for regression.")
+        len_train = self.energies.shape[0]
+        len_zs = len(self.numbers)
+        A = np.zeros((len_train, len_zs))[:: self.stride]
+        B = self.energies[:: self.stride]
+        for i, ij in enumerate(self.position_idx_range[:: self.stride]):
+            tmp = self.atomic_numbers[ij[0] : ij[1]]
+            for j, z in enumerate(self.numbers):
+                A[i, j] = np.count_nonzero(tmp == z)
+        self.X = A
+        self.y = B
+
+    def solve(self):
+        """
+        Solve the regression problem and return the predicted isolated energies and the estimated uncertainty.
+        """
+        logger.info(f"Solving regression with {self.solver}.")
+        E0_list, cov_list = [], []
+        for energy_idx in range(self.y.shape[1]):
+            if self.remove_nan:
+                idxs = non_nan_idxs(self.y[:, energy_idx])
+                X, y = self.X[idxs], self.y[idxs, energy_idx]
+            else:
+                X, y = self.X, self.y[:, energy_idx]
+            E0s, cov = self.solver(X, y)
+            if cov is None:
+                cov = np.zeros_like(E0s) + 1.0
+            E0_list.append(E0s)
+            cov_list.append(cov)
+        return np.vstack(E0_list).T, np.vstack(cov_list).T
+
+    def __call__(self):
+        return self.solve()
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ __init__(energies, atomic_numbers, position_idx_range, solver_type='linear', stride=1, subsample=None, remove_nan=True, *args, **kwargs) + +

+ + +
+ +

Regressor class for preparing and solving regression problem for isolated atom energies.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
energies + ndarray + +
+

numpy array of energies in the shape (n_samples, n_energy_methods)

+
+
+ required +
atomic_numbers + ndarray + +
+

numpy array of atomic numbers in the shape (n_atoms,)

+
+
+ required +
position_idx_range + ndarray + +
+

array of shape (n_samples, 2) containing the start and end indices of the atoms in the dataset

+
+
+ required +
solver_type + str + +
+

Type of solver to use. ["linear", "ridge"]

+
+
+ 'linear' +
stride + int + +
+

Stride to use for the regression.

+
+
+ 1 +
subsample + Optional[Union[float, int]] + +
+

Sumsample the dataset. +If a float, it is interpreted as a fraction of the dataset to use. +If >1 it is interpreted as the number of samples to use.

+
+
+ None +
remove_nan + bool + +
+

Sanitize the dataset by removing energies samples with NaN values.

+
+
+ True +
*args + any + +
+

Additional arguments to be passed to the regressor.

+
+
+ () +
**kwargs + any + +
+

Additional keyword arguments to be passed to the regressor.

+
+
+ {} +
+ +
+ Source code in openqdc/utils/regressor.py +
 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
def __init__(
+    self,
+    energies: np.ndarray,
+    atomic_numbers: np.ndarray,
+    position_idx_range: np.ndarray,
+    solver_type: str = "linear",
+    stride: int = 1,
+    subsample: Optional[Union[float, int]] = None,
+    remove_nan: bool = True,
+    *args: any,
+    **kwargs: any,
+):
+    """
+    Regressor class for preparing and solving regression problem for isolated atom energies.
+
+    Parameters:
+        energies:
+            numpy array of energies in the shape (n_samples, n_energy_methods)
+        atomic_numbers:
+            numpy array of atomic numbers in the shape (n_atoms,)
+        position_idx_range:
+            array of shape (n_samples, 2) containing the start and end indices of the atoms in the dataset
+        solver_type: Type of solver to use. ["linear", "ridge"]
+        stride: Stride to use for the regression.
+        subsample: Sumsample the dataset.
+            If a float, it is interpreted as a fraction of the dataset to use.
+            If >1 it is interpreted as the number of samples to use.
+        remove_nan: Sanitize the dataset by removing energies samples with NaN values.
+        *args: Additional arguments to be passed to the regressor.
+        **kwargs: Additional keyword arguments to be passed to the regressor.
+    """
+    self.subsample = subsample
+    self.stride = stride
+    self.solver_type = solver_type.lower()
+    self.energies = energies
+    self.atomic_numbers = atomic_numbers
+    self.numbers = pd.unique(atomic_numbers)
+    self.position_idx_range = position_idx_range
+    self.remove_nan = remove_nan
+    self.hparams = {
+        "subsample": subsample,
+        "stride": stride,
+        "solver_type": solver_type,
+    }
+    self._post_init()
+
+
+
+ +
+ +
+ + +

+ from_openqdc_dataset(dataset, *args, **kwargs) + + + classmethod + + +

+ + +
+ +

Initialize the regressor object from an openqdc dataset. This is the default method. +args and and *kwargs are passed to the init method and depends on the specific regressor.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
dataset + any + +
+

openqdc dataset object.

+
+
+ required +
*args + any + +
+

Additional arguments to be passed to the regressor.

+
+
+ () +
**kwargs + any + +
+

Additional keyword arguments to be passed to the regressor.

+
+
+ {} +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Regressor + +
+

Instance of the regressor class.

+
+
+ +
+ Source code in openqdc/utils/regressor.py +
119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
@classmethod
+def from_openqdc_dataset(cls, dataset: any, *args: any, **kwargs: any) -> "Regressor":
+    """
+    Initialize the regressor object from an openqdc dataset. This is the default method.
+    *args and and **kwargs are passed to the __init__ method and depends on the specific regressor.
+
+    Parameters:
+        dataset: openqdc dataset object.
+        *args: Additional arguments to be passed to the regressor.
+        **kwargs: Additional keyword arguments to be passed to the regressor.
+
+    Returns:
+        Instance of the regressor class.
+    """
+    energies = dataset.data["energies"]
+    position_idx_range = dataset.data["position_idx_range"]
+    atomic_numbers = dataset.data["atomic_inputs"][:, 0].astype("int32")
+    return cls(energies, atomic_numbers, position_idx_range, *args, **kwargs)
+
+
+
+ +
+ +
+ + +

+ solve() + +

+ + +
+ +

Solve the regression problem and return the predicted isolated energies and the estimated uncertainty.

+ +
+ Source code in openqdc/utils/regressor.py +
180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
def solve(self):
+    """
+    Solve the regression problem and return the predicted isolated energies and the estimated uncertainty.
+    """
+    logger.info(f"Solving regression with {self.solver}.")
+    E0_list, cov_list = [], []
+    for energy_idx in range(self.y.shape[1]):
+        if self.remove_nan:
+            idxs = non_nan_idxs(self.y[:, energy_idx])
+            X, y = self.X[idxs], self.y[idxs, energy_idx]
+        else:
+            X, y = self.X, self.y[:, energy_idx]
+        E0s, cov = self.solver(X, y)
+        if cov is None:
+            cov = np.zeros_like(E0s) + 1.0
+        E0_list.append(E0s)
+        cov_list.append(cov)
+    return np.vstack(E0_list).T, np.vstack(cov_list).T
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ RidgeSolver + + +

+ + +
+

+ Bases: Solver

+ + +

Ridge regression solver.

+ +
+ Source code in openqdc/utils/regressor.py +
233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
class RidgeSolver(Solver):
+    """
+    Ridge regression solver.
+    """
+
+    _regr_str = "ridge"
+
+    @staticmethod
+    def solve(X, y):
+        X, y, y_mean = atom_standardization(X, y)
+        A = X.T @ X
+        dy = y - (np.sum(X, axis=1, keepdims=True) * y_mean).reshape(y.shape)
+        Xy = X.T @ dy
+        mean = np.linalg.solve(A, Xy)
+        sigma2 = np.var(X @ mean - dy)
+        Ainv = np.linalg.inv(A)
+        cov = np.sqrt(sigma2 * np.einsum("ij,kj,kl,li->i", Ainv, X, X, Ainv))
+        mean = mean + y_mean.reshape([-1])
+        return mean, cov
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ Solver + + +

+ + +
+

+ Bases: ABC

+ + +

Abstract class for regression solvers.

+ +
+ Source code in openqdc/utils/regressor.py +
18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
class Solver(ABC):
+    """Abstract class for regression solvers."""
+
+    _regr_str: str
+
+    @staticmethod
+    @abstractmethod
+    def solve(X: np.ndarray, Y: np.ndarray) -> Tuple[np.ndarray, Optional[np.ndarray]]:
+        """
+        Main method to solve the regression problem.
+        Must be implemented in all the subclasses.
+
+        Parameters:
+            X: Input features of shape (n_samples, n_species)
+            Y: Target values of shape (n_samples,) (energy values for the regression)
+
+        Returns:
+            Tuple of predicted values and the estimated uncertainty.
+        """
+        pass
+
+    def __call__(self, X, Y):
+        return self.solve(X, Y)
+
+    def __str__(self):
+        return self._regr_str
+
+    def __repr__(self):
+        return str(self)
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ solve(X, Y) + + + abstractmethod + staticmethod + + +

+ + +
+ +

Main method to solve the regression problem. +Must be implemented in all the subclasses.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
X + ndarray + +
+

Input features of shape (n_samples, n_species)

+
+
+ required +
Y + ndarray + +
+

Target values of shape (n_samples,) (energy values for the regression)

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Tuple[ndarray, Optional[ndarray]] + +
+

Tuple of predicted values and the estimated uncertainty.

+
+
+ +
+ Source code in openqdc/utils/regressor.py +
23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
@staticmethod
+@abstractmethod
+def solve(X: np.ndarray, Y: np.ndarray) -> Tuple[np.ndarray, Optional[np.ndarray]]:
+    """
+    Main method to solve the regression problem.
+    Must be implemented in all the subclasses.
+
+    Parameters:
+        X: Input features of shape (n_samples, n_species)
+        Y: Target values of shape (n_samples,) (energy values for the regression)
+
+    Returns:
+        Tuple of predicted values and the estimated uncertainty.
+    """
+    pass
+
+
+
+ +
+ + + +
+ +
+ +
+ + +
+ + +

+ atom_standardization(X, y) + +

+ + +
+ +

Standardize the energies and the atom counts. +This will make the calculated uncertainty more +meaningful.

+ +
+ Source code in openqdc/utils/regressor.py +
203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
def atom_standardization(X, y):
+    """
+    Standardize the energies and the atom counts.
+    This will make the calculated uncertainty more
+    meaningful.
+    """
+    X_norm = X.sum()
+    X = X / X_norm
+    y = y / X_norm
+    y_mean = y.sum() / X.sum()
+    return X, y, y_mean
+
+
+
+ +
+ +
+ + +

+ non_nan_idxs(array) + +

+ + +
+ +

Return non nan indices of an array.

+ +
+ Source code in openqdc/utils/regressor.py +
11
+12
+13
+14
+15
def non_nan_idxs(array):
+    """
+    Return non nan indices of an array.
+    """
+    return np.where(~np.isnan(array))[0]
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/statistics.html b/0.1.2/API/statistics.html new file mode 100644 index 00000000..7ad58f91 --- /dev/null +++ b/0.1.2/API/statistics.html @@ -0,0 +1,4982 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Statistics - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + + + + + +
+
+ + + + + + + +

Statistics

+ +
+ + + + +
+ + + +
+ + + + + + + + +
+ + + +

+ AbstractStatsCalculator + + +

+ + +
+

+ Bases: ABC

+ + +

Abstract class that defines the interface for all +the calculators object and the methods to +compute the statistics.

+ +
+ Source code in openqdc/datasets/statistics.py +
159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
class AbstractStatsCalculator(ABC):
+    """
+    Abstract class that defines the interface for all
+    the calculators object and the methods to
+    compute the statistics.
+    """
+
+    # State Dependencies of the calculator to skip part of the calculation
+    state_dependency = []
+    name = None
+
+    def __init__(
+        self,
+        name: str,
+        energy_type: Optional[str] = None,
+        force_recompute: bool = False,
+        energies: Optional[np.ndarray] = None,
+        n_atoms: Optional[np.ndarray] = None,
+        atom_species: Optional[np.ndarray] = None,
+        position_idx_range: Optional[np.ndarray] = None,
+        e0_matrix: Optional[np.ndarray] = None,
+        atom_charges: Optional[np.ndarray] = None,
+        forces: Optional[np.ndarray] = None,
+    ):
+        """
+        Parameters:
+            name :
+                Name of the dataset for saving and loading.
+            energy_type :
+                Type of the energy for the computation of the statistics. Used for loading and saving.
+            force_recompute :
+                Flag to force the recomputation of the statistics
+            energies : n
+                Energies of the dataset
+            n_atoms :
+                Number of atoms in the dataset
+            atom_species :
+                Atomic species of the dataset
+            position_idx_range : n
+                Position index range of the dataset
+            e0_matrix :
+                Isolated atom energies matrix of the dataset
+            atom_charges :
+                Atomic charges of the dataset
+            forces :
+                Forces of the dataset
+        """
+        self.name = name
+        self.energy_type = energy_type
+        self.force_recompute = force_recompute
+        self.energies = energies
+        self.forces = forces
+        self.position_idx_range = position_idx_range
+        self.e0_matrix = e0_matrix
+        self.n_atoms = n_atoms
+        self.atom_species_charges_tuple = (atom_species, atom_charges)
+        self._root = p_join(get_local_cache(), self.name)
+        if atom_species is not None and atom_charges is not None:
+            # by value not reference
+            self.atom_species_charges_tuple = np.concatenate((atom_species[:, None], atom_charges[:, None]), axis=-1)
+
+    @property
+    def has_forces(self) -> bool:
+        return self.forces is not None
+
+    @property
+    def preprocess_path(self):
+        path = p_join(self.root, "statistics", self.name + f"_{str(self)}" + ".pkl")
+        return path
+
+    @property
+    def root(self):
+        """
+        Path to the dataset folder
+        """
+        return self._root
+
+    @classmethod
+    def from_openqdc_dataset(cls, dataset, recompute: bool = False):
+        """
+        Create a calculator object from a dataset object.
+        """
+        obj = cls(
+            name=dataset.__name__,
+            force_recompute=recompute,
+            energy_type=dataset.energy_type,
+            energies=dataset.data["energies"],
+            forces=dataset.data["forces"] if "forces" in dataset.data else None,
+            n_atoms=dataset.data["n_atoms"],
+            position_idx_range=dataset.data["position_idx_range"],
+            atom_species=dataset.data["atomic_inputs"][:, 0].ravel(),
+            atom_charges=dataset.data["atomic_inputs"][:, 1].ravel(),
+            e0_matrix=dataset.__isolated_atom_energies__,
+        )
+        obj._root = dataset.root  # set to the dataset root in case of multiple datasets
+        return obj
+
+    @abstractmethod
+    def compute(self) -> StatisticsResults:
+        """
+        Abstract method to compute the statistics.
+        Must return a StatisticsResults object and be implemented
+        in all the childs
+        """
+        raise NotImplementedError
+
+    def save_statistics(self) -> None:
+        """
+        Save statistics file to the dataset folder as a pkl file
+        """
+        save_pkl(self.result, self.preprocess_path)
+
+    def attempt_load(self) -> bool:
+        """
+        Load precomputed statistics file and return the success of the operation
+        """
+        try:
+            self.result = load_pkl(self.preprocess_path)
+            logger.info(f"Statistics for {str(self)} loaded successfully")
+            return True
+        except FileNotFoundError:
+            logger.warning(f"Statistics for {str(self)} not found. Computing...")
+            return False
+
+    def _setup_deps(self, state: Dict) -> None:
+        """
+        Check if the dependencies of calculators are satisfied
+        from the state object and set the attributes of the calculator
+        to skip part of the calculation
+        """
+        self.state = state
+        self.deps_satisfied = all([dep in state for dep in self.state_dependency])
+        if self.deps_satisfied:
+            for dep in self.state_dependency:
+                setattr(self, dep, state[dep])
+
+    def write_state(self, update: Dict) -> None:
+        """
+        Write/update the state dictionary with the update dictionary
+
+        update:
+            dictionary containing the update to the state
+        """
+        self.state.update(update)
+
+    def run(self, state: Dict) -> None:
+        """
+        Main method to run the calculator.
+        Setup the dependencies from the state dictionary
+        Check if the statistics are already computed and load them or
+        recompute them
+        Save the statistics in the correct folder
+
+        state:
+            dictionary containing the state of the calculator
+        """
+        self._setup_deps(state)
+        if self.force_recompute or not self.attempt_load():
+            self.result = self.compute()
+            self.save_statistics()
+
+    def __str__(self) -> str:
+        return self.__class__.__name__.lower()
+
+
+ + + +
+ + + + + + + +
+ + + +

+ root + + + property + + +

+ + +
+ +

Path to the dataset folder

+
+ +
+ + + +
+ + +

+ __init__(name, energy_type=None, force_recompute=False, energies=None, n_atoms=None, atom_species=None, position_idx_range=None, e0_matrix=None, atom_charges=None, forces=None) + +

+ + +
+ + + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
name + +
+

Name of the dataset for saving and loading.

+
+
+ required +
energy_type + +
+

Type of the energy for the computation of the statistics. Used for loading and saving.

+
+
+ None +
force_recompute + +
+

Flag to force the recomputation of the statistics

+
+
+ False +
energies + +
+

n +Energies of the dataset

+
+
+ None +
n_atoms + +
+

Number of atoms in the dataset

+
+
+ None +
atom_species + +
+

Atomic species of the dataset

+
+
+ None +
position_idx_range + +
+

n +Position index range of the dataset

+
+
+ None +
e0_matrix + +
+

Isolated atom energies matrix of the dataset

+
+
+ None +
atom_charges + +
+

Atomic charges of the dataset

+
+
+ None +
forces + +
+

Forces of the dataset

+
+
+ None +
+ +
+ Source code in openqdc/datasets/statistics.py +
170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
def __init__(
+    self,
+    name: str,
+    energy_type: Optional[str] = None,
+    force_recompute: bool = False,
+    energies: Optional[np.ndarray] = None,
+    n_atoms: Optional[np.ndarray] = None,
+    atom_species: Optional[np.ndarray] = None,
+    position_idx_range: Optional[np.ndarray] = None,
+    e0_matrix: Optional[np.ndarray] = None,
+    atom_charges: Optional[np.ndarray] = None,
+    forces: Optional[np.ndarray] = None,
+):
+    """
+    Parameters:
+        name :
+            Name of the dataset for saving and loading.
+        energy_type :
+            Type of the energy for the computation of the statistics. Used for loading and saving.
+        force_recompute :
+            Flag to force the recomputation of the statistics
+        energies : n
+            Energies of the dataset
+        n_atoms :
+            Number of atoms in the dataset
+        atom_species :
+            Atomic species of the dataset
+        position_idx_range : n
+            Position index range of the dataset
+        e0_matrix :
+            Isolated atom energies matrix of the dataset
+        atom_charges :
+            Atomic charges of the dataset
+        forces :
+            Forces of the dataset
+    """
+    self.name = name
+    self.energy_type = energy_type
+    self.force_recompute = force_recompute
+    self.energies = energies
+    self.forces = forces
+    self.position_idx_range = position_idx_range
+    self.e0_matrix = e0_matrix
+    self.n_atoms = n_atoms
+    self.atom_species_charges_tuple = (atom_species, atom_charges)
+    self._root = p_join(get_local_cache(), self.name)
+    if atom_species is not None and atom_charges is not None:
+        # by value not reference
+        self.atom_species_charges_tuple = np.concatenate((atom_species[:, None], atom_charges[:, None]), axis=-1)
+
+
+
+ +
+ +
+ + +

+ attempt_load() + +

+ + +
+ +

Load precomputed statistics file and return the success of the operation

+ +
+ Source code in openqdc/datasets/statistics.py +
271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
def attempt_load(self) -> bool:
+    """
+    Load precomputed statistics file and return the success of the operation
+    """
+    try:
+        self.result = load_pkl(self.preprocess_path)
+        logger.info(f"Statistics for {str(self)} loaded successfully")
+        return True
+    except FileNotFoundError:
+        logger.warning(f"Statistics for {str(self)} not found. Computing...")
+        return False
+
+
+
+ +
+ +
+ + +

+ compute() + + + abstractmethod + + +

+ + +
+ +

Abstract method to compute the statistics. +Must return a StatisticsResults object and be implemented +in all the childs

+ +
+ Source code in openqdc/datasets/statistics.py +
256
+257
+258
+259
+260
+261
+262
+263
@abstractmethod
+def compute(self) -> StatisticsResults:
+    """
+    Abstract method to compute the statistics.
+    Must return a StatisticsResults object and be implemented
+    in all the childs
+    """
+    raise NotImplementedError
+
+
+
+ +
+ +
+ + +

+ from_openqdc_dataset(dataset, recompute=False) + + + classmethod + + +

+ + +
+ +

Create a calculator object from a dataset object.

+ +
+ Source code in openqdc/datasets/statistics.py +
236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
@classmethod
+def from_openqdc_dataset(cls, dataset, recompute: bool = False):
+    """
+    Create a calculator object from a dataset object.
+    """
+    obj = cls(
+        name=dataset.__name__,
+        force_recompute=recompute,
+        energy_type=dataset.energy_type,
+        energies=dataset.data["energies"],
+        forces=dataset.data["forces"] if "forces" in dataset.data else None,
+        n_atoms=dataset.data["n_atoms"],
+        position_idx_range=dataset.data["position_idx_range"],
+        atom_species=dataset.data["atomic_inputs"][:, 0].ravel(),
+        atom_charges=dataset.data["atomic_inputs"][:, 1].ravel(),
+        e0_matrix=dataset.__isolated_atom_energies__,
+    )
+    obj._root = dataset.root  # set to the dataset root in case of multiple datasets
+    return obj
+
+
+
+ +
+ +
+ + +

+ run(state) + +

+ + +
+ +

Main method to run the calculator. +Setup the dependencies from the state dictionary +Check if the statistics are already computed and load them or +recompute them +Save the statistics in the correct folder

+ + +
+ state +

dictionary containing the state of the calculator

+
+
+ Source code in openqdc/datasets/statistics.py +
304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
def run(self, state: Dict) -> None:
+    """
+    Main method to run the calculator.
+    Setup the dependencies from the state dictionary
+    Check if the statistics are already computed and load them or
+    recompute them
+    Save the statistics in the correct folder
+
+    state:
+        dictionary containing the state of the calculator
+    """
+    self._setup_deps(state)
+    if self.force_recompute or not self.attempt_load():
+        self.result = self.compute()
+        self.save_statistics()
+
+
+
+ +
+ +
+ + +

+ save_statistics() + +

+ + +
+ +

Save statistics file to the dataset folder as a pkl file

+ +
+ Source code in openqdc/datasets/statistics.py +
265
+266
+267
+268
+269
def save_statistics(self) -> None:
+    """
+    Save statistics file to the dataset folder as a pkl file
+    """
+    save_pkl(self.result, self.preprocess_path)
+
+
+
+ +
+ +
+ + +

+ write_state(update) + +

+ + +
+ +

Write/update the state dictionary with the update dictionary

+ + +
+ update +

dictionary containing the update to the state

+
+
+ Source code in openqdc/datasets/statistics.py +
295
+296
+297
+298
+299
+300
+301
+302
def write_state(self, update: Dict) -> None:
+    """
+    Write/update the state dictionary with the update dictionary
+
+    update:
+        dictionary containing the update to the state
+    """
+    self.state.update(update)
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ EnergyStatistics + + + + dataclass + + +

+ + +
+

+ Bases: StatisticsResults

+ + +

Dataclass for energy related statistics

+ +
+ Source code in openqdc/datasets/statistics.py +
41
+42
+43
+44
+45
+46
+47
+48
@dataclass
+class EnergyStatistics(StatisticsResults):
+    """
+    Dataclass for energy related statistics
+    """
+
+    mean: Optional[np.ndarray]
+    std: Optional[np.ndarray]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ ForceStatistics + + + + dataclass + + +

+ + +
+

+ Bases: StatisticsResults

+ + +

Dataclass for force statistics

+ +
+ Source code in openqdc/datasets/statistics.py +
51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
@dataclass
+class ForceStatistics(StatisticsResults):
+    """
+    Dataclass for force statistics
+    """
+
+    mean: Optional[np.ndarray]
+    std: Optional[np.ndarray]
+    component_mean: Optional[np.ndarray]
+    component_std: Optional[np.ndarray]
+    component_rms: Optional[np.ndarray]
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ ForcesCalculatorStats + + +

+ + +
+

+ Bases: AbstractStatsCalculator

+ + +

Forces statistics calculator class

+ +
+ Source code in openqdc/datasets/statistics.py +
324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
class ForcesCalculatorStats(AbstractStatsCalculator):
+    """
+    Forces statistics calculator class
+    """
+
+    def compute(self) -> ForceStatistics:
+        if not self.has_forces:
+            return ForceStatistics(mean=None, std=None, component_mean=None, component_std=None, component_rms=None)
+        converted_force_data = self.forces
+        num_methods = converted_force_data.shape[2]
+        mean = np.nanmean(converted_force_data.reshape(-1, num_methods), axis=0)
+        std = np.nanstd(converted_force_data.reshape(-1, num_methods), axis=0)
+        component_mean = np.nanmean(converted_force_data, axis=0)
+        component_std = np.nanstd(converted_force_data, axis=0)
+        component_rms = np.sqrt(np.nanmean(converted_force_data**2, axis=0))
+        return ForceStatistics(
+            mean=np.atleast_2d(mean),
+            std=np.atleast_2d(std),
+            component_mean=np.atleast_2d(component_mean),
+            component_std=np.atleast_2d(component_std),
+            component_rms=np.atleast_2d(component_rms),
+        )
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ FormationEnergyInterface + + +

+ + +
+

+ Bases: AbstractStatsCalculator, ABC

+ + +

Formation Energy interface calculator class. +Define the use of the dependency formation_energy in the +compute method

+ +
+ Source code in openqdc/datasets/statistics.py +
360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
class FormationEnergyInterface(AbstractStatsCalculator, ABC):
+    """
+    Formation Energy interface calculator class.
+    Define the use of the dependency formation_energy in the
+    compute method
+    """
+
+    state_dependency = ["formation_energy"]
+
+    def compute(self) -> EnergyStatistics:
+        # if the state has not the dependency satisfied
+        if not self.deps_satisfied:
+            # run the main computation
+            from openqdc.utils.constants import MAX_CHARGE
+
+            splits_idx = self.position_idx_range[:, 1]
+            s = np.array(self.atom_species_charges_tuple, dtype=int)
+            s[:, 1] += MAX_CHARGE
+            matrixs = [matrix[s[:, 0], s[:, 1]] for matrix in self.e0_matrix]
+            converted_energy_data = self.energies
+            E = []
+            for i, matrix in enumerate(matrixs):
+                c = np.cumsum(np.append([0], matrix))[splits_idx]
+                c[1:] = c[1:] - c[:-1]
+                E.append(converted_energy_data[:, i] - c)
+        else:
+            # if the dependency is satisfied get the dependency
+            E = getattr(self, self.state_dependency[0])
+        self.write_state({self.state_dependency[0]: E})
+        E = np.array(E).T
+        return self._compute(E)
+
+    @abstractmethod
+    def _compute(self, energy) -> EnergyStatistics:
+        raise NotImplementedError
+
+    def __str__(self) -> str:
+        # override the __str__ method to add the energy type to the name
+        # to differentiate between formation and regression type
+        return f"{self.__class__.__name__.lower()}_{self.energy_type.lower()}"
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ FormationEnergyStats + + +

+ + +
+

+ Bases: FormationEnergyInterface

+ + +

Formation Energy calculator class.

+ +
+ Source code in openqdc/datasets/statistics.py +
402
+403
+404
+405
+406
+407
+408
+409
+410
class FormationEnergyStats(FormationEnergyInterface):
+    """
+    Formation Energy  calculator class.
+    """
+
+    def _compute(self, energy) -> EnergyStatistics:
+        formation_E_mean = np.nanmean(energy, axis=0)
+        formation_E_std = np.nanstd(energy, axis=0)
+        return EnergyStatistics(mean=np.atleast_2d(formation_E_mean), std=np.atleast_2d(formation_E_std))
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ PerAtomFormationEnergyStats + + +

+ + +
+

+ Bases: FormationEnergyInterface

+ + +

Per atom Formation Energy calculator class.

+ +
+ Source code in openqdc/datasets/statistics.py +
413
+414
+415
+416
+417
+418
+419
+420
+421
class PerAtomFormationEnergyStats(FormationEnergyInterface):
+    """
+    Per atom Formation Energy  calculator class.
+    """
+
+    def _compute(self, energy) -> EnergyStatistics:
+        inter_E_mean = np.nanmean((energy / self.n_atoms[:, None]), axis=0)
+        inter_E_std = np.nanstd((energy / self.n_atoms[:, None]), axis=0)
+        return EnergyStatistics(mean=np.atleast_2d(inter_E_mean), std=np.atleast_2d(inter_E_std))
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ + + +

+ StatisticManager + + +

+ + +
+ + +

Manager class that automatically handle the shared state between +the statistic calculators

+ +
+ Source code in openqdc/datasets/statistics.py +
 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
class StatisticManager:
+    """
+    Manager class that automatically handle the shared state between
+    the statistic calculators
+    """
+
+    def __init__(self, dataset: Any, recompute: bool = False, *statistic_calculators: "AbstractStatsCalculator"):
+        """
+        Parameters:
+            dataset : openqdc.datasets.base.BaseDataset
+                The dataset object to compute the statistics
+            recompute:
+                Flag to recompute the statistics
+            *statistic_calculators:
+                List of statistic calculators to run
+        """
+        self._state = {}
+        self._results = {}
+        self._statistic_calculators = [
+            statistic_calculators.from_openqdc_dataset(dataset, recompute)
+            for statistic_calculators in statistic_calculators
+        ]
+
+    @property
+    def state(self) -> Dict:
+        """
+        Return the dictionary state of the manager
+
+        Returns:
+            State of the StatisticManager
+        """
+        return self._state
+
+    def reset_state(self):
+        """
+        Reset the state dictionary
+        """
+        self._state = {}
+
+    def reset_results(self):
+        """
+        Reset the results dictionary
+        """
+        self._results = {}
+
+    def get_state(self, key: Optional[str] = None) -> Optional[Any]:
+        """
+        Return the value of the key in the state dictionary
+
+        Parameters:
+            key: str, default = None
+        Returns:
+            the value of the key in the state dictionary
+            or the whole state dictionary if key is None
+        """
+        if key is None:
+            return self._state
+        return self._state.get(key, None)
+
+    def has_state(self, key: str) -> bool:
+        """
+        Check is state has key
+
+        Parameters:
+            key:
+                Key to check in the state dictionary
+
+        Returns:
+            True if the key is in the state dictionary
+        """
+        return key in self._state
+
+    def get_results(self, as_dict: bool = False):
+        """
+        Aggregate results from all the calculators
+
+        Parameters:
+            as_dict:
+                Flag to return the results as a dictionary
+        """
+        results = deepcopy(self._results)
+        if as_dict:
+            return {k: v.as_dict() for k, v in results.items()}
+        return {k: v for k, v in self._results.items()}
+
+    def run_calculators(self):
+        """
+        Run the saved calculators and save the results in the manager
+        """
+        logger.info("Processing dataset statistics")
+        for calculator in self._statistic_calculators:
+            calculator.run(self.state)
+            self._results[calculator.__class__.__name__] = calculator.result
+
+
+ + + +
+ + + + + + + +
+ + + +

+ state: Dict + + + property + + +

+ + +
+ +

Return the dictionary state of the manager

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Dict + +
+

State of the StatisticManager

+
+
+
+ +
+ + + +
+ + +

+ __init__(dataset, recompute=False, *statistic_calculators) + +

+ + +
+ + + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
dataset + +
+

openqdc.datasets.base.BaseDataset +The dataset object to compute the statistics

+
+
+ required +
recompute + bool + +
+

Flag to recompute the statistics

+
+
+ False +
*statistic_calculators + AbstractStatsCalculator + +
+

List of statistic calculators to run

+
+
+ () +
+ +
+ Source code in openqdc/datasets/statistics.py +
70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
def __init__(self, dataset: Any, recompute: bool = False, *statistic_calculators: "AbstractStatsCalculator"):
+    """
+    Parameters:
+        dataset : openqdc.datasets.base.BaseDataset
+            The dataset object to compute the statistics
+        recompute:
+            Flag to recompute the statistics
+        *statistic_calculators:
+            List of statistic calculators to run
+    """
+    self._state = {}
+    self._results = {}
+    self._statistic_calculators = [
+        statistic_calculators.from_openqdc_dataset(dataset, recompute)
+        for statistic_calculators in statistic_calculators
+    ]
+
+
+
+ +
+ +
+ + +

+ get_results(as_dict=False) + +

+ + +
+ +

Aggregate results from all the calculators

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
as_dict + bool + +
+

Flag to return the results as a dictionary

+
+
+ False +
+ +
+ Source code in openqdc/datasets/statistics.py +
136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
def get_results(self, as_dict: bool = False):
+    """
+    Aggregate results from all the calculators
+
+    Parameters:
+        as_dict:
+            Flag to return the results as a dictionary
+    """
+    results = deepcopy(self._results)
+    if as_dict:
+        return {k: v.as_dict() for k, v in results.items()}
+    return {k: v for k, v in self._results.items()}
+
+
+
+ +
+ +
+ + +

+ get_state(key=None) + +

+ + +
+ +

Return the value of the key in the state dictionary

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
key + Optional[str] + +
+

str, default = None

+
+
+ None +
+

Returns: + the value of the key in the state dictionary + or the whole state dictionary if key is None

+ +
+ Source code in openqdc/datasets/statistics.py +
109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
def get_state(self, key: Optional[str] = None) -> Optional[Any]:
+    """
+    Return the value of the key in the state dictionary
+
+    Parameters:
+        key: str, default = None
+    Returns:
+        the value of the key in the state dictionary
+        or the whole state dictionary if key is None
+    """
+    if key is None:
+        return self._state
+    return self._state.get(key, None)
+
+
+
+ +
+ +
+ + +

+ has_state(key) + +

+ + +
+ +

Check is state has key

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
key + str + +
+

Key to check in the state dictionary

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ bool + +
+

True if the key is in the state dictionary

+
+
+ +
+ Source code in openqdc/datasets/statistics.py +
123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
def has_state(self, key: str) -> bool:
+    """
+    Check is state has key
+
+    Parameters:
+        key:
+            Key to check in the state dictionary
+
+    Returns:
+        True if the key is in the state dictionary
+    """
+    return key in self._state
+
+
+
+ +
+ +
+ + +

+ reset_results() + +

+ + +
+ +

Reset the results dictionary

+ +
+ Source code in openqdc/datasets/statistics.py +
103
+104
+105
+106
+107
def reset_results(self):
+    """
+    Reset the results dictionary
+    """
+    self._results = {}
+
+
+
+ +
+ +
+ + +

+ reset_state() + +

+ + +
+ +

Reset the state dictionary

+ +
+ Source code in openqdc/datasets/statistics.py +
 97
+ 98
+ 99
+100
+101
def reset_state(self):
+    """
+    Reset the state dictionary
+    """
+    self._state = {}
+
+
+
+ +
+ +
+ + +

+ run_calculators() + +

+ + +
+ +

Run the saved calculators and save the results in the manager

+ +
+ Source code in openqdc/datasets/statistics.py +
149
+150
+151
+152
+153
+154
+155
+156
def run_calculators(self):
+    """
+    Run the saved calculators and save the results in the manager
+    """
+    logger.info("Processing dataset statistics")
+    for calculator in self._statistic_calculators:
+        calculator.run(self.state)
+        self._results[calculator.__class__.__name__] = calculator.result
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ StatisticsResults + + +

+ + +
+ + +

Parent class to statistics results +to provide general methods.

+ +
+ Source code in openqdc/datasets/statistics.py +
13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
class StatisticsResults:
+    """
+    Parent class to statistics results
+    to provide general methods.
+    """
+
+    def to_dict(self) -> Dict:
+        """
+        Convert the class to a dictionary
+
+        Returns:
+            Dictionary representation of the class
+        """
+        return asdict(self)
+
+    def transform(self, func: Callable):
+        """
+        Apply a function to all the attributes of the class
+
+        Parameters:
+            func:
+                Function to apply to the attributes
+        """
+        for k, v in self.to_dict().items():
+            if v is not None:
+                setattr(self, k, func(v))
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ to_dict() + +

+ + +
+ +

Convert the class to a dictionary

+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Dict + +
+

Dictionary representation of the class

+
+
+ +
+ Source code in openqdc/datasets/statistics.py +
19
+20
+21
+22
+23
+24
+25
+26
def to_dict(self) -> Dict:
+    """
+    Convert the class to a dictionary
+
+    Returns:
+        Dictionary representation of the class
+    """
+    return asdict(self)
+
+
+
+ +
+ +
+ + +

+ transform(func) + +

+ + +
+ +

Apply a function to all the attributes of the class

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
func + Callable + +
+

Function to apply to the attributes

+
+
+ required +
+ +
+ Source code in openqdc/datasets/statistics.py +
28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
def transform(self, func: Callable):
+    """
+    Apply a function to all the attributes of the class
+
+    Parameters:
+        func:
+            Function to apply to the attributes
+    """
+    for k, v in self.to_dict().items():
+        if v is not None:
+            setattr(self, k, func(v))
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ TotalEnergyStats + + +

+ + +
+

+ Bases: AbstractStatsCalculator

+ + +

Total Energy statistics calculator class

+ +
+ Source code in openqdc/datasets/statistics.py +
348
+349
+350
+351
+352
+353
+354
+355
+356
+357
class TotalEnergyStats(AbstractStatsCalculator):
+    """
+    Total Energy statistics calculator class
+    """
+
+    def compute(self) -> EnergyStatistics:
+        converted_energy_data = self.energies
+        total_E_mean = np.nanmean(converted_energy_data, axis=0)
+        total_E_std = np.nanstd(converted_energy_data, axis=0)
+        return EnergyStatistics(mean=np.atleast_2d(total_E_mean), std=np.atleast_2d(total_E_std))
+
+
+ + + +
+ + + + + + + + + + + +
+ +
+ +
+ + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/units.html b/0.1.2/API/units.html new file mode 100644 index 00000000..d389de13 --- /dev/null +++ b/0.1.2/API/units.html @@ -0,0 +1,3212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Units - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

UNITS

+ + +
+ + + + +
+ +

Units conversion utilities module.

+ + +
+ Available Energy units +

["kcal/mol", "kj/mol", "hartree", "ev" "mev", "ryd]

+
+ +
+ Available Distance units +

["ang", "nm", "bohr"]

+
+ +
+ Available Force units +

Combinations between Energy and Distance units

+
+ + +
+ + + + + + + + +
+ + + +

+ Conversion + + +

+ + +
+ + +

Conversion from one unit system to another defined by a name and a callable

+ +
+ Source code in openqdc/utils/units.py +
130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
class Conversion:
+    """
+    Conversion from one unit system to another defined by a name and a callable
+    """
+
+    def __init__(self, in_unit: str, out_unit: str, func: Callable[[float], float]):
+        """
+
+        Parameters:
+            in_unit: String defining the units of the current values
+            out_unit: String defining the target units
+            func: The callable to compute the conversion
+        """
+        name = "convert_" + in_unit.lower().strip() + "_to_" + out_unit.lower().strip()
+
+        if name in CONVERSION_REGISTRY:
+            raise ConversionAlreadyDefined(in_unit, out_unit)
+        CONVERSION_REGISTRY[name] = self
+
+        self.name = name
+        self.fn = func
+
+    def __call__(self, x):
+        return self.fn(x)
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ __init__(in_unit, out_unit, func) + +

+ + +
+ + + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
in_unit + str + +
+

String defining the units of the current values

+
+
+ required +
out_unit + str + +
+

String defining the target units

+
+
+ required +
func + Callable[[float], float] + +
+

The callable to compute the conversion

+
+
+ required +
+ +
+ Source code in openqdc/utils/units.py +
135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
def __init__(self, in_unit: str, out_unit: str, func: Callable[[float], float]):
+    """
+
+    Parameters:
+        in_unit: String defining the units of the current values
+        out_unit: String defining the target units
+        func: The callable to compute the conversion
+    """
+    name = "convert_" + in_unit.lower().strip() + "_to_" + out_unit.lower().strip()
+
+    if name in CONVERSION_REGISTRY:
+        raise ConversionAlreadyDefined(in_unit, out_unit)
+    CONVERSION_REGISTRY[name] = self
+
+    self.name = name
+    self.fn = func
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ DistanceTypeConversion + + +

+ + +
+

+ Bases: ConversionEnum, StrEnum

+ + +

Define the possible distance units for conversion

+ +
+ Source code in openqdc/utils/units.py +
59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
@unique
+class DistanceTypeConversion(ConversionEnum, StrEnum):
+    """
+    Define the possible distance units for conversion
+    """
+
+    ANG = "ang"
+    NM = "nm"
+    BOHR = "bohr"
+
+    def to(self, distance: "DistanceTypeConversion", fraction: bool = False) -> Callable[[float], float]:
+        """
+        Get the conversion function to convert the distance to the desired units.
+
+        Parameters:
+            distance: distance unit to convert to
+            fraction: whether it is distance^1 or distance^-1
+
+        Returns:
+            callable to convert the distance to the desired units
+        """
+        return get_conversion(str(self), str(distance)) if not fraction else get_conversion(str(distance), str(self))
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ to(distance, fraction=False) + +

+ + +
+ +

Get the conversion function to convert the distance to the desired units.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
distance + DistanceTypeConversion + +
+

distance unit to convert to

+
+
+ required +
fraction + bool + +
+

whether it is distance^1 or distance^-1

+
+
+ False +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Callable[[float], float] + +
+

callable to convert the distance to the desired units

+
+
+ +
+ Source code in openqdc/utils/units.py +
69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
def to(self, distance: "DistanceTypeConversion", fraction: bool = False) -> Callable[[float], float]:
+    """
+    Get the conversion function to convert the distance to the desired units.
+
+    Parameters:
+        distance: distance unit to convert to
+        fraction: whether it is distance^1 or distance^-1
+
+    Returns:
+        callable to convert the distance to the desired units
+    """
+    return get_conversion(str(self), str(distance)) if not fraction else get_conversion(str(distance), str(self))
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ EnergyTypeConversion + + +

+ + +
+

+ Bases: ConversionEnum, StrEnum

+ + +

Define the possible energy units for conversion

+ +
+ Source code in openqdc/utils/units.py +
33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
@unique
+class EnergyTypeConversion(ConversionEnum, StrEnum):
+    """
+    Define the possible energy units for conversion
+    """
+
+    KCAL_MOL = "kcal/mol"
+    KJ_MOL = "kj/mol"
+    HARTREE = "hartree"
+    EV = "ev"
+    MEV = "mev"
+    RYD = "ryd"
+
+    def to(self, energy: "EnergyTypeConversion") -> Callable[[float], float]:
+        """
+        Get the conversion function to convert the energy to the desired units.
+
+        Parameters:
+            energy: energy unit to convert to
+
+        Returns:
+            Callable to convert the distance to the desired units
+        """
+        return get_conversion(str(self), str(energy))
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ to(energy) + +

+ + +
+ +

Get the conversion function to convert the energy to the desired units.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
energy + EnergyTypeConversion + +
+

energy unit to convert to

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Callable[[float], float] + +
+

Callable to convert the distance to the desired units

+
+
+ +
+ Source code in openqdc/utils/units.py +
46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
def to(self, energy: "EnergyTypeConversion") -> Callable[[float], float]:
+    """
+    Get the conversion function to convert the energy to the desired units.
+
+    Parameters:
+        energy: energy unit to convert to
+
+    Returns:
+        Callable to convert the distance to the desired units
+    """
+    return get_conversion(str(self), str(energy))
+
+
+
+ +
+ + + +
+ +
+ +
+ +
+ + + +

+ ForceTypeConversion + + +

+ + +
+

+ Bases: ConversionEnum

+ + +

Define the possible foce units for conversion

+ +
+ Source code in openqdc/utils/units.py +
 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
@unique
+class ForceTypeConversion(ConversionEnum):
+    """
+    Define the possible foce units for conversion
+    """
+
+    #     Name      = EnergyTypeConversion,         , DistanceTypeConversion
+    HARTREE_BOHR = EnergyTypeConversion.HARTREE, DistanceTypeConversion.BOHR
+    HARTREE_ANG = EnergyTypeConversion.HARTREE, DistanceTypeConversion.ANG
+    HARTREE_NM = EnergyTypeConversion.HARTREE, DistanceTypeConversion.NM
+    EV_BOHR = EnergyTypeConversion.EV, DistanceTypeConversion.BOHR
+    EV_ANG = EnergyTypeConversion.EV, DistanceTypeConversion.ANG
+    EV_NM = EnergyTypeConversion.EV, DistanceTypeConversion.NM
+    KCAL_MOL_BOHR = EnergyTypeConversion.KCAL_MOL, DistanceTypeConversion.BOHR
+    KCAL_MOL_ANG = EnergyTypeConversion.KCAL_MOL, DistanceTypeConversion.ANG
+    KCAL_MOL_NM = EnergyTypeConversion.KCAL_MOL, DistanceTypeConversion.NM
+    KJ_MOL_BOHR = EnergyTypeConversion.KJ_MOL, DistanceTypeConversion.BOHR
+    KJ_MOL_ANG = EnergyTypeConversion.KJ_MOL, DistanceTypeConversion.ANG
+    KJ_MOL_NM = EnergyTypeConversion.KJ_MOL, DistanceTypeConversion.NM
+    MEV_BOHR = EnergyTypeConversion.MEV, DistanceTypeConversion.BOHR
+    MEV_ANG = EnergyTypeConversion.MEV, DistanceTypeConversion.ANG
+    MEV_NM = EnergyTypeConversion.MEV, DistanceTypeConversion.NM
+    RYD_BOHR = EnergyTypeConversion.RYD, DistanceTypeConversion.BOHR
+    RYD_ANG = EnergyTypeConversion.RYD, DistanceTypeConversion.ANG
+    RYD_NM = EnergyTypeConversion.RYD, DistanceTypeConversion.NM
+
+    def __init__(self, energy: EnergyTypeConversion, distance: DistanceTypeConversion):
+        self.energy = energy
+        self.distance = distance
+
+    def __str__(self):
+        return f"{self.energy}/{self.distance}"
+
+    def to(self, energy: EnergyTypeConversion, distance: DistanceTypeConversion) -> Callable[[float], float]:
+        """
+        Get the conversion function to convert the force to the desired units.
+
+        Parameters:
+            energy: energy unit to convert to
+            distance: distance unit to convert to
+
+        Returns:
+            callable to convert the distance to the desired units
+        """
+        return lambda x: self.distance.to(distance, fraction=True)(self.energy.to(energy)(x))
+
+
+ + + +
+ + + + + + + + + +
+ + +

+ to(energy, distance) + +

+ + +
+ +

Get the conversion function to convert the force to the desired units.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
energy + EnergyTypeConversion + +
+

energy unit to convert to

+
+
+ required +
distance + DistanceTypeConversion + +
+

distance unit to convert to

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Callable[[float], float] + +
+

callable to convert the distance to the desired units

+
+
+ +
+ Source code in openqdc/utils/units.py +
116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
def to(self, energy: EnergyTypeConversion, distance: DistanceTypeConversion) -> Callable[[float], float]:
+    """
+    Get the conversion function to convert the force to the desired units.
+
+    Parameters:
+        energy: energy unit to convert to
+        distance: distance unit to convert to
+
+    Returns:
+        callable to convert the distance to the desired units
+    """
+    return lambda x: self.distance.to(distance, fraction=True)(self.energy.to(energy)(x))
+
+
+
+ +
+ + + +
+ +
+ +
+ + +
+ + +

+ get_conversion(in_unit, out_unit) + +

+ + +
+ +

Utility function to get the conversion function between two units.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
in_unit + +
+

The input unit

+
+
+ required +
out_unit + +
+

The output unit

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Callable[[float], float] + +
+

The conversion function

+
+
+ +
+ Source code in openqdc/utils/units.py +
156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
def get_conversion(in_unit: str, out_unit: str) -> Callable[[float], float]:
+    """
+    Utility function to get the conversion function between two units.
+
+    Parameters:
+        in_unit : The input unit
+        out_unit : The output unit
+
+    Returns:
+        The conversion function
+    """
+    name = "convert_" + in_unit.lower().strip() + "_to_" + out_unit.lower().strip()
+    if in_unit.lower().strip() == out_unit.lower().strip():
+        return lambda x: x
+    if name not in CONVERSION_REGISTRY:
+        raise ConversionNotDefinedError(in_unit, out_unit)
+    return CONVERSION_REGISTRY[name]
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/API/utils.html b/0.1.2/API/utils.html new file mode 100644 index 00000000..3feb2ecd --- /dev/null +++ b/0.1.2/API/utils.html @@ -0,0 +1,2822 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Utils - OpenQDC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + + + + +
+
+ + + +
+
+
+ + + + + + + +
+
+
+ + + + + + + +
+
+ + + + + + + +

Utils

+ +
+ + + + +
+ + + +
+ + + + + + + + + +
+ + +

+ check_file(path) + +

+ + +
+ +

Checks if file present on local

+ +
+ Source code in openqdc/utils/io.py +
123
+124
+125
def check_file(path) -> bool:
+    """Checks if file present on local"""
+    return os.path.exists(path)
+
+
+
+ +
+ +
+ + +

+ create_hdf5_file(hdf5_file_path) + +

+ + +
+ +

Creates hdf5 file with fsspec

+ +
+ Source code in openqdc/utils/io.py +
179
+180
+181
+182
+183
+184
def create_hdf5_file(hdf5_file_path: str):
+    """Creates hdf5 file with fsspec"""
+    fp = fsspec.open(hdf5_file_path, "wb")
+    if hasattr(fp, "open"):
+        fp = fp.open()
+    return h5py.File(fp, "a")
+
+
+
+ +
+ +
+ + +

+ get_conversion(in_unit, out_unit) + +

+ + +
+ +

Utility function to get the conversion function between two units.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
in_unit + +
+

The input unit

+
+
+ required +
out_unit + +
+

The output unit

+
+
+ required +
+ + +

Returns:

+ + + + + + + + + + + + + +
TypeDescription
+ Callable[[float], float] + +
+

The conversion function

+
+
+ +
+ Source code in openqdc/utils/units.py +
156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
def get_conversion(in_unit: str, out_unit: str) -> Callable[[float], float]:
+    """
+    Utility function to get the conversion function between two units.
+
+    Parameters:
+        in_unit : The input unit
+        out_unit : The output unit
+
+    Returns:
+        The conversion function
+    """
+    name = "convert_" + in_unit.lower().strip() + "_to_" + out_unit.lower().strip()
+    if in_unit.lower().strip() == out_unit.lower().strip():
+        return lambda x: x
+    if name not in CONVERSION_REGISTRY:
+        raise ConversionNotDefinedError(in_unit, out_unit)
+    return CONVERSION_REGISTRY[name]
+
+
+
+ +
+ +
+ + +

+ get_local_cache() + +

+ + +
+ +

Returns the local cache directory. It creates it if it does not exist.

+ + +

Returns:

+ + + + + + + + + + + + + +
Name TypeDescription
str + str + +
+

path to the local cache directory

+
+
+ +
+ Source code in openqdc/utils/io.py +
48
+49
+50
+51
+52
+53
+54
+55
+56
+57
def get_local_cache() -> str:
+    """
+    Returns the local cache directory. It creates it if it does not exist.
+
+    Returns:
+        str: path to the local cache directory
+    """
+    cache_dir = os.path.expanduser(os.path.expandvars(_OPENQDC_CACHE_DIR))
+    os.makedirs(cache_dir, exist_ok=True)
+    return cache_dir
+
+
+
+ +
+ +
+ + +

+ get_remote_cache(write_access=False) + +

+ + +
+ +

Returns the entry point based on the write access.

+ +
+ Source code in openqdc/utils/io.py +
60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
def get_remote_cache(write_access=False) -> str:
+    """
+    Returns the entry point based on the write access.
+    """
+    if write_access:
+        remote_cache = "openqdc/v1"  # "gs://qmdata-public/openqdc"
+        # remote_cache = "gs://qmdata-public/openqdc"
+    else:
+        remote_cache = _OPENQDC_DOWNLOAD_API.get(os.environ.get("OPENQDC_DOWNLOAD_API", "s3"))
+        # remote_cache = "https://storage.googleapis.com/qmdata-public/openqdc"
+    return remote_cache
+
+
+
+ +
+ +
+ + +

+ load_hdf5_file(hdf5_file_path) + +

+ + +
+ +

Loads hdf5 file with fsspec

+ +
+ Source code in openqdc/utils/io.py +
161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
def load_hdf5_file(hdf5_file_path: str):
+    """Loads hdf5 file with fsspec"""
+    if not check_file(hdf5_file_path):
+        raise FileNotFoundError(f"File {hdf5_file_path} does not exist on GCS and local.")
+
+    fp = fsspec.open(hdf5_file_path, "rb")
+    if hasattr(fp, "open"):
+        fp = fp.open()
+    file = h5py.File(fp)
+
+    # inorder to enable multiprocessing:
+    # https://github.com/fsspec/gcsfs/issues/379#issuecomment-839929801
+    # fsspec.asyn.iothread[0] = None
+    # fsspec.asyn.loop[0] = None
+
+    return file
+
+
+
+ +
+ +
+ + +

+ load_json(path) + +

+ + +
+ +

Loads json file

+ +
+ Source code in openqdc/utils/io.py +
187
+188
+189
+190
def load_json(path):
+    """Loads json file"""
+    with fsspec.open(path, "r") as fp:  # Unpickling
+        return json.load(fp)
+
+
+
+ +
+ +
+ + +

+ load_pkl(path, check=True) + +

+ + +
+ +

Load pkl file

+ +
+ Source code in openqdc/utils/io.py +
151
+152
+153
+154
+155
+156
+157
+158
def load_pkl(path, check=True):
+    """Load pkl file"""
+    if check:
+        if not check_file(path):
+            raise FileNotFoundError(f"File {path} does not exist on GCS and local.")
+
+    with open(path, "rb") as fp:  # Unpickling
+        return pkl.load(fp)
+
+
+
+ +
+ +
+ + +

+ makedirs(path, exist_ok=True) + +

+ + +
+ +

Creates directory

+ +
+ Source code in openqdc/utils/io.py +
118
+119
+120
def makedirs(path, exist_ok=True):
+    """Creates directory"""
+    os.makedirs(path, exist_ok=exist_ok)
+
+
+
+ +
+ +
+ + +

+ read_qc_archive_h5(raw_path, subset, energy_target_names, force_target_names=None) + +

+ + +
+ +

Extracts data from the HDF5 archive file.

+ +
+ Source code in openqdc/utils/io.py +
288
+289
+290
+291
+292
+293
+294
+295
+296
+297
def read_qc_archive_h5(
+    raw_path: str, subset: str, energy_target_names: List[str], force_target_names: Optional[List[str]] = None
+) -> List[Dict[str, np.ndarray]]:
+    """Extracts data from the HDF5 archive file."""
+    data = load_hdf5_file(raw_path)
+    data_t = {k2: data[k1][k2][:] for k1 in data.keys() for k2 in data[k1].keys()}
+
+    n = len(data_t["molecule_id"])
+    samples = [extract_entry(data_t, i, subset, energy_target_names, force_target_names) for i in tqdm(range(n))]
+    return samples
+
+
+
+ +
+ +
+ + +

+ save_pkl(file, path) + +

+ + +
+ +

Saves pkl file

+ +
+ Source code in openqdc/utils/io.py +
134
+135
+136
+137
+138
def save_pkl(file, path):
+    """Saves pkl file"""
+    logger.info(f"Saving file at {path}")
+    with fsspec.open(path, "wb") as fp:  # Pickling
+        pkl.dump(file, fp)
+
+
+
+ +
+ +
+ + +

+ set_cache_dir(d) + +

+ + +
+ +

Optionally set the _OPENQDC_CACHE_DIR directory.

+ + +

Parameters:

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
d + str + +
+

path to a local folder.

+
+
+ required +
+ +
+ Source code in openqdc/utils/io.py +
35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
def set_cache_dir(d):
+    r"""
+    Optionally set the _OPENQDC_CACHE_DIR directory.
+
+    Args:
+        d (str): path to a local folder.
+    """
+    if d is None:
+        return
+    global _OPENQDC_CACHE_DIR
+    _OPENQDC_CACHE_DIR = os.path.normpath(os.path.expanduser(d))
+
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + +
+
+
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/0.1.2/assets/StorageView.png b/0.1.2/assets/StorageView.png new file mode 100644 index 0000000000000000000000000000000000000000..8d39892678087db840f31381d495b4fc3c3ffa7b GIT binary patch literal 111109 zcma&Oc|6r?_ddRx(2Pn7A#>(=rjQ|u44E@il39pQ6hfxVAtFOcNM@Q$B{L-pF?d|Ivv-m3 zkY?Mst_1#{_-kG^yvfVdEMKRxTFK7ad(MI@mK1uW4rP;N~jL#gs&a{GY4ayYQH8{Kk#=5gtsM*UZv|m!F4^_*e`KQh(nsal+Dt`10>fw5*&qUi^J! zcX8uRj%Lm-R@$D9R?=*mRxS>1&K6c1S0H}qUl);gwlZ_IvXl|v6A1xGEG>Ag?5r+Z*}D=qiT_`l zWN9JcdePO+>OWg_!p`-7w+OZ;VP|G%Gt(~LCwtE%8r4X zf&c%Q)xRzz#rt3P_&?_K_gAoB*fQ@w7LOPIoEa;79294q2%4VgB?5tgprUX>+vDCu zpSzK^?waUN!Pk5*`26;d(QV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X_`H1`LdoB=>D^NIZfLw%2Jkt8& z`LW^9&UkEa(b3V{o>j3{sCHA3up?j0wXP$!lL7hCBNZRNm~YB#HGW3h_1xo|;M3}7 zY(v7y?3eVdqoNeR*?3XNFg&KF5!?YMC1e8B4=QT|jYv|W(X7ziDYRTACEIW2hSI=KYTX7gY8#U= z57cro$C^al$<7XonX{yDg8KYFuV{}4g$O14Tmm}%>94P}Xa9bD4p$zfQ-;KIx~f0} z{(FV@f@%p%X_|NVo}$9E*7==;B3eg5CnleP{@UN0GZxz;jE_%6mq^QK=hT)E@_ E11<#p-T(jq literal 0 HcmV?d00001 diff --git a/0.1.2/assets/_mkdocstrings.css b/0.1.2/assets/_mkdocstrings.css new file mode 100644 index 00000000..85449ec7 --- /dev/null +++ b/0.1.2/assets/_mkdocstrings.css @@ -0,0 +1,119 @@ + +/* Avoid breaking parameter names, etc. in table cells. */ +.doc-contents td code { + word-break: normal !important; +} + +/* No line break before first paragraph of descriptions. */ +.doc-md-description, +.doc-md-description>p:first-child { + display: inline; +} + +/* Max width for docstring sections tables. */ +.doc .md-typeset__table, +.doc .md-typeset__table table { + display: table !important; + width: 100%; +} + +.doc .md-typeset__table tr { + display: table-row; +} + +/* Defaults in Spacy table style. */ +.doc-param-default { + float: right; +} + +/* Backward-compatibility: docstring section titles in bold. */ +.doc-section-title { + font-weight: bold; +} + +/* Symbols in Navigation and ToC. */ +:root, +[data-md-color-scheme="default"] { + --doc-symbol-attribute-fg-color: #953800; + --doc-symbol-function-fg-color: #8250df; + --doc-symbol-method-fg-color: #8250df; + --doc-symbol-class-fg-color: #0550ae; + --doc-symbol-module-fg-color: #5cad0f; + + --doc-symbol-attribute-bg-color: #9538001a; + --doc-symbol-function-bg-color: #8250df1a; + --doc-symbol-method-bg-color: #8250df1a; + --doc-symbol-class-bg-color: #0550ae1a; + --doc-symbol-module-bg-color: #5cad0f1a; +} + +[data-md-color-scheme="slate"] { + --doc-symbol-attribute-fg-color: #ffa657; + --doc-symbol-function-fg-color: #d2a8ff; + --doc-symbol-method-fg-color: #d2a8ff; + --doc-symbol-class-fg-color: #79c0ff; + --doc-symbol-module-fg-color: #baff79; + + --doc-symbol-attribute-bg-color: #ffa6571a; + --doc-symbol-function-bg-color: #d2a8ff1a; + --doc-symbol-method-bg-color: #d2a8ff1a; + --doc-symbol-class-bg-color: #79c0ff1a; + --doc-symbol-module-bg-color: #baff791a; +} + +code.doc-symbol { + border-radius: .1rem; + font-size: .85em; + padding: 0 .3em; + font-weight: bold; +} + +code.doc-symbol-attribute { + color: var(--doc-symbol-attribute-fg-color); + background-color: var(--doc-symbol-attribute-bg-color); +} + +code.doc-symbol-attribute::after { + content: "attr"; +} + +code.doc-symbol-function { + color: var(--doc-symbol-function-fg-color); + background-color: var(--doc-symbol-function-bg-color); +} + +code.doc-symbol-function::after { + content: "func"; +} + +code.doc-symbol-method { + color: var(--doc-symbol-method-fg-color); + background-color: var(--doc-symbol-method-bg-color); +} + +code.doc-symbol-method::after { + content: "meth"; +} + +code.doc-symbol-class { + color: var(--doc-symbol-class-fg-color); + background-color: var(--doc-symbol-class-bg-color); +} + +code.doc-symbol-class::after { + content: "class"; +} + +code.doc-symbol-module { + color: var(--doc-symbol-module-fg-color); + background-color: var(--doc-symbol-module-bg-color); +} + +code.doc-symbol-module::after { + content: "mod"; +} + +.doc-signature .autorefs { + color: inherit; + border-bottom: 1px dotted currentcolor; +} diff --git a/0.1.2/assets/images/favicon.png b/0.1.2/assets/images/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..1cf13b9f9d978896599290a74f77d5dbe7d1655c GIT binary patch literal 1870 zcmV-U2eJ5xP)Gc)JR9QMau)O=X#!i9;T z37kk-upj^(fsR36MHs_+1RCI)NNu9}lD0S{B^g8PN?Ww(5|~L#Ng*g{WsqleV}|#l zz8@ri&cTzw_h33bHI+12+kK6WN$h#n5cD8OQt`5kw6p~9H3()bUQ8OS4Q4HTQ=1Ol z_JAocz`fLbT2^{`8n~UAo=#AUOf=SOq4pYkt;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hV** z?Cpalt1oH&{r!o3eSKc&ap)iz2BTn_VV`4>9M^b3;(YY}4>#ML6{~(4mH+?%07*qo IM6N<$f(jP3KmY&$ literal 0 HcmV?d00001 diff --git a/0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js b/0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js new file mode 100644 index 00000000..cf778d42 --- /dev/null +++ b/0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js @@ -0,0 +1,29 @@ +"use strict";(()=>{var Fi=Object.create;var gr=Object.defineProperty;var ji=Object.getOwnPropertyDescriptor;var Wi=Object.getOwnPropertyNames,Dt=Object.getOwnPropertySymbols,Ui=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable;var oo=(e,t,r)=>t in e?gr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))xr.call(t,r)&&oo(e,r,t[r]);if(Dt)for(var r of Dt(t))no.call(t,r)&&oo(e,r,t[r]);return e};var io=(e,t)=>{var r={};for(var o in e)xr.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&Dt)for(var o of Dt(e))t.indexOf(o)<0&&no.call(e,o)&&(r[o]=e[o]);return r};var yr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Di=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Wi(t))!xr.call(e,n)&&n!==r&&gr(e,n,{get:()=>t[n],enumerable:!(o=ji(t,n))||o.enumerable});return e};var Vt=(e,t,r)=>(r=e!=null?Fi(Ui(e)):{},Di(t||!e||!e.__esModule?gr(r,"default",{value:e,enumerable:!0}):r,e));var ao=(e,t,r)=>new Promise((o,n)=>{var i=p=>{try{s(r.next(p))}catch(c){n(c)}},a=p=>{try{s(r.throw(p))}catch(c){n(c)}},s=p=>p.done?o(p.value):Promise.resolve(p.value).then(i,a);s((r=r.apply(e,t)).next())});var co=yr((Er,so)=>{(function(e,t){typeof Er=="object"&&typeof so!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(Er,function(){"use strict";function e(r){var o=!0,n=!1,i=null,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(H){return!!(H&&H!==document&&H.nodeName!=="HTML"&&H.nodeName!=="BODY"&&"classList"in H&&"contains"in H.classList)}function p(H){var mt=H.type,ze=H.tagName;return!!(ze==="INPUT"&&a[mt]&&!H.readOnly||ze==="TEXTAREA"&&!H.readOnly||H.isContentEditable)}function c(H){H.classList.contains("focus-visible")||(H.classList.add("focus-visible"),H.setAttribute("data-focus-visible-added",""))}function l(H){H.hasAttribute("data-focus-visible-added")&&(H.classList.remove("focus-visible"),H.removeAttribute("data-focus-visible-added"))}function f(H){H.metaKey||H.altKey||H.ctrlKey||(s(r.activeElement)&&c(r.activeElement),o=!0)}function u(H){o=!1}function h(H){s(H.target)&&(o||p(H.target))&&c(H.target)}function w(H){s(H.target)&&(H.target.classList.contains("focus-visible")||H.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(i),i=window.setTimeout(function(){n=!1},100),l(H.target))}function A(H){document.visibilityState==="hidden"&&(n&&(o=!0),te())}function te(){document.addEventListener("mousemove",J),document.addEventListener("mousedown",J),document.addEventListener("mouseup",J),document.addEventListener("pointermove",J),document.addEventListener("pointerdown",J),document.addEventListener("pointerup",J),document.addEventListener("touchmove",J),document.addEventListener("touchstart",J),document.addEventListener("touchend",J)}function ie(){document.removeEventListener("mousemove",J),document.removeEventListener("mousedown",J),document.removeEventListener("mouseup",J),document.removeEventListener("pointermove",J),document.removeEventListener("pointerdown",J),document.removeEventListener("pointerup",J),document.removeEventListener("touchmove",J),document.removeEventListener("touchstart",J),document.removeEventListener("touchend",J)}function J(H){H.target.nodeName&&H.target.nodeName.toLowerCase()==="html"||(o=!1,ie())}document.addEventListener("keydown",f,!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",A,!0),te(),r.addEventListener("focus",h,!0),r.addEventListener("blur",w,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var Yr=yr((Rt,Kr)=>{/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */(function(t,r){typeof Rt=="object"&&typeof Kr=="object"?Kr.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Rt=="object"?Rt.ClipboardJS=r():t.ClipboardJS=r()})(Rt,function(){return function(){var e={686:function(o,n,i){"use strict";i.d(n,{default:function(){return Ii}});var a=i(279),s=i.n(a),p=i(370),c=i.n(p),l=i(817),f=i.n(l);function u(V){try{return document.execCommand(V)}catch(_){return!1}}var h=function(_){var M=f()(_);return u("cut"),M},w=h;function A(V){var _=document.documentElement.getAttribute("dir")==="rtl",M=document.createElement("textarea");M.style.fontSize="12pt",M.style.border="0",M.style.padding="0",M.style.margin="0",M.style.position="absolute",M.style[_?"right":"left"]="-9999px";var j=window.pageYOffset||document.documentElement.scrollTop;return M.style.top="".concat(j,"px"),M.setAttribute("readonly",""),M.value=V,M}var te=function(_,M){var j=A(_);M.container.appendChild(j);var D=f()(j);return u("copy"),j.remove(),D},ie=function(_){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},j="";return typeof _=="string"?j=te(_,M):_ instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(_==null?void 0:_.type)?j=te(_.value,M):(j=f()(_),u("copy")),j},J=ie;function H(V){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H=function(M){return typeof M}:H=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},H(V)}var mt=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=_.action,j=M===void 0?"copy":M,D=_.container,Y=_.target,ke=_.text;if(j!=="copy"&&j!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Y!==void 0)if(Y&&H(Y)==="object"&&Y.nodeType===1){if(j==="copy"&&Y.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(j==="cut"&&(Y.hasAttribute("readonly")||Y.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ke)return J(ke,{container:D});if(Y)return j==="cut"?w(Y):J(Y,{container:D})},ze=mt;function Ie(V){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ie=function(M){return typeof M}:Ie=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},Ie(V)}function _i(V,_){if(!(V instanceof _))throw new TypeError("Cannot call a class as a function")}function ro(V,_){for(var M=0;M<_.length;M++){var j=_[M];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(V,j.key,j)}}function Ai(V,_,M){return _&&ro(V.prototype,_),M&&ro(V,M),V}function Ci(V,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");V.prototype=Object.create(_&&_.prototype,{constructor:{value:V,writable:!0,configurable:!0}}),_&&br(V,_)}function br(V,_){return br=Object.setPrototypeOf||function(j,D){return j.__proto__=D,j},br(V,_)}function Hi(V){var _=Pi();return function(){var j=Wt(V),D;if(_){var Y=Wt(this).constructor;D=Reflect.construct(j,arguments,Y)}else D=j.apply(this,arguments);return ki(this,D)}}function ki(V,_){return _&&(Ie(_)==="object"||typeof _=="function")?_:$i(V)}function $i(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}function Pi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(V){return!1}}function Wt(V){return Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(M){return M.__proto__||Object.getPrototypeOf(M)},Wt(V)}function vr(V,_){var M="data-clipboard-".concat(V);if(_.hasAttribute(M))return _.getAttribute(M)}var Ri=function(V){Ci(M,V);var _=Hi(M);function M(j,D){var Y;return _i(this,M),Y=_.call(this),Y.resolveOptions(D),Y.listenClick(j),Y}return Ai(M,[{key:"resolveOptions",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof D.action=="function"?D.action:this.defaultAction,this.target=typeof D.target=="function"?D.target:this.defaultTarget,this.text=typeof D.text=="function"?D.text:this.defaultText,this.container=Ie(D.container)==="object"?D.container:document.body}},{key:"listenClick",value:function(D){var Y=this;this.listener=c()(D,"click",function(ke){return Y.onClick(ke)})}},{key:"onClick",value:function(D){var Y=D.delegateTarget||D.currentTarget,ke=this.action(Y)||"copy",Ut=ze({action:ke,container:this.container,target:this.target(Y),text:this.text(Y)});this.emit(Ut?"success":"error",{action:ke,text:Ut,trigger:Y,clearSelection:function(){Y&&Y.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(D){return vr("action",D)}},{key:"defaultTarget",value:function(D){var Y=vr("target",D);if(Y)return document.querySelector(Y)}},{key:"defaultText",value:function(D){return vr("text",D)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(D){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return J(D,Y)}},{key:"cut",value:function(D){return w(D)}},{key:"isSupported",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Y=typeof D=="string"?[D]:D,ke=!!document.queryCommandSupported;return Y.forEach(function(Ut){ke=ke&&!!document.queryCommandSupported(Ut)}),ke}}]),M}(s()),Ii=Ri},828:function(o){var n=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function a(s,p){for(;s&&s.nodeType!==n;){if(typeof s.matches=="function"&&s.matches(p))return s;s=s.parentNode}}o.exports=a},438:function(o,n,i){var a=i(828);function s(l,f,u,h,w){var A=c.apply(this,arguments);return l.addEventListener(u,A,w),{destroy:function(){l.removeEventListener(u,A,w)}}}function p(l,f,u,h,w){return typeof l.addEventListener=="function"?s.apply(null,arguments):typeof u=="function"?s.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(A){return s(A,f,u,h,w)}))}function c(l,f,u,h){return function(w){w.delegateTarget=a(w.target,f),w.delegateTarget&&h.call(l,w)}}o.exports=p},879:function(o,n){n.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},n.nodeList=function(i){var a=Object.prototype.toString.call(i);return i!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in i&&(i.length===0||n.node(i[0]))},n.string=function(i){return typeof i=="string"||i instanceof String},n.fn=function(i){var a=Object.prototype.toString.call(i);return a==="[object Function]"}},370:function(o,n,i){var a=i(879),s=i(438);function p(u,h,w){if(!u&&!h&&!w)throw new Error("Missing required arguments");if(!a.string(h))throw new TypeError("Second argument must be a String");if(!a.fn(w))throw new TypeError("Third argument must be a Function");if(a.node(u))return c(u,h,w);if(a.nodeList(u))return l(u,h,w);if(a.string(u))return f(u,h,w);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function c(u,h,w){return u.addEventListener(h,w),{destroy:function(){u.removeEventListener(h,w)}}}function l(u,h,w){return Array.prototype.forEach.call(u,function(A){A.addEventListener(h,w)}),{destroy:function(){Array.prototype.forEach.call(u,function(A){A.removeEventListener(h,w)})}}}function f(u,h,w){return s(document.body,u,h,w)}o.exports=p},817:function(o){function n(i){var a;if(i.nodeName==="SELECT")i.focus(),a=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var s=i.hasAttribute("readonly");s||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),s||i.removeAttribute("readonly"),a=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var p=window.getSelection(),c=document.createRange();c.selectNodeContents(i),p.removeAllRanges(),p.addRange(c),a=p.toString()}return a}o.exports=n},279:function(o){function n(){}n.prototype={on:function(i,a,s){var p=this.e||(this.e={});return(p[i]||(p[i]=[])).push({fn:a,ctx:s}),this},once:function(i,a,s){var p=this;function c(){p.off(i,c),a.apply(s,arguments)}return c._=a,this.on(i,c,s)},emit:function(i){var a=[].slice.call(arguments,1),s=((this.e||(this.e={}))[i]||[]).slice(),p=0,c=s.length;for(p;p{"use strict";/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */var ts=/["'&<>]/;ei.exports=rs;function rs(e){var t=""+e,r=ts.exec(t);if(!r)return t;var o,n="",i=0,a=0;for(i=r.index;i0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],a;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function q(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o1||s(u,h)})})}function s(u,h){try{p(o[u](h))}catch(w){f(i[0][3],w)}}function p(u){u.value instanceof nt?Promise.resolve(u.value.v).then(c,l):f(i[0][2],u)}function c(u){s("next",u)}function l(u){s("throw",u)}function f(u,h){u(h),i.shift(),i.length&&s(i[0][0],i[0][1])}}function mo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof de=="function"?de(e):e[Symbol.iterator](),r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r);function o(i){r[i]=e[i]&&function(a){return new Promise(function(s,p){a=e[i](a),n(s,p,a.done,a.value)})}}function n(i,a,s,p){Promise.resolve(p).then(function(c){i({value:c,done:s})},a)}}function k(e){return typeof e=="function"}function ft(e){var t=function(o){Error.call(o),o.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var zt=ft(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription: +`+r.map(function(o,n){return n+1+") "+o.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=r}});function qe(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Fe=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,o,n,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=de(a),p=s.next();!p.done;p=s.next()){var c=p.value;c.remove(this)}}catch(A){t={error:A}}finally{try{p&&!p.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var l=this.initialTeardown;if(k(l))try{l()}catch(A){i=A instanceof zt?A.errors:[A]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var u=de(f),h=u.next();!h.done;h=u.next()){var w=h.value;try{fo(w)}catch(A){i=i!=null?i:[],A instanceof zt?i=q(q([],N(i)),N(A.errors)):i.push(A)}}}catch(A){o={error:A}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}}if(i)throw new zt(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)fo(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&qe(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&qe(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var Tr=Fe.EMPTY;function qt(e){return e instanceof Fe||e&&"closed"in e&&k(e.remove)&&k(e.add)&&k(e.unsubscribe)}function fo(e){k(e)?e():e.unsubscribe()}var $e={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var ut={setTimeout:function(e,t){for(var r=[],o=2;o0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var o=this,n=this,i=n.hasError,a=n.isStopped,s=n.observers;return i||a?Tr:(this.currentObservers=null,s.push(r),new Fe(function(){o.currentObservers=null,qe(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var o=this,n=o.hasError,i=o.thrownError,a=o.isStopped;n?r.error(i):a&&r.complete()},t.prototype.asObservable=function(){var r=new F;return r.source=this,r},t.create=function(r,o){return new Eo(r,o)},t}(F);var Eo=function(e){re(t,e);function t(r,o){var n=e.call(this)||this;return n.destination=r,n.source=o,n}return t.prototype.next=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,r)},t.prototype.error=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,r)},t.prototype.complete=function(){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||o===void 0||o.call(r)},t.prototype._subscribe=function(r){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(r))!==null&&n!==void 0?n:Tr},t}(g);var _r=function(e){re(t,e);function t(r){var o=e.call(this)||this;return o._value=r,o}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var o=e.prototype._subscribe.call(this,r);return!o.closed&&r.next(this._value),o},t.prototype.getValue=function(){var r=this,o=r.hasError,n=r.thrownError,i=r._value;if(o)throw n;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(g);var Lt={now:function(){return(Lt.delegate||Date).now()},delegate:void 0};var _t=function(e){re(t,e);function t(r,o,n){r===void 0&&(r=1/0),o===void 0&&(o=1/0),n===void 0&&(n=Lt);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,o),i}return t.prototype.next=function(r){var o=this,n=o.isStopped,i=o._buffer,a=o._infiniteTimeWindow,s=o._timestampProvider,p=o._windowTime;n||(i.push(r),!a&&i.push(s.now()+p)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(r),n=this,i=n._infiniteTimeWindow,a=n._buffer,s=a.slice(),p=0;p0?e.prototype.schedule.call(this,r,o):(this.delay=o,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,o){return o>0||this.closed?e.prototype.execute.call(this,r,o):this._execute(r,o)},t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!=null&&n>0||n==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.flush(this),0)},t}(vt);var So=function(e){re(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(gt);var Hr=new So(To);var Oo=function(e){re(t,e);function t(r,o){var n=e.call(this,r,o)||this;return n.scheduler=r,n.work=o,n}return t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!==null&&n>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.actions.push(this),r._scheduled||(r._scheduled=bt.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,o,n){var i;if(n===void 0&&(n=0),n!=null?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,o,n);var a=r.actions;o!=null&&((i=a[a.length-1])===null||i===void 0?void 0:i.id)!==o&&(bt.cancelAnimationFrame(o),r._scheduled=void 0)},t}(vt);var Mo=function(e){re(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var o=this._scheduled;this._scheduled=void 0;var n=this.actions,i;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while((r=n[0])&&r.id===o&&n.shift());if(this._active=!1,i){for(;(r=n[0])&&r.id===o&&n.shift();)r.unsubscribe();throw i}},t}(gt);var me=new Mo(Oo);var O=new F(function(e){return e.complete()});function Yt(e){return e&&k(e.schedule)}function kr(e){return e[e.length-1]}function Xe(e){return k(kr(e))?e.pop():void 0}function He(e){return Yt(kr(e))?e.pop():void 0}function Bt(e,t){return typeof kr(e)=="number"?e.pop():t}var xt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Gt(e){return k(e==null?void 0:e.then)}function Jt(e){return k(e[ht])}function Xt(e){return Symbol.asyncIterator&&k(e==null?void 0:e[Symbol.asyncIterator])}function Zt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Gi(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var er=Gi();function tr(e){return k(e==null?void 0:e[er])}function rr(e){return lo(this,arguments,function(){var r,o,n,i;return Nt(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,nt(r.read())];case 3:return o=a.sent(),n=o.value,i=o.done,i?[4,nt(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,nt(n)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function or(e){return k(e==null?void 0:e.getReader)}function W(e){if(e instanceof F)return e;if(e!=null){if(Jt(e))return Ji(e);if(xt(e))return Xi(e);if(Gt(e))return Zi(e);if(Xt(e))return Lo(e);if(tr(e))return ea(e);if(or(e))return ta(e)}throw Zt(e)}function Ji(e){return new F(function(t){var r=e[ht]();if(k(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Xi(e){return new F(function(t){for(var r=0;r=2;return function(o){return o.pipe(e?b(function(n,i){return e(n,i,o)}):le,Te(1),r?Be(t):zo(function(){return new ir}))}}function Fr(e){return e<=0?function(){return O}:y(function(t,r){var o=[];t.subscribe(T(r,function(n){o.push(n),e=2,!0))}function pe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new g}:t,o=e.resetOnError,n=o===void 0?!0:o,i=e.resetOnComplete,a=i===void 0?!0:i,s=e.resetOnRefCountZero,p=s===void 0?!0:s;return function(c){var l,f,u,h=0,w=!1,A=!1,te=function(){f==null||f.unsubscribe(),f=void 0},ie=function(){te(),l=u=void 0,w=A=!1},J=function(){var H=l;ie(),H==null||H.unsubscribe()};return y(function(H,mt){h++,!A&&!w&&te();var ze=u=u!=null?u:r();mt.add(function(){h--,h===0&&!A&&!w&&(f=Wr(J,p))}),ze.subscribe(mt),!l&&h>0&&(l=new at({next:function(Ie){return ze.next(Ie)},error:function(Ie){A=!0,te(),f=Wr(ie,n,Ie),ze.error(Ie)},complete:function(){w=!0,te(),f=Wr(ie,a),ze.complete()}}),W(H).subscribe(l))})(c)}}function Wr(e,t){for(var r=[],o=2;oe.next(document)),e}function $(e,t=document){return Array.from(t.querySelectorAll(e))}function P(e,t=document){let r=fe(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function fe(e,t=document){return t.querySelector(e)||void 0}function Re(){var e,t,r,o;return(o=(r=(t=(e=document.activeElement)==null?void 0:e.shadowRoot)==null?void 0:t.activeElement)!=null?r:document.activeElement)!=null?o:void 0}var xa=S(d(document.body,"focusin"),d(document.body,"focusout")).pipe(_e(1),Q(void 0),m(()=>Re()||document.body),G(1));function et(e){return xa.pipe(m(t=>e.contains(t)),K())}function kt(e,t){return C(()=>S(d(e,"mouseenter").pipe(m(()=>!0)),d(e,"mouseleave").pipe(m(()=>!1))).pipe(t?Ht(r=>Me(+!r*t)):le,Q(e.matches(":hover"))))}function Bo(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)Bo(e,r)}function x(e,t,...r){let o=document.createElement(e);if(t)for(let n of Object.keys(t))typeof t[n]!="undefined"&&(typeof t[n]!="boolean"?o.setAttribute(n,t[n]):o.setAttribute(n,""));for(let n of r)Bo(o,n);return o}function sr(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function wt(e){let t=x("script",{src:e});return C(()=>(document.head.appendChild(t),S(d(t,"load"),d(t,"error").pipe(v(()=>$r(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(m(()=>{}),L(()=>document.head.removeChild(t)),Te(1))))}var Go=new g,ya=C(()=>typeof ResizeObserver=="undefined"?wt("https://unpkg.com/resize-observer-polyfill"):I(void 0)).pipe(m(()=>new ResizeObserver(e=>e.forEach(t=>Go.next(t)))),v(e=>S(Ke,I(e)).pipe(L(()=>e.disconnect()))),G(1));function ce(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ge(e){let t=e;for(;t.clientWidth===0&&t.parentElement;)t=t.parentElement;return ya.pipe(E(r=>r.observe(t)),v(r=>Go.pipe(b(o=>o.target===t),L(()=>r.unobserve(t)))),m(()=>ce(e)),Q(ce(e)))}function Tt(e){return{width:e.scrollWidth,height:e.scrollHeight}}function cr(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}function Jo(e){let t=[],r=e.parentElement;for(;r;)(e.clientWidth>r.clientWidth||e.clientHeight>r.clientHeight)&&t.push(r),r=(e=r).parentElement;return t.length===0&&t.push(document.documentElement),t}function Ue(e){return{x:e.offsetLeft,y:e.offsetTop}}function Xo(e){let t=e.getBoundingClientRect();return{x:t.x+window.scrollX,y:t.y+window.scrollY}}function Zo(e){return S(d(window,"load"),d(window,"resize")).pipe(Le(0,me),m(()=>Ue(e)),Q(Ue(e)))}function pr(e){return{x:e.scrollLeft,y:e.scrollTop}}function De(e){return S(d(e,"scroll"),d(window,"scroll"),d(window,"resize")).pipe(Le(0,me),m(()=>pr(e)),Q(pr(e)))}var en=new g,Ea=C(()=>I(new IntersectionObserver(e=>{for(let t of e)en.next(t)},{threshold:0}))).pipe(v(e=>S(Ke,I(e)).pipe(L(()=>e.disconnect()))),G(1));function tt(e){return Ea.pipe(E(t=>t.observe(e)),v(t=>en.pipe(b(({target:r})=>r===e),L(()=>t.unobserve(e)),m(({isIntersecting:r})=>r))))}function tn(e,t=16){return De(e).pipe(m(({y:r})=>{let o=ce(e),n=Tt(e);return r>=n.height-o.height-t}),K())}var lr={drawer:P("[data-md-toggle=drawer]"),search:P("[data-md-toggle=search]")};function rn(e){return lr[e].checked}function Je(e,t){lr[e].checked!==t&&lr[e].click()}function Ve(e){let t=lr[e];return d(t,"change").pipe(m(()=>t.checked),Q(t.checked))}function wa(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function Ta(){return S(d(window,"compositionstart").pipe(m(()=>!0)),d(window,"compositionend").pipe(m(()=>!1))).pipe(Q(!1))}function on(){let e=d(window,"keydown").pipe(b(t=>!(t.metaKey||t.ctrlKey)),m(t=>({mode:rn("search")?"search":"global",type:t.key,claim(){t.preventDefault(),t.stopPropagation()}})),b(({mode:t,type:r})=>{if(t==="global"){let o=Re();if(typeof o!="undefined")return!wa(o,r)}return!0}),pe());return Ta().pipe(v(t=>t?O:e))}function xe(){return new URL(location.href)}function pt(e,t=!1){if(B("navigation.instant")&&!t){let r=x("a",{href:e.href});document.body.appendChild(r),r.click(),r.remove()}else location.href=e.href}function nn(){return new g}function an(){return location.hash.slice(1)}function sn(e){let t=x("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function Sa(e){return S(d(window,"hashchange"),e).pipe(m(an),Q(an()),b(t=>t.length>0),G(1))}function cn(e){return Sa(e).pipe(m(t=>fe(`[id="${t}"]`)),b(t=>typeof t!="undefined"))}function $t(e){let t=matchMedia(e);return ar(r=>t.addListener(()=>r(t.matches))).pipe(Q(t.matches))}function pn(){let e=matchMedia("print");return S(d(window,"beforeprint").pipe(m(()=>!0)),d(window,"afterprint").pipe(m(()=>!1))).pipe(Q(e.matches))}function Nr(e,t){return e.pipe(v(r=>r?t():O))}function zr(e,t){return new F(r=>{let o=new XMLHttpRequest;return o.open("GET",`${e}`),o.responseType="blob",o.addEventListener("load",()=>{o.status>=200&&o.status<300?(r.next(o.response),r.complete()):r.error(new Error(o.statusText))}),o.addEventListener("error",()=>{r.error(new Error("Network error"))}),o.addEventListener("abort",()=>{r.complete()}),typeof(t==null?void 0:t.progress$)!="undefined"&&(o.addEventListener("progress",n=>{var i;if(n.lengthComputable)t.progress$.next(n.loaded/n.total*100);else{let a=(i=o.getResponseHeader("Content-Length"))!=null?i:0;t.progress$.next(n.loaded/+a*100)}}),t.progress$.next(5)),o.send(),()=>o.abort()})}function Ne(e,t){return zr(e,t).pipe(v(r=>r.text()),m(r=>JSON.parse(r)),G(1))}function ln(e,t){let r=new DOMParser;return zr(e,t).pipe(v(o=>o.text()),m(o=>r.parseFromString(o,"text/html")),G(1))}function mn(e,t){let r=new DOMParser;return zr(e,t).pipe(v(o=>o.text()),m(o=>r.parseFromString(o,"text/xml")),G(1))}function fn(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function un(){return S(d(window,"scroll",{passive:!0}),d(window,"resize",{passive:!0})).pipe(m(fn),Q(fn()))}function dn(){return{width:innerWidth,height:innerHeight}}function hn(){return d(window,"resize",{passive:!0}).pipe(m(dn),Q(dn()))}function bn(){return z([un(),hn()]).pipe(m(([e,t])=>({offset:e,size:t})),G(1))}function mr(e,{viewport$:t,header$:r}){let o=t.pipe(Z("size")),n=z([o,r]).pipe(m(()=>Ue(e)));return z([r,t,n]).pipe(m(([{height:i},{offset:a,size:s},{x:p,y:c}])=>({offset:{x:a.x-p,y:a.y-c+i},size:s})))}function Oa(e){return d(e,"message",t=>t.data)}function Ma(e){let t=new g;return t.subscribe(r=>e.postMessage(r)),t}function vn(e,t=new Worker(e)){let r=Oa(t),o=Ma(t),n=new g;n.subscribe(o);let i=o.pipe(X(),ne(!0));return n.pipe(X(),Pe(r.pipe(U(i))),pe())}var La=P("#__config"),St=JSON.parse(La.textContent);St.base=`${new URL(St.base,xe())}`;function ye(){return St}function B(e){return St.features.includes(e)}function Ee(e,t){return typeof t!="undefined"?St.translations[e].replace("#",t.toString()):St.translations[e]}function Se(e,t=document){return P(`[data-md-component=${e}]`,t)}function ae(e,t=document){return $(`[data-md-component=${e}]`,t)}function _a(e){let t=P(".md-typeset > :first-child",e);return d(t,"click",{once:!0}).pipe(m(()=>P(".md-typeset",e)),m(r=>({hash:__md_hash(r.innerHTML)})))}function gn(e){if(!B("announce.dismiss")||!e.childElementCount)return O;if(!e.hidden){let t=P(".md-typeset",e);__md_hash(t.innerHTML)===__md_get("__announce")&&(e.hidden=!0)}return C(()=>{let t=new g;return t.subscribe(({hash:r})=>{e.hidden=!0,__md_set("__announce",r)}),_a(e).pipe(E(r=>t.next(r)),L(()=>t.complete()),m(r=>R({ref:e},r)))})}function Aa(e,{target$:t}){return t.pipe(m(r=>({hidden:r!==e})))}function xn(e,t){let r=new g;return r.subscribe(({hidden:o})=>{e.hidden=o}),Aa(e,t).pipe(E(o=>r.next(o)),L(()=>r.complete()),m(o=>R({ref:e},o)))}function Pt(e,t){return t==="inline"?x("div",{class:"md-tooltip md-tooltip--inline",id:e,role:"tooltip"},x("div",{class:"md-tooltip__inner md-typeset"})):x("div",{class:"md-tooltip",id:e,role:"tooltip"},x("div",{class:"md-tooltip__inner md-typeset"}))}function yn(...e){return x("div",{class:"md-tooltip2",role:"tooltip"},x("div",{class:"md-tooltip2__inner md-typeset"},e))}function En(e,t){if(t=t?`${t}_annotation_${e}`:void 0,t){let r=t?`#${t}`:void 0;return x("aside",{class:"md-annotation",tabIndex:0},Pt(t),x("a",{href:r,class:"md-annotation__index",tabIndex:-1},x("span",{"data-md-annotation-id":e})))}else return x("aside",{class:"md-annotation",tabIndex:0},Pt(t),x("span",{class:"md-annotation__index",tabIndex:-1},x("span",{"data-md-annotation-id":e})))}function wn(e){return x("button",{class:"md-clipboard md-icon",title:Ee("clipboard.copy"),"data-clipboard-target":`#${e} > code`})}function qr(e,t){let r=t&2,o=t&1,n=Object.keys(e.terms).filter(p=>!e.terms[p]).reduce((p,c)=>[...p,x("del",null,c)," "],[]).slice(0,-1),i=ye(),a=new URL(e.location,i.base);B("search.highlight")&&a.searchParams.set("h",Object.entries(e.terms).filter(([,p])=>p).reduce((p,[c])=>`${p} ${c}`.trim(),""));let{tags:s}=ye();return x("a",{href:`${a}`,class:"md-search-result__link",tabIndex:-1},x("article",{class:"md-search-result__article md-typeset","data-md-score":e.score.toFixed(2)},r>0&&x("div",{class:"md-search-result__icon md-icon"}),r>0&&x("h1",null,e.title),r<=0&&x("h2",null,e.title),o>0&&e.text.length>0&&e.text,e.tags&&e.tags.map(p=>{let c=s?p in s?`md-tag-icon md-tag--${s[p]}`:"md-tag-icon":"";return x("span",{class:`md-tag ${c}`},p)}),o>0&&n.length>0&&x("p",{class:"md-search-result__terms"},Ee("search.result.term.missing"),": ",...n)))}function Tn(e){let t=e[0].score,r=[...e],o=ye(),n=r.findIndex(l=>!`${new URL(l.location,o.base)}`.includes("#")),[i]=r.splice(n,1),a=r.findIndex(l=>l.scoreqr(l,1)),...p.length?[x("details",{class:"md-search-result__more"},x("summary",{tabIndex:-1},x("div",null,p.length>0&&p.length===1?Ee("search.result.more.one"):Ee("search.result.more.other",p.length))),...p.map(l=>qr(l,1)))]:[]];return x("li",{class:"md-search-result__item"},c)}function Sn(e){return x("ul",{class:"md-source__facts"},Object.entries(e).map(([t,r])=>x("li",{class:`md-source__fact md-source__fact--${t}`},typeof r=="number"?sr(r):r)))}function Qr(e){let t=`tabbed-control tabbed-control--${e}`;return x("div",{class:t,hidden:!0},x("button",{class:"tabbed-button",tabIndex:-1,"aria-hidden":"true"}))}function On(e){return x("div",{class:"md-typeset__scrollwrap"},x("div",{class:"md-typeset__table"},e))}function Ca(e){var o;let t=ye(),r=new URL(`../${e.version}/`,t.base);return x("li",{class:"md-version__item"},x("a",{href:`${r}`,class:"md-version__link"},e.title,((o=t.version)==null?void 0:o.alias)&&e.aliases.length>0&&x("span",{class:"md-version__alias"},e.aliases[0])))}function Mn(e,t){var o;let r=ye();return e=e.filter(n=>{var i;return!((i=n.properties)!=null&&i.hidden)}),x("div",{class:"md-version"},x("button",{class:"md-version__current","aria-label":Ee("select.version")},t.title,((o=r.version)==null?void 0:o.alias)&&t.aliases.length>0&&x("span",{class:"md-version__alias"},t.aliases[0])),x("ul",{class:"md-version__list"},e.map(Ca)))}var Ha=0;function ka(e){let t=z([et(e),kt(e)]).pipe(m(([o,n])=>o||n),K()),r=C(()=>Jo(e)).pipe(oe(De),ct(1),m(()=>Xo(e)));return t.pipe(Ae(o=>o),v(()=>z([t,r])),m(([o,n])=>({active:o,offset:n})),pe())}function $a(e,t){let{content$:r,viewport$:o}=t,n=`__tooltip2_${Ha++}`;return C(()=>{let i=new g,a=new _r(!1);i.pipe(X(),ne(!1)).subscribe(a);let s=a.pipe(Ht(c=>Me(+!c*250,Hr)),K(),v(c=>c?r:O),E(c=>c.id=n),pe());z([i.pipe(m(({active:c})=>c)),s.pipe(v(c=>kt(c,250)),Q(!1))]).pipe(m(c=>c.some(l=>l))).subscribe(a);let p=a.pipe(b(c=>c),ee(s,o),m(([c,l,{size:f}])=>{let u=e.getBoundingClientRect(),h=u.width/2;if(l.role==="tooltip")return{x:h,y:8+u.height};if(u.y>=f.height/2){let{height:w}=ce(l);return{x:h,y:-16-w}}else return{x:h,y:16+u.height}}));return z([s,i,p]).subscribe(([c,{offset:l},f])=>{c.style.setProperty("--md-tooltip-host-x",`${l.x}px`),c.style.setProperty("--md-tooltip-host-y",`${l.y}px`),c.style.setProperty("--md-tooltip-x",`${f.x}px`),c.style.setProperty("--md-tooltip-y",`${f.y}px`),c.classList.toggle("md-tooltip2--top",f.y<0),c.classList.toggle("md-tooltip2--bottom",f.y>=0)}),a.pipe(b(c=>c),ee(s,(c,l)=>l),b(c=>c.role==="tooltip")).subscribe(c=>{let l=ce(P(":scope > *",c));c.style.setProperty("--md-tooltip-width",`${l.width}px`),c.style.setProperty("--md-tooltip-tail","0px")}),a.pipe(K(),be(me),ee(s)).subscribe(([c,l])=>{l.classList.toggle("md-tooltip2--active",c)}),z([a.pipe(b(c=>c)),s]).subscribe(([c,l])=>{l.role==="dialog"?(e.setAttribute("aria-controls",n),e.setAttribute("aria-haspopup","dialog")):e.setAttribute("aria-describedby",n)}),a.pipe(b(c=>!c)).subscribe(()=>{e.removeAttribute("aria-controls"),e.removeAttribute("aria-describedby"),e.removeAttribute("aria-haspopup")}),ka(e).pipe(E(c=>i.next(c)),L(()=>i.complete()),m(c=>R({ref:e},c)))})}function lt(e,{viewport$:t},r=document.body){return $a(e,{content$:new F(o=>{let n=e.title,i=yn(n);return o.next(i),e.removeAttribute("title"),r.append(i),()=>{i.remove(),e.setAttribute("title",n)}}),viewport$:t})}function Pa(e,t){let r=C(()=>z([Zo(e),De(t)])).pipe(m(([{x:o,y:n},i])=>{let{width:a,height:s}=ce(e);return{x:o-i.x+a/2,y:n-i.y+s/2}}));return et(e).pipe(v(o=>r.pipe(m(n=>({active:o,offset:n})),Te(+!o||1/0))))}function Ln(e,t,{target$:r}){let[o,n]=Array.from(e.children);return C(()=>{let i=new g,a=i.pipe(X(),ne(!0));return i.subscribe({next({offset:s}){e.style.setProperty("--md-tooltip-x",`${s.x}px`),e.style.setProperty("--md-tooltip-y",`${s.y}px`)},complete(){e.style.removeProperty("--md-tooltip-x"),e.style.removeProperty("--md-tooltip-y")}}),tt(e).pipe(U(a)).subscribe(s=>{e.toggleAttribute("data-md-visible",s)}),S(i.pipe(b(({active:s})=>s)),i.pipe(_e(250),b(({active:s})=>!s))).subscribe({next({active:s}){s?e.prepend(o):o.remove()},complete(){e.prepend(o)}}),i.pipe(Le(16,me)).subscribe(({active:s})=>{o.classList.toggle("md-tooltip--active",s)}),i.pipe(ct(125,me),b(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:s})=>s)).subscribe({next(s){s?e.style.setProperty("--md-tooltip-0",`${-s}px`):e.style.removeProperty("--md-tooltip-0")},complete(){e.style.removeProperty("--md-tooltip-0")}}),d(n,"click").pipe(U(a),b(s=>!(s.metaKey||s.ctrlKey))).subscribe(s=>{s.stopPropagation(),s.preventDefault()}),d(n,"mousedown").pipe(U(a),ee(i)).subscribe(([s,{active:p}])=>{var c;if(s.button!==0||s.metaKey||s.ctrlKey)s.preventDefault();else if(p){s.preventDefault();let l=e.parentElement.closest(".md-annotation");l instanceof HTMLElement?l.focus():(c=Re())==null||c.blur()}}),r.pipe(U(a),b(s=>s===o),Ge(125)).subscribe(()=>e.focus()),Pa(e,t).pipe(E(s=>i.next(s)),L(()=>i.complete()),m(s=>R({ref:e},s)))})}function Ra(e){return e.tagName==="CODE"?$(".c, .c1, .cm",e):[e]}function Ia(e){let t=[];for(let r of Ra(e)){let o=[],n=document.createNodeIterator(r,NodeFilter.SHOW_TEXT);for(let i=n.nextNode();i;i=n.nextNode())o.push(i);for(let i of o){let a;for(;a=/(\(\d+\))(!)?/.exec(i.textContent);){let[,s,p]=a;if(typeof p=="undefined"){let c=i.splitText(a.index);i=c.splitText(s.length),t.push(c)}else{i.textContent=s,t.push(i);break}}}}return t}function _n(e,t){t.append(...Array.from(e.childNodes))}function fr(e,t,{target$:r,print$:o}){let n=t.closest("[id]"),i=n==null?void 0:n.id,a=new Map;for(let s of Ia(t)){let[,p]=s.textContent.match(/\((\d+)\)/);fe(`:scope > li:nth-child(${p})`,e)&&(a.set(p,En(p,i)),s.replaceWith(a.get(p)))}return a.size===0?O:C(()=>{let s=new g,p=s.pipe(X(),ne(!0)),c=[];for(let[l,f]of a)c.push([P(".md-typeset",f),P(`:scope > li:nth-child(${l})`,e)]);return o.pipe(U(p)).subscribe(l=>{e.hidden=!l,e.classList.toggle("md-annotation-list",l);for(let[f,u]of c)l?_n(f,u):_n(u,f)}),S(...[...a].map(([,l])=>Ln(l,t,{target$:r}))).pipe(L(()=>s.complete()),pe())})}function An(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return An(t)}}function Cn(e,t){return C(()=>{let r=An(e);return typeof r!="undefined"?fr(r,e,t):O})}var Hn=Vt(Yr());var Fa=0;function kn(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return kn(t)}}function ja(e){return ge(e).pipe(m(({width:t})=>({scrollable:Tt(e).width>t})),Z("scrollable"))}function $n(e,t){let{matches:r}=matchMedia("(hover)"),o=C(()=>{let n=new g,i=n.pipe(Fr(1));n.subscribe(({scrollable:c})=>{c&&r?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")});let a=[];if(Hn.default.isSupported()&&(e.closest(".copy")||B("content.code.copy")&&!e.closest(".no-copy"))){let c=e.closest("pre");c.id=`__code_${Fa++}`;let l=wn(c.id);c.insertBefore(l,e),B("content.tooltips")&&a.push(lt(l,{viewport$}))}let s=e.closest(".highlight");if(s instanceof HTMLElement){let c=kn(s);if(typeof c!="undefined"&&(s.classList.contains("annotate")||B("content.code.annotate"))){let l=fr(c,e,t);a.push(ge(s).pipe(U(i),m(({width:f,height:u})=>f&&u),K(),v(f=>f?l:O)))}}return $(":scope > span[id]",e).length&&e.classList.add("md-code__content"),ja(e).pipe(E(c=>n.next(c)),L(()=>n.complete()),m(c=>R({ref:e},c)),Pe(...a))});return B("content.lazy")?tt(e).pipe(b(n=>n),Te(1),v(()=>o)):o}function Wa(e,{target$:t,print$:r}){let o=!0;return S(t.pipe(m(n=>n.closest("details:not([open])")),b(n=>e===n),m(()=>({action:"open",reveal:!0}))),r.pipe(b(n=>n||!o),E(()=>o=e.open),m(n=>({action:n?"open":"close"}))))}function Pn(e,t){return C(()=>{let r=new g;return r.subscribe(({action:o,reveal:n})=>{e.toggleAttribute("open",o==="open"),n&&e.scrollIntoView()}),Wa(e,t).pipe(E(o=>r.next(o)),L(()=>r.complete()),m(o=>R({ref:e},o)))})}var Rn=".node circle,.node ellipse,.node path,.node polygon,.node rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}marker{fill:var(--md-mermaid-edge-color)!important}.edgeLabel .label rect{fill:#0000}.label{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.label foreignObject{line-height:normal;overflow:visible}.label div .edgeLabel{color:var(--md-mermaid-label-fg-color)}.edgeLabel,.edgeLabel rect,.label div .edgeLabel{background-color:var(--md-mermaid-label-bg-color)}.edgeLabel,.edgeLabel rect{fill:var(--md-mermaid-label-bg-color);color:var(--md-mermaid-edge-color)}.edgePath .path,.flowchart-link{stroke:var(--md-mermaid-edge-color);stroke-width:.05rem}.edgePath .arrowheadPath{fill:var(--md-mermaid-edge-color);stroke:none}.cluster rect{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}.cluster span{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}g #flowchart-circleEnd,g #flowchart-circleStart,g #flowchart-crossEnd,g #flowchart-crossStart,g #flowchart-pointEnd,g #flowchart-pointStart{stroke:none}g.classGroup line,g.classGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.classGroup text{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.classLabel .box{fill:var(--md-mermaid-label-bg-color);background-color:var(--md-mermaid-label-bg-color);opacity:1}.classLabel .label{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node .divider{stroke:var(--md-mermaid-node-fg-color)}.relation{stroke:var(--md-mermaid-edge-color)}.cardinality{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.cardinality text{fill:inherit!important}defs #classDiagram-compositionEnd,defs #classDiagram-compositionStart,defs #classDiagram-dependencyEnd,defs #classDiagram-dependencyStart,defs #classDiagram-extensionEnd,defs #classDiagram-extensionStart{fill:var(--md-mermaid-edge-color)!important;stroke:var(--md-mermaid-edge-color)!important}defs #classDiagram-aggregationEnd,defs #classDiagram-aggregationStart{fill:var(--md-mermaid-label-bg-color)!important;stroke:var(--md-mermaid-edge-color)!important}g.stateGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.stateGroup .state-title{fill:var(--md-mermaid-label-fg-color)!important;font-family:var(--md-mermaid-font-family)}g.stateGroup .composit{fill:var(--md-mermaid-label-bg-color)}.nodeLabel,.nodeLabel p{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}a .nodeLabel{text-decoration:underline}.node circle.state-end,.node circle.state-start,.start-state{fill:var(--md-mermaid-edge-color);stroke:none}.end-state-inner,.end-state-outer{fill:var(--md-mermaid-edge-color)}.end-state-inner,.node circle.state-end{stroke:var(--md-mermaid-label-bg-color)}.transition{stroke:var(--md-mermaid-edge-color)}[id^=state-fork] rect,[id^=state-join] rect{fill:var(--md-mermaid-edge-color)!important;stroke:none!important}.statediagram-cluster.statediagram-cluster .inner{fill:var(--md-default-bg-color)}.statediagram-cluster rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.statediagram-state rect.divider{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}defs #statediagram-barbEnd{stroke:var(--md-mermaid-edge-color)}.attributeBoxEven,.attributeBoxOdd{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityBox{fill:var(--md-mermaid-label-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityLabel{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.relationshipLabelBox{fill:var(--md-mermaid-label-bg-color);fill-opacity:1;background-color:var(--md-mermaid-label-bg-color);opacity:1}.relationshipLabel{fill:var(--md-mermaid-label-fg-color)}.relationshipLine{stroke:var(--md-mermaid-edge-color)}defs #ONE_OR_MORE_END *,defs #ONE_OR_MORE_START *,defs #ONLY_ONE_END *,defs #ONLY_ONE_START *,defs #ZERO_OR_MORE_END *,defs #ZERO_OR_MORE_START *,defs #ZERO_OR_ONE_END *,defs #ZERO_OR_ONE_START *{stroke:var(--md-mermaid-edge-color)!important}defs #ZERO_OR_MORE_END circle,defs #ZERO_OR_MORE_START circle{fill:var(--md-mermaid-label-bg-color)}.actor{fill:var(--md-mermaid-sequence-actor-bg-color);stroke:var(--md-mermaid-sequence-actor-border-color)}text.actor>tspan{fill:var(--md-mermaid-sequence-actor-fg-color);font-family:var(--md-mermaid-font-family)}line{stroke:var(--md-mermaid-sequence-actor-line-color)}.actor-man circle,.actor-man line{fill:var(--md-mermaid-sequence-actorman-bg-color);stroke:var(--md-mermaid-sequence-actorman-line-color)}.messageLine0,.messageLine1{stroke:var(--md-mermaid-sequence-message-line-color)}.note{fill:var(--md-mermaid-sequence-note-bg-color);stroke:var(--md-mermaid-sequence-note-border-color)}.loopText,.loopText>tspan,.messageText,.noteText>tspan{stroke:none;font-family:var(--md-mermaid-font-family)!important}.messageText{fill:var(--md-mermaid-sequence-message-fg-color)}.loopText,.loopText>tspan{fill:var(--md-mermaid-sequence-loop-fg-color)}.noteText>tspan{fill:var(--md-mermaid-sequence-note-fg-color)}#arrowhead path{fill:var(--md-mermaid-sequence-message-line-color);stroke:none}.loopLine{fill:var(--md-mermaid-sequence-loop-bg-color);stroke:var(--md-mermaid-sequence-loop-border-color)}.labelBox{fill:var(--md-mermaid-sequence-label-bg-color);stroke:none}.labelText,.labelText>span{fill:var(--md-mermaid-sequence-label-fg-color);font-family:var(--md-mermaid-font-family)}.sequenceNumber{fill:var(--md-mermaid-sequence-number-fg-color)}rect.rect{fill:var(--md-mermaid-sequence-box-bg-color);stroke:none}rect.rect+text.text{fill:var(--md-mermaid-sequence-box-fg-color)}defs #sequencenumber{fill:var(--md-mermaid-sequence-number-bg-color)!important}";var Br,Da=0;function Va(){return typeof mermaid=="undefined"||mermaid instanceof Element?wt("https://unpkg.com/mermaid@10/dist/mermaid.min.js"):I(void 0)}function In(e){return e.classList.remove("mermaid"),Br||(Br=Va().pipe(E(()=>mermaid.initialize({startOnLoad:!1,themeCSS:Rn,sequence:{actorFontSize:"16px",messageFontSize:"16px",noteFontSize:"16px"}})),m(()=>{}),G(1))),Br.subscribe(()=>ao(this,null,function*(){e.classList.add("mermaid");let t=`__mermaid_${Da++}`,r=x("div",{class:"mermaid"}),o=e.textContent,{svg:n,fn:i}=yield mermaid.render(t,o),a=r.attachShadow({mode:"closed"});a.innerHTML=n,e.replaceWith(r),i==null||i(a)})),Br.pipe(m(()=>({ref:e})))}var Fn=x("table");function jn(e){return e.replaceWith(Fn),Fn.replaceWith(On(e)),I({ref:e})}function Na(e){let t=e.find(r=>r.checked)||e[0];return S(...e.map(r=>d(r,"change").pipe(m(()=>P(`label[for="${r.id}"]`))))).pipe(Q(P(`label[for="${t.id}"]`)),m(r=>({active:r})))}function Wn(e,{viewport$:t,target$:r}){let o=P(".tabbed-labels",e),n=$(":scope > input",e),i=Qr("prev");e.append(i);let a=Qr("next");return e.append(a),C(()=>{let s=new g,p=s.pipe(X(),ne(!0));z([s,ge(e),tt(e)]).pipe(U(p),Le(1,me)).subscribe({next([{active:c},l]){let f=Ue(c),{width:u}=ce(c);e.style.setProperty("--md-indicator-x",`${f.x}px`),e.style.setProperty("--md-indicator-width",`${u}px`);let h=pr(o);(f.xh.x+l.width)&&o.scrollTo({left:Math.max(0,f.x-16),behavior:"smooth"})},complete(){e.style.removeProperty("--md-indicator-x"),e.style.removeProperty("--md-indicator-width")}}),z([De(o),ge(o)]).pipe(U(p)).subscribe(([c,l])=>{let f=Tt(o);i.hidden=c.x<16,a.hidden=c.x>f.width-l.width-16}),S(d(i,"click").pipe(m(()=>-1)),d(a,"click").pipe(m(()=>1))).pipe(U(p)).subscribe(c=>{let{width:l}=ce(o);o.scrollBy({left:l*c,behavior:"smooth"})}),r.pipe(U(p),b(c=>n.includes(c))).subscribe(c=>c.click()),o.classList.add("tabbed-labels--linked");for(let c of n){let l=P(`label[for="${c.id}"]`);l.replaceChildren(x("a",{href:`#${l.htmlFor}`,tabIndex:-1},...Array.from(l.childNodes))),d(l.firstElementChild,"click").pipe(U(p),b(f=>!(f.metaKey||f.ctrlKey)),E(f=>{f.preventDefault(),f.stopPropagation()})).subscribe(()=>{history.replaceState({},"",`#${l.htmlFor}`),l.click()})}return B("content.tabs.link")&&s.pipe(Ce(1),ee(t)).subscribe(([{active:c},{offset:l}])=>{let f=c.innerText.trim();if(c.hasAttribute("data-md-switching"))c.removeAttribute("data-md-switching");else{let u=e.offsetTop-l.y;for(let w of $("[data-tabs]"))for(let A of $(":scope > input",w)){let te=P(`label[for="${A.id}"]`);if(te!==c&&te.innerText.trim()===f){te.setAttribute("data-md-switching",""),A.click();break}}window.scrollTo({top:e.offsetTop-u});let h=__md_get("__tabs")||[];__md_set("__tabs",[...new Set([f,...h])])}}),s.pipe(U(p)).subscribe(()=>{for(let c of $("audio, video",e))c.pause()}),Na(n).pipe(E(c=>s.next(c)),L(()=>s.complete()),m(c=>R({ref:e},c)))}).pipe(Qe(se))}function Un(e,{viewport$:t,target$:r,print$:o}){return S(...$(".annotate:not(.highlight)",e).map(n=>Cn(n,{target$:r,print$:o})),...$("pre:not(.mermaid) > code",e).map(n=>$n(n,{target$:r,print$:o})),...$("pre.mermaid",e).map(n=>In(n)),...$("table:not([class])",e).map(n=>jn(n)),...$("details",e).map(n=>Pn(n,{target$:r,print$:o})),...$("[data-tabs]",e).map(n=>Wn(n,{viewport$:t,target$:r})),...$("[title]",e).filter(()=>B("content.tooltips")).map(n=>lt(n,{viewport$:t})))}function za(e,{alert$:t}){return t.pipe(v(r=>S(I(!0),I(!1).pipe(Ge(2e3))).pipe(m(o=>({message:r,active:o})))))}function Dn(e,t){let r=P(".md-typeset",e);return C(()=>{let o=new g;return o.subscribe(({message:n,active:i})=>{e.classList.toggle("md-dialog--active",i),r.textContent=n}),za(e,t).pipe(E(n=>o.next(n)),L(()=>o.complete()),m(n=>R({ref:e},n)))})}var qa=0;function Qa(e,t){document.body.append(e);let{width:r}=ce(e);e.style.setProperty("--md-tooltip-width",`${r}px`),e.remove();let o=cr(t),n=typeof o!="undefined"?De(o):I({x:0,y:0}),i=S(et(t),kt(t)).pipe(K());return z([i,n]).pipe(m(([a,s])=>{let{x:p,y:c}=Ue(t),l=ce(t),f=t.closest("table");return f&&t.parentElement&&(p+=f.offsetLeft+t.parentElement.offsetLeft,c+=f.offsetTop+t.parentElement.offsetTop),{active:a,offset:{x:p-s.x+l.width/2-r/2,y:c-s.y+l.height+8}}}))}function Vn(e){let t=e.title;if(!t.length)return O;let r=`__tooltip_${qa++}`,o=Pt(r,"inline"),n=P(".md-typeset",o);return n.innerHTML=t,C(()=>{let i=new g;return i.subscribe({next({offset:a}){o.style.setProperty("--md-tooltip-x",`${a.x}px`),o.style.setProperty("--md-tooltip-y",`${a.y}px`)},complete(){o.style.removeProperty("--md-tooltip-x"),o.style.removeProperty("--md-tooltip-y")}}),S(i.pipe(b(({active:a})=>a)),i.pipe(_e(250),b(({active:a})=>!a))).subscribe({next({active:a}){a?(e.insertAdjacentElement("afterend",o),e.setAttribute("aria-describedby",r),e.removeAttribute("title")):(o.remove(),e.removeAttribute("aria-describedby"),e.setAttribute("title",t))},complete(){o.remove(),e.removeAttribute("aria-describedby"),e.setAttribute("title",t)}}),i.pipe(Le(16,me)).subscribe(({active:a})=>{o.classList.toggle("md-tooltip--active",a)}),i.pipe(ct(125,me),b(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:a})=>a)).subscribe({next(a){a?o.style.setProperty("--md-tooltip-0",`${-a}px`):o.style.removeProperty("--md-tooltip-0")},complete(){o.style.removeProperty("--md-tooltip-0")}}),Qa(o,e).pipe(E(a=>i.next(a)),L(()=>i.complete()),m(a=>R({ref:e},a)))}).pipe(Qe(se))}function Ka({viewport$:e}){if(!B("header.autohide"))return I(!1);let t=e.pipe(m(({offset:{y:n}})=>n),Ye(2,1),m(([n,i])=>[nMath.abs(i-n.y)>100),m(([,[n]])=>n),K()),o=Ve("search");return z([e,o]).pipe(m(([{offset:n},i])=>n.y>400&&!i),K(),v(n=>n?r:I(!1)),Q(!1))}function Nn(e,t){return C(()=>z([ge(e),Ka(t)])).pipe(m(([{height:r},o])=>({height:r,hidden:o})),K((r,o)=>r.height===o.height&&r.hidden===o.hidden),G(1))}function zn(e,{header$:t,main$:r}){return C(()=>{let o=new g,n=o.pipe(X(),ne(!0));o.pipe(Z("active"),We(t)).subscribe(([{active:a},{hidden:s}])=>{e.classList.toggle("md-header--shadow",a&&!s),e.hidden=s});let i=ue($("[title]",e)).pipe(b(()=>B("content.tooltips")),oe(a=>Vn(a)));return r.subscribe(o),t.pipe(U(n),m(a=>R({ref:e},a)),Pe(i.pipe(U(n))))})}function Ya(e,{viewport$:t,header$:r}){return mr(e,{viewport$:t,header$:r}).pipe(m(({offset:{y:o}})=>{let{height:n}=ce(e);return{active:o>=n}}),Z("active"))}function qn(e,t){return C(()=>{let r=new g;r.subscribe({next({active:n}){e.classList.toggle("md-header__title--active",n)},complete(){e.classList.remove("md-header__title--active")}});let o=fe(".md-content h1");return typeof o=="undefined"?O:Ya(o,t).pipe(E(n=>r.next(n)),L(()=>r.complete()),m(n=>R({ref:e},n)))})}function Qn(e,{viewport$:t,header$:r}){let o=r.pipe(m(({height:i})=>i),K()),n=o.pipe(v(()=>ge(e).pipe(m(({height:i})=>({top:e.offsetTop,bottom:e.offsetTop+i})),Z("bottom"))));return z([o,n,t]).pipe(m(([i,{top:a,bottom:s},{offset:{y:p},size:{height:c}}])=>(c=Math.max(0,c-Math.max(0,a-p,i)-Math.max(0,c+p-s)),{offset:a-i,height:c,active:a-i<=p})),K((i,a)=>i.offset===a.offset&&i.height===a.height&&i.active===a.active))}function Ba(e){let t=__md_get("__palette")||{index:e.findIndex(o=>matchMedia(o.getAttribute("data-md-color-media")).matches)},r=Math.max(0,Math.min(t.index,e.length-1));return I(...e).pipe(oe(o=>d(o,"change").pipe(m(()=>o))),Q(e[r]),m(o=>({index:e.indexOf(o),color:{media:o.getAttribute("data-md-color-media"),scheme:o.getAttribute("data-md-color-scheme"),primary:o.getAttribute("data-md-color-primary"),accent:o.getAttribute("data-md-color-accent")}})),G(1))}function Kn(e){let t=$("input",e),r=x("meta",{name:"theme-color"});document.head.appendChild(r);let o=x("meta",{name:"color-scheme"});document.head.appendChild(o);let n=$t("(prefers-color-scheme: light)");return C(()=>{let i=new g;return i.subscribe(a=>{if(document.body.setAttribute("data-md-color-switching",""),a.color.media==="(prefers-color-scheme)"){let s=matchMedia("(prefers-color-scheme: light)"),p=document.querySelector(s.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");a.color.scheme=p.getAttribute("data-md-color-scheme"),a.color.primary=p.getAttribute("data-md-color-primary"),a.color.accent=p.getAttribute("data-md-color-accent")}for(let[s,p]of Object.entries(a.color))document.body.setAttribute(`data-md-color-${s}`,p);for(let s=0;sa.key==="Enter"),ee(i,(a,s)=>s)).subscribe(({index:a})=>{a=(a+1)%t.length,t[a].click(),t[a].focus()}),i.pipe(m(()=>{let a=Se("header"),s=window.getComputedStyle(a);return o.content=s.colorScheme,s.backgroundColor.match(/\d+/g).map(p=>(+p).toString(16).padStart(2,"0")).join("")})).subscribe(a=>r.content=`#${a}`),i.pipe(be(se)).subscribe(()=>{document.body.removeAttribute("data-md-color-switching")}),Ba(t).pipe(U(n.pipe(Ce(1))),st(),E(a=>i.next(a)),L(()=>i.complete()),m(a=>R({ref:e},a)))})}function Yn(e,{progress$:t}){return C(()=>{let r=new g;return r.subscribe(({value:o})=>{e.style.setProperty("--md-progress-value",`${o}`)}),t.pipe(E(o=>r.next({value:o})),L(()=>r.complete()),m(o=>({ref:e,value:o})))})}var Gr=Vt(Yr());function Ga(e){e.setAttribute("data-md-copying","");let t=e.closest("[data-copy]"),r=t?t.getAttribute("data-copy"):e.innerText;return e.removeAttribute("data-md-copying"),r.trimEnd()}function Bn({alert$:e}){Gr.default.isSupported()&&new F(t=>{new Gr.default("[data-clipboard-target], [data-clipboard-text]",{text:r=>r.getAttribute("data-clipboard-text")||Ga(P(r.getAttribute("data-clipboard-target")))}).on("success",r=>t.next(r))}).pipe(E(t=>{t.trigger.focus()}),m(()=>Ee("clipboard.copied"))).subscribe(e)}function Gn(e,t){return e.protocol=t.protocol,e.hostname=t.hostname,e}function Ja(e,t){let r=new Map;for(let o of $("url",e)){let n=P("loc",o),i=[Gn(new URL(n.textContent),t)];r.set(`${i[0]}`,i);for(let a of $("[rel=alternate]",o)){let s=a.getAttribute("href");s!=null&&i.push(Gn(new URL(s),t))}}return r}function ur(e){return mn(new URL("sitemap.xml",e)).pipe(m(t=>Ja(t,new URL(e))),ve(()=>I(new Map)))}function Xa(e,t){if(!(e.target instanceof Element))return O;let r=e.target.closest("a");if(r===null)return O;if(r.target||e.metaKey||e.ctrlKey)return O;let o=new URL(r.href);return o.search=o.hash="",t.has(`${o}`)?(e.preventDefault(),I(new URL(r.href))):O}function Jn(e){let t=new Map;for(let r of $(":scope > *",e.head))t.set(r.outerHTML,r);return t}function Xn(e){for(let t of $("[href], [src]",e))for(let r of["href","src"]){let o=t.getAttribute(r);if(o&&!/^(?:[a-z]+:)?\/\//i.test(o)){t[r]=t[r];break}}return I(e)}function Za(e){for(let o of["[data-md-component=announce]","[data-md-component=container]","[data-md-component=header-topic]","[data-md-component=outdated]","[data-md-component=logo]","[data-md-component=skip]",...B("navigation.tabs.sticky")?["[data-md-component=tabs]"]:[]]){let n=fe(o),i=fe(o,e);typeof n!="undefined"&&typeof i!="undefined"&&n.replaceWith(i)}let t=Jn(document);for(let[o,n]of Jn(e))t.has(o)?t.delete(o):document.head.appendChild(n);for(let o of t.values()){let n=o.getAttribute("name");n!=="theme-color"&&n!=="color-scheme"&&o.remove()}let r=Se("container");return je($("script",r)).pipe(v(o=>{let n=e.createElement("script");if(o.src){for(let i of o.getAttributeNames())n.setAttribute(i,o.getAttribute(i));return o.replaceWith(n),new F(i=>{n.onload=()=>i.complete()})}else return n.textContent=o.textContent,o.replaceWith(n),O}),X(),ne(document))}function Zn({location$:e,viewport$:t,progress$:r}){let o=ye();if(location.protocol==="file:")return O;let n=ur(o.base);I(document).subscribe(Xn);let i=d(document.body,"click").pipe(We(n),v(([p,c])=>Xa(p,c)),pe()),a=d(window,"popstate").pipe(m(xe),pe());i.pipe(ee(t)).subscribe(([p,{offset:c}])=>{history.replaceState(c,""),history.pushState(null,"",p)}),S(i,a).subscribe(e);let s=e.pipe(Z("pathname"),v(p=>ln(p,{progress$:r}).pipe(ve(()=>(pt(p,!0),O)))),v(Xn),v(Za),pe());return S(s.pipe(ee(e,(p,c)=>c)),s.pipe(v(()=>e),Z("pathname"),v(()=>e),Z("hash")),e.pipe(K((p,c)=>p.pathname===c.pathname&&p.hash===c.hash),v(()=>i),E(()=>history.back()))).subscribe(p=>{var c,l;history.state!==null||!p.hash?window.scrollTo(0,(l=(c=history.state)==null?void 0:c.y)!=null?l:0):(history.scrollRestoration="auto",sn(p.hash),history.scrollRestoration="manual")}),e.subscribe(()=>{history.scrollRestoration="manual"}),d(window,"beforeunload").subscribe(()=>{history.scrollRestoration="auto"}),t.pipe(Z("offset"),_e(100)).subscribe(({offset:p})=>{history.replaceState(p,"")}),s}var ri=Vt(ti());function oi(e){let t=e.separator.split("|").map(n=>n.replace(/(\(\?[!=<][^)]+\))/g,"").length===0?"\uFFFD":n).join("|"),r=new RegExp(t,"img"),o=(n,i,a)=>`${i}${a}`;return n=>{n=n.replace(/[\s*+\-:~^]+/g," ").trim();let i=new RegExp(`(^|${e.separator}|)(${n.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&").replace(r,"|")})`,"img");return a=>(0,ri.default)(a).replace(i,o).replace(/<\/mark>(\s+)]*>/img,"$1")}}function It(e){return e.type===1}function dr(e){return e.type===3}function ni(e,t){let r=vn(e);return S(I(location.protocol!=="file:"),Ve("search")).pipe(Ae(o=>o),v(()=>t)).subscribe(({config:o,docs:n})=>r.next({type:0,data:{config:o,docs:n,options:{suggest:B("search.suggest")}}})),r}function ii({document$:e}){let t=ye(),r=Ne(new URL("../versions.json",t.base)).pipe(ve(()=>O)),o=r.pipe(m(n=>{let[,i]=t.base.match(/([^/]+)\/?$/);return n.find(({version:a,aliases:s})=>a===i||s.includes(i))||n[0]}));r.pipe(m(n=>new Map(n.map(i=>[`${new URL(`../${i.version}/`,t.base)}`,i]))),v(n=>d(document.body,"click").pipe(b(i=>!i.metaKey&&!i.ctrlKey),ee(o),v(([i,a])=>{if(i.target instanceof Element){let s=i.target.closest("a");if(s&&!s.target&&n.has(s.href)){let p=s.href;return!i.target.closest(".md-version")&&n.get(p)===a?O:(i.preventDefault(),I(p))}}return O}),v(i=>ur(new URL(i)).pipe(m(a=>{let p=xe().href.replace(t.base,i);return a.has(p.split("#")[0])?new URL(p):new URL(i)})))))).subscribe(n=>pt(n,!0)),z([r,o]).subscribe(([n,i])=>{P(".md-header__topic").appendChild(Mn(n,i))}),e.pipe(v(()=>o)).subscribe(n=>{var a;let i=__md_get("__outdated",sessionStorage);if(i===null){i=!0;let s=((a=t.version)==null?void 0:a.default)||"latest";Array.isArray(s)||(s=[s]);e:for(let p of s)for(let c of n.aliases.concat(n.version))if(new RegExp(p,"i").test(c)){i=!1;break e}__md_set("__outdated",i,sessionStorage)}if(i)for(let s of ae("outdated"))s.hidden=!1})}function ns(e,{worker$:t}){let{searchParams:r}=xe();r.has("q")&&(Je("search",!0),e.value=r.get("q"),e.focus(),Ve("search").pipe(Ae(i=>!i)).subscribe(()=>{let i=xe();i.searchParams.delete("q"),history.replaceState({},"",`${i}`)}));let o=et(e),n=S(t.pipe(Ae(It)),d(e,"keyup"),o).pipe(m(()=>e.value),K());return z([n,o]).pipe(m(([i,a])=>({value:i,focus:a})),G(1))}function ai(e,{worker$:t}){let r=new g,o=r.pipe(X(),ne(!0));z([t.pipe(Ae(It)),r],(i,a)=>a).pipe(Z("value")).subscribe(({value:i})=>t.next({type:2,data:i})),r.pipe(Z("focus")).subscribe(({focus:i})=>{i&&Je("search",i)}),d(e.form,"reset").pipe(U(o)).subscribe(()=>e.focus());let n=P("header [for=__search]");return d(n,"click").subscribe(()=>e.focus()),ns(e,{worker$:t}).pipe(E(i=>r.next(i)),L(()=>r.complete()),m(i=>R({ref:e},i)),G(1))}function si(e,{worker$:t,query$:r}){let o=new g,n=tn(e.parentElement).pipe(b(Boolean)),i=e.parentElement,a=P(":scope > :first-child",e),s=P(":scope > :last-child",e);Ve("search").subscribe(l=>s.setAttribute("role",l?"list":"presentation")),o.pipe(ee(r),Ur(t.pipe(Ae(It)))).subscribe(([{items:l},{value:f}])=>{switch(l.length){case 0:a.textContent=f.length?Ee("search.result.none"):Ee("search.result.placeholder");break;case 1:a.textContent=Ee("search.result.one");break;default:let u=sr(l.length);a.textContent=Ee("search.result.other",u)}});let p=o.pipe(E(()=>s.innerHTML=""),v(({items:l})=>S(I(...l.slice(0,10)),I(...l.slice(10)).pipe(Ye(4),Vr(n),v(([f])=>f)))),m(Tn),pe());return p.subscribe(l=>s.appendChild(l)),p.pipe(oe(l=>{let f=fe("details",l);return typeof f=="undefined"?O:d(f,"toggle").pipe(U(o),m(()=>f))})).subscribe(l=>{l.open===!1&&l.offsetTop<=i.scrollTop&&i.scrollTo({top:l.offsetTop})}),t.pipe(b(dr),m(({data:l})=>l)).pipe(E(l=>o.next(l)),L(()=>o.complete()),m(l=>R({ref:e},l)))}function is(e,{query$:t}){return t.pipe(m(({value:r})=>{let o=xe();return o.hash="",r=r.replace(/\s+/g,"+").replace(/&/g,"%26").replace(/=/g,"%3D"),o.search=`q=${r}`,{url:o}}))}function ci(e,t){let r=new g,o=r.pipe(X(),ne(!0));return r.subscribe(({url:n})=>{e.setAttribute("data-clipboard-text",e.href),e.href=`${n}`}),d(e,"click").pipe(U(o)).subscribe(n=>n.preventDefault()),is(e,t).pipe(E(n=>r.next(n)),L(()=>r.complete()),m(n=>R({ref:e},n)))}function pi(e,{worker$:t,keyboard$:r}){let o=new g,n=Se("search-query"),i=S(d(n,"keydown"),d(n,"focus")).pipe(be(se),m(()=>n.value),K());return o.pipe(We(i),m(([{suggest:s},p])=>{let c=p.split(/([\s-]+)/);if(s!=null&&s.length&&c[c.length-1]){let l=s[s.length-1];l.startsWith(c[c.length-1])&&(c[c.length-1]=l)}else c.length=0;return c})).subscribe(s=>e.innerHTML=s.join("").replace(/\s/g," ")),r.pipe(b(({mode:s})=>s==="search")).subscribe(s=>{switch(s.type){case"ArrowRight":e.innerText.length&&n.selectionStart===n.value.length&&(n.value=e.innerText);break}}),t.pipe(b(dr),m(({data:s})=>s)).pipe(E(s=>o.next(s)),L(()=>o.complete()),m(()=>({ref:e})))}function li(e,{index$:t,keyboard$:r}){let o=ye();try{let n=ni(o.search,t),i=Se("search-query",e),a=Se("search-result",e);d(e,"click").pipe(b(({target:p})=>p instanceof Element&&!!p.closest("a"))).subscribe(()=>Je("search",!1)),r.pipe(b(({mode:p})=>p==="search")).subscribe(p=>{let c=Re();switch(p.type){case"Enter":if(c===i){let l=new Map;for(let f of $(":first-child [href]",a)){let u=f.firstElementChild;l.set(f,parseFloat(u.getAttribute("data-md-score")))}if(l.size){let[[f]]=[...l].sort(([,u],[,h])=>h-u);f.click()}p.claim()}break;case"Escape":case"Tab":Je("search",!1),i.blur();break;case"ArrowUp":case"ArrowDown":if(typeof c=="undefined")i.focus();else{let l=[i,...$(":not(details) > [href], summary, details[open] [href]",a)],f=Math.max(0,(Math.max(0,l.indexOf(c))+l.length+(p.type==="ArrowUp"?-1:1))%l.length);l[f].focus()}p.claim();break;default:i!==Re()&&i.focus()}}),r.pipe(b(({mode:p})=>p==="global")).subscribe(p=>{switch(p.type){case"f":case"s":case"/":i.focus(),i.select(),p.claim();break}});let s=ai(i,{worker$:n});return S(s,si(a,{worker$:n,query$:s})).pipe(Pe(...ae("search-share",e).map(p=>ci(p,{query$:s})),...ae("search-suggest",e).map(p=>pi(p,{worker$:n,keyboard$:r}))))}catch(n){return e.hidden=!0,Ke}}function mi(e,{index$:t,location$:r}){return z([t,r.pipe(Q(xe()),b(o=>!!o.searchParams.get("h")))]).pipe(m(([o,n])=>oi(o.config)(n.searchParams.get("h"))),m(o=>{var a;let n=new Map,i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT);for(let s=i.nextNode();s;s=i.nextNode())if((a=s.parentElement)!=null&&a.offsetHeight){let p=s.textContent,c=o(p);c.length>p.length&&n.set(s,c)}for(let[s,p]of n){let{childNodes:c}=x("span",null,p);s.replaceWith(...Array.from(c))}return{ref:e,nodes:n}}))}function as(e,{viewport$:t,main$:r}){let o=e.closest(".md-grid"),n=o.offsetTop-o.parentElement.offsetTop;return z([r,t]).pipe(m(([{offset:i,height:a},{offset:{y:s}}])=>(a=a+Math.min(n,Math.max(0,s-i))-n,{height:a,locked:s>=i+n})),K((i,a)=>i.height===a.height&&i.locked===a.locked))}function Jr(e,o){var n=o,{header$:t}=n,r=io(n,["header$"]);let i=P(".md-sidebar__scrollwrap",e),{y:a}=Ue(i);return C(()=>{let s=new g,p=s.pipe(X(),ne(!0)),c=s.pipe(Le(0,me));return c.pipe(ee(t)).subscribe({next([{height:l},{height:f}]){i.style.height=`${l-2*a}px`,e.style.top=`${f}px`},complete(){i.style.height="",e.style.top=""}}),c.pipe(Ae()).subscribe(()=>{for(let l of $(".md-nav__link--active[href]",e)){if(!l.clientHeight)continue;let f=l.closest(".md-sidebar__scrollwrap");if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:h}=ce(f);f.scrollTo({top:u-h/2})}}}),ue($("label[tabindex]",e)).pipe(oe(l=>d(l,"click").pipe(be(se),m(()=>l),U(p)))).subscribe(l=>{let f=P(`[id="${l.htmlFor}"]`);P(`[aria-labelledby="${l.id}"]`).setAttribute("aria-expanded",`${f.checked}`)}),as(e,r).pipe(E(l=>s.next(l)),L(()=>s.complete()),m(l=>R({ref:e},l)))})}function fi(e,t){if(typeof t!="undefined"){let r=`https://api.github.com/repos/${e}/${t}`;return Ct(Ne(`${r}/releases/latest`).pipe(ve(()=>O),m(o=>({version:o.tag_name})),Be({})),Ne(r).pipe(ve(()=>O),m(o=>({stars:o.stargazers_count,forks:o.forks_count})),Be({}))).pipe(m(([o,n])=>R(R({},o),n)))}else{let r=`https://api.github.com/users/${e}`;return Ne(r).pipe(m(o=>({repositories:o.public_repos})),Be({}))}}function ui(e,t){let r=`https://${e}/api/v4/projects/${encodeURIComponent(t)}`;return Ne(r).pipe(ve(()=>O),m(({star_count:o,forks_count:n})=>({stars:o,forks:n})),Be({}))}function di(e){let t=e.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i);if(t){let[,r,o]=t;return fi(r,o)}if(t=e.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i),t){let[,r,o]=t;return ui(r,o)}return O}var ss;function cs(e){return ss||(ss=C(()=>{let t=__md_get("__source",sessionStorage);if(t)return I(t);if(ae("consent").length){let o=__md_get("__consent");if(!(o&&o.github))return O}return di(e.href).pipe(E(o=>__md_set("__source",o,sessionStorage)))}).pipe(ve(()=>O),b(t=>Object.keys(t).length>0),m(t=>({facts:t})),G(1)))}function hi(e){let t=P(":scope > :last-child",e);return C(()=>{let r=new g;return r.subscribe(({facts:o})=>{t.appendChild(Sn(o)),t.classList.add("md-source__repository--active")}),cs(e).pipe(E(o=>r.next(o)),L(()=>r.complete()),m(o=>R({ref:e},o)))})}function ps(e,{viewport$:t,header$:r}){return ge(document.body).pipe(v(()=>mr(e,{header$:r,viewport$:t})),m(({offset:{y:o}})=>({hidden:o>=10})),Z("hidden"))}function bi(e,t){return C(()=>{let r=new g;return r.subscribe({next({hidden:o}){e.hidden=o},complete(){e.hidden=!1}}),(B("navigation.tabs.sticky")?I({hidden:!1}):ps(e,t)).pipe(E(o=>r.next(o)),L(()=>r.complete()),m(o=>R({ref:e},o)))})}function ls(e,{viewport$:t,header$:r}){let o=new Map,n=$(".md-nav__link",e);for(let s of n){let p=decodeURIComponent(s.hash.substring(1)),c=fe(`[id="${p}"]`);typeof c!="undefined"&&o.set(s,c)}let i=r.pipe(Z("height"),m(({height:s})=>{let p=Se("main"),c=P(":scope > :first-child",p);return s+.8*(c.offsetTop-p.offsetTop)}),pe());return ge(document.body).pipe(Z("height"),v(s=>C(()=>{let p=[];return I([...o].reduce((c,[l,f])=>{for(;p.length&&o.get(p[p.length-1]).tagName>=f.tagName;)p.pop();let u=f.offsetTop;for(;!u&&f.parentElement;)f=f.parentElement,u=f.offsetTop;let h=f.offsetParent;for(;h;h=h.offsetParent)u+=h.offsetTop;return c.set([...p=[...p,l]].reverse(),u)},new Map))}).pipe(m(p=>new Map([...p].sort(([,c],[,l])=>c-l))),We(i),v(([p,c])=>t.pipe(jr(([l,f],{offset:{y:u},size:h})=>{let w=u+h.height>=Math.floor(s.height);for(;f.length;){let[,A]=f[0];if(A-c=u&&!w)f=[l.pop(),...f];else break}return[l,f]},[[],[...p]]),K((l,f)=>l[0]===f[0]&&l[1]===f[1])))))).pipe(m(([s,p])=>({prev:s.map(([c])=>c),next:p.map(([c])=>c)})),Q({prev:[],next:[]}),Ye(2,1),m(([s,p])=>s.prev.length{let i=new g,a=i.pipe(X(),ne(!0));if(i.subscribe(({prev:s,next:p})=>{for(let[c]of p)c.classList.remove("md-nav__link--passed"),c.classList.remove("md-nav__link--active");for(let[c,[l]]of s.entries())l.classList.add("md-nav__link--passed"),l.classList.toggle("md-nav__link--active",c===s.length-1)}),B("toc.follow")){let s=S(t.pipe(_e(1),m(()=>{})),t.pipe(_e(250),m(()=>"smooth")));i.pipe(b(({prev:p})=>p.length>0),We(o.pipe(be(se))),ee(s)).subscribe(([[{prev:p}],c])=>{let[l]=p[p.length-1];if(l.offsetHeight){let f=cr(l);if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:h}=ce(f);f.scrollTo({top:u-h/2,behavior:c})}}})}return B("navigation.tracking")&&t.pipe(U(a),Z("offset"),_e(250),Ce(1),U(n.pipe(Ce(1))),st({delay:250}),ee(i)).subscribe(([,{prev:s}])=>{let p=xe(),c=s[s.length-1];if(c&&c.length){let[l]=c,{hash:f}=new URL(l.href);p.hash!==f&&(p.hash=f,history.replaceState({},"",`${p}`))}else p.hash="",history.replaceState({},"",`${p}`)}),ls(e,{viewport$:t,header$:r}).pipe(E(s=>i.next(s)),L(()=>i.complete()),m(s=>R({ref:e},s)))})}function ms(e,{viewport$:t,main$:r,target$:o}){let n=t.pipe(m(({offset:{y:a}})=>a),Ye(2,1),m(([a,s])=>a>s&&s>0),K()),i=r.pipe(m(({active:a})=>a));return z([i,n]).pipe(m(([a,s])=>!(a&&s)),K(),U(o.pipe(Ce(1))),ne(!0),st({delay:250}),m(a=>({hidden:a})))}function gi(e,{viewport$:t,header$:r,main$:o,target$:n}){let i=new g,a=i.pipe(X(),ne(!0));return i.subscribe({next({hidden:s}){e.hidden=s,s?(e.setAttribute("tabindex","-1"),e.blur()):e.removeAttribute("tabindex")},complete(){e.style.top="",e.hidden=!0,e.removeAttribute("tabindex")}}),r.pipe(U(a),Z("height")).subscribe(({height:s})=>{e.style.top=`${s+16}px`}),d(e,"click").subscribe(s=>{s.preventDefault(),window.scrollTo({top:0})}),ms(e,{viewport$:t,main$:o,target$:n}).pipe(E(s=>i.next(s)),L(()=>i.complete()),m(s=>R({ref:e},s)))}function xi({document$:e,viewport$:t}){e.pipe(v(()=>$(".md-ellipsis")),oe(r=>tt(r).pipe(U(e.pipe(Ce(1))),b(o=>o),m(()=>r),Te(1))),b(r=>r.offsetWidth{let o=r.innerText,n=r.closest("a")||r;return n.title=o,B("content.tooltips")?lt(n,{viewport$:t}).pipe(U(e.pipe(Ce(1))),L(()=>n.removeAttribute("title"))):O})).subscribe(),B("content.tooltips")&&e.pipe(v(()=>$(".md-status")),oe(r=>lt(r,{viewport$:t}))).subscribe()}function yi({document$:e,tablet$:t}){e.pipe(v(()=>$(".md-toggle--indeterminate")),E(r=>{r.indeterminate=!0,r.checked=!1}),oe(r=>d(r,"change").pipe(Dr(()=>r.classList.contains("md-toggle--indeterminate")),m(()=>r))),ee(t)).subscribe(([r,o])=>{r.classList.remove("md-toggle--indeterminate"),o&&(r.checked=!1)})}function fs(){return/(iPad|iPhone|iPod)/.test(navigator.userAgent)}function Ei({document$:e}){e.pipe(v(()=>$("[data-md-scrollfix]")),E(t=>t.removeAttribute("data-md-scrollfix")),b(fs),oe(t=>d(t,"touchstart").pipe(m(()=>t)))).subscribe(t=>{let r=t.scrollTop;r===0?t.scrollTop=1:r+t.offsetHeight===t.scrollHeight&&(t.scrollTop=r-1)})}function wi({viewport$:e,tablet$:t}){z([Ve("search"),t]).pipe(m(([r,o])=>r&&!o),v(r=>I(r).pipe(Ge(r?400:100))),ee(e)).subscribe(([r,{offset:{y:o}}])=>{if(r)document.body.setAttribute("data-md-scrolllock",""),document.body.style.top=`-${o}px`;else{let n=-1*parseInt(document.body.style.top,10);document.body.removeAttribute("data-md-scrolllock"),document.body.style.top="",n&&window.scrollTo(0,n)}})}Object.entries||(Object.entries=function(e){let t=[];for(let r of Object.keys(e))t.push([r,e[r]]);return t});Object.values||(Object.values=function(e){let t=[];for(let r of Object.keys(e))t.push(e[r]);return t});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(e,t){typeof e=="object"?(this.scrollLeft=e.left,this.scrollTop=e.top):(this.scrollLeft=e,this.scrollTop=t)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...e){let t=this.parentNode;if(t){e.length===0&&t.removeChild(this);for(let r=e.length-1;r>=0;r--){let o=e[r];typeof o=="string"?o=document.createTextNode(o):o.parentNode&&o.parentNode.removeChild(o),r?t.insertBefore(this.previousSibling,o):t.replaceChild(o,this)}}}));function us(){return location.protocol==="file:"?wt(`${new URL("search/search_index.js",Xr.base)}`).pipe(m(()=>__index),G(1)):Ne(new URL("search/search_index.json",Xr.base))}document.documentElement.classList.remove("no-js");document.documentElement.classList.add("js");var ot=Yo(),jt=nn(),Ot=cn(jt),Zr=on(),Oe=bn(),hr=$t("(min-width: 960px)"),Si=$t("(min-width: 1220px)"),Oi=pn(),Xr=ye(),Mi=document.forms.namedItem("search")?us():Ke,eo=new g;Bn({alert$:eo});var to=new g;B("navigation.instant")&&Zn({location$:jt,viewport$:Oe,progress$:to}).subscribe(ot);var Ti;((Ti=Xr.version)==null?void 0:Ti.provider)==="mike"&&ii({document$:ot});S(jt,Ot).pipe(Ge(125)).subscribe(()=>{Je("drawer",!1),Je("search",!1)});Zr.pipe(b(({mode:e})=>e==="global")).subscribe(e=>{switch(e.type){case"p":case",":let t=fe("link[rel=prev]");typeof t!="undefined"&&pt(t);break;case"n":case".":let r=fe("link[rel=next]");typeof r!="undefined"&&pt(r);break;case"Enter":let o=Re();o instanceof HTMLLabelElement&&o.click()}});xi({viewport$:Oe,document$:ot});yi({document$:ot,tablet$:hr});Ei({document$:ot});wi({viewport$:Oe,tablet$:hr});var rt=Nn(Se("header"),{viewport$:Oe}),Ft=ot.pipe(m(()=>Se("main")),v(e=>Qn(e,{viewport$:Oe,header$:rt})),G(1)),ds=S(...ae("consent").map(e=>xn(e,{target$:Ot})),...ae("dialog").map(e=>Dn(e,{alert$:eo})),...ae("header").map(e=>zn(e,{viewport$:Oe,header$:rt,main$:Ft})),...ae("palette").map(e=>Kn(e)),...ae("progress").map(e=>Yn(e,{progress$:to})),...ae("search").map(e=>li(e,{index$:Mi,keyboard$:Zr})),...ae("source").map(e=>hi(e))),hs=C(()=>S(...ae("announce").map(e=>gn(e)),...ae("content").map(e=>Un(e,{viewport$:Oe,target$:Ot,print$:Oi})),...ae("content").map(e=>B("search.highlight")?mi(e,{index$:Mi,location$:jt}):O),...ae("header-title").map(e=>qn(e,{viewport$:Oe,header$:rt})),...ae("sidebar").map(e=>e.getAttribute("data-md-type")==="navigation"?Nr(Si,()=>Jr(e,{viewport$:Oe,header$:rt,main$:Ft})):Nr(hr,()=>Jr(e,{viewport$:Oe,header$:rt,main$:Ft}))),...ae("tabs").map(e=>bi(e,{viewport$:Oe,header$:rt})),...ae("toc").map(e=>vi(e,{viewport$:Oe,header$:rt,main$:Ft,target$:Ot})),...ae("top").map(e=>gi(e,{viewport$:Oe,header$:rt,main$:Ft,target$:Ot})))),Li=ot.pipe(v(()=>hs),Pe(ds),G(1));Li.subscribe();window.document$=ot;window.location$=jt;window.target$=Ot;window.keyboard$=Zr;window.viewport$=Oe;window.tablet$=hr;window.screen$=Si;window.print$=Oi;window.alert$=eo;window.progress$=to;window.component$=Li;})(); +//# sourceMappingURL=bundle.fe8b6f2b.min.js.map + diff --git a/0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js.map b/0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js.map new file mode 100644 index 00000000..82635852 --- /dev/null +++ b/0.1.2/assets/javascripts/bundle.fe8b6f2b.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["node_modules/focus-visible/dist/focus-visible.js", "node_modules/clipboard/dist/clipboard.js", "node_modules/escape-html/index.js", "src/templates/assets/javascripts/bundle.ts", "node_modules/rxjs/node_modules/tslib/tslib.es6.js", "node_modules/rxjs/src/internal/util/isFunction.ts", "node_modules/rxjs/src/internal/util/createErrorClass.ts", "node_modules/rxjs/src/internal/util/UnsubscriptionError.ts", "node_modules/rxjs/src/internal/util/arrRemove.ts", "node_modules/rxjs/src/internal/Subscription.ts", "node_modules/rxjs/src/internal/config.ts", "node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts", "node_modules/rxjs/src/internal/util/reportUnhandledError.ts", "node_modules/rxjs/src/internal/util/noop.ts", "node_modules/rxjs/src/internal/NotificationFactories.ts", "node_modules/rxjs/src/internal/util/errorContext.ts", "node_modules/rxjs/src/internal/Subscriber.ts", "node_modules/rxjs/src/internal/symbol/observable.ts", "node_modules/rxjs/src/internal/util/identity.ts", "node_modules/rxjs/src/internal/util/pipe.ts", "node_modules/rxjs/src/internal/Observable.ts", "node_modules/rxjs/src/internal/util/lift.ts", "node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts", "node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts", "node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts", "node_modules/rxjs/src/internal/Subject.ts", "node_modules/rxjs/src/internal/BehaviorSubject.ts", "node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts", "node_modules/rxjs/src/internal/ReplaySubject.ts", "node_modules/rxjs/src/internal/scheduler/Action.ts", "node_modules/rxjs/src/internal/scheduler/intervalProvider.ts", "node_modules/rxjs/src/internal/scheduler/AsyncAction.ts", "node_modules/rxjs/src/internal/Scheduler.ts", "node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts", "node_modules/rxjs/src/internal/scheduler/async.ts", "node_modules/rxjs/src/internal/scheduler/QueueAction.ts", "node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts", "node_modules/rxjs/src/internal/scheduler/queue.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts", "node_modules/rxjs/src/internal/scheduler/animationFrame.ts", "node_modules/rxjs/src/internal/observable/empty.ts", "node_modules/rxjs/src/internal/util/isScheduler.ts", "node_modules/rxjs/src/internal/util/args.ts", "node_modules/rxjs/src/internal/util/isArrayLike.ts", "node_modules/rxjs/src/internal/util/isPromise.ts", "node_modules/rxjs/src/internal/util/isInteropObservable.ts", "node_modules/rxjs/src/internal/util/isAsyncIterable.ts", "node_modules/rxjs/src/internal/util/throwUnobservableError.ts", "node_modules/rxjs/src/internal/symbol/iterator.ts", "node_modules/rxjs/src/internal/util/isIterable.ts", "node_modules/rxjs/src/internal/util/isReadableStreamLike.ts", "node_modules/rxjs/src/internal/observable/innerFrom.ts", "node_modules/rxjs/src/internal/util/executeSchedule.ts", "node_modules/rxjs/src/internal/operators/observeOn.ts", "node_modules/rxjs/src/internal/operators/subscribeOn.ts", "node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts", "node_modules/rxjs/src/internal/scheduled/schedulePromise.ts", "node_modules/rxjs/src/internal/scheduled/scheduleArray.ts", "node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts", "node_modules/rxjs/src/internal/scheduled/scheduled.ts", "node_modules/rxjs/src/internal/observable/from.ts", "node_modules/rxjs/src/internal/observable/of.ts", "node_modules/rxjs/src/internal/observable/throwError.ts", "node_modules/rxjs/src/internal/util/EmptyError.ts", "node_modules/rxjs/src/internal/util/isDate.ts", "node_modules/rxjs/src/internal/operators/map.ts", "node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts", "node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts", "node_modules/rxjs/src/internal/util/createObject.ts", "node_modules/rxjs/src/internal/observable/combineLatest.ts", "node_modules/rxjs/src/internal/operators/mergeInternals.ts", "node_modules/rxjs/src/internal/operators/mergeMap.ts", "node_modules/rxjs/src/internal/operators/mergeAll.ts", "node_modules/rxjs/src/internal/operators/concatAll.ts", "node_modules/rxjs/src/internal/observable/concat.ts", "node_modules/rxjs/src/internal/observable/defer.ts", "node_modules/rxjs/src/internal/observable/fromEvent.ts", "node_modules/rxjs/src/internal/observable/fromEventPattern.ts", "node_modules/rxjs/src/internal/observable/timer.ts", "node_modules/rxjs/src/internal/observable/merge.ts", "node_modules/rxjs/src/internal/observable/never.ts", "node_modules/rxjs/src/internal/util/argsOrArgArray.ts", "node_modules/rxjs/src/internal/operators/filter.ts", "node_modules/rxjs/src/internal/observable/zip.ts", "node_modules/rxjs/src/internal/operators/audit.ts", "node_modules/rxjs/src/internal/operators/auditTime.ts", "node_modules/rxjs/src/internal/operators/bufferCount.ts", "node_modules/rxjs/src/internal/operators/catchError.ts", "node_modules/rxjs/src/internal/operators/scanInternals.ts", "node_modules/rxjs/src/internal/operators/combineLatest.ts", "node_modules/rxjs/src/internal/operators/combineLatestWith.ts", "node_modules/rxjs/src/internal/operators/debounce.ts", "node_modules/rxjs/src/internal/operators/debounceTime.ts", "node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts", "node_modules/rxjs/src/internal/operators/take.ts", "node_modules/rxjs/src/internal/operators/ignoreElements.ts", "node_modules/rxjs/src/internal/operators/mapTo.ts", "node_modules/rxjs/src/internal/operators/delayWhen.ts", "node_modules/rxjs/src/internal/operators/delay.ts", "node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts", "node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts", "node_modules/rxjs/src/internal/operators/throwIfEmpty.ts", "node_modules/rxjs/src/internal/operators/endWith.ts", "node_modules/rxjs/src/internal/operators/finalize.ts", "node_modules/rxjs/src/internal/operators/first.ts", "node_modules/rxjs/src/internal/operators/takeLast.ts", "node_modules/rxjs/src/internal/operators/merge.ts", "node_modules/rxjs/src/internal/operators/mergeWith.ts", "node_modules/rxjs/src/internal/operators/repeat.ts", "node_modules/rxjs/src/internal/operators/scan.ts", "node_modules/rxjs/src/internal/operators/share.ts", "node_modules/rxjs/src/internal/operators/shareReplay.ts", "node_modules/rxjs/src/internal/operators/skip.ts", "node_modules/rxjs/src/internal/operators/skipUntil.ts", "node_modules/rxjs/src/internal/operators/startWith.ts", "node_modules/rxjs/src/internal/operators/switchMap.ts", "node_modules/rxjs/src/internal/operators/takeUntil.ts", "node_modules/rxjs/src/internal/operators/takeWhile.ts", "node_modules/rxjs/src/internal/operators/tap.ts", "node_modules/rxjs/src/internal/operators/throttle.ts", "node_modules/rxjs/src/internal/operators/throttleTime.ts", "node_modules/rxjs/src/internal/operators/withLatestFrom.ts", "node_modules/rxjs/src/internal/operators/zip.ts", "node_modules/rxjs/src/internal/operators/zipWith.ts", "src/templates/assets/javascripts/browser/document/index.ts", "src/templates/assets/javascripts/browser/element/_/index.ts", "src/templates/assets/javascripts/browser/element/focus/index.ts", "src/templates/assets/javascripts/browser/element/hover/index.ts", "src/templates/assets/javascripts/utilities/h/index.ts", "src/templates/assets/javascripts/utilities/round/index.ts", "src/templates/assets/javascripts/browser/script/index.ts", "src/templates/assets/javascripts/browser/element/size/_/index.ts", "src/templates/assets/javascripts/browser/element/size/content/index.ts", "src/templates/assets/javascripts/browser/element/offset/_/index.ts", "src/templates/assets/javascripts/browser/element/offset/content/index.ts", "src/templates/assets/javascripts/browser/element/visibility/index.ts", "src/templates/assets/javascripts/browser/toggle/index.ts", "src/templates/assets/javascripts/browser/keyboard/index.ts", "src/templates/assets/javascripts/browser/location/_/index.ts", "src/templates/assets/javascripts/browser/location/hash/index.ts", "src/templates/assets/javascripts/browser/media/index.ts", "src/templates/assets/javascripts/browser/request/index.ts", "src/templates/assets/javascripts/browser/viewport/offset/index.ts", "src/templates/assets/javascripts/browser/viewport/size/index.ts", "src/templates/assets/javascripts/browser/viewport/_/index.ts", "src/templates/assets/javascripts/browser/viewport/at/index.ts", "src/templates/assets/javascripts/browser/worker/index.ts", "src/templates/assets/javascripts/_/index.ts", "src/templates/assets/javascripts/components/_/index.ts", "src/templates/assets/javascripts/components/announce/index.ts", "src/templates/assets/javascripts/components/consent/index.ts", "src/templates/assets/javascripts/templates/tooltip/index.tsx", "src/templates/assets/javascripts/templates/annotation/index.tsx", "src/templates/assets/javascripts/templates/clipboard/index.tsx", "src/templates/assets/javascripts/templates/search/index.tsx", "src/templates/assets/javascripts/templates/source/index.tsx", "src/templates/assets/javascripts/templates/tabbed/index.tsx", "src/templates/assets/javascripts/templates/table/index.tsx", "src/templates/assets/javascripts/templates/version/index.tsx", "src/templates/assets/javascripts/components/tooltip2/index.ts", "src/templates/assets/javascripts/components/content/annotation/_/index.ts", "src/templates/assets/javascripts/components/content/annotation/list/index.ts", "src/templates/assets/javascripts/components/content/annotation/block/index.ts", "src/templates/assets/javascripts/components/content/code/_/index.ts", "src/templates/assets/javascripts/components/content/details/index.ts", "src/templates/assets/javascripts/components/content/mermaid/index.css", "src/templates/assets/javascripts/components/content/mermaid/index.ts", "src/templates/assets/javascripts/components/content/table/index.ts", "src/templates/assets/javascripts/components/content/tabs/index.ts", "src/templates/assets/javascripts/components/content/_/index.ts", "src/templates/assets/javascripts/components/dialog/index.ts", "src/templates/assets/javascripts/components/tooltip/index.ts", "src/templates/assets/javascripts/components/header/_/index.ts", "src/templates/assets/javascripts/components/header/title/index.ts", "src/templates/assets/javascripts/components/main/index.ts", "src/templates/assets/javascripts/components/palette/index.ts", "src/templates/assets/javascripts/components/progress/index.ts", "src/templates/assets/javascripts/integrations/clipboard/index.ts", "src/templates/assets/javascripts/integrations/sitemap/index.ts", "src/templates/assets/javascripts/integrations/instant/index.ts", "src/templates/assets/javascripts/integrations/search/highlighter/index.ts", "src/templates/assets/javascripts/integrations/search/worker/message/index.ts", "src/templates/assets/javascripts/integrations/search/worker/_/index.ts", "src/templates/assets/javascripts/integrations/version/index.ts", "src/templates/assets/javascripts/components/search/query/index.ts", "src/templates/assets/javascripts/components/search/result/index.ts", "src/templates/assets/javascripts/components/search/share/index.ts", "src/templates/assets/javascripts/components/search/suggest/index.ts", "src/templates/assets/javascripts/components/search/_/index.ts", "src/templates/assets/javascripts/components/search/highlight/index.ts", "src/templates/assets/javascripts/components/sidebar/index.ts", "src/templates/assets/javascripts/components/source/facts/github/index.ts", "src/templates/assets/javascripts/components/source/facts/gitlab/index.ts", "src/templates/assets/javascripts/components/source/facts/_/index.ts", "src/templates/assets/javascripts/components/source/_/index.ts", "src/templates/assets/javascripts/components/tabs/index.ts", "src/templates/assets/javascripts/components/toc/index.ts", "src/templates/assets/javascripts/components/top/index.ts", "src/templates/assets/javascripts/patches/ellipsis/index.ts", "src/templates/assets/javascripts/patches/indeterminate/index.ts", "src/templates/assets/javascripts/patches/scrollfix/index.ts", "src/templates/assets/javascripts/patches/scrolllock/index.ts", "src/templates/assets/javascripts/polyfills/index.ts"], + "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (factory());\n}(this, (function () { 'use strict';\n\n /**\n * Applies the :focus-visible polyfill at the given scope.\n * A scope in this case is either the top-level Document or a Shadow Root.\n *\n * @param {(Document|ShadowRoot)} scope\n * @see https://github.com/WICG/focus-visible\n */\n function applyFocusVisiblePolyfill(scope) {\n var hadKeyboardEvent = true;\n var hadFocusVisibleRecently = false;\n var hadFocusVisibleRecentlyTimeout = null;\n\n var inputTypesAllowlist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n };\n\n /**\n * Helper function for legacy browsers and iframes which sometimes focus\n * elements like document, body, and non-interactive SVG.\n * @param {Element} el\n */\n function isValidFocusTarget(el) {\n if (\n el &&\n el !== document &&\n el.nodeName !== 'HTML' &&\n el.nodeName !== 'BODY' &&\n 'classList' in el &&\n 'contains' in el.classList\n ) {\n return true;\n }\n return false;\n }\n\n /**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} el\n * @return {boolean}\n */\n function focusTriggersKeyboardModality(el) {\n var type = el.type;\n var tagName = el.tagName;\n\n if (tagName === 'INPUT' && inputTypesAllowlist[type] && !el.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !el.readOnly) {\n return true;\n }\n\n if (el.isContentEditable) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Add the `focus-visible` class to the given element if it was not added by\n * the author.\n * @param {Element} el\n */\n function addFocusVisibleClass(el) {\n if (el.classList.contains('focus-visible')) {\n return;\n }\n el.classList.add('focus-visible');\n el.setAttribute('data-focus-visible-added', '');\n }\n\n /**\n * Remove the `focus-visible` class from the given element if it was not\n * originally added by the author.\n * @param {Element} el\n */\n function removeFocusVisibleClass(el) {\n if (!el.hasAttribute('data-focus-visible-added')) {\n return;\n }\n el.classList.remove('focus-visible');\n el.removeAttribute('data-focus-visible-added');\n }\n\n /**\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n * @param {KeyboardEvent} e\n */\n function onKeyDown(e) {\n if (e.metaKey || e.altKey || e.ctrlKey) {\n return;\n }\n\n if (isValidFocusTarget(scope.activeElement)) {\n addFocusVisibleClass(scope.activeElement);\n }\n\n hadKeyboardEvent = true;\n }\n\n /**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n * @param {Event} e\n */\n function onPointerDown(e) {\n hadKeyboardEvent = false;\n }\n\n /**\n * On `focus`, add the `focus-visible` class to the target if:\n * - the target received focus as a result of keyboard navigation, or\n * - the event target is an element that will likely require interaction\n * via the keyboard (e.g. a text box)\n * @param {Event} e\n */\n function onFocus(e) {\n // Prevent IE from focusing the document or HTML element.\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {\n addFocusVisibleClass(e.target);\n }\n }\n\n /**\n * On `blur`, remove the `focus-visible` class from the target.\n * @param {Event} e\n */\n function onBlur(e) {\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (\n e.target.classList.contains('focus-visible') ||\n e.target.hasAttribute('data-focus-visible-added')\n ) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function() {\n hadFocusVisibleRecently = false;\n }, 100);\n removeFocusVisibleClass(e.target);\n }\n }\n\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had .focus-visible.\n * @param {Event} e\n */\n function onVisibilityChange(e) {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n addInitialPointerMoveListeners();\n }\n }\n\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n * @param {Event} e\n */\n function onInitialPointerMove(e) {\n // Work around a Safari quirk that fires a mousemove on whenever the\n // window blurs, even if you're tabbing out of the page. \u00AF\\_(\u30C4)_/\u00AF\n if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') {\n return;\n }\n\n hadKeyboardEvent = false;\n removeInitialPointerMoveListeners();\n }\n\n // For some kinds of state, we are interested in changes at the global scope\n // only. For example, global pointer input, global key presses and global\n // visibility change should affect the state at every scope:\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n\n addInitialPointerMoveListeners();\n\n // For focus and blur, we specifically care about state changes in the local\n // scope. This is because focus / blur events that originate from within a\n // shadow root are not re-dispatched from the host element if it was already\n // the active element in its own scope:\n scope.addEventListener('focus', onFocus, true);\n scope.addEventListener('blur', onBlur, true);\n\n // We detect that a node is a ShadowRoot by ensuring that it is a\n // DocumentFragment and also has a host property. This check covers native\n // implementation and polyfill implementation transparently. If we only cared\n // about the native implementation, we could just check if the scope was\n // an instance of a ShadowRoot.\n if (scope.nodeType === Node.DOCUMENT_FRAGMENT_NODE && scope.host) {\n // Since a ShadowRoot is a special kind of DocumentFragment, it does not\n // have a root element to add a class to. So, we add this attribute to the\n // host element instead:\n scope.host.setAttribute('data-js-focus-visible', '');\n } else if (scope.nodeType === Node.DOCUMENT_NODE) {\n document.documentElement.classList.add('js-focus-visible');\n document.documentElement.setAttribute('data-js-focus-visible', '');\n }\n }\n\n // It is important to wrap all references to global window and document in\n // these checks to support server-side rendering use cases\n // @see https://github.com/WICG/focus-visible/issues/199\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n // Make the polyfill helper globally available. This can be used as a signal\n // to interested libraries that wish to coordinate with the polyfill for e.g.,\n // applying the polyfill to a shadow root:\n window.applyFocusVisiblePolyfill = applyFocusVisiblePolyfill;\n\n // Notify interested libraries of the polyfill's presence, in case the\n // polyfill was loaded lazily:\n var event;\n\n try {\n event = new CustomEvent('focus-visible-polyfill-ready');\n } catch (error) {\n // IE11 does not support using CustomEvent as a constructor directly:\n event = document.createEvent('CustomEvent');\n event.initCustomEvent('focus-visible-polyfill-ready', false, false, {});\n }\n\n window.dispatchEvent(event);\n }\n\n if (typeof document !== 'undefined') {\n // Apply the polyfill to the global document, so that no JavaScript\n // coordination is required to use the polyfill in the top-level document:\n applyFocusVisiblePolyfill(document);\n }\n\n})));\n", "/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT \u00A9 Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ clipboard; }\n});\n\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(279);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(370);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(817);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n;// CONCATENATED MODULE: ./src/common/command.js\n/**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\nfunction command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n}\n;// CONCATENATED MODULE: ./src/actions/cut.js\n\n\n/**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\nvar ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n};\n\n/* harmony default export */ var actions_cut = (ClipboardActionCut);\n;// CONCATENATED MODULE: ./src/common/create-fake-element.js\n/**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\nfunction createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n}\n;// CONCATENATED MODULE: ./src/actions/copy.js\n\n\n\n/**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\nvar fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n};\n/**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n\nvar ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n\n return selectedText;\n};\n\n/* harmony default export */ var actions_copy = (ClipboardActionCopy);\n;// CONCATENATED MODULE: ./src/actions/default.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n/**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\nvar ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n};\n\n/* harmony default export */ var actions_default = (ClipboardActionDefault);\n;// CONCATENATED MODULE: ./src/clipboard.js\nfunction clipboard_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return clipboard_typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\nfunction getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\nvar Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n\n _classCallCheck(this, Clipboard);\n\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n\n return Clipboard;\n}((tiny_emitter_default()));\n\n/* harmony default export */ var clipboard = (Clipboard);\n\n/***/ }),\n\n/***/ 828:\n/***/ (function(module) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n\n/***/ 438:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar closest = __webpack_require__(828);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n\n/***/ 879:\n/***/ (function(__unused_webpack_module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n\n/***/ 370:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar is = __webpack_require__(879);\nvar delegate = __webpack_require__(438);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(module) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n\n/***/ 279:\n/***/ (function(module) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(686);\n/******/ })()\n.default;\n});", "/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n", "/*\n * Copyright (c) 2016-2024 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport \"focus-visible\"\n\nimport {\n EMPTY,\n NEVER,\n Observable,\n Subject,\n defer,\n delay,\n filter,\n map,\n merge,\n mergeWith,\n shareReplay,\n switchMap\n} from \"rxjs\"\n\nimport { configuration, feature } from \"./_\"\nimport {\n at,\n getActiveElement,\n getOptionalElement,\n requestJSON,\n setLocation,\n setToggle,\n watchDocument,\n watchKeyboard,\n watchLocation,\n watchLocationTarget,\n watchMedia,\n watchPrint,\n watchScript,\n watchViewport\n} from \"./browser\"\nimport {\n getComponentElement,\n getComponentElements,\n mountAnnounce,\n mountBackToTop,\n mountConsent,\n mountContent,\n mountDialog,\n mountHeader,\n mountHeaderTitle,\n mountPalette,\n mountProgress,\n mountSearch,\n mountSearchHiglight,\n mountSidebar,\n mountSource,\n mountTableOfContents,\n mountTabs,\n watchHeader,\n watchMain\n} from \"./components\"\nimport {\n SearchIndex,\n setupClipboardJS,\n setupInstantNavigation,\n setupVersionSelector\n} from \"./integrations\"\nimport {\n patchEllipsis,\n patchIndeterminate,\n patchScrollfix,\n patchScrolllock\n} from \"./patches\"\nimport \"./polyfills\"\n\n/* ----------------------------------------------------------------------------\n * Functions - @todo refactor\n * ------------------------------------------------------------------------- */\n\n/**\n * Fetch search index\n *\n * @returns Search index observable\n */\nfunction fetchSearchIndex(): Observable {\n if (location.protocol === \"file:\") {\n return watchScript(\n `${new URL(\"search/search_index.js\", config.base)}`\n )\n .pipe(\n // @ts-ignore - @todo fix typings\n map(() => __index),\n shareReplay(1)\n )\n } else {\n return requestJSON(\n new URL(\"search/search_index.json\", config.base)\n )\n }\n}\n\n/* ----------------------------------------------------------------------------\n * Application\n * ------------------------------------------------------------------------- */\n\n/* Yay, JavaScript is available */\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\n/* Set up navigation observables and subjects */\nconst document$ = watchDocument()\nconst location$ = watchLocation()\nconst target$ = watchLocationTarget(location$)\nconst keyboard$ = watchKeyboard()\n\n/* Set up media observables */\nconst viewport$ = watchViewport()\nconst tablet$ = watchMedia(\"(min-width: 960px)\")\nconst screen$ = watchMedia(\"(min-width: 1220px)\")\nconst print$ = watchPrint()\n\n/* Retrieve search index, if search is enabled */\nconst config = configuration()\nconst index$ = document.forms.namedItem(\"search\")\n ? fetchSearchIndex()\n : NEVER\n\n/* Set up Clipboard.js integration */\nconst alert$ = new Subject()\nsetupClipboardJS({ alert$ })\n\n/* Set up progress indicator */\nconst progress$ = new Subject()\n\n/* Set up instant navigation, if enabled */\nif (feature(\"navigation.instant\"))\n setupInstantNavigation({ location$, viewport$, progress$ })\n .subscribe(document$)\n\n/* Set up version selector */\nif (config.version?.provider === \"mike\")\n setupVersionSelector({ document$ })\n\n/* Always close drawer and search on navigation */\nmerge(location$, target$)\n .pipe(\n delay(125)\n )\n .subscribe(() => {\n setToggle(\"drawer\", false)\n setToggle(\"search\", false)\n })\n\n/* Set up global keyboard handlers */\nkeyboard$\n .pipe(\n filter(({ mode }) => mode === \"global\")\n )\n .subscribe(key => {\n switch (key.type) {\n\n /* Go to previous page */\n case \"p\":\n case \",\":\n const prev = getOptionalElement(\"link[rel=prev]\")\n if (typeof prev !== \"undefined\")\n setLocation(prev)\n break\n\n /* Go to next page */\n case \"n\":\n case \".\":\n const next = getOptionalElement(\"link[rel=next]\")\n if (typeof next !== \"undefined\")\n setLocation(next)\n break\n\n /* Expand navigation, see https://bit.ly/3ZjG5io */\n case \"Enter\":\n const active = getActiveElement()\n if (active instanceof HTMLLabelElement)\n active.click()\n }\n })\n\n/* Set up patches */\npatchEllipsis({ viewport$, document$ })\npatchIndeterminate({ document$, tablet$ })\npatchScrollfix({ document$ })\npatchScrolllock({ viewport$, tablet$ })\n\n/* Set up header and main area observable */\nconst header$ = watchHeader(getComponentElement(\"header\"), { viewport$ })\nconst main$ = document$\n .pipe(\n map(() => getComponentElement(\"main\")),\n switchMap(el => watchMain(el, { viewport$, header$ })),\n shareReplay(1)\n )\n\n/* Set up control component observables */\nconst control$ = merge(\n\n /* Consent */\n ...getComponentElements(\"consent\")\n .map(el => mountConsent(el, { target$ })),\n\n /* Dialog */\n ...getComponentElements(\"dialog\")\n .map(el => mountDialog(el, { alert$ })),\n\n /* Header */\n ...getComponentElements(\"header\")\n .map(el => mountHeader(el, { viewport$, header$, main$ })),\n\n /* Color palette */\n ...getComponentElements(\"palette\")\n .map(el => mountPalette(el)),\n\n /* Progress bar */\n ...getComponentElements(\"progress\")\n .map(el => mountProgress(el, { progress$ })),\n\n /* Search */\n ...getComponentElements(\"search\")\n .map(el => mountSearch(el, { index$, keyboard$ })),\n\n /* Repository information */\n ...getComponentElements(\"source\")\n .map(el => mountSource(el))\n)\n\n/* Set up content component observables */\nconst content$ = defer(() => merge(\n\n /* Announcement bar */\n ...getComponentElements(\"announce\")\n .map(el => mountAnnounce(el)),\n\n /* Content */\n ...getComponentElements(\"content\")\n .map(el => mountContent(el, { viewport$, target$, print$ })),\n\n /* Search highlighting */\n ...getComponentElements(\"content\")\n .map(el => feature(\"search.highlight\")\n ? mountSearchHiglight(el, { index$, location$ })\n : EMPTY\n ),\n\n /* Header title */\n ...getComponentElements(\"header-title\")\n .map(el => mountHeaderTitle(el, { viewport$, header$ })),\n\n /* Sidebar */\n ...getComponentElements(\"sidebar\")\n .map(el => el.getAttribute(\"data-md-type\") === \"navigation\"\n ? at(screen$, () => mountSidebar(el, { viewport$, header$, main$ }))\n : at(tablet$, () => mountSidebar(el, { viewport$, header$, main$ }))\n ),\n\n /* Navigation tabs */\n ...getComponentElements(\"tabs\")\n .map(el => mountTabs(el, { viewport$, header$ })),\n\n /* Table of contents */\n ...getComponentElements(\"toc\")\n .map(el => mountTableOfContents(el, {\n viewport$, header$, main$, target$\n })),\n\n /* Back-to-top button */\n ...getComponentElements(\"top\")\n .map(el => mountBackToTop(el, { viewport$, header$, main$, target$ }))\n))\n\n/* Set up component observables */\nconst component$ = document$\n .pipe(\n switchMap(() => content$),\n mergeWith(control$),\n shareReplay(1)\n )\n\n/* Subscribe to all components */\ncomponent$.subscribe()\n\n/* ----------------------------------------------------------------------------\n * Exports\n * ------------------------------------------------------------------------- */\n\nwindow.document$ = document$ /* Document observable */\nwindow.location$ = location$ /* Location subject */\nwindow.target$ = target$ /* Location target observable */\nwindow.keyboard$ = keyboard$ /* Keyboard observable */\nwindow.viewport$ = viewport$ /* Viewport observable */\nwindow.tablet$ = tablet$ /* Media tablet observable */\nwindow.screen$ = screen$ /* Media screen observable */\nwindow.print$ = print$ /* Media print observable */\nwindow.alert$ = alert$ /* Alert subject */\nwindow.progress$ = progress$ /* Progress indicator subject */\nwindow.component$ = component$ /* Component observable */\n", "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n", "/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n", "/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nexport class Subscription implements SubscriptionLike {\n /** @nocollapse */\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n", "import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n", "import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n", "/* tslint:disable:no-empty */\nexport function noop() { }\n", "import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n", "import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @nocollapse\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n next(value?: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent\n * @param subscriber The stopped subscriber\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n", "/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n", "/**\n * This function takes one parameter and just returns it. Simply put,\n * this is like `(x: T): T => x`.\n *\n * ## Examples\n *\n * This is useful in some cases when using things like `mergeMap`\n *\n * ```ts\n * import { interval, take, map, range, mergeMap, identity } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(5));\n *\n * const result$ = source$.pipe(\n * map(i => range(i)),\n * mergeMap(identity) // same as mergeMap(x => x)\n * );\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * Or when you want to selectively apply an operator\n *\n * ```ts\n * import { interval, take, identity } from 'rxjs';\n *\n * const shouldLimit = () => Math.random() < 0.5;\n *\n * const source$ = interval(1000);\n *\n * const result$ = source$.pipe(shouldLimit() ? take(5) : identity);\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * @param x Any value that is returned by this function\n * @returns The value passed as the first parameter to this function\n */\nexport function identity(x: T): T {\n return x;\n}\n", "import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n", "import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable\n */\nexport class Observable implements Subscribable {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator | undefined;\n\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new observable\n * @nocollapse\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => {\n return new Observable(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param operator the operator defining the operation to take on the observable\n * @return a new observable with the Operator applied\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * Use it when you have all these Observables, but still nothing is happening.\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {Subscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n subscribe(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next a handler for each value emitted by the observable\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n forEach(next: (value: T) => void): Promise;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable;\n pipe(op1: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction,\n ...operations: OperatorFunction[]\n ): Observable;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n * @method pipe\n * @return {Observable} the Observable result of all of the operators having\n * been called in the order they were passed in.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n */\n pipe(...operations: OperatorFunction[]): Observable {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @method toPromise\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver(value: any): value is Observer {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber(value: any): value is Subscriber {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n", "import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n", "import { Subscriber } from '../Subscriber';\n\n/**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional teardown logic here. This will only be called on teardown if the\n * subscriber itself is not already closed. This is called after all other teardown logic is executed.\n */\nexport function createOperatorSubscriber(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n onFinalize?: () => void\n): Subscriber {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\n\n/**\n * A generic helper for allowing operators to be created with a Subscriber and\n * use closures to capture necessary state from the operator function itself.\n */\nexport class OperatorSubscriber extends Subscriber {\n /**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional finalization logic here. This will only be called on finalization if the\n * subscriber itself is not already closed. This is called after all other finalization logic is executed.\n * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe.\n * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription\n * to the resulting observable does not actually disconnect from the source if there are active subscriptions\n * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!)\n */\n constructor(\n destination: Subscriber,\n onNext?: (value: T) => void,\n onComplete?: () => void,\n onError?: (err: any) => void,\n private onFinalize?: () => void,\n private shouldUnsubscribe?: () => boolean\n ) {\n // It's important - for performance reasons - that all of this class's\n // members are initialized and that they are always initialized in the same\n // order. This will ensure that all OperatorSubscriber instances have the\n // same hidden class in V8. This, in turn, will help keep the number of\n // hidden classes involved in property accesses within the base class as\n // low as possible. If the number of hidden classes involved exceeds four,\n // the property accesses will become megamorphic and performance penalties\n // will be incurred - i.e. inline caches won't be used.\n //\n // The reasons for ensuring all instances have the same hidden class are\n // further discussed in this blog post from Benedikt Meurer:\n // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/\n super(destination);\n this._next = onNext\n ? function (this: OperatorSubscriber, value: T) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (this: OperatorSubscriber, err: any) {\n try {\n onError(err);\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function (this: OperatorSubscriber) {\n try {\n onComplete();\n } catch (err) {\n // Send any errors that occur down stream.\n destination.error(err);\n } finally {\n // Ensure finalization.\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n\n unsubscribe() {\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n // Execute additional teardown if we have any and we didn't already do so.\n !closed && this.onFinalize?.();\n }\n }\n}\n", "import { Subscription } from '../Subscription';\n\ninterface AnimationFrameProvider {\n schedule(callback: FrameRequestCallback): Subscription;\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n delegate:\n | {\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n }\n | undefined;\n}\n\nexport const animationFrameProvider: AnimationFrameProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n // Clear the cancel function. The request has been fulfilled, so\n // attempting to cancel the request upon unsubscription would be\n // pointless.\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel?.(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface ObjectUnsubscribedError extends Error {}\n\nexport interface ObjectUnsubscribedErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): ObjectUnsubscribedError;\n}\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(\n (_super) =>\n function ObjectUnsubscribedErrorImpl(this: any) {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n }\n);\n", "import { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject extends Observable implements SubscriptionLike {\n closed = false;\n\n private currentObservers: Observer[] | null = null;\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n observers: Observer[] = [];\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n isStopped = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n hasError = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n thrownError: any = null;\n\n /**\n * Creates a \"subject\" by basically gluing an observer to an observable.\n *\n * @nocollapse\n * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.\n */\n static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => {\n return new AnonymousSubject(destination, source);\n };\n\n constructor() {\n // NOTE: This must be here to obscure Observable's constructor.\n super();\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n lift(operator: Operator): Observable {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator as any;\n return subject as any;\n }\n\n /** @internal */\n protected _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n\n next(value: T) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n\n error(err: any) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.error(err);\n }\n }\n });\n }\n\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.complete();\n }\n }\n });\n }\n\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null!;\n }\n\n get observed() {\n return this.observers?.length > 0;\n }\n\n /** @internal */\n protected _trySubscribe(subscriber: Subscriber): TeardownLogic {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n\n /** @internal */\n protected _innerSubscribe(subscriber: Subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n\n /**\n * Creates a new Observable with this Subject as the source. You can do this\n * to create custom Observer-side logic of the Subject and conceal it from\n * code that uses the Observable.\n * @return {Observable} Observable that the Subject casts to\n */\n asObservable(): Observable {\n const observable: any = new Observable();\n observable.source = this;\n return observable;\n }\n}\n\n/**\n * @class AnonymousSubject\n */\nexport class AnonymousSubject extends Subject {\n constructor(\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n public destination?: Observer,\n source?: Observable\n ) {\n super();\n this.source = source;\n }\n\n next(value: T) {\n this.destination?.next?.(value);\n }\n\n error(err: any) {\n this.destination?.error?.(err);\n }\n\n complete() {\n this.destination?.complete?.();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n }\n}\n", "import { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\n\n/**\n * A variant of Subject that requires an initial value and emits its current\n * value whenever it is subscribed to.\n *\n * @class BehaviorSubject\n */\nexport class BehaviorSubject extends Subject {\n constructor(private _value: T) {\n super();\n }\n\n get value(): T {\n return this.getValue();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n\n getValue(): T {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n\n next(value: T): void {\n super.next((this._value = value));\n }\n}\n", "import { TimestampProvider } from '../types';\n\ninterface DateTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const dateTimestampProvider: DateTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n", "import { Subject } from './Subject';\nimport { TimestampProvider } from './types';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * A variant of {@link Subject} that \"replays\" old values to new subscribers by emitting them when they first subscribe.\n *\n * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,\n * `ReplaySubject` \"observes\" values by having them passed to its `next` method. When it observes a value, it will store that\n * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.\n *\n * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in\n * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will\n * error if it has observed an error.\n *\n * There are two main configuration items to be concerned with:\n *\n * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.\n * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.\n *\n * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values\n * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.\n *\n * ### Differences with BehaviorSubject\n *\n * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:\n *\n * 1. `BehaviorSubject` comes \"primed\" with a single value upon construction.\n * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n * @see {@link shareReplay}\n */\nexport class ReplaySubject extends Subject {\n private _buffer: (T | number)[] = [];\n private _infiniteTimeWindow = true;\n\n /**\n * @param bufferSize The size of the buffer to replay on subscription\n * @param windowTime The amount of time the buffered items will stay buffered\n * @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to\n * calculate the amount of time something has been buffered.\n */\n constructor(\n private _bufferSize = Infinity,\n private _windowTime = Infinity,\n private _timestampProvider: TimestampProvider = dateTimestampProvider\n ) {\n super();\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n\n next(value: T): void {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n this._throwIfClosed();\n this._trimBuffer();\n\n const subscription = this._innerSubscribe(subscriber);\n\n const { _infiniteTimeWindow, _buffer } = this;\n // We use a copy here, so reentrant code does not mutate our array while we're\n // emitting it to a new subscriber.\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i] as T);\n }\n\n this._checkFinalizedStatuses(subscriber);\n\n return subscription;\n }\n\n private _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n // If we don't have an infinite buffer size, and we're over the length,\n // use splice to truncate the old buffer values off. Note that we have to\n // double the size for instances where we're not using an infinite time window\n // because we're storing the values and the timestamps in the same array.\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n\n // Now, if we're not in an infinite time window, remove all values where the time is\n // older than what is allowed.\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n // Search the array for the first timestamp that isn't expired and\n // truncate the buffer up to that point.\n for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Subscription } from '../Subscription';\nimport { SchedulerAction } from '../types';\n\n/**\n * A unit of work to be executed in a `scheduler`. An action is typically\n * created from within a {@link SchedulerLike} and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n *\n * @class Action\n */\nexport class Action extends Subscription {\n constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) {\n super();\n }\n /**\n * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler.\n * @return {void}\n */\n public schedule(state?: T, delay: number = 0): Subscription {\n return this;\n }\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearIntervalFunction = (handle: TimerHandle) => void;\n\ninterface IntervalProvider {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n delegate:\n | {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n }\n | undefined;\n}\n\nexport const intervalProvider: IntervalProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setInterval(handler: () => void, timeout?: number, ...args) {\n const { delegate } = intervalProvider;\n if (delegate?.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return (delegate?.clearInterval || clearInterval)(handle as any);\n },\n delegate: undefined,\n};\n", "import { Action } from './Action';\nimport { SchedulerAction } from '../types';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncAction extends Action {\n public id: TimerHandle | undefined;\n public state?: T;\n // @ts-ignore: Property has no initializer and is not definitely assigned\n public delay: number;\n protected pending: boolean = false;\n\n constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (this.closed) {\n return this;\n }\n\n // Always replace the current state with the new state.\n this.state = state;\n\n const id = this.id;\n const scheduler = this.scheduler;\n\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay);\n\n return this;\n }\n\n protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined {\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n\n return undefined;\n }\n\n /**\n * Immediately executes this action and the `work` it contains.\n * @return {any}\n */\n public execute(state: T, delay: number): any {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n\n protected _execute(state: T, _delay: number): any {\n let errored: boolean = false;\n let errorValue: any;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n // HACK: Since code elsewhere is relying on the \"truthiness\" of the\n // return here, we can't have it return \"\" or 0 or false.\n // TODO: Clean this up when we refactor schedulers mid-version-8 or so.\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n\n this.work = this.state = this.scheduler = null!;\n this.pending = false;\n\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null!;\n super.unsubscribe();\n }\n }\n}\n", "import { Action } from './scheduler/Action';\nimport { Subscription } from './Subscription';\nimport { SchedulerLike, SchedulerAction } from './types';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an `Action`.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @class Scheduler\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}. Will be made internal in v8.\n */\nexport class Scheduler implements SchedulerLike {\n public static now: () => number = dateTimestampProvider.now;\n\n constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) {\n this.now = now;\n }\n\n /**\n * A getter method that returns a number representing the current time\n * (at the time this function was called) according to the scheduler's own\n * internal clock.\n * @return {number} A number that represents the current time. May or may not\n * have a relation to wall-clock time. May or may not refer to a time unit\n * (e.g. milliseconds).\n */\n public now: () => number;\n\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param {function(state: ?T): ?Subscription} work A function representing a\n * task, or some unit of work to be executed by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler itself.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @return {Subscription} A subscription in order to be able to unsubscribe\n * the scheduled work.\n */\n public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\n", "import { Scheduler } from '../Scheduler';\nimport { Action } from './Action';\nimport { AsyncAction } from './AsyncAction';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncScheduler extends Scheduler {\n public actions: Array> = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @type {boolean}\n * @internal\n */\n public _active: boolean = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @type {any}\n * @internal\n */\n public _scheduled: TimerHandle | undefined;\n\n constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) {\n super(SchedulerAction, now);\n }\n\n public flush(action: AsyncAction): void {\n const { actions } = this;\n\n if (this._active) {\n actions.push(action);\n return;\n }\n\n let error: any;\n this._active = true;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()!)); // exhaust the scheduler queue\n\n this._active = false;\n\n if (error) {\n while ((action = actions.shift()!)) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\n/**\n *\n * Async Scheduler\n *\n * Schedule task as if you used setTimeout(task, duration)\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asapScheduler} scheduler.\n *\n * ## Examples\n * Use async scheduler to delay task\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * const task = () => console.log('it works!');\n *\n * asyncScheduler.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n * ```\n *\n * Use async scheduler to repeat task in intervals\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * asyncScheduler.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n * ```\n */\n\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\n\n/**\n * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.\n */\nexport const async = asyncScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { QueueScheduler } from './QueueScheduler';\nimport { SchedulerAction } from '../types';\nimport { TimerHandle } from './timerHandle';\n\nexport class QueueAction extends AsyncAction {\n constructor(protected scheduler: QueueScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (delay > 0) {\n return super.schedule(state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n }\n\n public execute(state: T, delay: number): any {\n return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay);\n }\n\n protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n\n // Otherwise flush the scheduler starting with this action.\n scheduler.flush(this);\n\n // HACK: In the past, this was returning `void`. However, `void` isn't a valid\n // `TimerHandle`, and generally the return value here isn't really used. So the\n // compromise is to return `0` which is both \"falsy\" and a valid `TimerHandle`,\n // as opposed to refactoring every other instanceo of `requestAsyncId`.\n return 0;\n }\n}\n", "import { AsyncScheduler } from './AsyncScheduler';\n\nexport class QueueScheduler extends AsyncScheduler {\n}\n", "import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\n\n/**\n *\n * Queue Scheduler\n *\n * Put every next task on a queue, instead of executing it immediately\n *\n * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.\n *\n * When used without delay, it schedules given task synchronously - executes it right when\n * it is scheduled. However when called recursively, that is when inside the scheduled task,\n * another task is scheduled with queue scheduler, instead of executing immediately as well,\n * that task will be put on a queue and wait for current one to finish.\n *\n * This means that when you execute task with `queue` scheduler, you are sure it will end\n * before any other task scheduled with that scheduler will start.\n *\n * ## Examples\n * Schedule recursively first, then do something\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(() => {\n * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue\n *\n * console.log('first');\n * });\n *\n * // Logs:\n * // \"first\"\n * // \"second\"\n * ```\n *\n * Reschedule itself recursively\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(function(state) {\n * if (state !== 0) {\n * console.log('before', state);\n * this.schedule(state - 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * console.log('after', state);\n * }\n * }, 0, 3);\n *\n * // In scheduler that runs recursively, you would expect:\n * // \"before\", 3\n * // \"before\", 2\n * // \"before\", 1\n * // \"after\", 1\n * // \"after\", 2\n * // \"after\", 3\n *\n * // But with queue it logs:\n * // \"before\", 3\n * // \"after\", 3\n * // \"before\", 2\n * // \"after\", 2\n * // \"before\", 1\n * // \"after\", 1\n * ```\n */\n\nexport const queueScheduler = new QueueScheduler(QueueAction);\n\n/**\n * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8.\n */\nexport const queue = queueScheduler;\n", "import { AsyncAction } from './AsyncAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nimport { SchedulerAction } from '../types';\nimport { animationFrameProvider } from './animationFrameProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AnimationFrameAction extends AsyncAction {\n constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If an animation frame has already been requested, don't request another\n // one. If an animation frame hasn't been requested yet, request one. Return\n // the current animation frame request id.\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n\n protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested animation frame and set the scheduled flag to\n // undefined so the next AnimationFrameAction will request its own.\n const { actions } = scheduler;\n if (id != null && actions[actions.length - 1]?.id !== id) {\n animationFrameProvider.cancelAnimationFrame(id as number);\n scheduler._scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n", "import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AnimationFrameScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n const flushId = this._scheduled;\n this._scheduled = undefined;\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n", "import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\n\n/**\n *\n * Animation Frame Scheduler\n *\n * Perform task when `window.requestAnimationFrame` would fire\n *\n * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler\n * behaviour.\n *\n * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.\n * It makes sure scheduled task will happen just before next browser content repaint,\n * thus performing animations as efficiently as possible.\n *\n * ## Example\n * Schedule div height animation\n * ```ts\n * // html:

\n * import { animationFrameScheduler } from 'rxjs';\n *\n * const div = document.querySelector('div');\n *\n * animationFrameScheduler.schedule(function(height) {\n * div.style.height = height + \"px\";\n *\n * this.schedule(height + 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * }, 0, 0);\n *\n * // You will see a div element growing in height\n * ```\n */\n\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\n\n/**\n * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.\n */\nexport const animationFrame = animationFrameScheduler;\n", "import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\n/**\n * A simple Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * Just emits 'complete', and nothing else.\n *\n * ![](empty.png)\n *\n * A simple Observable that only emits the complete notification. It can be used\n * for composing with other Observables, such as in a {@link mergeMap}.\n *\n * ## Examples\n *\n * Log complete notification\n *\n * ```ts\n * import { EMPTY } from 'rxjs';\n *\n * EMPTY.subscribe({\n * next: () => console.log('Next'),\n * complete: () => console.log('Complete!')\n * });\n *\n * // Outputs\n * // Complete!\n * ```\n *\n * Emit the number 7, then complete\n *\n * ```ts\n * import { EMPTY, startWith } from 'rxjs';\n *\n * const result = EMPTY.pipe(startWith(7));\n * result.subscribe(x => console.log(x));\n *\n * // Outputs\n * // 7\n * ```\n *\n * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`\n *\n * ```ts\n * import { interval, mergeMap, of, EMPTY } from 'rxjs';\n *\n * const interval$ = interval(1000);\n * const result = interval$.pipe(\n * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1, print a, b, c (each on its own)\n * // if x % 2 is not equal to 1, nothing will be output\n * ```\n *\n * @see {@link Observable}\n * @see {@link NEVER}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\n\n/**\n * @param scheduler A {@link SchedulerLike} to use for scheduling\n * the emission of the complete notification.\n * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.\n */\nexport function empty(scheduler?: SchedulerLike) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\n\nfunction emptyScheduled(scheduler: SchedulerLike) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n return value && isFunction(value.schedule);\n}\n", "import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n", "export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function');", "import { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike {\n return isFunction(value?.then);\n}\n", "import { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable {\n return isFunction(input[Symbol_observable]);\n}\n", "import { isFunction } from './isFunction';\n\nexport function isAsyncIterable(obj: any): obj is AsyncIterable {\n return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n", "/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n // TODO: We should create error codes that can be looked up, so this can be less verbose.\n return new TypeError(\n `You provided ${\n input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n } where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`\n );\n}\n", "export function getSymbolIterator(): symbol {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator' as any;\n }\n\n return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n", "import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable {\n return isFunction(input?.[Symbol_iterator]);\n}\n", "import { ReadableStreamLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = await reader.read();\n if (done) {\n return;\n }\n yield value!;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function isReadableStreamLike(obj: any): obj is ReadableStreamLike {\n // We don't want to use instanceof checks because they would return\n // false for instances from another Realm, like an