aiida_mcp.plugins.mlip module¶
MLIP calcjob tools: single point, geometry optimisation, MD and phonons.
- aiida_mcp.plugins.mlip.is_available() bool¶
Return whether the MLIP calcjob plugins are installed.
- Returns:
True if the
mlip.spentry point is installed.- Return type:
bool
- aiida_mcp.plugins.mlip.register(mcp: MCPServer) None¶
Register the MLIP tools on the given MCP server.
- Parameters:
mcp (MCPServer) – The server to register the MLIP tools on.
- aiida_mcp.plugins.mlip.submit_md_job(code: str | int, structure: str | int, model: str | int | None = None, architecture: str | None = None, device: str | None = None, calc_kwargs: dict[str, Any] | None = None, ensemble: str | None = None, md_kwargs: dict[str, Any] | None = None, num_machines: int = 1, num_mpiprocs_per_machine: int = 1, label: str | None = None, description: str | None = None) dict[str, Any]¶
Build the inputs for an MLIP molecular dynamics calcjob and submit it.
- Parameters:
code (str or int) – Label (e.g.
janus@localhost) or PK of the MLIP code.structure (str or int) – Path to a structure file on the machine running the server, or the PK of an existing StructureData node.
model (str or int or None) – Path or URL of the MLIP model file, or the PK of an existing ModelData node. If omitted, the code’s own default model for architecture is used.
architecture (str or None) – MLIP architecture to use, e.g.
mace_mp. Required unless model is the PK of an existing ModelData node, which already carries its own architecture.device (str or None) – Device to run the calculation on:
cpu,cudaormps.calc_kwargs (dict or None) – Extra keyword arguments to pass to the selected calculator.
ensemble (str or None) – Name of the thermodynamic ensemble.
md_kwargs (dict or None) – Keyword arguments for the molecular dynamics run.
num_machines (int) – Number of machines to run on.
num_mpiprocs_per_machine (int) – MPI processes per machine.
label (str or None) – Optional label to set on the calcjob node.
description (str or None) – Optional description to set on the calcjob node.
- Returns:
The process PK, uuid, label, description, code, input node PKs, and daemon state.
- Return type:
dict[str, Any]
- Raises:
ToolError – If num_machines or num_mpiprocs_per_machine is below 1, code, structure or model does not match a known code or node, or an input fails validation.
- aiida_mcp.plugins.mlip.submit_opt_job(code: str | int, structure: str | int, model: str | int | None = None, architecture: str | None = None, device: str | None = None, calc_kwargs: dict[str, Any] | None = None, opt_cell_fully: bool | None = None, opt_cell_lengths: bool | None = None, fmax: float | None = None, steps: int | None = None, minimize_kwargs: dict[str, Any] | None = None, pressure: float | None = None, num_machines: int = 1, num_mpiprocs_per_machine: int = 1, label: str | None = None, description: str | None = None) dict[str, Any]¶
Build the inputs for an MLIP geometry optimisation calcjob and submit it.
- Parameters:
code (str or int) – Label (e.g.
janus@localhost) or PK of the MLIP code.structure (str or int) – Path to a structure file on the machine running the server, or the PK of an existing StructureData node.
model (str or int or None) – Path or URL of the MLIP model file, or the PK of an existing ModelData node. If omitted, the code’s own default model for architecture is used.
architecture (str or None) – MLIP architecture to use, e.g.
mace_mp. Required unless model is the PK of an existing ModelData node, which already carries its own architecture.device (str or None) – Device to run the calculation on:
cpu,cudaormps.calc_kwargs (dict or None) – Extra keyword arguments to pass to the selected calculator.
opt_cell_fully (bool or None) – Fully optimise the cell vectors, angles, and atomic positions.
opt_cell_lengths (bool or None) – Optimise cell vectors, as well as atomic positions.
fmax (float or None) – Maximum force for convergence.
steps (int or None) – Number of optimisation steps.
minimize_kwargs (dict or None) – All other keyword arguments to pass to the geometry optimizer.
pressure (float or None) – Scalar pressure when optimizing cell geometry, in GPa.
num_machines (int) – Number of machines to run on.
num_mpiprocs_per_machine (int) – MPI processes per machine.
label (str or None) – Optional label to set on the calcjob node.
description (str or None) – Optional description to set on the calcjob node.
- Returns:
The process PK, uuid, label, description, code, input node PKs, and daemon state.
- Return type:
dict[str, Any]
- Raises:
ToolError – If num_machines or num_mpiprocs_per_machine is below 1, code, structure or model does not match a known code or node, or an input fails validation.
- aiida_mcp.plugins.mlip.submit_ph_job(code: str | int, structure: str | int, model: str | int | None = None, architecture: str | None = None, device: str | None = None, calc_kwargs: dict[str, Any] | None = None, out: str | None = None, supercell: str | None = None, n_qpoints: int | None = None, displacement: float | None = None, no_hdf5: bool | None = None, dos: bool | None = None, pdos: bool | None = None, bands: bool | None = None, symmetrize: bool | None = None, qpoint_file: str | None = None, num_machines: int = 1, num_mpiprocs_per_machine: int = 1, label: str | None = None, description: str | None = None) dict[str, Any]¶
Build the inputs for an MLIP phonon calcjob and submit it.
- Parameters:
code (str or int) – Label (e.g.
janus@localhost) or PK of the MLIP code.structure (str or int) – Path to a structure file on the machine running the server, or the PK of an existing StructureData node.
model (str or int or None) – Path or URL of the MLIP model file, or the PK of an existing ModelData node. If omitted, the code’s own default model for architecture is used.
architecture (str or None) – MLIP architecture to use, e.g.
mace_mp. Required unless model is the PK of an existing ModelData node, which already carries its own architecture.device (str or None) – Device to run the calculation on:
cpu,cudaormps.calc_kwargs (dict or None) – Extra keyword arguments to pass to the selected calculator.
out (str or None) – Name of the phonon output file.
supercell (str or None) – The size of supercells used in the phonon calculation.
n_qpoints (int or None) – Number of q points in the band path.
displacement (float or None) – Displacement for numerical derivatives.
no_hdf5 (bool or None) – Write force constants to the phonopy yaml, rather than separate HDF5.
dos (bool or None) – Calculate the density of states.
pdos (bool or None) – Calculate the partial density of states.
bands (bool or None) – Calculate the phonon band structure.
symmetrize (bool or None) – Symmetrize force constants.
qpoint_file (str or None) – The file for q-points in the phonon calculation.
num_machines (int) – Number of machines to run on.
num_mpiprocs_per_machine (int) – MPI processes per machine.
label (str or None) – Optional label to set on the calcjob node.
description (str or None) – Optional description to set on the calcjob node.
- Returns:
The process PK, uuid, label, description, code, input node PKs, and daemon state.
- Return type:
dict[str, Any]
- Raises:
ToolError – If num_machines or num_mpiprocs_per_machine is below 1, code, structure or model does not match a known code or node, or an input fails validation.
- aiida_mcp.plugins.mlip.submit_sp_job(code: str | int, structure: str | int, model: str | int | None = None, architecture: str | None = None, device: str | None = None, calc_kwargs: dict[str, Any] | None = None, out: str | None = None, properties: list[str] | None = None, num_machines: int = 1, num_mpiprocs_per_machine: int = 1, label: str | None = None, description: str | None = None) dict[str, Any]¶
Build the inputs for an MLIP single point calcjob and submit it.
- Parameters:
code (str or int) – Label (e.g.
janus@localhost) or PK of the MLIP code.structure (str or int) – Path to a structure file on the machine running the server, or the PK of an existing StructureData node.
model (str or int or None) – Path or URL of the MLIP model file, or the PK of an existing ModelData node. If omitted, the code’s own default model for architecture is used.
architecture (str or None) – MLIP architecture to use, e.g.
mace_mp. Required unless model is the PK of an existing ModelData node, which already carries its own architecture.device (str or None) – Device to run the calculation on:
cpu,cudaormps.calc_kwargs (dict or None) – Extra keyword arguments to pass to the selected calculator.
out (str or None) – Name of the xyz output file.
properties (list[str] or None) – Properties to calculate, e.g.
["energy", "forces"].num_machines (int) – Number of machines to run on.
num_mpiprocs_per_machine (int) – MPI processes per machine.
label (str or None) – Optional label to set on the calcjob node.
description (str or None) – Optional description to set on the calcjob node.
- Returns:
The process PK, uuid, label, description, code, input node PKs, and daemon state.
- Return type:
dict[str, Any]
- Raises:
ToolError – If num_machines or num_mpiprocs_per_machine is below 1, code, structure or model does not match a known code or node, or an input fails validation.