[lammps-users] File Size Limitations

Hi everyone,

I am just starting to use lammps and encountered a surprising problem. I
am writing large dump.xyz files 100,000 time steps sampled every time
step. I noticed the program crash after ~35,000 steps. This crash was
reproducible. Has anyone else noticed something similar? any ideas?

thanks much

Matthew Wander
Department of Geosciences
SUNY at Stony Brook


If you are using a linux machine, there is likely a 2GB individual
filesize limit. I think there are ways of getting around this in linux,
but the easiest way to get around it is to just dump to multiple files.
Just use the undump command after your run command, and start a new dump
file. Like this...

dump 1 all atom 1 dump.1
run 10000

undump 1

dump 2 all atom 1 dump.2
run 10000

Hope this helps...


You don't say which OS you are running on, but Linux, for example, has by
default a file size limit of 2Gb (due to using 32bit addressing), which
you are probably exceeding. You can recompile LAMMPS to use a 64bit file
address space (if you are using a newish version of linux - say > 2.4) by
adding the following flags to the compiler's CCFLAGS:



In addition to the suggestions others have offered, if
you specify the dump file name as mydump.* then
one dumpfile per snapshot will be written. Thus no
single file will be huge. This and other options are
discussed on the dump doc page.


Hello List,

Could anyone help me with these two questions:

  1. I am still running an old version of lammps. Is it possible to download the latest version with all the patches at once?

  2. I want to compute the free energy of sorption of small molecules in a polymer system. Do you know of any way
    to do this (or compute the chemical potential of the small molecule) using lammps? If you have additional routines
    to help do this that you are willing to share, or know of other open source codes that do this, please let me know.


On your first question, the answer is yes. Just download the “LAMMPS upgrade” tarball here:


It has all of the bug fixes to date.

Your second question is harder. We have done free energy calcs using LAMMPS. And we do have some extra code that helps with this. Naveen wrote some LAMMPS patches for this purpose last summer. Our strategy was essentially the same as the one found in this and related papers: JCC vol 25, No 1, pp 28 - 39. “Improving the Efficiency and Reliability of Free Energy Perturbation Calculations Using Overlap Sampling Methods”.