ML FFN: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:ML_FFN}}
{{DISPLAYTITLE:ML_FFN}}
This binary file contains a knewly created force field from machine learning runs with the options {{TAG|ML_MODE}}=<code>train</code>, <code>refit</code> or <code>select</code>. It's structure is identical to the {{TAG|ML_FF}} file. To be able to use the new force field from {{FILE|ML_FFN}} file it has to be simply copied to {{FILE|ML_FF}} and the {{FILE|INCAR}} tag {{TAG|ML_MODE}}=<code>run</code> has to be set.
This binary file contains a newly created force field from machine learning runs with the options {{TAG|ML_MODE}}=<code>train</code>, <code>refit</code> or <code>select</code>. It's structure is identical to the {{TAG|ML_FF}} file. To be able to use the new force field in the {{FILE|ML_FFN}} file it has to be simply copied to {{FILE|ML_FF}} and the {{FILE|INCAR}} tag {{TAG|ML_MODE}}=<code>run</code> has to be set (see [[Machine_learning_force_field_calculations:_Basics#Step-by-step_instructions|here]] for the basic workflow).


Since VASP 6.4.0 the {{FILE|ML_FFN}} file starts with an ASCII header containing the most important INCAR tags in effect during generation of this force field. In Linux shells this can be easily extracted issuing the following command:
Since VASP 6.4.0 the {{FILE|ML_FFN}} file starts with an ASCII header containing the most important INCAR tags in effect during generation of this force field. In Linux shells this can be easily extracted issuing the following command:
Line 6: Line 6:
The output may look like this:
The output may look like this:
  ML_FF 0.2.1 binary { "date" : "2023-03-16T13:49:44.829", "ML_LFAST" : False, "ML_DESC_TYPE" :  0, "types" : [ "Si" ], "training_structures" : 984, "local_reference_cfgs" : [ 110 ], "descriptors" : [ 142 ], "ML_IALGO_LINREG" : 3, "ML_RCUT1" :  6.0000E+00, "ML_RCUT2" :  6.0000E+00, "ML_W1" :  1.0000E-01, "ML_SION1" :  5.0000E-01, "ML_SION2" :  5.0000E-01, "ML_LMAX2" : 4, "ML_MRB1" : 8, "ML_MRB2" : 8, "ML_IWEIGHT" : 3, "ML_WTOTEN" :  1.0000E+00, "ML_WTIFOR" :  1.0000E+00, "ML_WTSIF" :  1.0000E-10 }
  ML_FF 0.2.1 binary { "date" : "2023-03-16T13:49:44.829", "ML_LFAST" : False, "ML_DESC_TYPE" :  0, "types" : [ "Si" ], "training_structures" : 984, "local_reference_cfgs" : [ 110 ], "descriptors" : [ 142 ], "ML_IALGO_LINREG" : 3, "ML_RCUT1" :  6.0000E+00, "ML_RCUT2" :  6.0000E+00, "ML_W1" :  1.0000E-01, "ML_SION1" :  5.0000E-01, "ML_SION2" :  5.0000E-01, "ML_LMAX2" : 4, "ML_MRB1" : 8, "ML_MRB2" : 8, "ML_IWEIGHT" : 3, "ML_WTOTEN" :  1.0000E+00, "ML_WTIFOR" :  1.0000E+00, "ML_WTSIF" :  1.0000E-10 }
followed by some extra spaces (because the header is always 4096 characters long). The timestamp following <code>"date"</code> is also written to the <code>FFOUT</code> lines in {{FILE|ML_LOGFILE}}. The <code>"ML_LFAST"</code> item allows you to check whether this force field is ready for fast prediction mode.
followed by some extra spaces (because the header is always 4096 characters long). After the string <code>ML_FF</code> the header contains the file version number. {{VASP}} machine-learned force field files are versioned since {{VASP}} 6.4.0 to allow for compatibility checks. Typically, {{FILE|ML_FFN}} files are backward compatible, i.e., newer versions of {{VASP}} will be able to read files generated by older {{VASP}} versions. The opposite is generally not true. However, the {{FILE|ML_FFN}} version number does not automatically increase with the {{VASP}} version, so two or more consecutive {{VASP}} versions could create {{FILE|ML_FFN}} files with identical version number. The version number in the header is followed by the word <code>binary</code>. The remainder of the header contains a [https://www.json.org JSON] string with general information about the force field and values of selected {{FILE|INCAR}} tags. For example, the timestamp following the <code>"date"</code> key is also written to the <code>FFOUT</code> lines in {{FILE|ML_LOGFILE}} which helps to identify later on which force field files belong to which log files. Another important piece of information is <code>"ML_LFAST"</code> key which allows you to check whether this force field is ready for fast prediction mode.
----
----


[[Category:Files]][[Category:Machine-learned force fields]][[Category:Output files]]
[[Category:Files]][[Category:Machine-learned force fields]][[Category:Output files]]

Revision as of 09:18, 15 October 2025

This binary file contains a newly created force field from machine learning runs with the options ML_MODE=train, refit or select. It's structure is identical to the ML_FF file. To be able to use the new force field in the ML_FFN file it has to be simply copied to ML_FF and the INCAR tag ML_MODE=run has to be set (see here for the basic workflow).

Since VASP 6.4.0 the ML_FFN file starts with an ASCII header containing the most important INCAR tags in effect during generation of this force field. In Linux shells this can be easily extracted issuing the following command:

head -n 1 ML_FFN

The output may look like this:

ML_FF 0.2.1 binary { "date" : "2023-03-16T13:49:44.829", "ML_LFAST" : False, "ML_DESC_TYPE" :   0, "types" : [ "Si" ], "training_structures" : 984, "local_reference_cfgs" : [ 110 ], "descriptors" : [ 142 ], "ML_IALGO_LINREG" : 3, "ML_RCUT1" :  6.0000E+00, "ML_RCUT2" :  6.0000E+00, "ML_W1" :  1.0000E-01, "ML_SION1" :  5.0000E-01, "ML_SION2" :  5.0000E-01, "ML_LMAX2" : 4, "ML_MRB1" : 8, "ML_MRB2" : 8, "ML_IWEIGHT" : 3, "ML_WTOTEN" :  1.0000E+00, "ML_WTIFOR" :  1.0000E+00, "ML_WTSIF" :  1.0000E-10 }

followed by some extra spaces (because the header is always 4096 characters long). After the string ML_FF the header contains the file version number. VASP machine-learned force field files are versioned since VASP 6.4.0 to allow for compatibility checks. Typically, ML_FFN files are backward compatible, i.e., newer versions of VASP will be able to read files generated by older VASP versions. The opposite is generally not true. However, the ML_FFN version number does not automatically increase with the VASP version, so two or more consecutive VASP versions could create ML_FFN files with identical version number. The version number in the header is followed by the word binary. The remainder of the header contains a JSON string with general information about the force field and values of selected INCAR tags. For example, the timestamp following the "date" key is also written to the FFOUT lines in ML_LOGFILE which helps to identify later on which force field files belong to which log files. Another important piece of information is "ML_LFAST" key which allows you to check whether this force field is ready for fast prediction mode.