From cf25a586bd961c396f1e6c24e71b7bf3dbdd89c1 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 18 Aug 2021 13:07:49 -0600 Subject: [PATCH] debugging merged version --- doc/src/dump.rst | 33 +++++++++++++++++++-------------- src/dump_custom.cpp | 2 ++ src/utils.cpp | 6 +++--- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/doc/src/dump.rst b/doc/src/dump.rst index 1b81e23e28..998498d1d4 100644 --- a/doc/src/dump.rst +++ b/doc/src/dump.rst @@ -569,10 +569,11 @@ Nprocs-1) that currently owns the atom. *Procp1* is the proc ID+1, which can be convenient in place of a *type* attribute (1 to Ntypes) for coloring atoms in a visualization program. *Type* is the atom type (1 to Ntypes). *Element* is typically the chemical name of an -element, which you must assign to each type via the :doc:`dump_modify element ` command. More generally, it can be any -string you wish to associated with an atom type. *Mass* is the atom -mass. *Vx*, *vy*, *vz*, *fx*, *fy*, *fz*, and *q* are components of -atom velocity and force and atomic charge. +element, which you must assign to each type via the :doc:`dump_modify +element ` command. More generally, it can be any string +you wish to associated with an atom type. *Mass* is the atom mass. +*Vx*, *vy*, *vz*, *fx*, *fy*, *fz*, and *q* are components of atom +velocity and force and atomic charge. There are several options for outputting atom coordinates. The *x*, *y*, *z* attributes write atom coordinates "unscaled", in the @@ -646,11 +647,12 @@ above for how I can be specified with a wildcard asterisk to effectively specify multiple values. The *f_ID* and *f_ID[I]* attributes allow vector or array per-atom -quantities calculated by a :doc:`fix ` to be output. The ID in the -attribute should be replaced by the actual ID of the fix that has been -defined previously in the input script. The :doc:`fix ave/atom ` command is one that calculates per-atom -quantities. Since it can time-average per-atom quantities produced by -any :doc:`compute `, :doc:`fix `, or atom-style +quantities calculated by a :doc:`fix ` to be output. The ID in +the attribute should be replaced by the actual ID of the fix that has +been defined previously in the input script. The :doc:`fix ave/atom +` command is one that calculates per-atom quantities. +Since it can time-average per-atom quantities produced by any +:doc:`compute `, :doc:`fix `, or atom-style :doc:`variable `, this allows those time-averaged results to be written to a dump file. @@ -667,10 +669,10 @@ should be replaced by the actual name of the variable that has been defined previously in the input script. Only an atom-style variable can be referenced, since it is the only style that generates per-atom values. Variables of style *atom* can reference individual atom -attributes, per-atom attributes, thermodynamic keywords, or -invoke other computes, fixes, or variables when they are evaluated, so -this is a very general means of creating quantities to output to a -dump file. +attributes, per-atom attributes, thermodynamic keywords, or invoke +other computes, fixes, or variables when they are evaluated, so this +is a very general means of creating quantities to output to a dump +file. The *i_name*, *d_name*, *i2_name*, *d2_name* attributes refer to per-atom integer and floating-point vectors or arrays that have been @@ -678,7 +680,10 @@ added via the :doc:`fix property/atom ` command. When that command is used specific names are given to each attribute which are the "name" portion of these keywords. For arrays *i2_name* and *d2_name*, the column of the array must also be included following -the name in brackets: e.g. d2_xyz[2], i2_mySpin[3]. +the name in brackets: e.g. d2_xyz[I], i2_mySpin[I], where I is in the +range from 1-M, where M is the number of columns in the custom array. +See the discussion above for how I can be specified with a wildcard +asterisk to effectively specify multiple values. See the :doc:`Modify ` page for information on how to add new compute and fix styles to LAMMPS to calculate per-atom quantities diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 68a2ab4a57..e7ad930019 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -1554,6 +1554,8 @@ int DumpCustom::parse_fields(int narg, char **arg) n = atom->find_custom(name,flag,cols); + printf("NAME %s\n",name); + if (n < 0) error->all(FLERR,"Could not find custom per-atom property ID: {}", name); if (argindex[iarg] == 0) { diff --git a/src/utils.cpp b/src/utils.cpp index fd3170859b..d63cd1d1c4 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -693,9 +693,9 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod } } - //printf("NEWARG %d\n",newarg); - //for (int i = 0; i < newarg; i++) - // printf(" arg %d: %s\n",i,earg[i]); + printf("NEWARG %d\n",newarg); + for (int i = 0; i < newarg; i++) + printf(" arg %d: %s\n",i,earg[i]); return newarg; }