VASPml library: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
VASPml is a C++ library accompanying {{VASP}}, providing functionality related to machine-learned force fields. It is supposed to extend, and eventually replace, the original Fortran machine learning code inside {{VASP}}. Currently, it does not yet offer any training capabilities but rather focuses on inference. At this point VASPml is in a beta-testing stage and provides its first application, an interface to the popular molecular dynamics (MD) software [https://www.lammps.org LAMMPS]. This allows users to combine {{VASP}}-generated machine-learned force fields with the large amount of MD-related features provided by LAMMPS, some of which may not be offered in {{VASP}} directly. | VASPml is a C++ library accompanying {{VASP}}, providing functionality related to machine-learned force fields. It is supposed to extend, and eventually replace, the original Fortran machine learning code inside {{VASP}}. Currently, it does not yet offer any training capabilities but rather focuses on inference. At this point VASPml is in a beta-testing stage and provides its first application, an interface to the popular molecular dynamics (MD) software [https://www.lammps.org LAMMPS]. This allows users to combine {{VASP}}-generated machine-learned force fields with the large amount of MD-related features provided by LAMMPS, some of which may not be offered in {{VASP}} directly. | ||
{{NB|warning|As of {{VASP}} 6.5.0 the VASPml library is experimental and results should be carefully checked against the standard Fortran code (compile without <code>-Dlibvaspml</code> or set {{TAGO|ML_LIB|.FALSE.}}).}} | |||
= | = Supported features = | ||
* Fast prediction-only mode in {{VASP}} ({{TAGO|ML_MODE|run}}) | |||
* Running {{VASP}} machine-learned force fields in LAMMPS | |||
If {{VASP}} is compiled with the VASPml library and a requested feature is supported by both, the original Fortran code '''and''' the C++ VASPml implementation, then the latter code path is used by default. To override this behavior and explicitly avoid the use of the VASPml library set {{TAGO|ML_LIB|.FALSE.}} in the {{FILE|INCAR}} file. | |||
= Build instructions = | |||
< | The VASPml library is automatically built alongside {{VASP}} if <code>-Dlibvaspml</code> is added to the <code>CPP_OPTIONS</code> [[Precompiler options|precompiler option]] in the [[makefile.include]] file. In addition, a few more compiler settings regarding the C++ compiler, include paths and VASPml options may be required. The [[makefile.include#Archetypical files|makefile.include templates]] provided in {{VASP}}'s <code>arch</code> directory contain pre-filled blocks corresponding to the VASPml build. Uncomment the VASPml-related lines and fill and This may look like this: | ||
... | |||
# For machine learning library vaspml (experimental) | |||
#CPP_OPTIONS += -Dlibvaspml | |||
#CPP_OPTIONS += -DVASPML_USE_CBLAS | |||
#CPP_OPTIONS += -DVASPML_DEBUG_LEVEL=3 | |||
#CXX_ML = mpic++ | |||
#CXXFLAGS_ML = -O3 -std=c++17 -pedantic-errors -Wall -Wextra | |||
#INCLUDE_ML = -I$(OPENBLAS_ROOT)/include | |||
... |
Revision as of 14:53, 22 January 2025
VASPml is a C++ library accompanying VASP, providing functionality related to machine-learned force fields. It is supposed to extend, and eventually replace, the original Fortran machine learning code inside VASP. Currently, it does not yet offer any training capabilities but rather focuses on inference. At this point VASPml is in a beta-testing stage and provides its first application, an interface to the popular molecular dynamics (MD) software LAMMPS. This allows users to combine VASP-generated machine-learned force fields with the large amount of MD-related features provided by LAMMPS, some of which may not be offered in VASP directly.
Warning: As of VASP 6.5.0 the VASPml library is experimental and results should be carefully checked against the standard Fortran code (compile without -Dlibvaspml or set ML_LIB = .FALSE. ).
|
Supported features
- Fast prediction-only mode in VASP (
ML_MODE = run
) - Running VASP machine-learned force fields in LAMMPS
If VASP is compiled with the VASPml library and a requested feature is supported by both, the original Fortran code and the C++ VASPml implementation, then the latter code path is used by default. To override this behavior and explicitly avoid the use of the VASPml library set ML_LIB = .FALSE.
in the INCAR file.
Build instructions
The VASPml library is automatically built alongside VASP if -Dlibvaspml
is added to the CPP_OPTIONS
precompiler option in the makefile.include file. In addition, a few more compiler settings regarding the C++ compiler, include paths and VASPml options may be required. The makefile.include templates provided in VASP's arch
directory contain pre-filled blocks corresponding to the VASPml build. Uncomment the VASPml-related lines and fill and This may look like this:
... # For machine learning library vaspml (experimental) #CPP_OPTIONS += -Dlibvaspml #CPP_OPTIONS += -DVASPML_USE_CBLAS #CPP_OPTIONS += -DVASPML_DEBUG_LEVEL=3 #CXX_ML = mpic++ #CXXFLAGS_ML = -O3 -std=c++17 -pedantic-errors -Wall -Wextra #INCLUDE_ML = -I$(OPENBLAS_ROOT)/include ...