-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes for lammps integration #367
base: master
Are you sure you want to change the base?
Conversation
} | ||
//auto manager_root = extract_underlying_manager<0>(manager); | ||
//auto cell_length = manager_root->get_cell_length(); | ||
//auto pbc = manager_root->get_periodic_boundary_conditions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what you mean with the sentence below?
disabled some checks which require cell information which we do not have in the case of lammps
The periodicity of the cell should be available somewhere in lammps, it is set with the boundary command in the input.
The cell lengths can be recomputed if we want from LAMMPS xlo xhi
and friends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this part is meant. Also in stress one line is commented out. Yes it should be somewhere available, it is not so urgent at the moment.
I don't know how to get the central atom tag from a ghost atom in lammps, because we use the neighbour tag of the nonghost atom when iterating through the neighbourlist. Here the comparison of the neighbourlist of lammps and how it should be
I looked where this information could be stored it in lammps in the atom.cpp and neigh_list.cpp but could not find anything. EDIT: I think problem is solved, just found atom->tag in lammps |
Seems to work now, at least no segmentation fault for the input I used (methane_pbc.lammps https://github.com/agoscinski/lammps/blob/a5e34127bd55dfedebeae510fac8b88511837067/examples/rascal/methane_pbc.lammps). The neighbourlists using StructureManagerLammps and Center have same number of pairs with same tags, order is different but that is a possible difference. This is for me to remember how the neighbour list member variables in rascal work, because the doc is not expressive enough |
I just checked for two H atoms, the representation for the two atoms are not even the same with lammps. I will see if can get some useful information from our test framework after adapting the tests for the changes in StructureManagerLammps It is definitely an issue regarding StructureManagerLammps, since it works with the center one (in examples/cpp/krr_model.cc) |
I found the bug for the soap representation of two hydrogens (without pbc) being different: StructureManagerLammps is considered as half neighbour list in its traits. It is also written in multiple threads that lammps uses a half neighbourlist as default, but when I forward it to rascal it is a full one. I am not sure what setting I have changed or what I have misunderstood that lammps gives me a full neighbour list. Anyway the H2 representation is correct now. Sources: EDIT: Found the reason for the half neighbourlist, something I have copied over from quip
|
format changes of models python obj -> dict disabled some checks which require cell information which we do not have in the case of lammps make structure manager lammps work, assume for now that lammps index are without gaps manager seems to be not destructed properly
…neighbour_atom_tag updated to be usable with ghost atoms
…m_index_from_atom_tag_list was wrong in lammps
…g domain decomposition bug for multi-species
1110306
to
d1de43e
Compare
…l gradients to ghost atoms or correspoinding within-cell atom by additional flag store_partial_gradients_in_ghosts
The MPI support seems to work now. There are small errors when comparing the MPI runs for different number of tasks, this however seems lammps related, since I could also observe this using QUIP. The physical properties I computed on BaTiO3 with 320 atoms were very close between different number of tasks for the first picosecond and then started to diverge from each other. Same when comparing ipi-lammps-cpprascal with ipi-pyrascal, here it is more an issue of different constants for converting to internal units in ipi and lammps. The average properties seem to be close to each other. A more detailed analysis of this for longer trajectories is currently in progress. If we consider to merge this thing to master here is the plan for splitting this up into PRs:
Adding new tests for structure_manager_lammps.hh which test the new changes and tests the additional option offered to support domain decomposition (in sparse_kernel_predict.hh) would take roughly full week of work. Everything else is just a copy paste of this branch and make things clean. |
* cpp representation and kernel information is now included in rascal's model json file. * weights are now always flattened to one dimension for consistency in the models format.
A PR to discuss required changes for the integration of rascal as pair potential into lammps. Please also check out the changes made on the lammps side agoscinski/lammps#1 You should be able to use the lammps draft by just cloning this repo with this branch within lammps src folder. There is an
examples/rascal/in.lammps
file you can use. It should at least run one compute iteration (loading model, computing forces with it) and then crash.With the current code I get a memory error after the compute step in the pair potential has finished. I think it is related to the destruction of the structure manager. A detailed trace of the debug log can be found here https://github.com/agoscinski/lammps/files/6726135/log.txt
Minor changes have been done
Changes need to be done later: