shnitsel-tools 0.0.2.dev1__tar.gz → 0.0.2.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shnitsel_tools-0.0.2.dev1/shnitsel_tools.egg-info → shnitsel_tools-0.0.2.dev2}/PKG-INFO +132 -56
- shnitsel_tools-0.0.2.dev2/README.md +197 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/pyproject.toml +15 -5
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/_generated_accessors.py +24 -19
- shnitsel_tools-0.0.2.dev2/shnitsel/analyze/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/analyze/generic.py +81 -3
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/analyze/pca.py +48 -16
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/analyze/stats.py +15 -1
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/bridges.py +116 -5
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/clean/__init__.py +1 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/clean/common.py +2 -0
- shnitsel_tools-0.0.2.dev2/shnitsel/clean/dispatch_plots.py +51 -0
- shnitsel_tools-0.0.2.dev2/shnitsel/clean/filter_energy.py +184 -0
- shnitsel_tools-0.0.2.dev2/shnitsel/clean/filter_geo.py +178 -0
- shnitsel_tools-0.0.2.dev2/shnitsel/data/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/node_base.py +2 -1
- shnitsel_tools-0.0.2.dev2/shnitsel/filtering/__init__.py +0 -0
- shnitsel_tools-0.0.2.dev2/shnitsel/geo/analogs.py +250 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/geo/geocalc.py +132 -14
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/geo/geomatch.py +14 -11
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/helpers.py +7 -1
- shnitsel_tools-0.0.2.dev2/shnitsel/vis/__init__.py +0 -0
- shnitsel_tools-0.0.2.dev2/shnitsel/vis/datasheet/figures/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/filtration.py +42 -5
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/kde.py +9 -4
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/p3mhelpers.py +0 -4
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/pca_biplot.py +14 -9
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/polychrom.py +2 -1
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/time.py +44 -14
- shnitsel_tools-0.0.2.dev2/shnitsel/vis/vmd/__init__.py +38 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2/shnitsel_tools.egg-info}/PKG-INFO +132 -56
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel_tools.egg-info/SOURCES.txt +6 -2
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel_tools.egg-info/requires.txt +9 -4
- shnitsel_tools-0.0.2.dev1/README.md +0 -126
- shnitsel_tools-0.0.2.dev1/shnitsel/clean/filter_energy.py +0 -96
- shnitsel_tools-0.0.2.dev1/shnitsel/clean/filter_geo.py +0 -70
- shnitsel_tools-0.0.2.dev1/shnitsel/data/custom_indexes.py +0 -16
- shnitsel_tools-0.0.2.dev1/shnitsel/geo/analogs.py +0 -140
- shnitsel_tools-0.0.2.dev1/shnitsel/geo/bla.py +0 -122
- shnitsel_tools-0.0.2.dev1/shnitsel/vis/vmd/__init__.py +0 -34
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/LICENSE +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/setup.cfg +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/__api_info.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/_accessors.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/_contracts.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/_state.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/analyze/lda.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/analyze/pls.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/analyze/populations.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/analyze/spectra.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/cli/convert_to_shnitsel.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/cli/merge_shnitsel_files.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/core/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/core/typedefs.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/helpers.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/multi_indices.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/proxy_class.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/combiner_methods.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/datatree_level.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/db_compound_group.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/db_function_decorator.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/db_trajectory_data.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/db_trajectory_group.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/grouping_methods.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db/helpers.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db_format.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/shnitsel_db_helpers.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/trajectory_format.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/trajectory_format_wrapper.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/trajectory_variable_description.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/data/tree.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/filtering/state_selection.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/geo/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/geo/geomatch_exact.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/geo/nonred.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/ase/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/ase/parse.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/ase/write.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/format_reader_base.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/molcas/molcas_opt.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/newtonx/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/newtonx/format_reader.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/newtonx/parse.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/pyrai2md/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/pyrai2md/format_reader.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/pyrai2md/parse.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/read.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/sharc/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/sharc/format_reader.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/sharc/parse_initial_conditions.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/sharc/parse_trajectory.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/sharc/qm_helpers.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/shared/trajectory_finalization.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/shared/trajectory_setup.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/shared/variable_flagging.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/shnitsel/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/shnitsel/format_reader.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/shnitsel/parse.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/shnitsel/write.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/xyz/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/io/xyz/parse.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/rd.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/test_support/trajectory_verification.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/units/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/units/conversion.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/units/defaults.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/units/definitions.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/colormaps.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/datasheet.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/datasheet_page.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/figures/common.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/figures/dip_trans_hist.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/figures/hist.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/figures/nacs_hist.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/figures/per_state_hist.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/figures/structure.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/datasheet/figures/time.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/__init__.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/common.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/select.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/vis/plot/spectra3d.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel/xarray.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel_tools.egg-info/dependency_links.txt +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel_tools.egg-info/entry_points.txt +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/shnitsel_tools.egg-info/top_level.txt +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/tests/test_accessors.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/tests/test_datasheet.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/tests/test_filtration.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/tests/test_plots.py +0 -0
- {shnitsel_tools-0.0.2.dev1 → shnitsel_tools-0.0.2.dev2}/tests/test_postprocess.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shnitsel-tools
|
|
3
|
-
Version: 0.0.2.
|
|
3
|
+
Version: 0.0.2.dev2
|
|
4
4
|
Summary: Collect, manage, process, analyse & visualize surface hopping data
|
|
5
5
|
Author-email: Theodor Everley Röhrkasten <theodor.roehrkasten@fau.de>, Kevin Höllring <kevin.hoellring@fau.de>, Carolin Müller <carolin.cpc.mueller@fau.de>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -22,22 +22,27 @@ Requires-Dist: jupyter>=1.0.0
|
|
|
22
22
|
Requires-Dist: py3dmol>=2.0.4
|
|
23
23
|
Requires-Dist: tqdm>=4.66.2
|
|
24
24
|
Requires-Dist: pyparsing>=3.2.5
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
|
|
29
|
-
Requires-Dist: bokeh>=3.5; extra == "
|
|
25
|
+
Requires-Dist: fsspec
|
|
26
|
+
Requires-Dist: requests
|
|
27
|
+
Requires-Dist: aiohttp
|
|
28
|
+
Provides-Extra: vis
|
|
29
|
+
Requires-Dist: bokeh>=3.5; extra == "vis"
|
|
30
|
+
Requires-Dist: datashader; extra == "vis"
|
|
31
|
+
Requires-Dist: seaborn; extra == "vis"
|
|
30
32
|
Provides-Extra: dev
|
|
31
33
|
Requires-Dist: pytest>=5.2; extra == "dev"
|
|
32
34
|
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
33
35
|
Requires-Dist: hypothesis>=6; extra == "dev"
|
|
34
36
|
Requires-Dist: tox>=4.10.0; extra == "dev"
|
|
37
|
+
Requires-Dist: tox-uv>=1.29.0; extra == "dev"
|
|
35
38
|
Requires-Dist: pre-commit>=2.20.0; extra == "dev"
|
|
36
39
|
Requires-Dist: ruff==0.4.1; extra == "dev"
|
|
37
40
|
Requires-Dist: mypy>=1.9.0; extra == "dev"
|
|
38
41
|
Requires-Dist: pandas-stubs; extra == "dev"
|
|
39
42
|
Requires-Dist: scipy-stubs; extra == "dev"
|
|
40
43
|
Requires-Dist: types-tqdm; extra == "dev"
|
|
44
|
+
Requires-Dist: build; extra == "dev"
|
|
45
|
+
Requires-Dist: grayskull; extra == "dev"
|
|
41
46
|
Requires-Dist: sphinx; extra == "dev"
|
|
42
47
|
Requires-Dist: sphinx-autobuild; extra == "dev"
|
|
43
48
|
Requires-Dist: sphinx-autosummary-accessors; extra == "dev"
|
|
@@ -69,23 +74,31 @@ The package leverages [Xarray](https://xarray.dev/) to benefit from efficient mu
|
|
|
69
74
|
`shnitsel-tools` is normally used interactively via Jupyter Notebook on a local machine.
|
|
70
75
|
However, some users might find it convenient to convert trajectories to NetCDF
|
|
71
76
|
on-cluster, as the NetCDF file will likely download faster than the raw text files.
|
|
72
|
-
Either way the following should work as usual, ideally in a virtual (e.g. `conda`) environment:
|
|
73
|
-
|
|
77
|
+
Either way the following should work as usual, ideally in a fresh virtual (e.g. `conda`) environment:
|
|
78
|
+
|
|
79
|
+
<!-- TODO: remove --pre once full release out -->
|
|
74
80
|
```bash
|
|
75
|
-
pip install shnitsel-tools
|
|
81
|
+
pip install shnitsel-tools[vis]
|
|
76
82
|
```
|
|
77
83
|
|
|
84
|
+
For more detailed installation instructions, see [here](#detailed-installation-instructions)
|
|
85
|
+
|
|
78
86
|
## Usage
|
|
79
87
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
For documentation including an API reference, please see https://shnitsel.github.io/tools/docs/_build/index.html.
|
|
89
|
+
|
|
90
|
+
`shnitsel-tools` mostly exposes data as Xarray (`xr`) objects, so familiarity with that library is beneficial.
|
|
91
|
+
Xarray is somewhat like Pandas for higher-dimensional data, or like Numpy with labels and other metadata.
|
|
92
|
+
- [Overview of data structures](https://tutorial.xarray.dev/intermediate/datastructures-intermediate.html)
|
|
93
|
+
- [Official quick overview](https://docs.xarray.dev/en/stable/getting-started-guide/quick-overview.html)
|
|
94
|
+
- [Xarray in 45 minutes](https://tutorial.xarray.dev/overview/xarray-in-45-min.html) for a more detailed introduction
|
|
84
95
|
|
|
85
96
|
### Tutorials
|
|
86
97
|
For a quick start, see the [tutorials](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials) directory,
|
|
87
98
|
which contains Jupyter Notebooks showing the workflow for parsing, writing and loading SHNITSEL databases as well as how to postprocess and visualize the respective data.
|
|
88
99
|
|
|
100
|
+
<!--
|
|
101
|
+
TODO: Adapt to new tutorials!
|
|
89
102
|
#### Collection & storage
|
|
90
103
|
- [parsing trajcetory and initial condition data obtained by SHARC](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/0_1_sharc2hdf5.ipynb)
|
|
91
104
|
- [parsing trajectory data produced with Newton-X](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/0_2_nx2hdf5.ipynb)
|
|
@@ -103,51 +116,112 @@ analysis of homologous/isoelectronic molecules, from filtration via dimensional
|
|
|
103
116
|
## Tree
|
|
104
117
|
|
|
105
118
|
```bash
|
|
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
|
-
|
|
119
|
+
# TODO: regenerate directory tree
|
|
120
|
+
```
|
|
121
|
+
-->
|
|
122
|
+
|
|
123
|
+
## Detailed installation instructions
|
|
124
|
+
|
|
125
|
+
### Optional dependencies
|
|
126
|
+
In the following, the `[vis]` suffix causes optional plotting dependencies to be
|
|
127
|
+
installed. If you are using `shnitsel-tools` on an HPC, you can omit it.
|
|
128
|
+
|
|
129
|
+
If you would like to contribute to `shnitsel-tools`, you may find the development
|
|
130
|
+
dependencies useful. These can be obtained by adding `[dev]` at the end of the
|
|
131
|
+
package name.
|
|
132
|
+
|
|
133
|
+
To install all optional dependencies, please add `[vis,dev]` after the package name.
|
|
134
|
+
|
|
135
|
+
### Using conda
|
|
136
|
+
Before anything else, please run:
|
|
137
|
+
```bash
|
|
138
|
+
conda create -n shnitsel python==3.12 pip
|
|
139
|
+
conda activate shnitsel
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### For tutorials or development
|
|
143
|
+
If you would like to work through the tutorials, please use the following commands
|
|
144
|
+
while the conda environment is active:
|
|
145
|
+
<!-- TODO: remove git-switch command once full release version comes out -->
|
|
146
|
+
```bash
|
|
147
|
+
git clone 'https://github.com/SHNITSEL/shnitsel-tools.git'
|
|
148
|
+
cd shnitsel-tools
|
|
149
|
+
git switch develop
|
|
150
|
+
pip install .[vis]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
If you would like changes you make to the code in the `shnitsel-tools` directory
|
|
154
|
+
to be reflected in your environment, please add the `-e` flag ("editable mode") to the
|
|
155
|
+
final line of the above block:
|
|
156
|
+
```bash
|
|
157
|
+
# Same commands as before, and then:
|
|
158
|
+
pip install -e .[vis] # or .[vis,dev] to include development tools
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### For ordinary use
|
|
162
|
+
If you would just like to use the package, it is unnecessary to clone the repository.
|
|
163
|
+
Instead, it should suffice to run the following command with the conda environment active:
|
|
164
|
+
|
|
165
|
+
<!-- TODO: remove --pre once full release version comes out -->
|
|
166
|
+
```bash
|
|
167
|
+
pip install --pre shnitsel-tools[vis]
|
|
148
168
|
```
|
|
149
169
|
|
|
150
|
-
|
|
170
|
+
### Using uv
|
|
171
|
+
|
|
172
|
+
This tool, available at https://docs.astral.sh/uv/, is typically faster and
|
|
173
|
+
more light-weight than `pip` and `conda`.
|
|
174
|
+
Unlike `conda`, it creates traditional Python virtual environments, which are
|
|
175
|
+
stored in the folder in which the command is run and activated by sourcing
|
|
176
|
+
a shell-script.
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git clone 'https://github.com/SHNITSEL/shnitsel-tools.git'
|
|
180
|
+
cd shnitsel-tools
|
|
181
|
+
|
|
182
|
+
uv pip install -e .[dev] # install shnitsel in editable mode
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### For tutorials or development
|
|
186
|
+
If you would like to work through the tutorials, please use the following commands:
|
|
187
|
+
<!-- TODO: remove git-switch command once full release version comes out -->
|
|
188
|
+
```bash
|
|
189
|
+
git clone 'https://github.com/SHNITSEL/shnitsel-tools.git'
|
|
190
|
+
cd shnitsel-tools
|
|
191
|
+
git switch develop
|
|
192
|
+
uv venv --python 3.12 # create an environment under ./.venv
|
|
193
|
+
source .venv/bin/activate # activate the new environment
|
|
194
|
+
uv pip install .[vis]
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
If you would like changes you make to the code in the `shnitsel-tools` directory
|
|
198
|
+
to be reflected in your environment, please add the `-e` flag ("editable mode") to the
|
|
199
|
+
final line of the above block:
|
|
200
|
+
```bash
|
|
201
|
+
# Same commands as before, and then:
|
|
202
|
+
uv pip install -e .[vis] # or .[vis,dev] to include development tools
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### For command-line only use
|
|
206
|
+
The following will ensure the command-line programs provided are always available,
|
|
207
|
+
without requiring environments to be activated first.
|
|
208
|
+
```bash
|
|
209
|
+
uv tool install --pre shnitsel-tools
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### For ordinary use
|
|
213
|
+
If you would just like to use the package, it is unnecessary to clone the repository.
|
|
214
|
+
Instead, it should suffice to run the following commands:
|
|
215
|
+
|
|
216
|
+
<!-- TODO: remove --pre once full release version comes out -->
|
|
217
|
+
```bash
|
|
218
|
+
uv venv --python 3.12 shnitsel # creates a directory here called ./shnitsel
|
|
219
|
+
source shnitsel/bin/activate # activate the new environment
|
|
220
|
+
uv pip install --pre shnitsel-tools[vis]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
<!--
|
|
224
|
+
### For developers
|
|
151
225
|
|
|
152
226
|
We recommend installation using the `uv` tool, available at https://docs.astral.sh/uv/.
|
|
153
227
|
Please clone this repo and run the following in the `shnitsel-tools` directory:
|
|
@@ -167,6 +241,8 @@ shnitsel
|
|
|
167
241
|
please [fork](https://github.com/SHNITSEL/shnitsel-tools/fork) this repo,
|
|
168
242
|
and make a pull request.
|
|
169
243
|
|
|
244
|
+
-->
|
|
245
|
+
|
|
170
246
|
## Further Information
|
|
171
247
|
|
|
172
248
|
[](https://shnitsel.github.io/)
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>shnitsel-tools</h1>
|
|
3
|
+
<img src="https://raw.githubusercontent.com/SHNITSEL/shnitsel-tools/main/logo_shnitsel_tools.png" alt="SHNITSEL-TOOLS Logo" width="200px">
|
|
4
|
+
<h3>Surface Hopping Nested Instances Training Set for Excited-state Learning Tools</h3>
|
|
5
|
+
<br>
|
|
6
|
+
<a href="https://shnitsel.github.io/"><img src="https://img.shields.io/badge/Website-shnitsel.github.io-yellow.svg" alt="DOI"></a>
|
|
7
|
+
|
|
8
|
+
<a href="https://shnitsel.github.io/tools/docs/_build/index.html"><img src="https://img.shields.io/badge/Docs-shnitsel.github.io-yellow.svg" alt="DOI"></a>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
--------------------
|
|
12
|
+
|
|
13
|
+
## About
|
|
14
|
+
|
|
15
|
+
`shnitsel-tools` is designed to to support the entire data lifecycle of surface hopping (SH) trajectory data upon simulation: data managment, storage, processing, visualization and interpretation.
|
|
16
|
+
The tool is compatible with surface hopping data generated using the software packages [SHARC 3/4](https://sharc-md.org/), [Newton-X](https://newtonx.org/), and [PyRAI2MD](https://github.com/lopez-lab/PyRAI2MD).
|
|
17
|
+
The package leverages [Xarray](https://xarray.dev/) to benefit from efficient multidimensional data handling, improved metadata management, and a structure that aligns naturally with the needs of quantum chemical datasets.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
`shnitsel-tools` is normally used interactively via Jupyter Notebook on a local machine.
|
|
22
|
+
However, some users might find it convenient to convert trajectories to NetCDF
|
|
23
|
+
on-cluster, as the NetCDF file will likely download faster than the raw text files.
|
|
24
|
+
Either way the following should work as usual, ideally in a fresh virtual (e.g. `conda`) environment:
|
|
25
|
+
|
|
26
|
+
<!-- TODO: remove --pre once full release out -->
|
|
27
|
+
```bash
|
|
28
|
+
pip install shnitsel-tools[vis]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For more detailed installation instructions, see [here](#detailed-installation-instructions)
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
For documentation including an API reference, please see https://shnitsel.github.io/tools/docs/_build/index.html.
|
|
36
|
+
|
|
37
|
+
`shnitsel-tools` mostly exposes data as Xarray (`xr`) objects, so familiarity with that library is beneficial.
|
|
38
|
+
Xarray is somewhat like Pandas for higher-dimensional data, or like Numpy with labels and other metadata.
|
|
39
|
+
- [Overview of data structures](https://tutorial.xarray.dev/intermediate/datastructures-intermediate.html)
|
|
40
|
+
- [Official quick overview](https://docs.xarray.dev/en/stable/getting-started-guide/quick-overview.html)
|
|
41
|
+
- [Xarray in 45 minutes](https://tutorial.xarray.dev/overview/xarray-in-45-min.html) for a more detailed introduction
|
|
42
|
+
|
|
43
|
+
### Tutorials
|
|
44
|
+
For a quick start, see the [tutorials](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials) directory,
|
|
45
|
+
which contains Jupyter Notebooks showing the workflow for parsing, writing and loading SHNITSEL databases as well as how to postprocess and visualize the respective data.
|
|
46
|
+
|
|
47
|
+
<!--
|
|
48
|
+
TODO: Adapt to new tutorials!
|
|
49
|
+
#### Collection & storage
|
|
50
|
+
- [parsing trajcetory and initial condition data obtained by SHARC](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/0_1_sharc2hdf5.ipynb)
|
|
51
|
+
- [parsing trajectory data produced with Newton-X](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/0_2_nx2hdf5.ipynb)
|
|
52
|
+
- [convert ASE databases](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/0_4_ase2hdf5.ipynb)
|
|
53
|
+
#### Management
|
|
54
|
+
- [exploration of electronic properties](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/2_2_PS_explore.ipynb)
|
|
55
|
+
#### Postprocessing & visualization of data
|
|
56
|
+
- [datasheet for trajectory data](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/3_1_datasheet.ipynb)
|
|
57
|
+
- [principal component analysis and trajectory classification](https://github.com/SHNITSEL/shnitsel-tools/blob/main/tutorials/1_1_GS_PCA.ipynb)
|
|
58
|
+
|
|
59
|
+
### Workflow walkthrough
|
|
60
|
+
Four [notebooks](https://github.com/SHNITSEL/shnitsel-tools/tree/main/tutorials/walkthrough) demonstrate a workflow for the comparative
|
|
61
|
+
analysis of homologous/isoelectronic molecules, from filtration via dimensional reduction and clustering to kinetics.
|
|
62
|
+
|
|
63
|
+
## Tree
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# TODO: regenerate directory tree
|
|
67
|
+
```
|
|
68
|
+
-->
|
|
69
|
+
|
|
70
|
+
## Detailed installation instructions
|
|
71
|
+
|
|
72
|
+
### Optional dependencies
|
|
73
|
+
In the following, the `[vis]` suffix causes optional plotting dependencies to be
|
|
74
|
+
installed. If you are using `shnitsel-tools` on an HPC, you can omit it.
|
|
75
|
+
|
|
76
|
+
If you would like to contribute to `shnitsel-tools`, you may find the development
|
|
77
|
+
dependencies useful. These can be obtained by adding `[dev]` at the end of the
|
|
78
|
+
package name.
|
|
79
|
+
|
|
80
|
+
To install all optional dependencies, please add `[vis,dev]` after the package name.
|
|
81
|
+
|
|
82
|
+
### Using conda
|
|
83
|
+
Before anything else, please run:
|
|
84
|
+
```bash
|
|
85
|
+
conda create -n shnitsel python==3.12 pip
|
|
86
|
+
conda activate shnitsel
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### For tutorials or development
|
|
90
|
+
If you would like to work through the tutorials, please use the following commands
|
|
91
|
+
while the conda environment is active:
|
|
92
|
+
<!-- TODO: remove git-switch command once full release version comes out -->
|
|
93
|
+
```bash
|
|
94
|
+
git clone 'https://github.com/SHNITSEL/shnitsel-tools.git'
|
|
95
|
+
cd shnitsel-tools
|
|
96
|
+
git switch develop
|
|
97
|
+
pip install .[vis]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
If you would like changes you make to the code in the `shnitsel-tools` directory
|
|
101
|
+
to be reflected in your environment, please add the `-e` flag ("editable mode") to the
|
|
102
|
+
final line of the above block:
|
|
103
|
+
```bash
|
|
104
|
+
# Same commands as before, and then:
|
|
105
|
+
pip install -e .[vis] # or .[vis,dev] to include development tools
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### For ordinary use
|
|
109
|
+
If you would just like to use the package, it is unnecessary to clone the repository.
|
|
110
|
+
Instead, it should suffice to run the following command with the conda environment active:
|
|
111
|
+
|
|
112
|
+
<!-- TODO: remove --pre once full release version comes out -->
|
|
113
|
+
```bash
|
|
114
|
+
pip install --pre shnitsel-tools[vis]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Using uv
|
|
118
|
+
|
|
119
|
+
This tool, available at https://docs.astral.sh/uv/, is typically faster and
|
|
120
|
+
more light-weight than `pip` and `conda`.
|
|
121
|
+
Unlike `conda`, it creates traditional Python virtual environments, which are
|
|
122
|
+
stored in the folder in which the command is run and activated by sourcing
|
|
123
|
+
a shell-script.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git clone 'https://github.com/SHNITSEL/shnitsel-tools.git'
|
|
127
|
+
cd shnitsel-tools
|
|
128
|
+
|
|
129
|
+
uv pip install -e .[dev] # install shnitsel in editable mode
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
#### For tutorials or development
|
|
133
|
+
If you would like to work through the tutorials, please use the following commands:
|
|
134
|
+
<!-- TODO: remove git-switch command once full release version comes out -->
|
|
135
|
+
```bash
|
|
136
|
+
git clone 'https://github.com/SHNITSEL/shnitsel-tools.git'
|
|
137
|
+
cd shnitsel-tools
|
|
138
|
+
git switch develop
|
|
139
|
+
uv venv --python 3.12 # create an environment under ./.venv
|
|
140
|
+
source .venv/bin/activate # activate the new environment
|
|
141
|
+
uv pip install .[vis]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
If you would like changes you make to the code in the `shnitsel-tools` directory
|
|
145
|
+
to be reflected in your environment, please add the `-e` flag ("editable mode") to the
|
|
146
|
+
final line of the above block:
|
|
147
|
+
```bash
|
|
148
|
+
# Same commands as before, and then:
|
|
149
|
+
uv pip install -e .[vis] # or .[vis,dev] to include development tools
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
#### For command-line only use
|
|
153
|
+
The following will ensure the command-line programs provided are always available,
|
|
154
|
+
without requiring environments to be activated first.
|
|
155
|
+
```bash
|
|
156
|
+
uv tool install --pre shnitsel-tools
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
#### For ordinary use
|
|
160
|
+
If you would just like to use the package, it is unnecessary to clone the repository.
|
|
161
|
+
Instead, it should suffice to run the following commands:
|
|
162
|
+
|
|
163
|
+
<!-- TODO: remove --pre once full release version comes out -->
|
|
164
|
+
```bash
|
|
165
|
+
uv venv --python 3.12 shnitsel # creates a directory here called ./shnitsel
|
|
166
|
+
source shnitsel/bin/activate # activate the new environment
|
|
167
|
+
uv pip install --pre shnitsel-tools[vis]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
<!--
|
|
171
|
+
### For developers
|
|
172
|
+
|
|
173
|
+
We recommend installation using the `uv` tool, available at https://docs.astral.sh/uv/.
|
|
174
|
+
Please clone this repo and run the following in the `shnitsel-tools` directory:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
git clone 'https://github.com/SHNITSEL/shnitsel-tools.git'
|
|
178
|
+
cd shnitsel-tools
|
|
179
|
+
uv venv # create an environment under ./.venv
|
|
180
|
+
source .venv/bin/activate # activate the new environment
|
|
181
|
+
uv pip install -e .[dev] # install shnitsel in editable mode
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
In the above, the option `-e` installs in editable mode, meaning that Python will see changes you make
|
|
185
|
+
to the source, while `[dev]` installs the optional development dependencies.
|
|
186
|
+
|
|
187
|
+
If you would like to contribute your changes,
|
|
188
|
+
please [fork](https://github.com/SHNITSEL/shnitsel-tools/fork) this repo,
|
|
189
|
+
and make a pull request.
|
|
190
|
+
|
|
191
|
+
-->
|
|
192
|
+
|
|
193
|
+
## Further Information
|
|
194
|
+
|
|
195
|
+
[](https://shnitsel.github.io/)
|
|
196
|
+
|
|
197
|
+
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "shnitsel-tools"
|
|
7
|
-
version = "0.0.2.
|
|
7
|
+
version = "0.0.2.dev2"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name = "Theodor Everley Röhrkasten", email = "theodor.roehrkasten@fau.de" },
|
|
10
10
|
{ name = "Kevin Höllring", email = "kevin.hoellring@fau.de" },
|
|
@@ -29,27 +29,37 @@ dependencies = [
|
|
|
29
29
|
"pandas>=2.2",
|
|
30
30
|
"h5netcdf>=1.7.0",
|
|
31
31
|
"scikit-learn>=1.5",
|
|
32
|
-
"jupyter>=1.0.0",
|
|
33
|
-
"py3dmol>=2.0.4",
|
|
32
|
+
"jupyter>=1.0.0", # TODO: make optional?
|
|
33
|
+
"py3dmol>=2.0.4", # TODO: make optional?
|
|
34
34
|
"tqdm>=4.66.2",
|
|
35
35
|
"pyparsing>=3.2.5",
|
|
36
|
-
|
|
36
|
+
# To enable direct loading of remote resources:
|
|
37
|
+
"fsspec",
|
|
38
|
+
"requests",
|
|
39
|
+
"aiohttp"
|
|
37
40
|
]
|
|
38
41
|
|
|
39
42
|
[project.optional-dependencies]
|
|
40
|
-
|
|
43
|
+
vis = [
|
|
44
|
+
"bokeh>=3.5",
|
|
45
|
+
"datashader",
|
|
46
|
+
"seaborn"
|
|
47
|
+
]
|
|
41
48
|
|
|
42
49
|
dev = [
|
|
43
50
|
"pytest>=5.2",
|
|
44
51
|
"pytest-cov>=4.1.0",
|
|
45
52
|
"hypothesis>=6", # ==6.127.3
|
|
46
53
|
"tox>=4.10.0",
|
|
54
|
+
"tox-uv>=1.29.0",
|
|
47
55
|
"pre-commit>=2.20.0",
|
|
48
56
|
"ruff==0.4.1",
|
|
49
57
|
"mypy>=1.9.0",
|
|
50
58
|
"pandas-stubs",
|
|
51
59
|
"scipy-stubs",
|
|
52
60
|
"types-tqdm",
|
|
61
|
+
"build",
|
|
62
|
+
"grayskull",
|
|
53
63
|
|
|
54
64
|
# Sphinx and its extensions for building documentation
|
|
55
65
|
"sphinx",
|
|
@@ -13,7 +13,7 @@ from ._accessors import DAManualAccessor, DSManualAccessor
|
|
|
13
13
|
from ._contracts import needs
|
|
14
14
|
from numpy import nan, ndarray
|
|
15
15
|
from rdkit.Chem.rdchem import Mol
|
|
16
|
-
from shnitsel.analyze.generic import keep_norming, norm, subtract_combinations
|
|
16
|
+
from shnitsel.analyze.generic import keep_norming, norm, pwdists, subtract_combinations
|
|
17
17
|
from shnitsel.analyze.lda import lda
|
|
18
18
|
from shnitsel.analyze.pca import pairwise_dists_pca, pca, pca_and_hops
|
|
19
19
|
from shnitsel.analyze.pls import pls, pls_ds
|
|
@@ -45,6 +45,7 @@ class DataArrayAccessor(DAManualAccessor):
|
|
|
45
45
|
'norm',
|
|
46
46
|
'subtract_combinations',
|
|
47
47
|
'keep_norming',
|
|
48
|
+
'pwdists',
|
|
48
49
|
'calc_confidence_interval',
|
|
49
50
|
'time_grouped_confidence_interval',
|
|
50
51
|
'to_xyz',
|
|
@@ -102,6 +103,10 @@ class DataArrayAccessor(DAManualAccessor):
|
|
|
102
103
|
"""Wrapper for :py:func:`shnitsel.analyze.generic.keep_norming`."""
|
|
103
104
|
return keep_norming(self._obj, exclude=exclude)
|
|
104
105
|
|
|
106
|
+
def pwdists(self, mean: bool=False) -> DataArray:
|
|
107
|
+
"""Wrapper for :py:func:`shnitsel.analyze.generic.pwdists`."""
|
|
108
|
+
return pwdists(self._obj, mean=mean)
|
|
109
|
+
|
|
105
110
|
def calc_confidence_interval(self, confidence: float=0.95) -> ndarray:
|
|
106
111
|
"""Wrapper for :py:func:`shnitsel.analyze.stats.calc_confidence_interval`."""
|
|
107
112
|
return calc_confidence_interval(self._obj, confidence=confidence)
|
|
@@ -112,14 +117,14 @@ class DataArrayAccessor(DAManualAccessor):
|
|
|
112
117
|
return time_grouped_confidence_interval(self._obj, confidence=confidence)
|
|
113
118
|
|
|
114
119
|
@needs(dims={'atom', 'direction'}, coords_or_vars={'atNames'}, not_dims={'frame'})
|
|
115
|
-
def to_xyz(self, comment='#') -> str:
|
|
120
|
+
def to_xyz(self, comment='#', units='angstrom') -> str:
|
|
116
121
|
"""Wrapper for :py:func:`shnitsel.bridges.to_xyz`."""
|
|
117
|
-
return to_xyz(self._obj, comment=comment)
|
|
122
|
+
return to_xyz(self._obj, comment=comment, units=units)
|
|
118
123
|
|
|
119
124
|
@needs(dims={'atom', 'direction'}, groupable={'time'}, coords_or_vars={'atNames'})
|
|
120
|
-
def traj_to_xyz(self) -> str:
|
|
125
|
+
def traj_to_xyz(self, units='angstrom') -> str:
|
|
121
126
|
"""Wrapper for :py:func:`shnitsel.bridges.traj_to_xyz`."""
|
|
122
|
-
return traj_to_xyz(self._obj)
|
|
127
|
+
return traj_to_xyz(self._obj, units=units)
|
|
123
128
|
|
|
124
129
|
@needs(dims={'atom', 'direction'}, coords_or_vars={'atNames'}, not_dims={'frame'})
|
|
125
130
|
def to_mol(self, charge: int | None=None, covFactor: float=1.2, to2D: bool=True, molAtomMapNumber: Union=None, atomNote: Union=None, atomLabel: Union=None) -> Mol:
|
|
@@ -136,9 +141,9 @@ class DataArrayAccessor(DAManualAccessor):
|
|
|
136
141
|
return default_mol(self._obj)
|
|
137
142
|
|
|
138
143
|
@needs(dims={'atom'})
|
|
139
|
-
def pairwise_dists_pca(self, **kwargs) -> DataArray:
|
|
144
|
+
def pairwise_dists_pca(self, mean: bool=False, return_pca_object=False, **kwargs) -> DataArray:
|
|
140
145
|
"""Wrapper for :py:func:`shnitsel.analyze.pca.pairwise_dists_pca`."""
|
|
141
|
-
return pairwise_dists_pca(self._obj, **kwargs)
|
|
146
|
+
return pairwise_dists_pca(self._obj, mean=mean, return_pca_object=return_pca_object, **kwargs)
|
|
142
147
|
|
|
143
148
|
def convert_energy(self, to: str, convert_from: str | None=None):
|
|
144
149
|
"""Wrapper for :py:func:`shnitsel.units.conversion.convert_energy`."""
|
|
@@ -247,7 +252,7 @@ class DataArrayAccessor(DAManualAccessor):
|
|
|
247
252
|
return get_bats(self._obj, matches_or_mol=matches_or_mol, signed=signed, ang=ang, pyr=pyr)
|
|
248
253
|
|
|
249
254
|
@needs(dims={'atom', 'direction'})
|
|
250
|
-
def kabsch(self, reference_or_indexers: xarray.core.dataarray.DataArray | dict | None=None, **indexers_kwargs):
|
|
255
|
+
def kabsch(self, reference_or_indexers: xarray.core.dataarray.DataArray | dict | None=None, **indexers_kwargs) -> DataArray:
|
|
251
256
|
"""Wrapper for :py:func:`shnitsel.geo.geocalc.kabsch`."""
|
|
252
257
|
return kabsch(self._obj, reference_or_indexers=reference_or_indexers, **indexers_kwargs)
|
|
253
258
|
|
|
@@ -279,9 +284,9 @@ class DataArrayAccessor(DAManualAccessor):
|
|
|
279
284
|
"""Wrapper for :py:func:`shnitsel.vis.plot.p3mhelpers.trajs3Dgrid`."""
|
|
280
285
|
return trajs3Dgrid(self._obj, trajids=trajids, loop=loop)
|
|
281
286
|
|
|
282
|
-
def traj_vmd(self, groupby='trajid'
|
|
287
|
+
def traj_vmd(self, groupby='trajid'):
|
|
283
288
|
"""Wrapper for :py:func:`shnitsel.vis.vmd.traj_vmd`."""
|
|
284
|
-
return traj_vmd(self._obj, groupby=groupby
|
|
289
|
+
return traj_vmd(self._obj, groupby=groupby)
|
|
285
290
|
|
|
286
291
|
def pca(self, dim: str, n_components: int=2, return_pca_object: bool=False) -> tuple[xarray.core.dataarray.DataArray, sklearn.decomposition._pca.PCA] | xarray.core.dataarray.DataArray:
|
|
287
292
|
"""Wrapper for :py:func:`shnitsel.analyze.pca.pca`."""
|
|
@@ -328,9 +333,9 @@ class DatasetAccessor(DSManualAccessor):
|
|
|
328
333
|
]
|
|
329
334
|
|
|
330
335
|
@needs(coords_or_vars={'astate', 'atXYZ'})
|
|
331
|
-
def pca_and_hops(self) -> tuple:
|
|
336
|
+
def pca_and_hops(self, mean: bool) -> tuple:
|
|
332
337
|
"""Wrapper for :py:func:`shnitsel.analyze.pca.pca_and_hops`."""
|
|
333
|
-
return pca_and_hops(self._obj)
|
|
338
|
+
return pca_and_hops(self._obj, mean)
|
|
334
339
|
|
|
335
340
|
def validate(self) -> ndarray:
|
|
336
341
|
"""Wrapper for :py:func:`shnitsel.data.helpers.validate`."""
|
|
@@ -398,7 +403,7 @@ class DatasetAccessor(DSManualAccessor):
|
|
|
398
403
|
"""Wrapper for :py:func:`shnitsel.data.multi_indices.stack_trajs`."""
|
|
399
404
|
return stack_trajs(self._obj)
|
|
400
405
|
|
|
401
|
-
def write_shnitsel_file(self, savepath: str | os.PathLike
|
|
406
|
+
def write_shnitsel_file(self, savepath: str | os.PathLike, complevel: int=9):
|
|
402
407
|
"""Wrapper for :py:func:`shnitsel.io.shnitsel.write.write_shnitsel_file`."""
|
|
403
408
|
return write_shnitsel_file(self._obj, savepath, complevel=complevel)
|
|
404
409
|
|
|
@@ -411,17 +416,17 @@ class DatasetAccessor(DSManualAccessor):
|
|
|
411
416
|
"""Wrapper for :py:func:`shnitsel.clean.filter_energy.energy_filtranda`."""
|
|
412
417
|
return energy_filtranda(self._obj, etot_drift=etot_drift, etot_step=etot_step, epot_step=epot_step, ekin_step=ekin_step, hop_epot_step=hop_epot_step, units=units)
|
|
413
418
|
|
|
414
|
-
def sanity_check(self, cut: Union='truncate', units='eV', etot_drift: float=nan, etot_step: float=nan, epot_step: float=nan, ekin_step: float=nan, hop_epot_step: float=nan):
|
|
419
|
+
def sanity_check(self, cut: Union='truncate', units='eV', etot_drift: float=nan, etot_step: float=nan, epot_step: float=nan, ekin_step: float=nan, hop_epot_step: float=nan, plot_thresholds: Union=False, plot_populations: Union=False):
|
|
415
420
|
"""Wrapper for :py:func:`shnitsel.clean.filter_energy.sanity_check`."""
|
|
416
|
-
return sanity_check(self._obj, cut=cut, units=units, etot_drift=etot_drift, etot_step=etot_step, epot_step=epot_step, ekin_step=ekin_step, hop_epot_step=hop_epot_step)
|
|
421
|
+
return sanity_check(self._obj, cut=cut, units=units, etot_drift=etot_drift, etot_step=etot_step, epot_step=epot_step, ekin_step=ekin_step, hop_epot_step=hop_epot_step, plot_thresholds=plot_thresholds, plot_populations=plot_populations)
|
|
417
422
|
|
|
418
|
-
def bond_length_filtranda(self, search_dict: dict[str, numbers.Number] | None=None, units='angstrom'):
|
|
423
|
+
def bond_length_filtranda(self, search_dict: dict[str, numbers.Number] | None=None, units='angstrom', mol: rdkit.Chem.rdchem.Mol | None=None):
|
|
419
424
|
"""Wrapper for :py:func:`shnitsel.clean.filter_geo.bond_length_filtranda`."""
|
|
420
|
-
return bond_length_filtranda(self._obj, search_dict=search_dict, units=units)
|
|
425
|
+
return bond_length_filtranda(self._obj, search_dict=search_dict, units=units, mol=mol)
|
|
421
426
|
|
|
422
|
-
def filter_by_length(self, cut: Union='truncate', search_dict: dict[str, numbers.Number] | None=None):
|
|
427
|
+
def filter_by_length(self, cut: Union='truncate', search_dict: dict[str, numbers.Number] | None=None, units: str='angstrom', plot_thresholds: Union=False, plot_populations: Union=False, mol: rdkit.Chem.rdchem.Mol | None=None):
|
|
423
428
|
"""Wrapper for :py:func:`shnitsel.clean.filter_geo.filter_by_length`."""
|
|
424
|
-
return filter_by_length(self._obj, cut=cut, search_dict=search_dict)
|
|
429
|
+
return filter_by_length(self._obj, cut=cut, search_dict=search_dict, units=units, plot_thresholds=plot_thresholds, plot_populations=plot_populations, mol=mol)
|
|
425
430
|
|
|
426
431
|
def omit(self):
|
|
427
432
|
"""Wrapper for :py:func:`shnitsel.clean.common.omit`."""
|
|
File without changes
|