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

nnp-atomenv usage? #167

Open mikejwaters opened 2 years ago

mikejwaters commented 2 years ago

Hi, I am trying to analyze my spatial descriptors for a 4 component system and would like to have the feature vector for each atom.

When I run nnp-atomenv 20 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 I get an error like this:

...
*** NEIGHBOR HISTOGRAMS *******************************************************

Minimum number of neighbors: 9
Mean    number of neighbors: 11.6
Maximum number of neighbors: 15
Neighbor histogram file: neighbors.histo.
*******************************************************************************

*** NEIGHBOR LIST *************************************************************

Sorting neighbor lists according to element and distance.
*******************************************************************************

*** NEIGHBOR LIST *************************************************************

Writing neighbor lists to file: neighbor-list.data.
*******************************************************************************

*** ATOMIC ENVIRONMENT ********************************************************

Preparing symmetry functions for atomic environment file(s).
Maximum number of  O neighbors for central  O atoms: 15
Maximum number of Ti neighbors for central  O atoms: 15
Maximum number of Zr neighbors for central  O atoms: 15
Maximum number of Nb neighbors for central  O atoms: 15
Maximum number of  O neighbors for central Ti atoms: 15
Maximum number of Ti neighbors for central Ti atoms: 15
Maximum number of Zr neighbors for central Ti atoms: 15
Maximum number of Nb neighbors for central Ti atoms: 15
Maximum number of  O neighbors for central Zr atoms: 15
Maximum number of Ti neighbors for central Zr atoms: 15
Maximum number of Zr neighbors for central Zr atoms: 15
Maximum number of Nb neighbors for central Zr atoms: 15
Maximum number of  O neighbors for central Nb atoms: 15
Maximum number of Ti neighbors for central Nb atoms: 15
Maximum number of Zr neighbors for central Nb atoms: 15
Maximum number of Nb neighbors for central Nb atoms: 15
terminate called after throwing an instance of 'std::runtime_error'
  what():  ERROR: Not enough neighbor atoms, cannot create atomic environment file. Reduce neighbor cutoff for element  O.

[quicksilver:3749287] *** Process received signal ***
[quicksilver:3749287] Signal: Aborted (6)
[quicksilver:3749287] Signal code:  (-6)
...

This is my structure:

begin
lattice    10.83597586     0.00000000     0.00000000
lattice     0.00000000    10.83597586     0.00000000
lattice     0.00000000     0.00000000    10.83597586
atom    6.13810632    4.54977913    6.99477662   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom   10.17662961   10.01115121    3.89807567   Nb    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    3.25096869   12.61624879    5.43801763   Ti    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    7.03339157    1.37015371    4.70915276   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom   10.03908412   10.80668249    6.98233055   Ti    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom   10.84196331   11.60825818    4.15291129   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    7.06367453    1.02758459    5.03463529   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    4.26545020   10.46256551   -1.55012852   Nb    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    5.84828968   -0.91140613    2.46206502   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    8.63772026    1.03827890    9.00138959   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    0.44206002    0.76030540   -2.17940765   Nb    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    3.36777455   11.37202928    7.28169081   Ti    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    3.19680066    8.91926927    9.73534137   O    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    5.48031119    9.67519412    6.91147687   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
atom    2.14692444    9.13172657    8.18862683   Zr    0.00000000    0.00000000    0.00000000    0.00000000    0.00000000
end

I only have one oxygen atom in my structure. Do I have to modulate the number of neighbors for each structure? When I put zeros in for oxygen atom neighbors, I get the same error on the Ti atoms. Can I do this through the python interface? For near term, I am not interested in the derivatives. Is there a simpler way to get these vectors I'm missing? I'd like to do PCA for my data set.

Best, -Mike