milady — Python launcher for the MiLaDy solver
milady_run(...) stages a working directory and runs
mpirun -np N milady_main.exe in it, so a MiLaDy run becomes one Python call.
from milady import milady_run
res = milady_run(
input="/path/to/vacancy.ml", # the .ml namelist
db_model="/path/to/db_model.in", # the db_model table
DB="/path/to/MPtrj_2022.9_full.json", # database: .json / .xyz file, or a classic DB dir
nprocs=4,
)
print(res.returncode, res.duration_s, res.workdir)
for f in res.output_files: # files the run created / changed
print(f)
Equivalent on the command line:
$ milady-run -i vacancy.ml -m db_model.in -d MPtrj_2022.9_full.json -n 4
What it does
The solver always runs inside a directory and reads fixed names from it.
milady_run builds that directory for you:
| staged file | source | name used |
|---|---|---|
name.in |
derived | one line: the run stem (e.g. vacancy) |
<stem>.ml |
input= |
stem from input's basename, or name= |
<db_file> |
db_model= |
db_file= in the .ml (default db_model.in) |
<db_path> |
DB= |
db_path= in the .ml; else DB for a directory (classic DB/), else the file's basename |
The database is symlinked by default (it can be tens of GB); pass
copy_db=True to copy it. Small text inputs are copied. Extra auxiliary inputs
(*.gin, train_files.milady, …) go through extra_files=[...].
Finding the solver
Resolution order (first hit wins):
exe=/mpirun=arguments$MILADY_EXE/$MILADY_MPIRUNmilady_main.exe/mpirunonPATH(the case afterconda install milady)$CONDA_PREFIX/bin, then$MLD_BUIDIR/bin(and_gnu/_intel/_mixvariants)
Runtime shared libraries: $MILADY_LIB (a :-list) if set, otherwise the
conda prefix the solver lives in plus whatever ldd currently resolves — these
are prepended to LD_LIBRARY_PATH for the child process only.
Key options
| argument | default | meaning |
|---|---|---|
nprocs |
1 |
MPI ranks (mpirun -np) |
workdir |
fresh temp dir | where to run; not deleted afterwards |
name |
from input |
run stem |
mpi_args |
() |
extra launcher tokens, e.g. ["--oversubscribe"] |
env |
None |
extra environment for the run |
use_mpirun |
None |
None = auto (launcher if found or nprocs>1) |
stream_output |
False |
also echo solver output live |
check |
True |
raise MiladyError on non-zero exit |
timeout |
None |
seconds before the run is killed |
log_file |
"milady.out" |
combined stdout+stderr log written in workdir |
output |
None |
extra combined-log path (abs, or relative to CWD), e.g. run.out |
Install
The PyPI distribution name is milady-mlip; the import name stays milady.
| want | command | contents |
|---|---|---|
| solver + launcher, no toolchain | pip install milady-mlip |
self-contained wheel (Linux x86-64); pulls mkl |
| solver + launcher, via conda | conda install -c <ch> milady |
milady + milady-bin (see ../conda/) |
launcher only (you supply milady_main.exe) |
pip install ./python |
pure Python, any OS |
The self-contained wheel is built by wheel/build_wheel.sh
(desktop) or the wheels GitHub Actions workflow (manylinux, PyPI-ready) — see
wheel/README.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file milady_mlip-2.0.1.tar.gz.
File metadata
- Download URL: milady_mlip-2.0.1.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c157c94e3bfeda1a57de36d3b126f060228653135298baa0596c0cebf4b4d6f5
|
|
| MD5 |
07f13b453e86edf42951c6d025ca68be
|
|
| BLAKE2b-256 |
1d939ed85eef4a6d0866a6fdbb197745548c314446c500f3a4aea825202d9c3f
|
Provenance
The following attestation bundles were made for milady_mlip-2.0.1.tar.gz:
Publisher:
wheels.yml on mcmarinica/ml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
milady_mlip-2.0.1.tar.gz -
Subject digest:
c157c94e3bfeda1a57de36d3b126f060228653135298baa0596c0cebf4b4d6f5 - Sigstore transparency entry: 2771038029
- Sigstore integration time:
-
Permalink:
mcmarinica/ml@68a69d250a392873333d3286f4c604f4a27b62f9 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/mcmarinica
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@68a69d250a392873333d3286f4c604f4a27b62f9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file milady_mlip-2.0.1-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: milady_mlip-2.0.1-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 8.2 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a3bcbd04ffda4d079fd20b11c4e69513c54438a8343d997394fba8447cd0cb5
|
|
| MD5 |
defb51e58f8623ca63ef2bf39e6adadc
|
|
| BLAKE2b-256 |
5dbe3e529886edc7a7992ec5f56a36e1750f432ad84cd6a0fc6c3d31fa5648cd
|
Provenance
The following attestation bundles were made for milady_mlip-2.0.1-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on mcmarinica/ml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
milady_mlip-2.0.1-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
7a3bcbd04ffda4d079fd20b11c4e69513c54438a8343d997394fba8447cd0cb5 - Sigstore transparency entry: 2771038067
- Sigstore integration time:
-
Permalink:
mcmarinica/ml@68a69d250a392873333d3286f4c604f4a27b62f9 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/mcmarinica
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@68a69d250a392873333d3286f4c604f4a27b62f9 -
Trigger Event:
push
-
Statement type: