lammps external files

Hello,

I am attempting to find documentation for a lammps external file and I cannot find it anywhere. The file is called fix_fcm.cpp and fix_fcm.h . It is posted in an opensource software called OpenFSI on github:

https://github.com/huilinye/OpenFSI/blob/master/src/IB_interface/fix_fcm.cpp

Is there any documentation on this and where did they get this lammps code?

Thanks,

Karl Gardner

LAMMPS is designed to be easily modified and many people do it and not all of them (probably most of them) do not contributed their work back to the LAMMPS distribution. On github there are nearly a thousand forks of the LAMMPS tree and there may be more projects that do not start from a LAMMPS fork, but just maintain add-on files or do not use github, so you can assume that the actual number of LAMMPS modifications is a multiple of that.

most modifications/customizations are done by copying a similar file from the LAMMPS distribution and renaming it (and the class name inside) and then apply the modifications/customizations. this is the recommended procedure for most cases. thus these files may look like they are part of LAMMPS and may even have the original author attribution in it.

for every file included in the LAMMPS distribution we require documentation, but this is not something that we can enforce for external modifications, so your options are to either contact the author of that specific github repository for more details or read the source and figure it out by yourself. the file seems small and simple enough to understand what it does.

HTH,
Axel.

Hello Axel,

Thanks for the response, I am wondering if there is a specific section in github where the lammps add-on files are included?

Karl Gardner

Hello Axel,

Thanks for the response, I am wondering if there is a specific section in github where the lammps add-on files are included?

why would github care about that or force people to do something like this? that makes no sense. github hosts git repositories and it is up to the owners of those repositories what they put in there (and github’s terms of usage, of course).

LAMMPS is open source under GPL v2 and users are encouraged to make modifications of their own, however because of that we have no power (and no desire) to force people to organize their work in a specific way or otherwise comply with some policies of our own.

we still get many contributions to the LAMMPS software (in fact, most of it is contributed code from outside the core LAMMPS developers) as having it included into the official distribution will make it easier to be used and it will also apply some kind of “approval” as we enforce certain code quality standards and consider the usefulness of contributions before including them.

as I mentioned before, if you need more information or documentation about any code that is not part of the LAMMPS distribution, you must contact that person that manages that code. the LAMMPS developers don’t know about it and don’t have the time or interest to keep track of those changes, let alone “police” people into how to manage their modifications.

that may be frustrating for you, but that is how open source software works. the best you can do is to encourage people working on external LAMMPS code to contribute it back and have it properly documented and tested. however, this may not be appealing to everybody.

axel.

The problem is that the person who manages the code is not answering and since I thought since it had the lammps attribute at the top it would have come from a code written by lammps. Anyways, I am unexperienced in coding and that is why I was asking about the github repository since you said that there are thousands of forks in the lammps tree. So not everything posted in github Lammps repository is from the lammps developers?

Karl

The problem is that the person who manages the code is not answering

this is a common problem in research, as the bulk of the work is done by graduate students and postdocs that often move on after they graduate or their position expires. one would hope that this would be managed differently, but unless there is a fundamental change in how scientific software is maintenance is funded and how publications are reviewed that are based on custom software, this will remain that way. it has been like this for a very long time, only now it is much more visible because a) more people are using computational tools while in the past people doing simulations had to be sufficiently capable in programming or else they could not do their job and b) because in the past most work was done with (smaller) in-house software packages, while now the complexity of problems and the maturity of many “package programs” (be it open source or closed source) has reached a point where it is much easier for non-programmers to use it productively while also for (model/method) developers it is much more attractive to extend an existing package than write (and test/debug!) a complete package from ground up on their own.

and since I thought since it had the lammps attribute at the top it would have come from a code written by lammps.

anything the LAMMPS developers know about is part of the LAMMPS distribution.

Anyways, I am unexperienced in coding

then you may consider finding a collaborator that has the necessary experience and can assist you in “reverse engineering”.

and that is why I was asking about the github repository since you said that there are thousands of forks in the lammps tree.

not in the LAMMPS tree. but people have made forks of the LAMMPS tree. but that is likely only a much smaller number than the number of people that have modified LAMMPS code and/or written custom extensions. …and this is not even looking at people that embed LAMMPS as a library into their python projects.

So not everything posted in github Lammps repository is from the lammps developers?

we are too few people to write such an amount of code and also don’t have the level of expertise in the underlying physics of most of those contributed packages. when people contribute code, we review it on code quality issues and how cleanly it integrates into the existing code. usually contributed files have an attribution in the source and packages have a README file/ this is also documented in the manual.

the manual also has a whole section that explains how to modify LAMMPS and how to contribute those features back for inclusion.

axel.

FWIW, there is also a (partial) list of LAMMPS contributors, that provided significant contributions at: https://lammps.sandia.gov/authors.html

axel.