Liquid Si - MLFF: Difference between revisions
Line 94: | Line 94: | ||
=== {{TAG|INCAR}} === | === {{TAG|INCAR}} === | ||
#Basic parameters | #Basic parameters | ||
ISMEAR = 0 | {{TAGBL|ISMEAR}} = 0 | ||
SIGMA = 0.1 | {{TAGBL|SIGMA}} = 0.1 | ||
LREAL = Auto | {{TAGBL|LREAL}} = Auto | ||
PREC = FAST | {{TAGBL|PREC}} = FAST | ||
ALGO = FAST | {{TAGBL|ALGO}} = FAST | ||
ISYM = -1 | {{TAGBL|ISYM}} = -1 | ||
NELM = 100 | {{TAGBL|NELM}} = 100 | ||
EDIFF = 1E-4 | {{TAGBL|EDIFF}} = 1E-4 | ||
LWAVE = .FALSE. | {{TAGBL|LWAVE}} = .FALSE. | ||
LCHARG = .FALSE. | {{TAGBL|LCHARG}} = .FALSE. | ||
#Parallelization of ab initio calculations | #Parallelization of ab initio calculations | ||
NCORE = 2 | {{TAGBL|NCORE}} = 2 | ||
#MD | #MD | ||
IBRION = 0 | {{TAGBL|IBRION}} = 0 | ||
MDALGO = 2 | {{TAGBL|MDALGO}} = 2 | ||
ISIF = 2 | {{TAGBL|ISIF}} = 2 | ||
SMASS = 1.0 | {{TAGBL|SMASS}} = 1.0 | ||
TEBEG = 2000 | {{TAGBL|TEBEG}} = 2000 | ||
NSW = 10000 | {{TAGBL|NSW}} = 10000 | ||
POTIM = 3.0 | {{TAGBL|POTIM}} = 3.0 | ||
#Machine learning paramters | #Machine learning paramters | ||
ML_FF_LMLFF = .TRUE. | {{TAGBL|ML_FF_LMLFF}} = .TRUE. | ||
ML_FF_ISTART = 0 | {{TAGBL|ML_FF_ISTART}} = 0 | ||
ML_FF_NWRITE = 2 | {{TAGBL|ML_FF_NWRITE}} = 2 | ||
ML_FF_EATOM = -.70128086E+00 | {{TAGBL|ML_FF_EATOM}} = -.70128086E+00 | ||
*The user should be familiar at this step how to run a basic molecular dynamics calculations. If not please go through the example here: {{TAG|Liquid Si - Standard MD}}. | *The user should be familiar at this step how to run a basic molecular dynamics calculations. If not please go through the example here: {{TAG|Liquid Si - Standard MD}}. | ||
*Machine learning is switched on by setting the following tag: {{TAG|ML_FF_LMLFF}}=''.TRUE.''. | *Machine learning is switched on by setting the following tag: {{TAG|ML_FF_LMLFF}}=''.TRUE.''. |
Revision as of 17:45, 23 July 2019
Task
Generating a machine learning force field for liquid Si.
Input
POSCAR
- In this example we start from a 64 atom super cell of diamond-fcc Si (the same as in this example: Liquid Si - Standard MD:
Si cubic diamond 2x2x2 super cell of conventional cell 5.43090000000000 2.00000000 0.00000000 0.00000000 0.00000000 2.00000000 0.00000000 0.00000000 0.00000000 2.00000000 Si 64 Direct 0.00000000 0.00000000 0.00000000 0.50000000 0.00000000 0.00000000 0.00000000 0.50000000 0.00000000 0.50000000 0.50000000 0.00000000 0.00000000 0.00000000 0.50000000 0.50000000 0.00000000 0.50000000 0.00000000 0.50000000 0.50000000 0.50000000 0.50000000 0.50000000 0.37500000 0.12500000 0.37500000 0.87500000 0.12500000 0.37500000 0.37500000 0.62500000 0.37500000 0.87500000 0.62500000 0.37500000 0.37500000 0.12500000 0.87500000 0.87500000 0.12500000 0.87500000 0.37500000 0.62500000 0.87500000 0.87500000 0.62500000 0.87500000 0.00000000 0.25000000 0.25000000 0.50000000 0.25000000 0.25000000 0.00000000 0.75000000 0.25000000 0.50000000 0.75000000 0.25000000 0.00000000 0.25000000 0.75000000 0.50000000 0.25000000 0.75000000 0.00000000 0.75000000 0.75000000 0.50000000 0.75000000 0.75000000 0.37500000 0.37500000 0.12500000 0.87500000 0.37500000 0.12500000 0.37500000 0.87500000 0.12500000 0.87500000 0.87500000 0.12500000 0.37500000 0.37500000 0.62500000 0.87500000 0.37500000 0.62500000 0.37500000 0.87500000 0.62500000 0.87500000 0.87500000 0.62500000 0.25000000 0.00000000 0.25000000 0.75000000 0.00000000 0.25000000 0.25000000 0.50000000 0.25000000 0.75000000 0.50000000 0.25000000 0.25000000 0.00000000 0.75000000 0.75000000 0.00000000 0.75000000 0.25000000 0.50000000 0.75000000 0.75000000 0.50000000 0.75000000 0.12500000 0.12500000 0.12500000 0.62500000 0.12500000 0.12500000 0.12500000 0.62500000 0.12500000 0.62500000 0.62500000 0.12500000 0.12500000 0.12500000 0.62500000 0.62500000 0.12500000 0.62500000 0.12500000 0.62500000 0.62500000 0.62500000 0.62500000 0.62500000 0.25000000 0.25000000 0.00000000 0.75000000 0.25000000 0.00000000 0.25000000 0.75000000 0.00000000 0.75000000 0.75000000 0.00000000 0.25000000 0.25000000 0.50000000 0.75000000 0.25000000 0.50000000 0.25000000 0.75000000 0.50000000 0.75000000 0.75000000 0.50000000 0.12500000 0.37500000 0.37500000 0.62500000 0.37500000 0.37500000 0.12500000 0.87500000 0.37500000 0.62500000 0.87500000 0.37500000 0.12500000 0.37500000 0.87500000 0.62500000 0.37500000 0.87500000 0.12500000 0.87500000 0.87500000 0.62500000 0.87500000 0.87500000
KPOINTS
- We will start with a single k point in this example:
K-Points 0 Gamma 1 1 1 0 0 0
INCAR
#Basic parameters ISMEAR = 0 SIGMA = 0.1 LREAL = Auto PREC = FAST ALGO = FAST ISYM = -1 NELM = 100 EDIFF = 1E-4 LWAVE = .FALSE. LCHARG = .FALSE. #Parallelization of ab initio calculations NCORE = 2 #MD IBRION = 0 MDALGO = 2 ISIF = 2 SMASS = 1.0 TEBEG = 2000 NSW = 10000 POTIM = 3.0 #Machine learning paramters ML_FF_LMLFF = .TRUE. ML_FF_ISTART = 0 ML_FF_NWRITE = 2 ML_FF_EATOM = -.70128086E+00
- The user should be familiar at this step how to run a basic molecular dynamics calculations. If not please go through the example here: Liquid Si - Standard MD.
- Machine learning is switched on by setting the following tag: ML_FF_LMLFF=.TRUE..
- By setting the tag ML_FF_ISTART to zero learning from scratch is selected.
- The flag ML_FF_NWRITE=2 selects a more verbose output where the error on energies, forces and stress are output to the ML_LOGFILE file. This setting is very handy to check the accuracy of the force field.
- The tag ML_FF_EATOM=-.70128086E+00 sets the atomic reference energy for each species. How to obtain that energy is explained below.
Calculation
Reference energy
Before the force field for liquid Si can be calculated, the atomic energy of a single Si atom in a large enough box has to be calculated. For that the following steps have to be done:
- Create a new directory Si_ATOM by typing mkdir Si_ATOM and go to that directory cd Si_ATOM.
- Create an INCAR file with the following parameters:
#Basic parameters ISMEAR = 0 SIGMA = 0.1 LREAL = Auto PREC = FAST ALGO = FAST ISYM = 0 NELM = 100 EDIFF = 1E-4 LWAVE = .FALSE. LCHARG = .FALSE. ISPIN = 2
- Create a POSCAR file with a single atom in a large enough box (the box should be orthorombic to have enough degrees of freedom for electronic relaxation):
Si atom 1.00090000000000 12.00000000 0.00000000 0.00000000 0.00000000 12.01000000 0.00000000 0.00000000 0.00000000 12.02000000 Si 1 Direct 0.00000000 0.00000000 0.00000000
- Create a KPOINTS file with a single k point (or copy the one delivered with this example):
test 0 0 0 Gamma 1 1 1 0 0 0
- Copy the POTCAR from the previous directory to this directory (cp ../POTCAR).
- Run the calculation and look at the total energy in the OUTCAR file (or OSZICAR). That energy will be used for the ML_FF_EATOM tag. If multiple atom types are present in the structure than this step has to be repeated for each atom type separately and the reference energies are provided as a list after the ML_FF_EATOM tag, where the ordering of the energies corresponds to the ordering of the elements in the POTCAR file.