CompPhysVienna / n2p2

n2p2 - A Neural Network Potential Package
https://compphysvienna.github.io/n2p2/
GNU General Public License v3.0
217 stars 82 forks source link

utils.h missing in LAMMPS/USER-NNP cpp file 'pair_nnp.cpp' #135

Closed yliu1240 closed 2 years ago

yliu1240 commented 2 years ago

Hi! I'm trying to generate the current version of N2P2 and use it with LAMMPS, but it seems there's a problem with the LAMMPS interface cpp file, while this problem doesn't occur in previous versions.

Thank you for your time and I appreciate it a lot!

Describe the bug In the current version of N2P2 package, it seems the 'utils.h' is missing when generating LAMMPS executable files. So, basically it's the 'pair_nnp.cpp' file in USER-NNP directory causes this problem. The 'pair_nnp.cpp' requires a library 'utils.h' which cannot be found. Is this 'utils.h' actually the 'utility.h' file in N2P2 package? Or it's something else?

To Reproduce This problem doesn't exist in earlier versions (such as the version around a year ago). -- For earlier versions, the 'pair_nnp.cpp' have:

include

include

include "pair_nnp.h"

include "atom.h"

include "comm.h"

include "force.h"

include "neighbor.h"

include "neigh_list.h"

include "neigh_request.h"

include "memory.h"

include "error.h"

include "update.h"

-- While in the new version:

include

include

include "pair_nnp.h"

include "atom.h"

include "comm.h"

include "neighbor.h"

include "neigh_list.h"

include "neigh_request.h"

include "memory.h"

include "error.h"

include "update.h"

include "utils.h"

It's the last library causing this problem seems.

Expected behavior Shall I use an earlier version or is there some extra library I'm missing?

singraber commented 2 years ago

Hello!

I tried to reproduce this issue but I did not run into any problems.. after doing a fresh git clone of the current n2p2 repository, followed by

cd src/
make lammps-nnp -j

correctly builds the lmp_mpi executable. Could you please try a fresh install? If the error still persists could you post which errors occur? Thank you!

yliu1240 commented 2 years ago

Hello!

I tried to reproduce this issue but I did not run into any problems.. after doing a fresh git clone of the current n2p2 repository, followed by

cd src/
make lammps-nnp -j

correctly builds the lmp_mpi executable. Could you please try a fresh install? If the error still persists could you post which errors occur? Thank you!

Hi! Thanks, I solved the problem starting with a fresh install. Thank you very much!