xnn.common.deploy.mdi_engine.main#

xnn.common.deploy.mdi_engine.main(argv=None)[source]#

Command-line entry point serving a checkpoint as an MDI engine.

Invoked as xnn mdi ... or python -m xnn.common.deploy.mdi_engine ...:

xnn mdi --ckpt runs/exp/best.pt \
    -mdi "-role ENGINE -name xnn -method TCP -port 8021 -hostname localhost"

Serve a plain checkpoint with D4 added and a net charge of -1:

xnn mdi --ckpt best.pt --dispersion "{name: d4, cutoff_pair: 12.0}" \
    --total-charge -1 -mdi "..."

For the MPI communication method, launch under mpirun alongside the driver (mpi4py required):

mpirun -np 1 xnn mdi --ckpt best.pt -mdi "-role ENGINE -name xnn -method MPI" \
    : -np 1 lmp -mdi "-role DRIVER -name LAMMPS -method MPI" -in input.dat
Parameters:

argv (list of str or None, optional) – Argument vector excluding the program name. When None (the default), sys.argv[1:] is used.

Return type:

None