CompPhysVienna / n2p2

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

Include an "inner cutoff" that suppresses the symmetry function values at short distances. #184

Open xyttyxy opened 1 year ago

xyttyxy commented 1 year ago

Is your feature request related to a problem? Please describe. When building a neural network potential for plasma-surface interactions I find it advantageous to let the NNP describe intermediate range interactions, and leave the high-energy, repulsive short-range interaction to a simple empirical potential (e.g. ZBL). The empirical potential would be fitted to the difference between the NNP and ab-initio data (DFT). However, my NNP at the moment has a flat short-distance asymptotic behavior, and I would like to suppress the NNP so that it approaches 0. This would take the DFT-NNP difference closer to the functional form supported by the ZBL potential, resulting in a more accurate fit. See Figure 1 for the comparison of potential energy surfaces. compare_pes Figure 1: PES of O atom on top of Cu(100) surface, top site as function of Cu-O distance

Describe the solution you'd like I would like to include an inner cutoff (not to be confused with the existing inner cutoff set by the $\alpha$ parameter) function that suppresses the NN at short distances. An example functional form would be $\frac{1}{2}(-\cos(\pi x) + 1)$ where $x = \frac{r - r{ii}}{r{io}-r{ii}}$ and $r{ii} = \beta rc, r{io} = \gamma r_c$ are the start and end of this 'inner cutoff'. The resulting overall function, with $\alpha = 0.5, \beta = 0.1, \gamma = 0.2$ looks like Figure 2, CT_ICOS: compare_cuts Figure 2: cutoff functions

CT_COS: $\alpha=\beta=\gamma=0$; CT_COS_INNER $\alpha=0.5, \beta=\gamma=0$; CT_ICOS: $\alpha=0.5, \beta = 0.1, \gamma = 0.2$

Describe alternatives you've considered For my own research I have hard-coded this into the CutoffFunction class. I will submit a PR soon that implements this for some symmetry function and symmetry function groups but I am not sure if it is the best way.