@@ -78,7 +78,7 @@ For floating point numbers in scientific notation, the Fortran double
7878precision notation "1.1d3" is not accepted; you have to use "1100",
7979"1100.0" or "1.1e3".
8080
81- Input file
81+ Input File
8282^^^^^^^^^^
8383
8484A LAMMPS input file is a text file with commands. It is read
@@ -161,7 +161,7 @@ recommended to always have an empty line at the end of an input file.
161161The specific details describing how LAMMPS input is processed and parsed
162162are explained in :doc: `Commands_parse `.
163163
164- Data file
164+ Data File
165165^^^^^^^^^
166166
167167A LAMMPS data file contains a description of a system suitable for
@@ -302,7 +302,7 @@ Molecule-ID', one for each atom in the system. For adding charges to
302302atom style molecular with fix property/atom, the "Atoms" section is now
303303formatted according to the atom style and a "Charges" section is added.
304304
305- Molecule file
305+ Molecule File
306306^^^^^^^^^^^^^
307307
308308Molecule files for use with the :doc: `molecule command <molecule >` look
@@ -376,7 +376,7 @@ if the molecule command is issued *before* the simulation box is
376376defined. Otherwise, the molecule command can derive the required
377377settings internally.
378378
379- Restart file
379+ Restart File
380380^^^^^^^^^^^^
381381
382382LAMMPS restart files are binary files and not available in text format.
@@ -409,6 +409,69 @@ are in the ``lmprestart.h`` header file.
409409LAMMPS restart files are not expected to be portable between platforms
410410or LAMMPS versions, but changes to the file format are rare.
411411
412+ .. _json-dump-files :
413+
414+ JSON Dump Files
415+ ^^^^^^^^^^^^^^^
416+
417+ LAMMPS can print information about molecules and other sets of atoms during
418+ a run, in JSON format. Several fixes currently support dumping JSON files
419+ in the 'molecules' style, including :doc: `fix bond/react <fix_bond_react >`
420+ and the *delete * keyword of :doc: `fix reaxff/species <fix_reaxff_species >`.
421+ The JSON 'dump molecules' format lists sets of atoms in the style of the
422+ :doc: `JSON molecule file <molecule >`, where more discussion of JSON schema
423+ can be found. Here is an generic example of a JSON output file that dumped
424+ one water molecule on the first timestep:
425+
426+ .. code-block :: json
427+
428+ {
429+ "application" : " LAMMPS" ,
430+ "units" : " real" ,
431+ "format" : " dump" ,
432+ "style" : " molecules" ,
433+ "revision" : 1 ,
434+ "timesteps" : [
435+ {
436+ "timestep" : 1 ,
437+ "molecules" : [
438+ {
439+ "types" : {
440+ "format" : [" atom-id" , " type" ],
441+ "data" : [
442+ [1368 , " H" ],
443+ [1366 , " O" ],
444+ [1367 , " H" ]
445+ ]
446+ },
447+ "coords" : {
448+ "format" : [" atom-id" , " x" , " y" , " z" ],
449+ "data" : [
450+ [1368 , 26.787767440427466 , 29.785528640296768 , 25.85197353660144 ],
451+ [1366 , 26.641801222582824 , 29.868106247702887 , 24.91285138212243 ],
452+ [1367 , 25.69611192416744 , 30.093425787807448 , 24.914380215672846 ]
453+ ]
454+ }
455+ }
456+ ]
457+ }
458+ ]
459+ }
460+
461+ The required first-level keys of the JSON format output are "application",
462+ "format", "style", "revision", and "timesteps", and optional keys are
463+ "units" and "title". The value of the "timesteps" key is an array of
464+ objects that contain data for each timestep on which a molecule was dumped,
465+ and the other first-level keys identify this JSON schema. The objects in
466+ "timesteps" contains two mandatory keys, "timestep" and "molecules". The
467+ "molecules" key is an array of :doc: `LAMMPS molecule JSON <molecule >`
468+ objects, and may contain other keys that contain metadata for each
469+ molecule. The "format" keys within molecule JSON objects are only printed
470+ once per output file, for brevity. The "atom-id" values are atom IDs from
471+ the simulation, and the "type" values are atom types. In the above
472+ example, the types were reported as strings corresponding to elements using
473+ :doc: `type labels <labelmap >`.
474+
412475.. Native Dump file
413476.. ^^^^^^^^^^^^^^^^
414477..
0 commit comments