Skip to content

Commit 459a17e

Browse files
committed
Merge branch 'main' into feature_website [ci skip]
2 parents 6dd2290 + 68c27a5 commit 459a17e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2862
-1863
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
ref: ${{ github.event.pull_request.head.sha }}
4747
if: github.event_name == 'pull_request'
4848
#
49-
- uses: conda-incubator/setup-miniconda@v2
49+
- uses: conda-incubator/setup-miniconda@v3
5050
with:
5151
auto-update-conda: true
5252
python-version: ${{ matrix.python-version }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ results/
2929

3030
# VSCode config
3131
.vscode/
32+
33+
# Local test input.
34+
tests/input/deepmd
35+
tests/input/rascal

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
(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).)
99

1010
See the [website](https://chemle.github.io/emle-engine) for full documentation.
11+
12+
We thank EPSRC for funding (grant code EP/V011421/1).

bin/emle-analyze

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#######################################################################
44
# EMLE-Engine: https://github.com/chemle/emle-engine
55
#
6-
# Copyright: 2023-2024
6+
# Copyright: 2023-2025
77
#
88
# Authors: Lester Hedges <[email protected]>
99
# Kirill Zinovjev <[email protected]>
@@ -36,14 +36,19 @@ parser.add_argument(
3636
parser.add_argument(
3737
"--backend",
3838
type=str,
39-
choices=["deepmd", "ani2x"],
40-
help="Gas phase ML backend ('deepmd' or 'ani2x')",
39+
choices=["torchani", "mace", "deepmd"],
40+
help="Gas phase ML backend",
4141
)
4242
parser.add_argument(
4343
"--deepmd-model",
4444
type=str,
4545
metavar="name.pb",
46-
help="Deepmd model file (for backend='deepmd')",
46+
help="DeePMD model file (for backend='deepmd')",
47+
)
48+
parser.add_argument(
49+
"--mace-model",
50+
type=str,
51+
help="MACE model file (for backend='mace')",
4752
)
4853
parser.add_argument(
4954
"--qm-xyz", type=str, metavar="name.xyz", required=True, help="QM xyz file"
@@ -64,19 +69,28 @@ args = parser.parse_args()
6469

6570
import scipy.io
6671

67-
from emle.models._emle import EMLE
72+
from emle.models import EMLE
73+
from emle._analyzer import EMLEAnalyzer
6874
from emle._orca_parser import ORCAParser
69-
from emle._analyzer import EMLEAnalyzer, ANI2xBackend, DeepMDBackend
70-
7175

7276
if args.backend == "deepmd" and not args.deepmd_model:
7377
parser.error("--deepmd-model is required when backend='deepmd'")
78+
if args.backend == "mace" and not args.mace_model:
79+
parser.error("--mace-model is required when backend='mace'")
7480

7581
backend = None
76-
if args.backend == "ani2x":
77-
backend = ANI2xBackend()
82+
if args.backend == "torchani":
83+
from emle._models import ANI2xEMLE
84+
85+
backend = ANI2xEMLE()
86+
elif args.backend == "mace":
87+
from emle._models import MACEEMLE
88+
89+
backend = MACEEMLE(mace_model=args.mace_model)
7890
elif args.backend == "deepmd":
79-
backend = DeepMDBackend(args.deepmd_model)
91+
from emle._backends import DeepMD
92+
93+
backend = DeepMD(args.deepmd_model)
8094

8195
emle_base = EMLE(model=args.emle_model)._emle_base
8296

bin/emle-server

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#######################################################################
44
# EMLE-Engine: https://github.com/chemle/emle-engine
55
#
6-
# Copyright: 2023-2024
6+
# Copyright: 2023-2025
77
#
88
# Authors: Lester Hedges <[email protected]>
99
# Kirill Zinovjev <[email protected]>
@@ -30,6 +30,7 @@ import time
3030

3131
from glob import glob
3232

33+
from emle import _supported_backends
3334
from emle._socket import Socket
3435

3536

@@ -92,6 +93,14 @@ try:
9293
ani2x_model_index = int(os.getenv("EMLE_ANI2X_MODEL_INDEX"))
9394
except:
9495
ani2x_model_index = None
96+
try:
97+
mace_model = os.getenv("EMLE_MACE_MODEL")
98+
except:
99+
mace_model = None
100+
try:
101+
ace_model = os.getenv("EMLE_ACE_MODEL")
102+
except:
103+
ace_model = None
95104
rascal_model = os.getenv("EMLE_RASCAL_MODEL")
96105
parm7 = os.getenv("EMLE_PARM7")
97106
try:
@@ -147,6 +156,8 @@ env = {
147156
"pc_xyz_file": pc_xyz_file,
148157
"qm_xyz_frequency": qm_xyz_frequency,
149158
"ani2x_model_index": ani2x_model_index,
159+
"mace_model": mace_model,
160+
"ace_model": ace_model,
150161
"rascal_model": rascal_model,
151162
"lambda_interpolate": lambda_interpolate,
152163
"interpolate_steps": interpolate_steps,
@@ -225,8 +236,9 @@ parser.add_argument(
225236
parser.add_argument(
226237
"--backend",
227238
type=str,
239+
nargs="*",
228240
help="the in vacuo backend",
229-
choices=["torchani", "deepmd", "orca", "sander", "sqm", "xtb"],
241+
choices=_supported_backends,
230242
required=False,
231243
)
232244
parser.add_argument(
@@ -248,6 +260,24 @@ parser.add_argument(
248260
choices=["cpu", "cuda"],
249261
required=False,
250262
)
263+
parser.add_argument(
264+
"--ani2x-model-index",
265+
type=int,
266+
help="the index of the ANI2x model to use",
267+
required=False,
268+
)
269+
parser.add_argument(
270+
"--mace-model",
271+
type=str,
272+
help="name of the MACE-OFF23 model, or path to the MACE model file",
273+
required=False,
274+
)
275+
parser.add_argument(
276+
"--ace-model",
277+
type=str,
278+
help="path to the ACE model file",
279+
required=False,
280+
)
251281
parser.add_argument(
252282
"--deepmd-model",
253283
type=str,

bin/emle-train

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#######################################################################
44
# EMLE-Engine: https://github.com/chemle/emle-engine
55
#
6-
# Copyright: 2023-2024
6+
# Copyright: 2023-2025
77
#
88
# Authors: Lester Hedges <[email protected]>
99
# Kirill Zinovjev <[email protected]>

bin/orca

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#######################################################################
44
# EMLE-Engine: https://github.com/chemle/emle-engine
55
#
6-
# Copyright: 2023-2024
6+
# Copyright: 2023-2025
77
#
88
# Authors: Lester Hedges <[email protected]>
99
# Kirill Zinovjev <[email protected]>

emle/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
######################################################################
22
# EMLE-Engine: https://github.com/chemle/emle-engine
33
#
4-
# Copyright: 2023-2024
4+
# Copyright: 2023-2025
55
#
66
# Authors: Lester Hedges <[email protected]>
77
# Kirill Zinovjev <[email protected]>
@@ -32,6 +32,19 @@
3232
molecular systems.
3333
"""
3434

35+
# List of supported backends.
36+
_supported_backends = [
37+
"torchani",
38+
"mace",
39+
"ace",
40+
"deepmd",
41+
"orca",
42+
"rascal",
43+
"sqm",
44+
"sander",
45+
"xtb",
46+
]
47+
3548
from ._version import get_versions
3649

3750
__version__ = get_versions()["version"]

0 commit comments

Comments
 (0)