Closed weilaigit closed 3 years ago
Hello, weilaigit.
Sorry for being late reply. I also have tried on the multi-nary system on the LAMMPS of 3Mar20. My conclusion is that we can still run one element system with potential with three elements.
The input structure file of LAMMPS specifies the # of atoms, # of elements, and types of each atom. It can have only one element while declaring the many elements in front. For example,
5 atoms
3 atom types
0.0 10.0 xlo xhi
0.0 10.0 ylo yhi
0.0 10.0 zlo zhi
Masses
1 1.000
2 2.000
3 3.000
4 4.000
5 5.000
Atoms
1 1 1.00 1.00 1.00
2 1 2.00 2.00 2.00
3 1 3.00 3.00 3.00
4 1 4.00 4.00 4.00
5 1 5.00 5.00 5.00
Now, LAMMPS can run with commands of "pair_coeff potential_file (1st element)". Please let me know whether your LAMMPS also works or not.
Best regards, Jisu
Additionally, I recommend updating the SIMPLE-NN. We fix the memory leak in pair_nn.cpp that now supports only LAMMPS of 29Oct2020 or later.
What I found was that if you specify "3 atom types", LAMMPS expect to see three elements after "potential_file". So this method didn't work.
I could get it to work by deleting the neural network block for the other two elements in the potential file and use 1 atom type and 1 element after "potential_file". However, I was expecting that pair_nn.cpp could identify the elements specified after "potential_file" and find the relevant blocks in the potential file automatically.
I did try the LAMMPS master with new pair_nn.cpp. I had the same problem. I could also get it to work by deleting the blocks of two other elements.
potential_saved_iteration50001 in the example was trained for SiO2. Although not intended, I found I could use this potential to run LAMMPS for Si by specifying "pair_coeff potential_saved_iteration50001 Si" and even a virtual O system by doing something similar.
I tried a potential with three elements (Cu-Sb-S). I could run LAMMPS with this potential to systems with three elements (Cu-Sb-S), systems with two elements (Cu-Sb, Cu-S, Sb-S), but not with systems with single elements (Cu, Sb, or S). It gave the "munmap_chunk(): invalid pointer: 0x00000000021b3c80 ***". I am using lammps-3Mar20.
Similarly, a potential trained with four elements can only be applied to systems with three or four elements, but not two and one elements.
The broader context of this is to train the potential with multiple datasets with different number of elements.