mir-group / pair_allegro

LAMMPS pair style for Allegro deep learning interatomic potentials with parallelization support
https://www.nature.com/articles/s41467-023-36329-y
MIT License
34 stars 8 forks source link

Configuring LAMMPS with pair_allegro #8

Closed apoletayev closed 1 year ago

apoletayev commented 1 year ago

Having problems building LAMMPS with cmake after patching with pair_allegro.

OS: opensuse linux SLES 15.1 (https://www.archer2.ac.uk/about/hardware.html) LAMMPS version: 20220623 KOKKOS: no

Error messages:

/path/to/lammps/src/pair_allegro.cpp:125:33: error: 'half' is a protected member of 'LAMMPS_NS::NeighRequest'
  neighbor->requests[irequest]->half = 0;
                                ^
/path/to/lammps/src/neigh_request.h:55:7: note: declared protected here
  int half;    // half neigh list (set by default)
      ^
/path/to/lammps/src/pair_allegro.cpp:126:33: error: 'full' is a protected member of 'LAMMPS_NS::NeighRequest'
  neighbor->requests[irequest]->full = 1;
                                ^
/path/to/lammps/src/neigh_request.h:56:7: note: declared protected here
  int full;    // full neigh list
      ^
/path/to/lammps/src/pair_allegro.cpp:128:33: error: 'ghost' is a protected member of 'LAMMPS_NS::NeighRequest'
  neighbor->requests[irequest]->ghost = 1;
                                ^
/path/to/lammps/src/neigh_request.h:69:7: note: declared protected here
  int ghost;           // 1 if includes ghost atom neighbors
      ^

Removing the pair_allegro.cpp and pair_allegro.h from /path/to/lammps/src lets the build go forward and LAMMPS builds. For what it's worth, the same problem arises with pair_nequip. If the patching is not done, the build goes forward.

Any help will be very appreciated!

apoletayev commented 1 year ago

Solved with reverting to an older LAMMPS, 29Sep2021.

Linux-cpp-lisp commented 1 year ago

:+1: see also in README: https://github.com/mir-group/pair_allegro#download-lammps