The LAMMPS forum is not Science Talk
This forum is dedicated to discussing LAMMPS, and the volunteers here focus on helping with LAMMPS, not general scientific queries. Here are some typical queries that are out of scope for this forum, with explanations:
-
“How do I turn mercury into gold with LAMMPS?” You need to do a literature review, and we don’t provide that service.
-
“I tried turning mercury into gold with LAMMPS, but then a “PPPM: Particles out of range” error happened!” You need to form a hypothesis about what happened and vary some variables to test it, and we don’t provide that service.
-
“I wrote a script to turn mercury into gold with LAMMPS, could anyone check it?” As above, and also see “We do not know your field”.
We do not know your field
We are typically not experts in your research. So if some detail of your research is important to the problem you are facing, you are responsible for explaining your area of expertise. Please do not use specialist terminology, abbreviations or initialisms without explaining them first – pretend you are giving a talk at a generalist conference.
As a very important corollary, we do not know what your system is supposed to do, and we do not know why your system is doing something else instead. I do not know enough about the molecular intricacies of water to know why it boils at 100 degC in real life, and if you want to know why it boils at 80 degC in your simulation I will mumble something about checking your force field. An important exception is that if you are trying to replicate an MD simulation reported in literature, I will usually be motivated to read through that paper and see what might be missing from your attempted replication, since replicability is central to science.
Start small before building complexity
You should (even before you run into errors) build small, simple systems that give straightforward results that you fully understand, before adding in complexity. For example, you should simulate a polymer at equilibrium before trying to shear it, and you should simulate a liquid at uniform temperature before trying a thermal gradient. You should not use polarisability, many-body potentials, or ReaxFF, unless you can clearly justify the extra accuracy compared to nonpolarisable, pair potential, or non-reactive simulations respectively.
Small systems (in terms of volume and particle number) are also very valuable because they run faster, crash faster, and are faster to visualise. They therefore save you lots of time. Also, fluctuation magnitudes (and thus, notably, diffusivities) change in interesting ways against system size, and the easiest way to convince yourself that a simulation is “big enough” is to simulate something slightly larger and see that there is no change in your (intensive) observable of interest.
Don't use ReaxFF if you're not studying a very reactive system
I know I just said it, but that’s how often it needs saying.
Your system just does what your force field and equations of motion say
The foundational inputs to LAMMPS are your force field – that is, given a set of coordinates, what the forces between particles are – and your equations of motion – that is, are particles’ velocities and positions altered in any way beyond Newton’s laws. Almost all LAMMPS (indeed, MD) problems boil down to either inappropriate force fields or inappropriate equations of motion.
Force fields are tricky beasts and you should tell us clearly what force fields you are using, with a reference if possible. Note that a force field is the complete description of all interactions between all particle types in a system, and mixing different coefficients from different publications creates an all-new force field. So, for example, MD simulations of DMSO with water show different miscibilities depending on whether SPC/E or TIP3P parameters are used (https://pubs.acs.org/doi/abs/10.1021/jp0007336).
Force fields are more than pair coefficients
A force field covers more than just the Lennard-Jones coefficients. You cannot fully specify the forces between particles without also stating:
- Combination / mixing rules
- Truncation / smoothing rules
- Tail corrections presence / absence
- Kspace algorithm and accuracy
- Intramolecular / bonded exclusions (1-2, 1-3, etc)
In practical terms, you should report your pair_modify
and special_bonds
lines, or look up the defaults and report those if you haven’t changed them.
"fix nve" and similar are integrators, not ensembles
The fixes fix nve
, fix nvt
and so on are integrators – that is, they update particles’ positions based on the calculated forces. While these integrators can include thermostats or barostats, these -stat components do not ensure that your simulation samples a particular thermodynamic ensemble, unless no additional forces are imposed.
To drive this point home, consider the following script fragment:
fix 1 all setforce 0 0 0
fix 2 all nvt temp 300 300 100
The fix nvt
integrator is used here, but clearly LAMMPS cannot sample the NVT ensemble using this script.