ML MODE: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 7: Line 7:
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.
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:
The following options are available for this tag:
*{{TAG|ML_MODE}} = TRAIN or train: There are two possible cases depending on, whether an {{TAG|ML_AB}} is present in the calculation folder or not:
*{{TAG|ML_MODE}} = TRAIN or train: On-the-fly training is executed. If no {{TAG|ML_AB}} file is detected in the calculation folder the training is executed from scratch ({{TAG|ML_ISTART}}=0). Otherwise if an {{TAG|ML_AB}} exists a continuation run is executed. ({{TAG|ML_ISTART}}=1).   
**No {{TAG|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 {{TAG|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. The following tags are set internally: {{TAG|ML_ISTART}}=0.
*{{TAG|ML_MODE}} = SELECT or select: Reselection of the local reference configurations is done for an existing {{TAG|ML_AB}} file ({{TAG|ML_ISTART}}=3). {{TAG|NSW}}=1 is set. ML_CDOUB = 4.
**{{TAG|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 {{FILE|ML_AB}} file, copied from {{FILE|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 {{FILE|ML_AB}} file. Then, the MD simulation is started with on-the-fly learning enabled. The {{FILE|ML_AB}} file does not necessarily need to contain structures matching the current starting configuration in the {{FILE|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 {{FILE|ML_FFN}} file will define a force field applicable to both, the structures in the {{FILE|ML_AB}} file '''and''' the current MD simulation. By restarting repeatedly with {{TAG|ML_MODE}}='''TRAIN''' while providing an {{FILE|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. The following tags are set internally: {{TAG|ML_ISTART}}=1.   
*{{TAG|ML_MODE}} = SELECT or select: Reselection of the local reference configurations is done for an existing {{TAG|ML_AB}} file ({{TAG|ML_ISTART}}=3). {{TAG|NSW}}=1 is set.
*{{TAG|ML_MODE}} = REFIT or refit: Refitting of the force field from an existing {{TAG|ML_AB}} file using the fast version is executed ({{TAG|ML_ISTART}}=4 together with {{TAG|ML_LFAST}}=.TRUE.). {{TAG|NSW}}=1 is. {{TAG|ML_IALGO_LINREG}}=4 is set. Furthermore the following flags are set: ML_SIGW0 = 1E-7 ; ML_SIGV0 = 1 ; ML_EPS_LOW = 1E-12
*{{TAG|ML_MODE}} = REFIT or refit: Refitting of the force field from an existing {{TAG|ML_AB}} file using the fast version is executed ({{TAG|ML_ISTART}}=4 together with {{TAG|ML_LFAST}}=.TRUE.). {{TAG|NSW}}=1 is. {{TAG|ML_IALGO_LINREG}}=4 is set. Furthermore the following flags are set: ML_SIGW0 = 1E-7 ; ML_SIGV0 = 1 ; ML_EPS_LOW = 1E-12
*{{TAG|ML_MODE}} = REFITFULL or refitfull: Refitting of the force field from an existing {{TAG|ML_AB}} file using the full version is executed ({{TAG|ML_ISTART}}=4). {{TAG|NSW}}=1 is set. {{TAG|ML_IALGO_LINREG}}=1 is set
*{{TAG|ML_MODE}} = REFITBAYESIAN or refitbayesian (deprecated); Refitting of the force field from an existing {{TAG|ML_AB}} file using the Bayesian version ({{TAG|ML_ISTART}}=4). {{TAG|NSW}}=1 is set. {{TAG|ML_IALGO_LINREG}}=1 is set
*{{TAG|ML_MODE}} = RUN or run: Force field only mode is executed ({{TAG|ML_ISTART}}=2). This mode requires an {{TAG|ML_FF}} file.
*{{TAG|ML_MODE}} = RUN or run: Force field only mode is executed ({{TAG|ML_ISTART}}=2). This mode requires an {{TAG|ML_FF}} file.
*{{TAG|ML_MODE}} = NONE or none: This tag is not used.
*{{TAG|ML_MODE}} = NONE or none: This tag is not used.

Revision as of 14:31, 27 March 2023

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: On-the-fly training is executed. If no ML_AB file is detected in the calculation folder the training is executed from scratch (ML_ISTART=0). Otherwise if an ML_AB exists a continuation run is executed. (ML_ISTART=1).
  • 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_CDOUB = 4.
  • 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 = REFITBAYESIAN or refitbayesian (deprecated); Refitting of the force field from an existing ML_AB file using the Bayesian version (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