PLUGINS/MACHINE LEARNING: Difference between revisions
(Created page with "{{TAGDEF|PLUGINS/MACHINE_LEARNING| .True. {{!}} .False.|.False.}} Description: {{TAG|PLUGINS/MACHINE_LEARNING}} calls the Python plugin for the machine learning interface for each ionic relaxation step ---- When {{TAG|PLUGINS/MACHINE_LEARNING}}=.TRUE., VASP calls the <code>machine_learning</code> 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 interatom...") |
|||
Line 28: | Line 28: | ||
{{TAG|PLUGINS/LOCAL_POTENTIAL}}, | {{TAG|PLUGINS/LOCAL_POTENTIAL}}, | ||
{{TAG|PLUGINS/STRUCTURE}} | {{TAG|PLUGINS/STRUCTURE}} | ||
{{sc|PLUGINS/MACHINE_LEARNING|Examples|Examples that use this tag}} | |||
[[Category:INCAR tag]] | [[Category:INCAR tag]] |
Latest revision as of 08:21, 19 December 2024
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