How to compile the other package that is developed by others?

Dear Lammps users.

I would like to the other package from the other to calculate the specific properties

How to I compile the package( xxx.cpp)

I paste the xxx.cpp and xxx.h to src folder and then

Should I just enter this commend like make yes-xxx ?

How I compile the xxx.cpp ?

Please give me some tips

I attached the cpp files

compute_gkma.cpp (7.8 KB)
compute_gkma.h (1.6 KB)

When you copy sources to the src folder they are not part of any package and thus will be included automatically.

1 Like

I had a quick look at those files and there is a bigger problem looming: those files were written for an old version of LAMMPS and would need to be adapted to cleanly compile with a current version of LAMMPS. So you either need to adapt them as needed or compile them with a version of LAMMPS they were developed for.

1 Like

Dear. akohlmey

Thanks for your kind reply

If the version would be matched with the files, it works by just putting the files to the src folder.

Do you mean I need to fix those files to apply the new version of Lammps?

How I check the which line is meaning what is the version of lammps?

Could you recommend ref or link to fix it and how to apply the new version of lammps?

Best regard

Yes, those will not compile with the current version of LAMMPS.

The LAMMPS version is stored in src/version.h, but not in individual files.
You can only see the difference when you look at them. E.g. There is no more function inumeric() in the Force class, it has been moved to the utils namespace.

There is not a single line and I don’t recall the differences and moreover I don’t know for which version of LAMMPS this compute was written for. The best option to figure out any differences would be to compare a similar file from the old LAMMPS version to the current version. Another option would be to ask the author(s) whether they plan to update it and submit it for inclusion into the LAMMPS distribution (that would, however, require additional changes, since the files also have code that is in contrast with our coding conventions).

1 Like

Thanks. akohlmey

I understand what you mean.

Is fine to ask something if I have further questions to use this files?

Not really. Questions about usage should be directed at the authors of those files.