Generating geometrically spaced trajectory data with geo-rev11.py and geometricdump.com,
and analyzing it in the cyclic modes of 2_time.py and s4_tb_fft_ww.py.
← / → or space · d toggles dark mode · click the slide counter to jump
The linear modes of 2_time.py and s4_tb_fft_ww.py work on linearly spaced dumps. That is fine until the
dynamics spread over many decades: a correlation function can only be evaluated at time separations that exist
in the saved trajectory, and a single linear spacing cannot cover all the decades at once.
Numbers for the production region used throughout these slides (106 steps ≈ 100 τα, 100k particles, ~1.2 MB per frame):
| Dump schedule | Frames / run | Size / run | Lag coverage |
|---|---|---|---|
| linear, every step | 106 | ~1.2 TB | everything |
| linear, every 1000 steps | 1,000 | 1.2 GB | nothing below 1 LJ; the first 3 decades are missing |
| geometric (25 dumps/cycle) | 2,775 | 3.3 GB | 1 step to full span, uniform in log t |
A single geometric series from step 1 to the end of the run would solve storage. It fails for a different reason. Correlation functions are averaged over initial times t0: the same separation t is measured from many starting frames. The translational overlap, for example:
The schedule is therefore built in two levels:
Cost: separations between the cycle length Λ and its multiples are coarser. In practice the set of available separations stays dense enough (slide 13 shows it exactly).
Generated live with the geo-rev11.py --small algorithm (geometric runtimes). Each tick is one frame.
The time axis is fixed at 160 LJ, so changing -t or the cycle count changes the coverage you see.
Top: the dumps in real (linear) time. Bottom: one row per cycle, each showing the time of its dumps measured from that cycle's own start, on a log axis. The rows are identical: every cycle repeats the same pattern.
Prints three text files that a LAMMPS loop reads line by line. One frame per DCD file.
| File | Contents |
|---|---|
run_times.txt | steps to run before each dump (argument to run) |
dump_times.txt | cumulative timestep of each dump (dump trigger / bookkeeping) |
file_names.txt | output filename for each frame |
| Option | Meaning |
|---|---|
-a [float] | (LJ time units) first geometric term. Without --old, as used here, this is the first runtime; with --old it would be the first dump offset. Values below one timestep floor to one timestep. |
-t [float] | (LJ time units) endpoint used with -a and -n to set the geometric ratio. Without --old, as used here, it is the largest single runtime and the span is whatever the runtimes sum to; the site solves this backwards from the span you ask for. |
-n [int] | (count) number of geometric terms. Without --old every runtime is at least one timestep, so no term is dropped and this is exactly the dump count. |
-d [float] | (LJ time units) simulation timestep, used to convert LJ times to integer timesteps. |
-r [int] | (count) number of times to repeat the generated sequence back to back. |
-c [int] | (file index) initial filename counter before each generated file increments it. Set this to the last already-used index; the first generated file is -c + 1. |
-m [int] | (timesteps) offset added to every cumulative dump time, used to continue the timestep counter after a previous sequence. |
--small | (mode flag) generate the simple geometric-series schedule used by this workflow. Without it, geo-rev11.py uses the older long-series mode. |
--old | (mode flag) treat the geometric terms as cumulative dump offsets and compute runtimes as their differences. This workflow does not use it: the runtimes are the geometric terms instead. |
--test | (diagnostic flag) print diagnostics instead of loop-file output. Do not use this output as LAMMPS schedule files. |
Choose the version that matches how the job will run. The ZIP includes both files for every long+short schedule.
traj1.dcd.run_times.txt and writes one DCD.START_FROM_RESTART and the newest valid CKPT_FILE;CKPT_WRITE_FIRST the slot that was not loaded and CKPT_WRITE_SECOND the loaded slot.read_restart;The launcher overrides these index variables with -var. The branch must appear before fresh atom creation because a resumed run uses read_restart instead.
The fresh path publishes an initial checkpoint atomically. The resume path must recreate required fixes because restart files store state but do not recreate the input script’s fix commands.
checkpoint_every is one complete short-sequence duration. Before the seam, restart times are measured from timestep zero; after the seam, they are phase-aligned with the repeated short sequences. At seamline, the scan replaces target_npt with tw_nve before writing the first short file (short1803.dcd in the worked example). If dt1 and dt2 differ, the downloaded template also converts the checkpoint interval between the two step grids and switches to dt2 at this seam.
write_dump.The fault-tolerance reference is an uninterrupted run using the same preempt-tolerant input and checkpoint schedule. The generated template protects the trajectory schedule; it cannot infer model-specific commands that belong to the surrounding simulation.
runtimek = ⌊t0 rk⌋; dump time = running sum.
-t sets the largest single gap. The sequence ends wherever the sum lands, so the site solves -t backwards from the span you ask for. No runtime can floor to zero, so -n is exactly the dump count.
Used for both sequences. Repeating the same runtime list still reproduces identical offsets in every cycle, which is what the analysis scripts verify.
dump offsetk = ⌊t0 rk⌋ exactly; runtime = difference from the previous dump.
The sequence ends exactly at -t, but early terms can floor onto each other and disappear.
Not used here. Shown for contrast: it is the alternative reading of the same geometric series.
Top: 27 dumps spanning 9 LJ with geometric runtimes, one sequence. Bottom: -a 0.001 -t 9 -n 27 --old -r 3, on the same linear axis.
Both production commands use --small; the non---small path is the legacy long-series mode and predates the current workflow.
System is equilibrated before recording. Every cycle start is an equivalent initial time.
Analyze with 2_time.py -G … and s4_tb_fft_ww.py -G ….
During aging, correlations depend on the waiting time tw, and the evolution is slow in log tw,
so one geometric series samples it with a few hundred frames. Analyze the long region with 2_time_aging.py
(explicit initial frames); analyze the short region in the unified scripts’ cyclic modes, starting at the right file index (-z).
You can hand-pick geo-rev11.py flags, but they interact: the ratio depends on -a, -t, -n,
and the stitch values -c and -m depend on the long sequence's output.
The site takes system-level inputs and derives the flags.
-n from the first run time, companions added after-n 27, -r = total/length-c, -m from the long output (+ the step-0 file)The reason for the specific defaults is dump density at τα: next slide.
A schedule can look reasonable and still measure τα badly. The available separations get sparse toward the end of a cycle and dense again right after the cycle boundary. The cycle length decides which region τα falls in.
At the default Λ = 0.9 τα, τα sits just past the cycle boundary, in dense spacing. Push Λ above τα and τα lands in the sparse tail of the cycle, where the nearest available separations are far apart.
dt1 = dt2 = 0.001, τα = 10 LJ, τequil = 200 LJ, production 100 τα, companions on.
Long sequence: one sequence whose runtimes are geometric,
ending at the seam so the largest gap matches the short sequence's final 2.66 LJ gap, with
665 terms (no runtime can floor to zero, so all 665 become schedule dumps),
first dump one timestep in, filename counter starting at 1 (the step-0 dump took traj1.dcd),
timestep counter starting at 0. The site then adds companions at +3 and +5 timesteps, bringing 665 dumps to 1,801:
Short sequences: 111 repeats of a sequence whose runtimes are geometric, each spanning 9 LJ = 0.9 τα with a goal of 27 dumps and the first dump 1 step in, continuing the filename counter from the long sequence and the timestep counter from its last dump:
| Long (with companions) | Short (production) | |
|---|---|---|
| dumps | 665 schedule + 1,136 companions = 1,801 | 111 cycles × 27 = 2,997 |
| files | traj2.dcd – traj1802.dcd | short1803.dcd – short4799.dcd |
| timesteps | 1 – 200,000 (= 200 LJ) | 200,001 – 1,199,000 (= 1,000 LJ past the seam) |
One short sequence (production cycle), in steps. Dump times, measured from the start of the sequence (the last is 9 LJ / 0.001 = 9,000). Offsets 4 and 5 are the default companion separations:
and the corresponding runtimes (the gaps between dumps):
The long sequence has one job: sample waiting time after the quench. Two things about it are already decided before you choose anything.
The last long dump lands on τequil, where production starts. Call it S in timesteps.
The widest gap in the long sequence is matched to the widest gap of a production cycle, G, so the sampling density does not jump at the seam.
Those two facts pin the ratio completely. The last gap of a geometric sequence ending at S is S(1 − 1/r), so setting it equal to G gives
Nothing is left to tune there. The only free choice is a1, the first dump time, and once you pick it the number of terms follows:
So a1 is the whole knob. It is the earliest waiting time you will ever be able to report, and it is also what sets the file count. The default is one timestep, the earliest possible.
Starting later saves less than you would expect. Once adjacent terms are closer together than one timestep, which happens below a1 = 1/(r − 1), they floor onto the same integer and collapse into a run of consecutive timesteps. Those dumps were going to be taken anyway, so pushing a1 right mostly discards early waiting times without buying much storage back.
One frame at waiting time T, paired with a later frame, gives a correlation value. But some quantities are correlations of the relaxation rate: how fast the correlation is falling at T. A rate is a difference, so it needs two frames close together at T, not one.
The production region gets this for free: its cycles repeat, so short separations exist everywhere. The aging region does not repeat, so if the schedule only records single frames, no rate can ever be recovered from it. The fix is to add a companion dump a few timesteps after each scheduled dump.
A rate at waiting time T needs a main dump δ0 plus nearby companions δ1, δ2; the next main dump is δ0′. Top: t < tx (companions land on scheduled dumps). Middle: t > tx (companions are extras in the gap). Bottom: gap versus waiting time with tx.
The separations are taken from the production cycle's own dump offsets, indexed by i. That is not decoration: it guarantees the same physical separation exists on both sides of the seam, so a rate means the same thing in the aging region and in production. It is also why the companions that would fall past the seam can simply be dropped, since the first production dumps already supply them.
Watch the plot as you move i. The red line is the crossover tx: left of it the schedule is already denser than the companion separation, so δ0′ arrives at or before the widest companion and those frames land on dumps that were being taken anyway; right of it every dump owns its own companions in the gap. Raising i pushes tx later; raising a1 throws away early waiting times.
The analysis scripts don't read dump_times.txt directly. The schedule is recovered from the DCD metadata.
The cyclic modes of 2_time.py and s4_tb_fft_ww.py both start with these steps
(L = frames per cycle, the -G argument):
Step 2 is why --small matters at generation time, and why a wrong -G
or -z fails immediately instead of producing wrong numbers.
-g N asks for N lag values, geometrically spaced between a first lag and the longest separation in the data.
The data only contains specific separations, so each requested value is moved to the closest one available.
When two requests land on the same separation it is kept once, which is why fewer values come out than went in.
-U sets the first requested lag. After the cycle is rotated to begin with its shortest gap, -U n (positive) starts at n times that gap.
-U 0, the old default, starts at 1.0 LJ, so no separations shorter than 1 LJ get requested. Try it below.
One script now handles both frame layouts. Supplying -G selects cyclic mode; omitting it selects linear mode.
traj<n>.dcd; count -n, prefix -N-d frames-a), Fs (-q), orientational correlations (--polyatomic*)-r runs)-s/-m, last initial time -k-f / -g / -w, --low-interval / --high-interval-P run-level workers, normally equal to -rshort<n>.dcd; count -n, prefix -N, first file -z-G, the true frames per cycle-UFor the worked example: average over 5 runs with 5 run-level workers, reading 2,997 short files per run starting at short1803.dcd, with 25 frames per cycle, requesting 50 geometric lags with the first lag one frame in:
* file tests: before computing, the script checks that every expected DCD file exists and opens readably
(--skip-file-tests skips this part; the cycle verification always runs). Cyclic mode needs at least 2 full cycles of frames.
--negvals is forced off in cyclic mode.
S4(q, tb): spatial correlations of mobility. For each interval length tb, particles get a mobility weight w(t0, t0+tb), the weights are binned on an FFT grid, and the structure factor of that field is computed. Output per tb: total, self, and distinct parts, with errors from across-run scatter. At least 2 runs required.
--W1-theta 0.25 (step function on displacement, same form as the overlap on slide 3) is the usual choice.
Also available: --W1-gauss, --W1-exp, --W1-dir-theta (angle in degrees; orientational, needs --polyatomic).--ta) and tc (--tc) offset the two intervals or make them unequal.
We usually leave both at 0, which compares an interval with itself. Nonzero values require explicit --W2-* options.-q discrete region, -v shell region, -l shell count).-x FFT grid size, -y box size.One script now handles both layouts. Supplying -G selects cyclic mode and adds the cycle steps from slide 12; omitting it selects linear mode.
-n; use -N traj for standard traj<n>.dcd files-d initial-time spacing in frames (default 10)-M margin in frames-x FFT grid, -y box size (both required)--ta), tc (--tc), usually 0; W1/W2 flags-q / -v / -l-k last initial time; -i one output file per tb; -r ≥ 2-P run-level workers, normally equal to -r-N (default short), count -n, first file -z-G, the true frames per cycle-U, --geom-terms-factor-d in cycles (default 1); -M in cycles-S; mismatches are skippedFor the worked example: average over 5 runs with 5 run-level workers, reading 2,775 files named short*.dcd starting at index 593, with 25 frames per cycle, 30 requested tb values, a 24³ FFT grid for a box of side 47.0, and a Heaviside mobility function (translational overlap) with threshold radius 0.25:
| Issue | Behavior / fix |
|---|---|
| re-running geo-rev11 without deleting outputs | schedules concatenate silently (append mode) |
| set_len is the dumps per cycle | with geometric runtimes no term is dropped, so -n 27 gives 27 dumps and -c 27 / -G 27. The wrong value fails the cycle check |
| forgetting the step-0 dump | it consumes the first filename; first generated file is index 2, and the first production file in the example is short1803.dcd (1 + 1,801 + 1) |
wrong -z in long+short data | long-sequence frames enter the cycle check and it fails |
--skip-file-tests | skips only the existence/readability tests; the cycle check always runs |
-U < 0 | unsupported; the script warns that this path is incorrect, so leave -U nonnegative |
| S4 with 1 run | hard error; errors come from across-run scatter |
ta or tc ≠ 0 without --W2-* | hard error |
| too few frames | cyclic 2_time.py needs at least 2 cycles; cyclic S4 warns if -M leaves too little room and may fail at the last tb |
The worked example end to end: dt1 = dt2 = 0.001, τα = 10 LJ, τequil = 200 LJ, production 100 τα, 5 runs.
-G takes the true dumps per sequence (25), not the generation -n goal (27).
-z 1803 = 1 step-0 file + 1,801 long files (with companions) + 1.
geo-rev11.py | generates the schedule files (run_times, dump_times, file_names) for the LAMMPS loop |
| geometricdump.com | derives the geo-rev11 flags from dt1/dt2, τα, τequil; emits both commands and the files |
2_time.py | MSD, overlap, Fs, orientational correlations; -G selects cyclic dumps |
s4_tb_fft_ww.py | S4(q, tb); -G selects cyclic dumps |
2_time_aging.py | two-time correlations vs (tw, tw+t) for the long-sequence region |
Repo docs: files_readme/, geometric-dumping/README.md.