From e8eca75cb3aa7328b546e23573f5513ce27459b7 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Mon, 6 Jan 2014 16:23:24 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11138
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/dump_modify.html | 36 ++++++++++++++++++++++++++++--------
doc/dump_modify.txt | 36 ++++++++++++++++++++++++++++--------
2 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/doc/dump_modify.html b/doc/dump_modify.html
index ce27761188..7bc0bbe4c2 100644
--- a/doc/dump_modify.html
+++ b/doc/dump_modify.html
@@ -253,15 +253,35 @@ the output in that file is current (no buffering by the OS), even if
LAMMPS halts before the simulation completes. Flushes cannot be
performed with dump style xtc.
+
+
The text-based dump styles have a default C-style format string which
-simply specifies %d for integers and %g for real values. The format
-keyword can be used to override the default with a new C-style format
-string. Do not include a trailing "\n" newline character in the
-format string. This option has no effect on the dcd and xtc dump
-styles since they write binary files. Note that for the cfg style,
-the first two fields (atom id and type) are not actually written into
-the CFG file, though you must include formats for them in the format
-string.
+simply specifies %d for integers and %g for floating-point values.
+The format keyword can be used to override the default with a new
+C-style format string. Do not include a trailing "\n" newline
+character in the format string. This option has no effect on the
+dcd and xtc dump styles since they write binary files. Note that
+for the cfg style, the first two fields (atom id and type) are not
+actually written into the CFG file, though you must include formats
+for them in the format string.
+
+IMPORTANT NOTE: Any value written to a text-based dump file that is a
+per-atom quantity calculated by a compute or
+fix is stored internally as a floating-point value. If the
+value is actually an integer and you wish it to appear in the text
+dump file as a (large) integer, then you need to use an appropriate
+format. For example, these commands:
+
+compute 1 all property/local batom1 batom2
+dump 1 all local 100 tmp.bonds index c_11 c_12
+dump_modify 1 format "%d %0.0f %0.0f"
+
+will output the two atom IDs for atoms in each bond as integers. If
+the dump_modify command were omitted, they would appear as
+floating-point values, assuming they were large integers (more than 6
+digits). The "index" keyword should use the "%d" format since it is
+not generated by a compute or fix, and is stored internally as an
+integer.
diff --git a/doc/dump_modify.txt b/doc/dump_modify.txt
index dfb3073aa4..7c27b2604d 100644
--- a/doc/dump_modify.txt
+++ b/doc/dump_modify.txt
@@ -241,15 +241,35 @@ the output in that file is current (no buffering by the OS), even if
LAMMPS halts before the simulation completes. Flushes cannot be
performed with dump style {xtc}.
+:line
+
The text-based dump styles have a default C-style format string which
-simply specifies %d for integers and %g for real values. The {format}
-keyword can be used to override the default with a new C-style format
-string. Do not include a trailing "\n" newline character in the
-format string. This option has no effect on the {dcd} and {xtc} dump
-styles since they write binary files. Note that for the {cfg} style,
-the first two fields (atom id and type) are not actually written into
-the CFG file, though you must include formats for them in the format
-string.
+simply specifies %d for integers and %g for floating-point values.
+The {format} keyword can be used to override the default with a new
+C-style format string. Do not include a trailing "\n" newline
+character in the format string. This option has no effect on the
+{dcd} and {xtc} dump styles since they write binary files. Note that
+for the {cfg} style, the first two fields (atom id and type) are not
+actually written into the CFG file, though you must include formats
+for them in the format string.
+
+IMPORTANT NOTE: Any value written to a text-based dump file that is a
+per-atom quantity calculated by a "compute"_compute.html or
+"fix"_fix.html is stored internally as a floating-point value. If the
+value is actually an integer and you wish it to appear in the text
+dump file as a (large) integer, then you need to use an appropriate
+format. For example, these commands:
+
+compute 1 all property/local batom1 batom2
+dump 1 all local 100 tmp.bonds index c_1[1] c_1[2]
+dump_modify 1 format "%d %0.0f %0.0f" :pre
+
+will output the two atom IDs for atoms in each bond as integers. If
+the dump_modify command were omitted, they would appear as
+floating-point values, assuming they were large integers (more than 6
+digits). The "index" keyword should use the "%d" format since it is
+not generated by a compute or fix, and is stored internally as an
+integer.
:line