Hi Marcin. Basically, the best suggestion is to write any new code so
that it has the same "look and feel" as existing LAMMPS code. So, with
that in mind, the answers to your questions are no, no, int is
preferred, and "stdlib.h" is preferred.
We do have an informal "LAMMPS Style Guide" that I'll paste below.
This may help you as you write your code.
LAMMPS Style Guide
One of the reasons LAMMPS is easy to understand and work on is that
the LAMMPS authors are fairly fanatic about several things:
stylistic C issues: indentation, bracket usage, comment format,
variable naming conventions, etc
consistency: memory allocation, I/O style, no C++ templates ---
there are LAMMPS ways to do these things
consistency: when multiple classes do similar things,
the code fragments are constructed identically
If multiple people contribute to the code, we feel the need to enforce
these kinds of conventions even more strongly.
Adding new features to LAMMPS
There are 2 kinds of features one can add to LAMMPS. The simple kind
is where you are adding a new "style" of something that LAMMPS already
handles (a new pair potential, angle potential, a fix, a temperature,
a new command). The features
themselves may be very complex, but they are isolated and hopefully
require no changes to the rest of LAMMPS.
The 2nd kind is where the new feature does require changes to the rest
of LAMMPS. These can be tricky to implement and require some thought
to consider all the side effects and performance impact. We also feel
it is important to keep the core of LAMMPS simple, so it is not
necessarily desirable to add any feature one can imagine.
So before implementing a new feature of the 2nd kind that you hope to
have included in the main LAMMPS distribution, you should communicate
with Steve Plimpton in order to come to consensus on the following:
a) Should it be done at all?
b) What is the best way to do it that changes LAMMPS the least and
will take side
effects into account?
c) What is the LAMMPS-style of implementing it?
Update the documentation
Making upgrades and bug fixes to LAMMPS is more that editing source
code. It also means updating the doc pages and posting a notice of
the change on the WWW site. For tricky features it often means
creating a new example file or how-to section in the manual. This can
be tedious work, but it is critical in order to keep LAMMPS coherent