Closed Leimeroth closed 7 months ago
@Leimeroth For traditional potentials (EAM, MEAM) it is working fine for me, can you confirm that those are also working for you? The important part is that the elements in Species
are sorted in the way how they are implemented in the potential. Here is an example for SiO:
pot = pd.DataFrame({
"Filename": [['potential_LAMMPS/1994--Nakano-A--Si-O--LAMMPS--ipr1/SiO.1994.vashishta']],
"Model": ["NISTiprpy"],
"Name": ["1994--Nakano-A--Si-O--LAMMPS--ipr1"],
"Species": [['Si', 'O']],
"Config": [['pair_style vashishta\n', 'pair_coeff * * SiO.1994.vashishta Si O\n']],
})
So I did some tests and apparently the error occurs only when setting
job.input.control['atom_style'] = 'charge'
Seems like a pretty evil trap to me that can quickly mess up your calculations. Is there a reason why the sorting is different between different atom_styles anyway? If not, I guess it would be good to refactor the structure writing to have the same function doing the sorting based on the Species field of the potential dataframe all the time.
short reminder :)
Hi @Leimeroth , given the current conferences and that none of the current pyiron developers is using the charge
atom style in LAMMPS I can not promise a quick solution. So anything helps. If you can provide a simple unit test which currently does not work that would already be helpful and makes it easier for us as pyiron developers to take a look on how to fix this issue.
@samwaseda Do you have time to take a look at this?
I am trying to run some reaxff calculations with a potential DF made by this function
This requires to set
Here I noticed that lammps does not follow the order of elements given by the potential when writing the structure.inp file. This seems like a very critical bug and used to work as far as I can remember. In the structure_full function there is a lot of code doing the sorting:
sorted_species_list = np.array(self._potential.get_element_lst())
This is completely lacking in structure_atomic for example. Instead there is something like
which however, seems to not work.
Tagging you @pmrv and @jan-janssen, maybe one of you knows whats going on?