libAtoms / QUIP

libAtoms/QUIP molecular dynamics framework: https://libatoms.github.io
348 stars 122 forks source link

How to couple GAP potentials with electric field #431

Closed yuxzhou closed 2 years ago

yuxzhou commented 2 years ago

Dear developers and users,

I'm trying to perform MD simulations using GAP potential under electric field, via fix efield command in LAMMPS. However, I guess the "conventional" GAP potentials (which were trained only based on structural information) can hardly deal with the atomic charge and thus cannot be used to accurately study the structural and dynamical properties under electric field.

Do you have any suggestions or ideas of how to couple GAP potentials with electric field to calculate the charge value and the electrostatic interaction energy at each MD step? Can charge properties be added directly into the pristine GAP potentials or could we add a correction on the basis of the GAP?

Look forward to further discussions!

Thank you!

albapa commented 2 years ago

You can create a combined electrostatic + GAP model. The most basic approach is defining fixed charges on each atomic species. You'll need to subtract the electrostatic interaction before fitting the GAP model, and fit on the (abinitio-Coulomb) difference. You can then define a hybrid/overlay model in LAMMPS that combines the two.

It's also possible to use QUIP's Coulomb IP, but unlike LAMMPS', that is not an efficient implementation.

yonghyuklee commented 10 months ago

I shortly reopen this issue. How can we treat the isolated atom energies for this electrostatic + GAP model? The fitting on the (abinitio-Coulomb) difference might be both on energy differences and force differences, and only in this case, the LAMMPS hybrid/overlay model predicts the total energy of the electrostatic + GAP model correctly (comparable to dft total energy). Is it reliable to use the same ab initio energies for isolated atoms?

Thank you so much.