deMonPy.deMonNano
Back to DeMonNanoPy API Reference
Description
Main deMonNano calculator and the workflow-capable Module_DeMonNano wrapper.
Source file: deMonPy/deMonNano.py
Classes
deMonNano (Common)
High-level calculator: one calculate() call writes deMon.inp, runs the binary, parses deMon.out / deMon.mol and stores parsed results.
Attributes
| Attribute | Meaning |
|---|---|
| parameters | Snapshot of the keyword arguments passed at init time. |
| title | Title string written to the generated input file. |
| workdir | Directory where calculation files are read and written. |
| basis | Basis / Slater-Koster configuration dictionary (PTYPE, SKFILE). |
| flags | set of lower-case flags derived from active parameter and module keys. |
| state | Dictionary of state snapshots produced by calculate(). |
| results | Dictionary of parsed results from the last calculation. |
Methods
| Method | Signature | Description |
|---|---|---|
__init__ |
__init__(execut=None, workdir=".", omp_threads=1, prefix="DEMON", title="CALCULATION DEMONANO", properties=None, basis=None, ase_obj=True, clean_repository=True, ignore_parse_errors=True, **parameters) |
Initialise the deMonNano calculator; execut/basis fall back to deMonPy.DEMON_EXECUTABLE / DEMON_BASIS; **parameters accepts DEMON_EXECUTABLE, DEMON_WORKDIR, DEMON_PARAMETERS, DEMON_MODULE. |
update |
update(properties=None, basis=None, **parameters) |
Update properties/basis/parameters before a next iteration. |
calculate |
calculate(*, symbols, positions, cell=None, pbc=False, kpts=None, index=0, read_charges=False, extract_debug=False, **kwargs) |
Run one deMonNano calculation end-to-end and store results. |
write_input |
write_input(symbols, geometry, cell=None, kpts=None) |
Build and write the deMon.inp input file from the parameter dictionaries. |
parse_output |
parse_output(read_charges=False, extract_debug=False, **kwargs) |
Parse deMon.out / deMon.mol; a missing deMon.out always raises, other failures are recorded when ignore_parse_errors=True. |
Module_DeMonNano (deMonNano)
deMonNano extended with pluggable workflow modules (optimization, MD, PTMC).
Methods
| Method | Signature | Description |
|---|---|---|
__init__ |
__init__(module=None, execut=None, workdir=".", omp_threads=1, prefix="DEMON", title="CALCULATION MODULE-DEMONANO", properties=None, available_modules=None, **parameters) |
Initialise a module-aware calculator; module must be a key of available_modules ("opt", "md", "ptmc"). |
module |
module (property, get/set) |
Current workflow module instance; the setter swaps the module and re-injects its parameters. |
initialize |
initialize(**kwds) |
Configure the workflow module with module-specific parameters. |
__call__ |
__call__(method=None, **kwds) |
Dispatch: method=None runs the module default workflow, otherwise calls a named method on the module. |