graph2mat.tools.siesta.md

Tools to analyze how DM predictions can improve a MD run

Functions

md_guess_performance_dataframe(out_file)

Returns a dataframe describing how close the first SCF step is to the converged properties.

md_guess_performance_dataframe_multi(out_files)

Returns a dataframe describing how close the first SCF step is to the converged properties.

setup([ml, siesta, inplace, work_dir, ...])

Sets up directories to run molecular dynamics using different DM initialization modes.

setup_store([dir, step_prefix, interval, ...])

Prepares a lua script that, if included in a SIESTA run, generates a dataset.

visualize_performance_table(out_files[, ...])

Styles the performance dataframe so to help visualization.

graph2mat.tools.siesta.md.md_guess_performance_dataframe(out_file: str | Path) DataFrame[source]

Returns a dataframe describing how close the first SCF step is to the converged properties.

The resulting dataframe contains information for each MD step.

Parameters:

out_file (Union[str, Path]) – Path to SIESTA’s output file.

graph2mat.tools.siesta.md.md_guess_performance_dataframe_multi(out_files: Iterable[str | Path], agg: Sequence[Callable | str] | None = ('mean', 'min', 'max', 'std')) DataFrame[source]

Returns a dataframe describing how close the first SCF step is to the converged properties.

Same as md_guess_performance_dataframe, but adds an extra column that specifies the run name.

Parameters:
  • out_files (Iterable[Union[str, Path]]) – Iterable that returns paths to SIESTA’s output files of the different MDs.

  • agg ((Iterable of functions) or None, optional) – If it is None, the df contains information for each MD step. Otherwise, the MD steps are aggregated using the provided functions. Note that the MD steps are aggregated separately for each run.

graph2mat.tools.siesta.md.setup(ml: str | None = None, siesta: str | None = None, inplace: bool = False, work_dir: Path | None = None, fdf_name: str = 'graph2mat.fdf', lua_script: str = 'graph2mat.lua', ml_model_name: str = '0', server_host: str = 'localhost', server_port: int = 56000, server_api_endpoint: str = 'api/extrapolation', store_interval: int = 0, store_dir: Path = 'MD_steps', store_step_prefix: str = '', store_files: str = '*fdf *TSHS *TSDE *XV')[source]

Sets up directories to run molecular dynamics using different DM initialization modes.

This function will produce an fdf file (fdf_name) that you will need to include to your SIESTA main fdf input file.

Notice that if you want to use the store functionality or machine learning predictions, you will need to use a SIESTA version that supports the lua language.

History depth specifications

Both ml and siesta arguments accept a history depth specification. This is a string that specifies the history depths, separated by commas, to be used with that method. E.g. “0” means that history depth 0 should be used, and “0,1” means that both history depths 0 and 1 should be used.

graph2mat.tools.siesta.md.setup_store(dir: Path = 'MD_steps', step_prefix: str = '', interval: int = 1, files: str = '*fdf *TSHS *TSDE *XV', out: Path = 'md_store.lua')[source]

Prepares a lua script that, if included in a SIESTA run, generates a dataset.

The resulting script is meant to be passed to SIESTA using the Lua.Script flag.

graph2mat.tools.siesta.md.visualize_performance_table(out_files: List[Path], agg: List[str] = ['mean', 'min', 'max', 'std'], precision: int = 3, notebook: bool = False, save: str | None = None)[source]

Styles the performance dataframe so to help visualization.

For now, this function must be run in an IPython notebook.