PLUGINS/MACHINE LEARNING

From VASP Wiki
Revision as of 08:21, 19 December 2024 by Schlipf (talk | contribs) (→‎Related tags and articles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

PLUGINS/MACHINE_LEARNING = .True. | .False.
Default: PLUGINS/MACHINE_LEARNING = .False. 

Description: PLUGINS/MACHINE_LEARNING calls the Python plugin for the machine learning interface for each ionic relaxation step


When PLUGINS/MACHINE_LEARNING=.TRUE., VASP calls the machine_learning Python function at the end of each ionic relaxation step. You can use this tag to replace VASP forces and the stress tensor to represent an external machine-learned interatomic potential. This can be used if you want to combine an machine-learned interatomic potential with the different features of IBRION. For example, you could compute the phonon frequencies of the interatomic potential and compare it to ab-initio data and be sure that the workflow is the same.

Expected inputs

The machine_learning Python function is different from the other plugins because it does not provide any input from VASP. Instead the plugin infrastructure handles the communication with VASP. The only requirement of the plugin is that the function returns a class compatible with an Calculator.

def machine_learning():
    # code to setup calculator
    return calculator

VASP will take care to convert its internal data to be compatible with the Calculator. We compute the forces and stress using the calculator on this data. VASP packages the results on the Python side and sends them back to Fortran where they replace the usual force and stress values.

Related tags and articles

Plugins, PLUGINS/FORCE_AND_STRESS, PLUGINS/LOCAL_POTENTIAL, PLUGINS/STRUCTURE

Examples that use this tag