adding my personal package within LAMMPS

Hi all,

I wonder what is the more recommended route to add/modify LAMMPS code to better match my application. Either:

  1. Add more files into USER-MISC and use make yes-user-misc as command? The downside of this is I shall end up with bunches of extras I doubt I would ever need.

  2. Create my own directory inside src, i.e. src/USER-FOO and then add all my files *.h and *.cpp in there. Once I have mastered the code (haha who am I kidding…) then I can install it with make yes-user-foo? Do I need to edit the Makefile or isntall.sh at all for this?

Many thanks,
Quang

Hi all,

I wonder what is the more recommended route to add/modify LAMMPS code to
better match my application. Either:

1) Add more files into USER-MISC and use `make yes-user-misc` as command?
The downside of this is I shall end up with bunches of extras I doubt I
would ever need.

2) Create my own directory inside src, i.e. src/USER-FOO and then add all my
files *.h and *.cpp in there. Once I have mastered the code (haha who am I
kidding...) then I can install it with make yes-user-foo? Do I need to edit
the Makefile or isntall.sh at all for this?

if this is just your own code for your own purposes, you can just copy
it to the src directory and leave it there.
packages in LAMMPS are nothing else but mechanisms to add or remove
files from the src folder.

now, if you want to contribute your code to the LAMMPS that would be a
different question...

axel.

Thanks for your reply.

Just for ease of viewing and managing the code I thought of putting them in a package, but as you mention I may start with just placing them in the src folder first.

Now I don’t know how far I can get into ‘contributing’ LAMMMPS, but I would love to try! I don’t know if there would be any focus or projects that would need to be addressed those?

Q

Thanks for your reply.

Just for ease of viewing and managing the code I thought of putting them in
a package, but as you mention I may start with just placing them in the src
folder first.

Now I don't know how far I can get into 'contributing' LAMMMPS, but I would
love to try! I don't know if there would be any focus or projects that would
need to be addressed those?

no worries. we can look at that on a case by case basis. the primary
required property of a contribution is, that it seems to be of general
usefulness.

axel.