ML_MODE

From VASP Wiki
Revision as of 14:29, 27 March 2023 by Karsai (talk | contribs)

ML_MODE = [string]
Default: ML_MODE = NONE 

Description: String based tag selecting operation mode for machine learning force fields.

Mind: This tag is only available as of VASP.6.4.0.

This tag acts as a "supertag" and selects the operation mode by selecting the defaults for all other tags. Every tag that is affected by this "supertag" can be overwritten by the user by simply specifying the value for that tag. The following options are available for this tag:

  • ML_MODE = TRAIN or train: There are two possible cases depending on, whether an ML_AB is present in the calculation folder or not:
    • No ML_AB file: On-the-fly training is executed from scratch. Force predictions from the machine learning force field are used to drive the MD simulation. However, if the error estimation performed in each time step indicates a high force error an ab initio calculation is performed instead and the collected energy, forces and stress are used to improve the machine learning force field. Setting ML_ISTART = 0 starts the machine learning force field from scratch. Hence, in the beginning of the MD run there is no force field available and ab initio calculations will happen frequently. ML_ISTART=0 is set internally.
    • ML_AB file present: On-the-fly training is executed but taking into account pre-existing ab initio data. This is the usual choice for continuing a previous MD simulation with activated machine learning. Before the MD run starts the ML_AB file, copied from ML_ABN from a previous run, is read and the contained ab initio energies, forces and stresses are used to generate an initial force field. Note that this preparative learning step adopts the previous choice of local reference configurations, i.e. the reference atomic environments entering the kernel are taken from a list in the ML_AB file. Then, the MD simulation is started with on-the-fly learning enabled. The ML_AB file does not necessarily need to contain structures matching the current starting configuration in the POSCAR file in terms of simulation box, present elements or number of atoms. However, if the same elements appear the initial force field is of course used for predictions. In any case the provided training data is included in the finally generated machine learning force field, i.e. the ML_FFN file will define a force field applicable to both, the structures in the ML_AB file and the current MD simulation. By restarting repeatedly with ML_MODE=TRAIN while providing an ML_AB file from the last run it is possible to iteratively extend the applicability of the resulting machine learning force field, e.g. by exploring different temperature ranges or element compositions. (ML_ISTART=1) is set internally.
  • ML_MODE = SELECT or select: Reselection of the local reference configurations is done for an existing ML_AB file (ML_ISTART=3). NSW=1 is set.
  • ML_MODE = REFIT or refit: Refitting of the force field from an existing ML_AB file using the fast version is executed (ML_ISTART=4 together with ML_LFAST=.TRUE.). NSW=1 is. ML_IALGO_LINREG=4 is set. Furthermore the following flags are set: ML_SIGW0 = 1E-7 ; ML_SIGV0 = 1 ; ML_EPS_LOW = 1E-12
  • ML_MODE = REFITFULL or refitfull: Refitting of the force field from an existing ML_AB file using the full version is executed (ML_ISTART=4). NSW=1 is set. ML_IALGO_LINREG=1 is set
  • ML_MODE = RUN or run: Force field only mode is executed (ML_ISTART=2). This mode requires an ML_FF file.
  • ML_MODE = NONE or none: This tag is not used.

If any option other than the above is chosen or any of them is misspelled (be careful to write everything in upper case or lower case letters) the code will exit with an error.

Related tags and articles

ML_LMLFF, ML_ISTART, ML_LFAST, ML_IERR, ML_OUTBLOCK, ML_OUTPUT_MODE