emle-engine 2.0.0__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.
Files changed (120) hide show
  1. emle_engine-2.0.0/.github/workflows/main.yaml +78 -0
  2. emle_engine-2.0.0/.github/workflows/release.yaml +143 -0
  3. emle_engine-2.0.0/.gitignore +45 -0
  4. emle_engine-2.0.0/CHANGELOG.md +60 -0
  5. emle_engine-2.0.0/CITATION.cff +23 -0
  6. emle_engine-2.0.0/LICENSE +21 -0
  7. emle_engine-2.0.0/PKG-INFO +49 -0
  8. emle_engine-2.0.0/README.md +12 -0
  9. emle_engine-2.0.0/bin/emle-analyze +175 -0
  10. emle_engine-2.0.0/bin/emle-compile +162 -0
  11. emle_engine-2.0.0/bin/emle-server +777 -0
  12. emle_engine-2.0.0/bin/emle-stop +21 -0
  13. emle_engine-2.0.0/bin/emle-train +127 -0
  14. emle_engine-2.0.0/bin/orca +95 -0
  15. emle_engine-2.0.0/bin/tarball-to-extxyz +6 -0
  16. emle_engine-2.0.0/demo/adp.parm7 +11846 -0
  17. emle_engine-2.0.0/demo/adp.rst7 +2936 -0
  18. emle_engine-2.0.0/demo/demo.sh +24 -0
  19. emle_engine-2.0.0/demo/emle.in +36 -0
  20. emle_engine-2.0.0/doc/Makefile +42 -0
  21. emle_engine-2.0.0/doc/requirements.txt +4 -0
  22. emle_engine-2.0.0/doc/source/_static/css/custom.css +31 -0
  23. emle_engine-2.0.0/doc/source/analysis.rst +46 -0
  24. emle_engine-2.0.0/doc/source/api/index.rst +18 -0
  25. emle_engine-2.0.0/doc/source/api/index_analyzer.rst +11 -0
  26. emle_engine-2.0.0/doc/source/api/index_backends.rst +32 -0
  27. emle_engine-2.0.0/doc/source/api/index_calculator.rst +14 -0
  28. emle_engine-2.0.0/doc/source/api/index_models.rst +21 -0
  29. emle_engine-2.0.0/doc/source/api/index_orca_parser.rst +13 -0
  30. emle_engine-2.0.0/doc/source/api/index_train.rst +11 -0
  31. emle_engine-2.0.0/doc/source/changelog.rst +63 -0
  32. emle_engine-2.0.0/doc/source/conf.py +194 -0
  33. emle_engine-2.0.0/doc/source/contributing.rst +29 -0
  34. emle_engine-2.0.0/doc/source/dynamics.rst +404 -0
  35. emle_engine-2.0.0/doc/source/images/favicon.png +0 -0
  36. emle_engine-2.0.0/doc/source/images/logo.jpg +0 -0
  37. emle_engine-2.0.0/doc/source/index.rst +114 -0
  38. emle_engine-2.0.0/doc/source/install.rst +120 -0
  39. emle_engine-2.0.0/doc/source/issues.rst +41 -0
  40. emle_engine-2.0.0/doc/source/training.rst +114 -0
  41. emle_engine-2.0.0/emle/__init__.py +39 -0
  42. emle_engine-2.0.0/emle/_analyzer.py +337 -0
  43. emle_engine-2.0.0/emle/_backends/__init__.py +14 -0
  44. emle_engine-2.0.0/emle/_backends/_ace.py +141 -0
  45. emle_engine-2.0.0/emle/_backends/_aimnet2.py +136 -0
  46. emle_engine-2.0.0/emle/_backends/_backend.py +148 -0
  47. emle_engine-2.0.0/emle/_backends/_deepmd.py +186 -0
  48. emle_engine-2.0.0/emle/_backends/_omnip2x.py +349 -0
  49. emle_engine-2.0.0/emle/_backends/_orca.py +322 -0
  50. emle_engine-2.0.0/emle/_backends/_sander.py +232 -0
  51. emle_engine-2.0.0/emle/_backends/_sqm.py +230 -0
  52. emle_engine-2.0.0/emle/_backends/_xtb.py +126 -0
  53. emle_engine-2.0.0/emle/_compiler.py +279 -0
  54. emle_engine-2.0.0/emle/_csrc/ops.cpp +350 -0
  55. emle_engine-2.0.0/emle/_csrc/ops_cuda.cu +454 -0
  56. emle_engine-2.0.0/emle/_ops.py +173 -0
  57. emle_engine-2.0.0/emle/_orca_parser.py +331 -0
  58. emle_engine-2.0.0/emle/_resources.py +32 -0
  59. emle_engine-2.0.0/emle/_socket.py +211 -0
  60. emle_engine-2.0.0/emle/_tarball_to_extXYZ.py +236 -0
  61. emle_engine-2.0.0/emle/_units.py +16 -0
  62. emle_engine-2.0.0/emle/_utils.py +57 -0
  63. emle_engine-2.0.0/emle/calculator.py +1974 -0
  64. emle_engine-2.0.0/emle/models/__init__.py +13 -0
  65. emle_engine-2.0.0/emle/models/_ani.py +315 -0
  66. emle_engine-2.0.0/emle/models/_deepmd.py +410 -0
  67. emle_engine-2.0.0/emle/models/_emle.py +629 -0
  68. emle_engine-2.0.0/emle/models/_emle_aev_computer.py +616 -0
  69. emle_engine-2.0.0/emle/models/_emle_base.py +1063 -0
  70. emle_engine-2.0.0/emle/models/_mace.py +1368 -0
  71. emle_engine-2.0.0/emle/models/_patches.py +66 -0
  72. emle_engine-2.0.0/emle/models/_utils.py +279 -0
  73. emle_engine-2.0.0/emle/train/__init__.py +8 -0
  74. emle_engine-2.0.0/emle/train/_extxyz.py +63 -0
  75. emle_engine-2.0.0/emle/train/_gpr.py +205 -0
  76. emle_engine-2.0.0/emle/train/_ivm.py +126 -0
  77. emle_engine-2.0.0/emle/train/_loss.py +357 -0
  78. emle_engine-2.0.0/emle/train/_trainer.py +709 -0
  79. emle_engine-2.0.0/emle/train/_utils.py +92 -0
  80. emle_engine-2.0.0/emle_engine.egg-info/PKG-INFO +49 -0
  81. emle_engine-2.0.0/emle_engine.egg-info/SOURCES.txt +118 -0
  82. emle_engine-2.0.0/emle_engine.egg-info/dependency_links.txt +1 -0
  83. emle_engine-2.0.0/emle_engine.egg-info/not-zip-safe +1 -0
  84. emle_engine-2.0.0/emle_engine.egg-info/requires.txt +9 -0
  85. emle_engine-2.0.0/emle_engine.egg-info/scm_file_list.json +114 -0
  86. emle_engine-2.0.0/emle_engine.egg-info/scm_version.json +8 -0
  87. emle_engine-2.0.0/emle_engine.egg-info/top_level.txt +1 -0
  88. emle_engine-2.0.0/environment.yaml +16 -0
  89. emle_engine-2.0.0/pyproject.toml +193 -0
  90. emle_engine-2.0.0/recipes/emle-engine/recipe.yaml +65 -0
  91. emle_engine-2.0.0/setup.cfg +4 -0
  92. emle_engine-2.0.0/setup.py +64 -0
  93. emle_engine-2.0.0/tests/conftest.py +32 -0
  94. emle_engine-2.0.0/tests/input/adp.parm7 +3991 -0
  95. emle_engine-2.0.0/tests/input/adp.rst7 +959 -0
  96. emle_engine-2.0.0/tests/input/adp_mm_charges.txt +22 -0
  97. emle_engine-2.0.0/tests/input/adp_qm.parm7 +247 -0
  98. emle_engine-2.0.0/tests/input/adp_qm_indices.txt +22 -0
  99. emle_engine-2.0.0/tests/input/atomic_numbers.npy +0 -0
  100. emle_engine-2.0.0/tests/input/charges_mm.npy +0 -0
  101. emle_engine-2.0.0/tests/input/config.yaml +59 -0
  102. emle_engine-2.0.0/tests/input/emle_prod.in +22 -0
  103. emle_engine-2.0.0/tests/input/emle_sp.in +21 -0
  104. emle_engine-2.0.0/tests/input/external.py +44 -0
  105. emle_engine-2.0.0/tests/input/methane.prm7 +134 -0
  106. emle_engine-2.0.0/tests/input/mm_sp.in +8 -0
  107. emle_engine-2.0.0/tests/input/orc_job.inp +16 -0
  108. emle_engine-2.0.0/tests/input/xyz_mm.npy +0 -0
  109. emle_engine-2.0.0/tests/input/xyz_qm.npy +0 -0
  110. emle_engine-2.0.0/tests/output/mdinfo_emle +8 -0
  111. emle_engine-2.0.0/tests/output/mdinfo_mm +7 -0
  112. emle_engine-2.0.0/tests/test_backends.py +229 -0
  113. emle_engine-2.0.0/tests/test_compiler.py +66 -0
  114. emle_engine-2.0.0/tests/test_delta_learning.py +123 -0
  115. emle_engine-2.0.0/tests/test_external.py +100 -0
  116. emle_engine-2.0.0/tests/test_interpolate.py +225 -0
  117. emle_engine-2.0.0/tests/test_models.py +1041 -0
  118. emle_engine-2.0.0/tests/test_qm_state.py +217 -0
  119. emle_engine-2.0.0/tests/test_qm_xyz.py +60 -0
  120. emle_engine-2.0.0/tests/test_train_extxyz.py +242 -0
@@ -0,0 +1,78 @@
1
+ name: Build and test
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - "**"
8
+ pull_request:
9
+ branches:
10
+ - "main"
11
+
12
+ jobs:
13
+ pre_job:
14
+ runs-on: ubuntu-latest
15
+ outputs:
16
+ should_skip: ${{ steps.skip_check.outputs.should_skip }}
17
+ steps:
18
+ - id: skip_check
19
+ uses: fkirc/skip-duplicate-actions@v5
20
+ with:
21
+ concurrent_skipping: 'same_content_newer'
22
+ build:
23
+ needs: pre_job
24
+ if: needs.pre_job.outputs.should_skip != 'true'
25
+ name: build (${{ matrix.python-version }}, ${{ matrix.platform.name }})
26
+ runs-on: ${{ matrix.platform.os }}
27
+ strategy:
28
+ max-parallel: 9
29
+ fail-fast: false
30
+ matrix:
31
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
32
+ platform:
33
+ - { name: "linux", os: "ubuntu-latest", shell: "bash -l {0}" }
34
+ - { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
35
+ exclude:
36
+ - platform: { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
37
+ python-version: "3.11"
38
+ - platform: { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
39
+ python-version: "3.12"
40
+ - platform: { name: "macos", os: "macos-latest", shell: "bash -l {0}" }
41
+ python-version: "3.13"
42
+ defaults:
43
+ run:
44
+ shell: ${{ matrix.platform.shell }}
45
+ steps:
46
+ #
47
+ - name: Checkout the repository (commit)
48
+ uses: actions/checkout@v4
49
+ if: github.event_name != 'pull_request'
50
+ #
51
+ - name: Checkout the repository (PR)
52
+ uses: actions/checkout@v4
53
+ with:
54
+ ref: ${{ github.event.pull_request.head.sha }}
55
+ if: github.event_name == 'pull_request'
56
+ #
57
+ - uses: conda-incubator/setup-miniconda@v3
58
+ with:
59
+ auto-update-conda: true
60
+ python-version: ${{ matrix.python-version }}
61
+ activate-environment: emle
62
+ environment-file: environment.yaml
63
+ miniforge-version: latest
64
+ #
65
+ - name: Cache MACE models
66
+ uses: actions/cache@v4
67
+ with:
68
+ path: ~/.cache/mace
69
+ key: mace-models-v1
70
+ #
71
+ - name: Install additional test dependencies
72
+ run: conda install cxx-compiler ninja pytest
73
+ #
74
+ - name: Install the package
75
+ run: pip install .
76
+ #
77
+ - name: Run the tests
78
+ run: python -m pytest -svvv --color=yes tests
@@ -0,0 +1,143 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [devel]
6
+ workflow_dispatch:
7
+ inputs:
8
+ build_number:
9
+ description: "Conda build number, increased to replace a bad release"
10
+ type: number
11
+ default: 0
12
+
13
+ jobs:
14
+ build-pypi:
15
+ name: Build PyPI distributions
16
+ runs-on: ubuntu-latest
17
+ outputs:
18
+ version: ${{ steps.version.outputs.version }}
19
+ label: ${{ steps.label.outputs.label }}
20
+ env:
21
+ # PyPI and conda reject local version labels ("+g<hash>.d<date>"), so
22
+ # drop them for release builds only. Local/dev installs keep them, so
23
+ # that bug reports from modified checkouts are identifiable.
24
+ SETUPTOOLS_SCM_OVERRIDES_FOR_EMLE_ENGINE: '{local_scheme = "no-local-version"}'
25
+ steps:
26
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
27
+ with:
28
+ fetch-depth: 0
29
+ # Release tags on main publish to PyPI and the main label, devel to the
30
+ # dev label, and anything else (including dev tags) is build only.
31
+ - name: Determine the publish label
32
+ id: label
33
+ run: |
34
+ if [[ "$GITHUB_REF_TYPE" == tag && "$GITHUB_REF_NAME" != *dev* ]]; then
35
+ git merge-base --is-ancestor "$GITHUB_SHA" origin/main \
36
+ || { echo "::error::$GITHUB_REF_NAME is not on main"; exit 1; }
37
+ echo "label=main" >> "$GITHUB_OUTPUT"
38
+ elif [[ "$GITHUB_REF" == refs/heads/devel ]]; then
39
+ echo "label=dev" >> "$GITHUB_OUTPUT"
40
+ fi
41
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
42
+ with:
43
+ python-version: "3.12"
44
+ - name: Install build tooling
45
+ run: python -m pip install build==1.6.1 setuptools-scm==10.3.4
46
+ - name: Build sdist and wheel
47
+ run: python -m build
48
+ - name: Determine package version
49
+ id: version
50
+ run: echo "version=$(python -m setuptools_scm)" >> "$GITHUB_OUTPUT"
51
+ - name: Copy sdist for conda build
52
+ run: cp dist/*.tar.gz emle-engine-source.tar.gz
53
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
54
+ with:
55
+ name: pypi-dist
56
+ path: dist/
57
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
58
+ with:
59
+ name: conda-source
60
+ path: emle-engine-source.tar.gz
61
+
62
+ publish-pypi:
63
+ name: Publish to PyPI
64
+ needs: build-pypi
65
+ if: needs.build-pypi.outputs.label == 'main'
66
+ runs-on: ubuntu-latest
67
+ environment:
68
+ name: pypi
69
+ url: https://pypi.org/project/emle-engine/
70
+ permissions:
71
+ id-token: write
72
+ steps:
73
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
74
+ with:
75
+ name: pypi-dist
76
+ path: dist/
77
+ - name: Publish to PyPI
78
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
79
+
80
+ build-conda:
81
+ name: Build conda package (noarch)
82
+ needs: build-pypi
83
+ runs-on: ubuntu-latest
84
+ steps:
85
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
86
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
87
+ with:
88
+ name: conda-source
89
+ path: .
90
+ - name: Build conda package with rattler-build
91
+ uses: prefix-dev/rattler-build-action@1ca5f45832f419a46d1326ccc5861d7e14d67c44 # v0.2.39
92
+ with:
93
+ recipe-path: recipes/emle-engine/recipe.yaml
94
+ artifact-name: conda-dist
95
+ env:
96
+ PKG_VERSION: ${{ needs.build-pypi.outputs.version }}
97
+ BUILD_NUMBER: ${{ inputs.build_number || 0 }}
98
+
99
+ publish-conda:
100
+ name: Publish to chemle Anaconda.org channel
101
+ needs: [build-pypi, build-conda]
102
+ if: needs.build-pypi.outputs.label != ''
103
+ runs-on: ubuntu-latest
104
+ environment: anaconda
105
+ steps:
106
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
107
+ with:
108
+ python-version: "3.12"
109
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
110
+ with:
111
+ name: conda-dist
112
+ path: conda-dist
113
+ - name: Install anaconda-client
114
+ run: python -m pip install anaconda-client==1.16.0
115
+ - name: Upload to the chemle Anaconda.org channel
116
+ env:
117
+ ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
118
+ LABEL: ${{ needs.build-pypi.outputs.label }}
119
+ run: |
120
+ shopt -s globstar
121
+ anaconda --token "$ANACONDA_API_TOKEN" upload --user chemle \
122
+ --label "$LABEL" --skip-existing conda-dist/**/*.conda
123
+ - name: Remove all but the newest three dev builds
124
+ if: needs.build-pypi.outputs.label == 'dev'
125
+ env:
126
+ ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
127
+ run: |
128
+ curl -fsS -H "Authorization: token $ANACONDA_API_TOKEN" \
129
+ https://api.anaconda.org/package/chemle/emle-engine/files > files.json
130
+ python - <<'EOF' > stale.txt
131
+ import json
132
+ files = [f for f in json.load(open("files.json")) if f["labels"] == ["dev"]]
133
+ newest = {}
134
+ for f in files:
135
+ newest[f["version"]] = max(newest.get(f["version"], ""), f["upload_time"])
136
+ keep = sorted(newest, key=newest.get, reverse=True)[:3]
137
+ for f in files:
138
+ if f["version"] not in keep:
139
+ print(f"chemle/emle-engine/{f['version']}/{f['basename']}")
140
+ EOF
141
+ while read -r spec; do
142
+ anaconda --token "$ANACONDA_API_TOKEN" remove --force "$spec"
143
+ done < stale.txt
@@ -0,0 +1,45 @@
1
+ # Byte-compiled / optimized / DLL files.
2
+ __pycache__/
3
+ *.py[cod]
4
+
5
+ # C extensions.
6
+ *.so
7
+
8
+ # Pytest directories.
9
+ .pytest_cache/
10
+
11
+ # macOS folder attributes.
12
+ .DS_Store
13
+
14
+ # Jupyter notebook checkpoints.
15
+ .ipynb_checkpoints/
16
+
17
+ # Build artifacts.
18
+ setup.out
19
+ setup.err
20
+ dist/
21
+ build/
22
+ emle_engine.egg-info/
23
+
24
+ # Documetation build artifacts.
25
+ doc/build
26
+ doc/source/generated
27
+ doc/source/api/generated
28
+
29
+ # Resource files.
30
+
31
+ # Results.
32
+ results/
33
+
34
+ # VSCode config
35
+ .vscode/
36
+
37
+ # Pixi local environments
38
+ .pixi/
39
+
40
+ # Local test input.
41
+ tests/input/deepmd
42
+
43
+ # Release build artifacts.
44
+ emle-engine-source.tar.gz
45
+ output/
@@ -0,0 +1,60 @@
1
+ Changelog
2
+ =========
3
+
4
+ [2.0.0](https://github.com/chemle/emle-engine/compare/v1.0.0...v2.0.0) - Nov 2026
5
+ -----------------------------------------------------------------------------
6
+
7
+ * Switch to AEV based EMLE models, with fully TorchScript compatible models in the new `emle.models` module, including `ANI2xEMLE`, which computes the in vacuo and embedding energies in one pass re-using the same AEV features. The SOAP based models used in the original paper, which need `librascal`, are only supported by the 1.0.0 release [#26](https://github.com/chemle/emle-engine/pull/26).
8
+ * Encode the supported species in the model file, removing the species related options and environment variables. Existing custom models need a `species` key [#30](https://github.com/chemle/emle-engine/pull/30), [#31](https://github.com/chemle/emle-engine/pull/31).
9
+ * Add an optional `aev_mean` model parameter, used to centre the AEV features before the GPR [#32](https://github.com/chemle/emle-engine/pull/32).
10
+ * Update `emle-analyze` to use the new Torch models [#34](https://github.com/chemle/emle-engine/pull/34).
11
+ * Add support for training custom EMLE models with `emle-train` and `EMLETrainer` [#36](https://github.com/chemle/emle-engine/pull/36).
12
+ * Add a `qm_charge` option for the total charge of the QM region, set either on construction or per call [#38](https://github.com/chemle/emle-engine/pull/38).
13
+ * Separate the in vacuo backends from the calculator, adding batch support and an optional ACE backend. Delta-learning corrections can now be applied with any pair of backends, rather than only Rascal [#40](https://github.com/chemle/emle-engine/pull/40).
14
+ * Fixed minor bugs in `emle-analyze` [#41](https://github.com/chemle/emle-engine/pull/41).
15
+ * Add a documentation website [#42](https://github.com/chemle/emle-engine/pull/42).
16
+ * Make the `--emle-model` argument of `emle-analyze` optional [#43](https://github.com/chemle/emle-engine/pull/43).
17
+ * Fixed the `MACEEMLE` atomic numbers not being placed on the model's device [#45](https://github.com/chemle/emle-engine/pull/45).
18
+ * Fixed energy logging and the QM and point charge xyz output silently failing [#46](https://github.com/chemle/emle-engine/pull/46).
19
+ * Fixed single point calculations with sander using `imin=6`, which expects a dipole moment in the ORCA output [#48](https://github.com/chemle/emle-engine/pull/48).
20
+ * Fixed parsing of polarisabilities from ORCA 6 output [#49](https://github.com/chemle/emle-engine/pull/49).
21
+ * Fixed `emle-analyze` crashing with the MACE backend [#50](https://github.com/chemle/emle-engine/pull/50).
22
+ * Add an `--alpha-mode` option to `emle-analyze`, which was previously fixed to `species` [#51](https://github.com/chemle/emle-engine/pull/51).
23
+ * Fixed the import of the DeePMD backend [#53](https://github.com/chemle/emle-engine/pull/53).
24
+ * Add query-by-committee for the MACE backend, which reports the largest standard deviation of the force components over several models and stops the simulation when it exceeds a threshold [#54](https://github.com/chemle/emle-engine/pull/54).
25
+ * Add support for full ML simulations with sander, and fixed the units and force sign of the DeePMD backend [#55](https://github.com/chemle/emle-engine/pull/55).
26
+ * Fixed `EMLECalculator` failing with `backend=None`, as used by the OpenMM-ML interface [#57](https://github.com/chemle/emle-engine/pull/57).
27
+ * Add support for writing the QM and point charge xyz files with the OpenMM interface, via `qm_xyz_frequency` [#58](https://github.com/chemle/emle-engine/pull/58).
28
+ * Fixed loading MACE models created with an older version of MACE [#62](https://github.com/chemle/emle-engine/pull/62).
29
+ * Allow `emle-analyze` to be run without an ORCA tarball, giving only the model predictions. The total QM charge must then be given [#64](https://github.com/chemle/emle-engine/pull/64).
30
+ * Add support for fitting atomic polarisabilities and for fine-tuning an existing EMLE model with `EMLETrainer` [#66](https://github.com/chemle/emle-engine/pull/66).
31
+ * Add support for passing the cell vectors to the EMLE models, e.g. for NPT simulations with Sire [#67](https://github.com/chemle/emle-engine/pull/67).
32
+ * Fixed the trainer's plot data and the species written to trained model files [#70](https://github.com/chemle/emle-engine/pull/70).
33
+ * Fixed lambda interpolation in `EMLECalculator` [#72](https://github.com/chemle/emle-engine/pull/72).
34
+ * Fixed the QM charge not being used with the Sire interface [#74](https://github.com/chemle/emle-engine/pull/74).
35
+ * Add the `emle-mace` backend and `MACEEMLEJoint` model, which computes the in vacuo and embedding energies from a single EMLE-MACE model, with optional static atomic dipoles (`use_dipoles`). Also add `tarball-to-extxyz` for converting ORCA training data [#75](https://github.com/chemle/emle-engine/pull/75).
36
+ * Add `emle-compile` and `EMLECompiler` for exporting compiled models for use with TorchANI-Amber, and a DeePMD-kit v3 backend with query-by-committee. TorchANI 2.7 or later is now required [#76](https://github.com/chemle/emle-engine/pull/76).
37
+ * Add support for a switching function with the Sire-OpenMM interface [#78](https://github.com/chemle/emle-engine/pull/78).
38
+ * Fixed `emle-analyze` with non-Torch backends, e.g. DeePMD [#79](https://github.com/chemle/emle-engine/pull/79).
39
+ * Rename the `species` and `reference` alpha modes to `fixed` and `flexible`. The old names are deprecated, but still accepted with a warning [#81](https://github.com/chemle/emle-engine/pull/81).
40
+ * Fixed the ORCA parser's in vacuo energy missing the dispersion correction [#85](https://github.com/chemle/emle-engine/pull/85).
41
+ * Add the predicted molecular and induced dipoles to the `emle-analyze` output [#87](https://github.com/chemle/emle-engine/pull/87).
42
+ * Add coordinate preprocessing and a switching function to the EMLE models, for periodic and non-periodic systems [#90](https://github.com/chemle/emle-engine/pull/90), [#91](https://github.com/chemle/emle-engine/pull/91).
43
+ * Fixed pickling of `EMLE` and `MACEEMLE` models, needed by OpenMM-ML [#93](https://github.com/chemle/emle-engine/pull/93).
44
+ * Replace `setup.py` with `pyproject.toml` and add pixi environments for the optional backends. The Rascal backend has been removed [#95](https://github.com/chemle/emle-engine/pull/95).
45
+ * Python 3.10 or later is now required [#95](https://github.com/chemle/emle-engine/pull/95).
46
+ * Remove NNPOps support and the `atomic_numbers` argument of the models, `EMLECalculator` and `EMLECompiler`, and the `--atomic-numbers` option and `EMLE_ATOMIC_NUMBERS` variable of `emle-server`. MACE models use a pure PyTorch neighbour list [#97](https://github.com/chemle/emle-engine/pull/97).
47
+ * Add AIMNet2 and OMNI-P2x in vacuo backends, and an electronic state option for multistate models [#98](https://github.com/chemle/emle-engine/pull/98).
48
+ * Pass the QM charge, spin multiplicity and electronic state to the in vacuo backends on every call, taking them from the ORCA input with sander. Backends raise an error for values their model doesn't support. Models without these inputs, e.g. `torchani`, `mace` and `deepmd`, are assumed to be for a neutral singlet ground state, so other values must be declared with `model_charges`, `model_mults` and `model_states`. This also fixes SQM ignoring the per step charge with sander, and xtb ignoring the charge and multiplicity [#98](https://github.com/chemle/emle-engine/pull/98).
49
+ * Allow `emle-train` to read training data from extXYZ and add a `--device` option [#98](https://github.com/chemle/emle-engine/pull/98).
50
+ * Support the extra arguments of the TorchANI-Amber interface in compiled models (defaults only) [#99](https://github.com/chemle/emle-engine/pull/99), [#101](https://github.com/chemle/emle-engine/pull/101).
51
+ * Add conda and PyPI packages [#102](https://github.com/chemle/emle-engine/pull/102).
52
+ * Use the versioned `emle-1.0` default model, downloaded on first use and cached in the torch hub directory, rather than cloning the `emle-models` repository with `pygit2` [#103](https://github.com/chemle/emle-engine/pull/103).
53
+ * Relicense under MIT, with SPDX headers in the source files [#104](https://github.com/chemle/emle-engine/pull/104).
54
+ * Speed up the EMLE models on CPU and GPU, using TorchANI's cuAEV implementation on GPUs that support it. Add optional dense AEVs (`dense_aev`), so that models can be captured in a CUDA graph, and optional fused C++/CUDA operators (`use_fused_ops`), which are compiled on first use. On CUDA, a singular matrix in the linear solves now gives non-finite results rather than an error [#106](https://github.com/chemle/emle-engine/pull/106).
55
+ * Require Python 3.11 or later, and support Python 3.14.
56
+
57
+ [1.0.0](https://github.com/chemle/emle-engine/releases/tag/v1.0.0) - Oct 2024
58
+ -----------------------------------------------------------------------------
59
+
60
+ * Initial public release.
@@ -0,0 +1,23 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: Hedges
5
+ given-names: Lester
6
+ orcid: "https://orcid.org/0000-0002-5624-0500"
7
+ - family-names: Zinovjev
8
+ given-names: Kirill
9
+ orcid: "https://orcid.org/0000-0003-1052-5698"
10
+ - family-names: Woods
11
+ given-names: Christopher
12
+ orcid: "https://orcid.org/0000-0001-6563-9903"
13
+ - family-names: Tuñón
14
+ given-names: Iñaki
15
+ orcid: "https://orcid.org/0000-0002-6995-1838"
16
+ - family-names: van der Kamp
17
+ given-names: Marc
18
+ orcid: "https://orcid.org/0000-0002-8060-3359"
19
+ title: "emle-engine"
20
+ version: 1.0.0
21
+ date-released: 2024-10-10
22
+ url: "https://github.com/chemle/emle-engine"
23
+ repository-code: "https://github.com/chemle/emle-engine"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 The EMLE-Engine developers
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,49 @@
1
+ Metadata-Version: 2.4
2
+ Name: emle-engine
3
+ Version: 2.0.0
4
+ Summary: An engine for electrostatic machine learned embedding potentials
5
+ Author-email: Lester Hedges <lester.hedges@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://chemle.github.io/emle-engine
8
+ Project-URL: Repository, https://github.com/chemle/emle-engine
9
+ Project-URL: Issues, https://github.com/chemle/emle-engine/issues
10
+ Project-URL: Documentation, https://chemle.github.io/emle-engine
11
+ Keywords: machine-learning,molecular-dynamics,mlip,ml/mm,qm/mm,electrostatic-embedding
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
23
+ Classifier: Topic :: Scientific/Engineering :: Physics
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: ase
28
+ Requires-Dist: h5py
29
+ Requires-Dist: loguru
30
+ Requires-Dist: numpy
31
+ Requires-Dist: pyyaml
32
+ Requires-Dist: scipy
33
+ Requires-Dist: setuptools<81
34
+ Requires-Dist: torch
35
+ Requires-Dist: torchani>=2.7
36
+ Dynamic: license-file
37
+
38
+ # emle-engine
39
+
40
+ [![GitHub Actions](https://github.com/chemle/emle-engine/actions/workflows/main.yaml/badge.svg)](https://github.com/chemle/emle-engine/actions/workflows/main.yaml)
41
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
42
+
43
+ ![Emily Engine](https://raw.githubusercontent.com/chemle/emle-engine/main/doc/source/images/logo.jpg)
44
+
45
+ (Mascot courtesy [Nictrain123](https://www.deviantart.com/nictrain123/art/Simply-Emily-774815887) ![CC BY 3.0](https://licensebuttons.net/l/by/3.0/80x15.png).)
46
+
47
+ See the [website](https://chemle.github.io/emle-engine) for full documentation.
48
+
49
+ We thank EPSRC for funding (grant code EP/V011421/1).
@@ -0,0 +1,12 @@
1
+ # emle-engine
2
+
3
+ [![GitHub Actions](https://github.com/chemle/emle-engine/actions/workflows/main.yaml/badge.svg)](https://github.com/chemle/emle-engine/actions/workflows/main.yaml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ ![Emily Engine](https://raw.githubusercontent.com/chemle/emle-engine/main/doc/source/images/logo.jpg)
7
+
8
+ (Mascot courtesy [Nictrain123](https://www.deviantart.com/nictrain123/art/Simply-Emily-774815887) ![CC BY 3.0](https://licensebuttons.net/l/by/3.0/80x15.png).)
9
+
10
+ See the [website](https://chemle.github.io/emle-engine) for full documentation.
11
+
12
+ We thank EPSRC for funding (grant code EP/V011421/1).
@@ -0,0 +1,175 @@
1
+ #!/usr/bin/env python
2
+
3
+ # SPDX-FileCopyrightText: 2023-2026 The EMLE-Engine developers
4
+ # SPDX-License-Identifier: MIT
5
+
6
+ import argparse
7
+
8
+ parser = argparse.ArgumentParser(
9
+ description="Analysis tool for ML(EMLE)/MM simulations"
10
+ )
11
+ parser.add_argument(
12
+ "--orca-tarball", type=str, metavar="name.tar", required=False, help="ORCA tarball"
13
+ )
14
+ parser.add_argument(
15
+ "--emle-model", type=str, metavar="name.mat", required=False, help="EMLE model file"
16
+ )
17
+ parser.add_argument(
18
+ "--backend",
19
+ type=str,
20
+ choices=["torchani", "mace", "emle-mace", "deepmd"],
21
+ help="Gas phase ML backend",
22
+ )
23
+ parser.add_argument(
24
+ "--deepmd-model",
25
+ type=str,
26
+ metavar="name.pb",
27
+ help="DeePMD model file(s) (for backend='deepmd')",
28
+ )
29
+ parser.add_argument(
30
+ "--mace-model",
31
+ type=str,
32
+ help="MACE model file (for 'mace' and 'emle-mace' backends)",
33
+ )
34
+ parser.add_argument(
35
+ "--qm-xyz", type=str, metavar="name.xyz", required=True, help="QM xyz file"
36
+ )
37
+ parser.add_argument(
38
+ "--pc-xyz",
39
+ type=str,
40
+ metavar="name.pc",
41
+ required=True,
42
+ help="Point charges xyz file",
43
+ )
44
+ parser.add_argument(
45
+ "--alpha-mode",
46
+ type=str,
47
+ choices=["fixed", "flexible", "species", "reference"],
48
+ default="fixed",
49
+ help=(
50
+ "Method for calculating atomic polarizabilities. "
51
+ "('species'/'reference' are deprecated aliases for 'fixed'/'flexible')"
52
+ ),
53
+ )
54
+ parser.add_argument(
55
+ "--alpha", action="store_true", help="Extract molecular dipolar polarizabilities"
56
+ )
57
+ parser.add_argument(
58
+ "--q-total",
59
+ type=int,
60
+ default=0,
61
+ help="Total charge of the QM region",
62
+ )
63
+ parser.add_argument(
64
+ "--use-dipoles",
65
+ action="store_true",
66
+ help="Whether to include static atomic dipoles",
67
+ )
68
+ parser.add_argument(
69
+ "--start",
70
+ type=int,
71
+ help="Structure index to start parsing",
72
+ )
73
+ parser.add_argument(
74
+ "--end",
75
+ type=int,
76
+ help="Structure index to end parsing",
77
+ )
78
+ parser.add_argument("output", type=str, help="Output mat file")
79
+ args = parser.parse_args()
80
+
81
+
82
+ import scipy.io
83
+
84
+ from emle.models import EMLE
85
+ from emle._analyzer import EMLEAnalyzer
86
+ from emle._orca_parser import ORCAParser
87
+
88
+ if args.backend == "deepmd" and not args.deepmd_model:
89
+ parser.error("--deepmd-model is required when backend='deepmd'")
90
+ if args.backend in ("mace", "emle-mace") and not args.mace_model:
91
+ parser.error("--mace-model is required when backend is 'mace' or 'emle-mace'")
92
+
93
+ backend = None
94
+ if args.backend == "torchani":
95
+ from emle.models import ANI2xEMLE
96
+
97
+ backend = ANI2xEMLE()
98
+ elif args.backend == "mace":
99
+ from emle.models import MACEEMLE
100
+
101
+ backend = MACEEMLE(emle_model=args.emle_model, mace_model=args.mace_model)
102
+
103
+ elif args.backend == "emle-mace":
104
+ from emle.models import MACEEMLEJoint
105
+
106
+ backend = MACEEMLEJoint(
107
+ emle_model=args.emle_model,
108
+ mace_model=args.mace_model,
109
+ qm_charge=args.q_total,
110
+ )
111
+
112
+ elif args.backend == "deepmd":
113
+ from emle._backends import DeePMD
114
+
115
+ backend = DeePMD(args.deepmd_model)
116
+
117
+ emle_base = EMLE(model=args.emle_model, alpha_mode=args.alpha_mode)._emle_base
118
+
119
+ orca_parser = None
120
+ if args.orca_tarball:
121
+ orca_parser = ORCAParser(args.orca_tarball, decompose=True, alpha=args.alpha)
122
+
123
+ analyzer = EMLEAnalyzer(
124
+ args.qm_xyz,
125
+ args.pc_xyz,
126
+ emle_base,
127
+ backend,
128
+ orca_parser,
129
+ args.q_total,
130
+ args.use_dipoles,
131
+ start=args.start,
132
+ end=args.end,
133
+ )
134
+
135
+ result = {
136
+ "z": analyzer.atomic_numbers,
137
+ "xyz": analyzer.qm_xyz,
138
+ "E_static_emle": analyzer.e_static,
139
+ "E_induced_emle": analyzer.e_induced,
140
+ "s_emle": analyzer.s,
141
+ "q_core_emle": analyzer.q_core,
142
+ "q_val_emle": analyzer.q_val,
143
+ "atomic_alpha_emle": analyzer.atomic_alpha,
144
+ "alpha_emle": analyzer.alpha,
145
+ "mu_vac_emle": analyzer.mu_vac,
146
+ "mu_induced_emle": analyzer.mu_induced,
147
+ }
148
+ if args.use_dipoles:
149
+ result["mu_emle"] = analyzer.mu
150
+ result["E_static_mu_emle"] = analyzer.e_static_mu
151
+
152
+ if orca_parser:
153
+ result.update(
154
+ {
155
+ "z": orca_parser.z,
156
+ "xyz": orca_parser.xyz,
157
+ "E_vac_qm": orca_parser.vac_E,
158
+ "E_static_qm": orca_parser.E_static,
159
+ "E_induced_qm": orca_parser.E_induced,
160
+ "s_qm": orca_parser.mbis["s"],
161
+ "q_core_qm": orca_parser.mbis["q_core"],
162
+ "q_val_qm": orca_parser.mbis["q_val"],
163
+ "E_static_mbis": analyzer.e_static_mbis,
164
+ }
165
+ )
166
+ if args.use_dipoles:
167
+ result["mu_qm"] = orca_parser.mbis["mu"]
168
+
169
+ if args.backend:
170
+ result["E_vac_emle"] = analyzer.e_backend
171
+ result["grad_vac_emle"] = analyzer.grad_backend
172
+ if args.alpha:
173
+ result["alpha_qm"] = orca_parser.alpha
174
+
175
+ scipy.io.savemat(args.output, result)