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

WARNING: Structure # Atom # : # neighbors. #138

Open Matheus-Novoa opened 2 years ago

Matheus-Novoa commented 2 years ago

I'm trying to build an NNP for a 1-D nanomaterial. However, i'm facing some issues about the training stage.

In nnp-train.log file, there are some warning lines like that:

WARNING: Structure 1 Atom 2 : 1 neighbors. WARNING: Structure 1 Atom 3 : 1 neighbors. WARNING: Structure 1 Atom 8 : 1 neighbors. WARNING: Structure 1 Atom 9 : 1 neighbors. WARNING: Structure 1 Atom 10 : 1 neighbors. WARNING: Structure 1 Atom 11 : 1 neighbors. WARNING: Structure 1 Atom 16 : 1 neighbors. WARNING: Structure 1 Atom 17 : 1 neighbors. WARNING: Structure 1 Atom 18 : 1 neighbors. WARNING: Structure 1 Atom 19 : 1 neighbors. WARNING: Structure 1 Atom 22 : 1 neighbors.

Even so, i decided to test the model obtained from this training in a MD simulation. In simulation output, i got the same warnings and soon after a lost atoms error occurred.

I would like to know the origin of these warnings. Thanks in advance for your help

input.nn.txt nnp-train.log.txt

singraber commented 2 years ago

Hello!

The warning tells you that these atoms have only 1 neighbor in their neighbor list but some of your symmetry functions need at least 2 neighbors to be non-zero. This is usually the case when you have used all element combinations of angular symmetry functions (e.g. for central C atoms: H-H, H-C, C-C neighbors) but then within the cutoff sphere there are no atoms of all types. This is very likely to happen in your 1-D nanomaterial and not per se a problem (zero is also a valid input for a neural network input node). If you are sure that your symmetry function setup is ok, you can turn off these warnings if you recompile the entire code with

PROJECT_OPTIONS+= -DN2P2_NO_NEIGH_CHECK

Just remove the comment sign # in the corresponding line in makefile.<comp> (around line 43).

Best,

Andreas

nbzy1995 commented 10 months ago

Hello!

I have similar issues when running lammps calling n2p2. I run for a simple 3D atomic model using pbc. After the initial 100 steps, I start to see most of atoms showing this warning for most later steps, and this produces a huge output file. I wonder if it is possible to silence this warning from lammps without recompiling?

Also, when will this be an issue? From visualization I see nothing wrong, and for short-range interacting atoms that are far away (in gas phase), the angular functions shall be zero. Maybe we could consider this situation and incorporate into the code?

Thanks