qzhu2017 / PyXtal_ml

a Python3 library for ML modeling materials properties
MIT License
11 stars 1 forks source link

SNAP #45

Open yanxon opened 5 years ago

yanxon commented 5 years ago

Please change this line to your lammps executable if you want to run this script: https://github.com/qzhu2017/PyXtal_ml/blob/550f950807df32d67e5f12d201787b2682415303/pyxtal_ml/descriptors/snap.py#L16

qzhu2017 commented 5 years ago

@yanxon I tried. But it does not work. Where can I find the temporary calculation folder for lammps?

qzhu2017 commented 5 years ago

Okay, I think I used an outdated lammps version.

qzhu2017 commented 5 years ago

I just tried to run the example: for NaCl, if I put 2j_max =3,

For each atom, I saw 15 c_sna[] in dump_sna 90 c_snad[] in dump_snad 180 c_snav[*] in dump_snav

I don't understand this. According to the paper, there should be 30 bispectrum coefs for each atom, 303 for forces 306 for the vectors.

https://lammps.sandia.gov/doc/compute_sna_atom.html @yanxon you need to figure it by your own. Please don't just implement this function. Spend some time on understanding it.

yanxon commented 5 years ago

Hi @qzhu2017,

I run the code provided by the UCSD group. I obtain the same result:

                  0-0-0      1-0-1    1-1-0       1-1-2     2-0-2      2-1-1     2-1-3      2-2-0     2-2-2     3-0-3     3-1-2    3-2-1     3-2-3     3-3-0    3-3-2
input_index                                                                                                                                                          
0           0   525.858    3.34599    1.673   -0.589419   21.7573  -0.392946    3.9892    7.25244  -2.55513   172.425    2.9919   1.9946  -20.2493   43.1064 -15.1869
            1   525.858    3.34599    1.673   -0.589419   21.7573  -0.392946    3.9892    7.25244  -2.55513   172.425    2.9919   1.9946  -20.2493   43.1064 -15.1869
            2   525.858    3.34599    1.673   -0.589419   21.7573  -0.392946    3.9892    7.25244  -2.55513   172.425    2.9919   1.9946  -20.2493   43.1064 -15.1869
            3   525.858    3.34599    1.673   -0.589419   21.7573  -0.392946    3.9892    7.25244  -2.55513   172.425    2.9919   1.9946  -20.2493   43.1064 -15.1869
            4  6262.870  517.24400  258.622 -101.605000  322.2160 -67.736300  134.2180  107.40500 -42.19620  1015.410  100.6630  67.1089 -132.9740  253.8530 -99.7308
            5  6262.870  517.24400  258.622 -101.605000  322.2160 -67.736300  134.2180  107.40500 -42.19620  1015.410  100.6630  67.1089 -132.9740  253.8530 -99.7308
            6  6262.870  517.24400  258.622 -101.605000  322.2160 -67.736300  134.2180  107.40500 -42.19620  1015.410  100.6630  67.1089 -132.9740  253.8530 -99.7308
            7  6262.870  517.24400  258.622 -101.605000  322.2160 -67.736300  134.2180  107.40500 -42.19620  1015.410  100.6630  67.1089 -132.9740  253.8530 -99.7308

I believe there are 4 diagonal values:

0: 15 coeffs 1: 7 coeffs 2: 4 coeffs 3: 8 coeffs

Out of all of this diagonal, there are some unique and overlap js values. Therefore, just to count all distinct j value, everything adds up to 30 coefficients.

qzhu2017 commented 5 years ago

please don’t just run the code. You need to understand how it works. Also know some basic diagnostics. You guys are supposed to find out these issues by yourself.

Sent from my iPhone

On Jan 29, 2019, at 21:36, Howard Yanxon notifications@github.com wrote:

Hi @qzhu2017,

I run the code provided by the UCSD people with the same parameter. I obtain the same result:

              0-0-0      1-0-1    1-1-0       1-1-2     2-0-2      2-1-1     2-1-3      2-2-0     2-2-2     3-0-3     3-1-2    3-2-1     3-2-3     3-3-0    3-3-2

input_index
0 0 525.858 3.34599 1.673 -0.589419 21.7573 -0.392946 3.9892 7.25244 -2.55513 172.425 2.9919 1.9946 -20.2493 43.1064 -15.1869 1 525.858 3.34599 1.673 -0.589419 21.7573 -0.392946 3.9892 7.25244 -2.55513 172.425 2.9919 1.9946 -20.2493 43.1064 -15.1869 2 525.858 3.34599 1.673 -0.589419 21.7573 -0.392946 3.9892 7.25244 -2.55513 172.425 2.9919 1.9946 -20.2493 43.1064 -15.1869 3 525.858 3.34599 1.673 -0.589419 21.7573 -0.392946 3.9892 7.25244 -2.55513 172.425 2.9919 1.9946 -20.2493 43.1064 -15.1869 4 6262.870 517.24400 258.622 -101.605000 322.2160 -67.736300 134.2180 107.40500 -42.19620 1015.410 100.6630 67.1089 -132.9740 253.8530 -99.7308 5 6262.870 517.24400 258.622 -101.605000 322.2160 -67.736300 134.2180 107.40500 -42.19620 1015.410 100.6630 67.1089 -132.9740 253.8530 -99.7308 6 6262.870 517.24400 258.622 -101.605000 322.2160 -67.736300 134.2180 107.40500 -42.19620 1015.410 100.6630 67.1089 -132.9740 253.8530 -99.7308 7 6262.870 517.24400 258.622 -101.605000 322.2160 -67.736300 134.2180 107.40500 -42.19620 1015.410 100.6630 67.1089 -132.9740 253.8530 -99.7308 My hunch is due to the type of atom in the unit cell. In NaCl, it has two types, but there is only one type in Ta.

I'm not certain why this happens, but I will find out why we got 15 coefficient instead of 30.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

yanxon commented 5 years ago

@qzhu2017

After converting the Cartesian coordinate to fractional coordinate, the SNAP that I implemented works just fine with comparable accuracy as claimed in the Mo paper. Next, I'm going to implement the differential evolution algorithm.