emle-engine 2.0.0__py3-none-any.whl
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.
Potentially problematic release.
This version of emle-engine might be problematic. Click here for more details.
- emle/__init__.py +39 -0
- emle/_analyzer.py +337 -0
- emle/_backends/__init__.py +14 -0
- emle/_backends/_ace.py +141 -0
- emle/_backends/_aimnet2.py +136 -0
- emle/_backends/_backend.py +148 -0
- emle/_backends/_deepmd.py +186 -0
- emle/_backends/_omnip2x.py +349 -0
- emle/_backends/_orca.py +322 -0
- emle/_backends/_sander.py +232 -0
- emle/_backends/_sqm.py +230 -0
- emle/_backends/_xtb.py +126 -0
- emle/_compiler.py +279 -0
- emle/_csrc/ops.cpp +350 -0
- emle/_csrc/ops_cuda.cu +454 -0
- emle/_ops.py +173 -0
- emle/_orca_parser.py +331 -0
- emle/_resources.py +32 -0
- emle/_socket.py +211 -0
- emle/_tarball_to_extXYZ.py +236 -0
- emle/_units.py +16 -0
- emle/_utils.py +57 -0
- emle/calculator.py +1974 -0
- emle/models/__init__.py +13 -0
- emle/models/_ani.py +315 -0
- emle/models/_deepmd.py +410 -0
- emle/models/_emle.py +629 -0
- emle/models/_emle_aev_computer.py +616 -0
- emle/models/_emle_base.py +1063 -0
- emle/models/_mace.py +1368 -0
- emle/models/_patches.py +66 -0
- emle/models/_utils.py +279 -0
- emle/train/__init__.py +8 -0
- emle/train/_extxyz.py +63 -0
- emle/train/_gpr.py +205 -0
- emle/train/_ivm.py +126 -0
- emle/train/_loss.py +357 -0
- emle/train/_trainer.py +709 -0
- emle/train/_utils.py +92 -0
- emle_engine-2.0.0.data/scripts/emle-analyze +175 -0
- emle_engine-2.0.0.data/scripts/emle-compile +162 -0
- emle_engine-2.0.0.data/scripts/emle-server +777 -0
- emle_engine-2.0.0.data/scripts/emle-stop +21 -0
- emle_engine-2.0.0.data/scripts/emle-train +127 -0
- emle_engine-2.0.0.data/scripts/orca +95 -0
- emle_engine-2.0.0.data/scripts/tarball-to-extxyz +6 -0
- emle_engine-2.0.0.dist-info/METADATA +49 -0
- emle_engine-2.0.0.dist-info/RECORD +51 -0
- emle_engine-2.0.0.dist-info/WHEEL +5 -0
- emle_engine-2.0.0.dist-info/licenses/LICENSE +21 -0
- emle_engine-2.0.0.dist-info/top_level.txt +1 -0
emle/train/_utils.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2023-2026 The EMLE-Engine developers
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
"""Utility functions for EMLE training."""
|
|
5
|
+
|
|
6
|
+
import numpy as _np
|
|
7
|
+
import torch as _torch
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def pad_to_shape(tensor, shape, value=0):
|
|
11
|
+
"""
|
|
12
|
+
Pad a tensor to a specific shape.
|
|
13
|
+
|
|
14
|
+
Parameters
|
|
15
|
+
----------
|
|
16
|
+
|
|
17
|
+
tensor : torch.Tensor
|
|
18
|
+
Input tensor.
|
|
19
|
+
|
|
20
|
+
shape : tuple
|
|
21
|
+
Desired shape.
|
|
22
|
+
|
|
23
|
+
Returns
|
|
24
|
+
-------
|
|
25
|
+
|
|
26
|
+
torch.Tensor
|
|
27
|
+
Padded tensor.
|
|
28
|
+
"""
|
|
29
|
+
pad = [
|
|
30
|
+
(0, max_dim - current_dim) for max_dim, current_dim in zip(shape, tensor.shape)
|
|
31
|
+
]
|
|
32
|
+
pad = [item for sublist in reversed(pad) for item in sublist]
|
|
33
|
+
return _torch.nn.functional.pad(tensor, pad, value=value)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def pad_to_max(arrays, value=0):
|
|
37
|
+
"""
|
|
38
|
+
Pad tensors in the list/array/tensor to the size of the largest tensor along each axis.
|
|
39
|
+
|
|
40
|
+
Parameters
|
|
41
|
+
----------
|
|
42
|
+
|
|
43
|
+
arrays : iterable of torch.Tensor or np.ndarray or list
|
|
44
|
+
Iterable of data to be padded.
|
|
45
|
+
|
|
46
|
+
value : float, optional, default=0
|
|
47
|
+
Value to pad with.
|
|
48
|
+
|
|
49
|
+
side : str, optional, default='right'
|
|
50
|
+
The side to pad the sequences on.
|
|
51
|
+
|
|
52
|
+
Returns
|
|
53
|
+
-------
|
|
54
|
+
|
|
55
|
+
list of torch.Tensor or np.ndarray or list
|
|
56
|
+
Padded data.
|
|
57
|
+
"""
|
|
58
|
+
tensors = [
|
|
59
|
+
_torch.from_numpy(array) if isinstance(array, _np.ndarray) else array
|
|
60
|
+
for array in arrays
|
|
61
|
+
]
|
|
62
|
+
max_shape = [max(sizes) for sizes in zip(*[tensor.shape for tensor in tensors])]
|
|
63
|
+
padded_tensors = [pad_to_shape(tensor, max_shape, value) for tensor in tensors]
|
|
64
|
+
return _torch.stack(padded_tensors)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def mean_by_z(arr, zid):
|
|
68
|
+
"""
|
|
69
|
+
Calculate the mean of the input array by the zid.
|
|
70
|
+
|
|
71
|
+
Parameters
|
|
72
|
+
----------
|
|
73
|
+
|
|
74
|
+
arr : torch.Tensor(N_BATCH, MAX_N_ATOMS)
|
|
75
|
+
Input array.
|
|
76
|
+
|
|
77
|
+
zid : torch.Tensor(N_BATCH, MAX_N_ATOMS)
|
|
78
|
+
Species indices.
|
|
79
|
+
|
|
80
|
+
Returns
|
|
81
|
+
-------
|
|
82
|
+
|
|
83
|
+
torch.Tensor(N_SPECIES)
|
|
84
|
+
Mean values by species.
|
|
85
|
+
"""
|
|
86
|
+
max_index = _torch.max(zid).item()
|
|
87
|
+
mean_values = _torch.tensor(
|
|
88
|
+
[_torch.mean(arr[zid == i]) for i in range(max_index + 1)],
|
|
89
|
+
dtype=arr.dtype,
|
|
90
|
+
device=arr.device,
|
|
91
|
+
)
|
|
92
|
+
return mean_values
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!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)
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
#!python
|
|
2
|
+
|
|
3
|
+
# SPDX-FileCopyrightText: 2023-2026 The EMLE-Engine developers
|
|
4
|
+
# SPDX-License-Identifier: MIT
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
import yaml
|
|
12
|
+
|
|
13
|
+
from emle._compiler import EMLECompiler
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _parse_float_list(raw, name):
|
|
17
|
+
if raw is None:
|
|
18
|
+
return None
|
|
19
|
+
if isinstance(raw, str):
|
|
20
|
+
raw = raw.split(",")
|
|
21
|
+
if isinstance(raw, (list, tuple)):
|
|
22
|
+
if len(raw) == 1 and isinstance(raw[0], str) and os.path.isfile(raw[0]):
|
|
23
|
+
return np.loadtxt(raw[0], dtype=float).tolist()
|
|
24
|
+
try:
|
|
25
|
+
return [float(x) for x in raw]
|
|
26
|
+
except Exception as exc:
|
|
27
|
+
raise TypeError(f"Unable to parse '{name}' as a list of floats") from exc
|
|
28
|
+
raise TypeError(f"'{name}' must be a comma-separated string, list, or file path")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _build_parser():
|
|
32
|
+
p = argparse.ArgumentParser(
|
|
33
|
+
description=(
|
|
34
|
+
"Compile an EMLE composite model (in-vacuo backend + EMLE "
|
|
35
|
+
"embedding) into a TorchScript .pt file conforming to the "
|
|
36
|
+
"torchani-amber custom ML/MM contract (compute_mlmm method)."
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
p.add_argument(
|
|
40
|
+
"--config", type=str, required=False,
|
|
41
|
+
help="Path to a YAML configuration file. CLI flags override YAML entries."
|
|
42
|
+
)
|
|
43
|
+
p.add_argument(
|
|
44
|
+
"--output", type=str, required=False,
|
|
45
|
+
help="Path of the output .pt file (required)."
|
|
46
|
+
)
|
|
47
|
+
p.add_argument(
|
|
48
|
+
"--backend", type=str, choices=EMLECompiler._supported_backends, required=False,
|
|
49
|
+
help=(
|
|
50
|
+
"In-vacuo ML backend. One of: 'torchani' (ANI2xEMLE), 'mace' "
|
|
51
|
+
"(wrapping a vanilla MACE model), 'emle-mace' (model that jointly "
|
|
52
|
+
"predicts the in-vacuo energy and the EMLE properties), "
|
|
53
|
+
"'deepmd' (DeePMDEMLE). Default: torchani."
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
p.add_argument(
|
|
57
|
+
"--model", type=str, required=False,
|
|
58
|
+
help="Path to a custom EMLE model parameter file. Default: built-in."
|
|
59
|
+
)
|
|
60
|
+
p.add_argument(
|
|
61
|
+
"--method", type=str, required=False,
|
|
62
|
+
choices=["electrostatic", "mechanical", "nonpol", "mm"],
|
|
63
|
+
help="EMLE embedding method. Default: electrostatic."
|
|
64
|
+
)
|
|
65
|
+
p.add_argument(
|
|
66
|
+
"--alpha-mode", type=str, required=False,
|
|
67
|
+
choices=["fixed", "flexible", "species", "reference"],
|
|
68
|
+
help=(
|
|
69
|
+
"Polarizability mode. Default: fixed. "
|
|
70
|
+
"('species'/'reference' are deprecated aliases for 'fixed'/'flexible')"
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
p.add_argument(
|
|
74
|
+
"--mm-charges", type=str, nargs="*", required=False,
|
|
75
|
+
help=(
|
|
76
|
+
"Per-atom MM charges for the ML region in units of electron "
|
|
77
|
+
"charge. Only used when --method=mm."
|
|
78
|
+
),
|
|
79
|
+
)
|
|
80
|
+
p.add_argument(
|
|
81
|
+
"--qm-charge", type=int, required=False,
|
|
82
|
+
help="Net charge on the ML region (used when the model requires it)."
|
|
83
|
+
)
|
|
84
|
+
p.add_argument(
|
|
85
|
+
"--ani2x-model-index", type=int, required=False,
|
|
86
|
+
help="Index (0-7) into the ANI-2x ensemble. Default: full ensemble."
|
|
87
|
+
)
|
|
88
|
+
p.add_argument(
|
|
89
|
+
"--mace-model", type=str, required=False,
|
|
90
|
+
help=(
|
|
91
|
+
"MACE-OFF23 model name or path to a local MACE .model file. "
|
|
92
|
+
"For --backend=emle-mace this must point to an EnergyEMLEMACE "
|
|
93
|
+
"checkpoint (a MACE model trained to also predict EMLE "
|
|
94
|
+
"properties); vanilla MACE-OFF23 checkpoints are not valid "
|
|
95
|
+
"for emle-mace backend."
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
p.add_argument(
|
|
99
|
+
"--use-dipoles", action="store_true", default=False,
|
|
100
|
+
help=(
|
|
101
|
+
"Only valid with --backend=emle-mace. Include the "
|
|
102
|
+
"MACE-predicted atomic dipoles in the static electrostatic "
|
|
103
|
+
"energy."
|
|
104
|
+
)
|
|
105
|
+
)
|
|
106
|
+
p.add_argument(
|
|
107
|
+
"--deepmd-model", type=str, required=False,
|
|
108
|
+
help=(
|
|
109
|
+
"Path to a DeePMD-kit v3 PyTorch-backend .pth (TorchScript) model "
|
|
110
|
+
"file. Required when --backend=deepmd. TensorFlow .pb models are "
|
|
111
|
+
"not scriptable."
|
|
112
|
+
),
|
|
113
|
+
)
|
|
114
|
+
p.add_argument(
|
|
115
|
+
"--device", type=str, required=False, choices=["cpu", "cuda"],
|
|
116
|
+
help="PyTorch device. Default: cpu."
|
|
117
|
+
)
|
|
118
|
+
return p
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def main(argv=None):
|
|
122
|
+
parser = _build_parser()
|
|
123
|
+
args = vars(parser.parse_args(argv))
|
|
124
|
+
|
|
125
|
+
# Optional YAML config: re-parse so CLI args override YAML entries
|
|
126
|
+
# (same trick emle-server uses).
|
|
127
|
+
cfg_path = args.get("config")
|
|
128
|
+
if cfg_path is not None:
|
|
129
|
+
try:
|
|
130
|
+
with open(cfg_path, "r") as f:
|
|
131
|
+
cfg = yaml.safe_load(f) or {}
|
|
132
|
+
except Exception as exc:
|
|
133
|
+
raise ValueError(f"Could not load YAML config file: {exc}") from exc
|
|
134
|
+
args = vars(parser.parse_args(argv, namespace=argparse.Namespace(**cfg)))
|
|
135
|
+
|
|
136
|
+
args.pop("config", None)
|
|
137
|
+
|
|
138
|
+
output_path = args.pop("output", None)
|
|
139
|
+
if not output_path:
|
|
140
|
+
parser.error("--output is required")
|
|
141
|
+
|
|
142
|
+
# Defaults
|
|
143
|
+
if args.get("backend") is None:
|
|
144
|
+
args["backend"] = "torchani"
|
|
145
|
+
if args.get("method") is None:
|
|
146
|
+
args["method"] = "electrostatic"
|
|
147
|
+
# alpha_mode default is resolved inside EMLECompiler so the emle-mace
|
|
148
|
+
# backend can reject an explicit non-"fixed" choice.
|
|
149
|
+
if args.get("qm_charge") is None:
|
|
150
|
+
args["qm_charge"] = 0
|
|
151
|
+
|
|
152
|
+
if args.get("use_dipoles") and args["backend"] != "emle-mace":
|
|
153
|
+
parser.error("--use-dipoles is only valid with --backend=emle-mace")
|
|
154
|
+
|
|
155
|
+
args["mm_charges"] = _parse_float_list(args.get("mm_charges"), "mm_charges")
|
|
156
|
+
|
|
157
|
+
EMLECompiler(**args).compile(output_path)
|
|
158
|
+
print(f"Wrote compiled model to {output_path}")
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
if __name__ == "__main__":
|
|
162
|
+
sys.exit(main())
|