Page 1 of 1

MLFF of eutectic molten salt with magnetic impurities

Posted: Thu Jul 30, 2026 10:41 pm
by henry_ezeaku

Good day VASP team,
I hope you are doing well.

Please, I have a question regarding the best approach of training an MLFF for a molten salt system with Cr (magnetic element) as impurity. The Cr can exist as Cr0, Cr2+, and Cr3+ in the melt. So, I intend generating an MLFF that covers these three oxidation states. The approach I tried did not work and I want to know if this task is feasible using the VASP MLFF.

My Approach
- My target temperature is 900 K; therefore, I did a heating run from 750 to 1150 K, using NPT and also the ICONST file avaliable. My training steps:
a) I trained on eutectic NaCl-MgCl2 + Cr0. For the Cr0, I added just 2 Cr atoms to a representative atomic configuration of a eutectic NaCl-MgCl2:
Na Mg Cl Cr
14 10 34 2
This is the INCAR file I used, where I specified an initial guess of 5 as the MAGMOM for Cr0.
# ---------- Electronic / accuracy ----------
ALGO = Normal # SCF algorithm (robust choice for MD runs)
PREC = Accurate # Precision; 'Accurate' improves force quality (important for ML training)
NELM = 100 # Max number of electronic SCF steps per ionic move
ISMEAR = 0 # Gaussian smearing (good for insulators / ionic liquids)
SIGMA = 0.1 # Smearing width in eV
ENCUT = 550 # Plane-wave energy cutoff (basis set size)
EDIFF = 1E-05 # Electronic SCF convergence criterion (tighter = more accurate forces)
LASPH = .TRUE. # Include non-spherical corrections inside PAW spheres
LREAL = Auto # Projection operators evaluated in real space automatically (faster)
LWAVE = .FALSE. # Don't write WAVECAR (saves disk during MD/ML runs)
LCHARG = .FALSE. # Don't write CHGCAR (saves disk during MD/ML runs)

# ---------- MD (NVT) ----------
IBRION = 0 # Molecular dynamics mode (no ionic relaxation)
ISIF = 3 # Change positions AND cell shape/volume dynamically
ISYM = 0 # Turn symmetry off
ISPIN = 2 # Non-spin-polarized run
MAGMOM = 14*0.0 10*0.0 34*0.0 2*5.0

MDALGO = 3 # Langevin thermostat for NPT sampling
LANGEVIN_GAMMA = 10 10 10 10 # Thermal friction per species (ps^-1)
LANGEVIN_GAMMA_L = 5 # Lattice friction coefficient (ps^-1) for barostat
PMASS = 1000 # Fictitious lattice mass (amu) - paper used 1000
PSTRESS = 0.001 # Target pressure in kbar (0.001 kbar = 1 bar)

TEBEG = 750 # Starting temperature (K)
TEEND = 1150 # Target temperature at end of run
NSW = 30000 # Number of MD steps
POTIM = 1 # Time step (in fs)

NCORE = 2 # Parallelization control

# ---------- (optional) Dispersion corrections ----------
GGA = ML # vdW-DF2 functional base (when using ML-type GGA = "ML")
AGGAC = 0.0 # Exchange parameter for vdW-DF2
LUSE_VDW = .TRUE. # Enable nonlocal vdW-DF2 correction
ZAB_VDW = -1.8867 # Kernel parameter (specific to vdW functional)

# ---------- MLFF: enable on-the-fly training ----------
ML_LMLFF = .TRUE. # Switch on the MLFF framework
ML_MODE = train # Training mode: ab-initio + ML hybrid MD (For vasp 6.4.2>)
ML_MCONF = 5000
ML_MB = 6000

b) After training, I used the ML_AB file to continue the training on eutectic + (Cr2+) system (that is having CrCl2 + configuration of eutectic salt):
Na Mg Cl Cr
14 10 38 2
For this case, I used MAGMOM = 14*0.0 10*0.0 38*0.0 2*4.0 (4 for the Cr2+).

c) After step b, I continued the training on eutectic + (Cr3+) system (that is CrCl3 + configuration of eutectic salt):
Na Mg Cl Cr
14 10 40 2
For this case, I used MAGMOM = 14*0.0 10*0.0 40*0.0 2*3.0 (3 for Cr3+).

After the sequential training, I did a refit and generated my MLFF. This is my training error:
# ERR nstep rmse_energy rmse_force rmse_stress
# ERR 2 3 4 5
# ERR ######################################################################
ERR 0 5.98130425E-03 4.91795177E-02 4.22210045E-01

Now, I have a 20 ps AIMD NVT run for eutectic + Cr0 at 900 K. I picked the POSCAR and ran a 20ps prediction-only run at 900 K using the MLFF. When I compare the RDF from AIMD and MLFF, I get this attached plot:

Cr.png

The generated MLFF reproduces the bulk salt RDFs but failed to reproduce those of Cr-Cl against AIMD. This behavior also happens for Cr2+ and Cr3+ production runs. Please, what might be causing this? Or maybe, is there a more robust way of training this kind of system using the VASP MLFF. Thank you.

Best regards,
Henry