CompPhysVienna / n2p2

n2p2 - A Neural Network Potential Package
https://compphysvienna.github.io/n2p2/
GNU General Public License v3.0
217 stars 82 forks source link

LAMMPs MD Simulation Extrapolation Warnings? #120

Closed omorrison1 closed 2 years ago

omorrison1 commented 3 years ago

I am trying to use a N2P2 calculator to run an MD simulation in LAMMPS.

Unfortunately, the simulation is quickly interrupted by "ERROR on proc 17: Too many extrapolation warnings (../pair_nnp.cpp:409)".

What are these extrapolation warnings? How can I combat the issue?

Thanks, Oliver M

vsumaria commented 3 years ago

In the pair_style command in your lammps script, you can set maxew to a large value. This sets the number of extrapolation warnings allowed.

omorrison1 commented 3 years ago

Thankyou. By setting the number of extrapolation warnings the simulations are able to continue to completion.

I assume these warning are indicative of some issue? Is there something that I should be doing in response to these warnings? There are a lot of these warnings and it seems strange to just ignore them.

Thanks, Oliver M

moabe84 commented 3 years ago

The extrapolations show that you are outside the training range and it's been suggested that the extrapolating structures must be determined and added to the data set in order to remove the extrapolation warnings. This topic has been discussed in several papers. See for example this review by Jörg Behler:

https://pubs.acs.org/doi/abs/10.1021/acs.chemrev.0c00868

vsumaria commented 3 years ago

Yes I agree. But you might also not want to add structures that show extremely high or extremely low errors. Generally you can define an error range and add only those structures back to training - this avoids trying to fit the potentials in physically irrelevant regions of the PES and overfitting.

Check this work: https://arxiv.org/pdf/2006.03320.pdf It talks about good criteria for selecting atomic configurations into training.