diff --git a/doc/src/fix_property_atom.rst b/doc/src/fix_property_atom.rst index c7bf3f8c37..b6f6560770 100644 --- a/doc/src/fix_property_atom.rst +++ b/doc/src/fix_property_atom.rst @@ -180,7 +180,9 @@ atom-ID, the next two are a molecule-ID and a floating point value that will be stored in a new property called "flag". If a per-atom array was specified in the fix property/atom commmand then the *N* values for that array must be specified consecutively for that -property on each line. +property on each line. Note that the order of values on each line +corresponds to the order of custom names in the fix property/atom +command. Note that the the lines of per-atom properties can be listed in any order. Also note that all the per-atom properties specified by the @@ -301,12 +303,14 @@ uninterrupted fashion. .. warning:: - When reading data from a restart file, this fix command has to be specified - **exactly** the same way as before. LAMMPS will only check whether a - fix is of the same style and has the same fix ID and in case of a match - will then try to initialize the fix with the data stored in the binary - restart file. If the fix property/atom command does not match exactly, - data can be corrupted or LAMMPS may crash. + When reading data from a restart file, this fix command has to be + specified **exactly** the same was in the input script that created + the restart file. LAMMPS will only check whether a fix is of the + same style and has the same fix ID and in case of a match will then + try to initialize the fix with the data stored in the binary + restart file. If the names and associated date types in the new + fix property/atom command do not match the old one exactly, data + can be corrupted or LAMMPS may crash. None of the :doc:`fix_modify ` options are relevant to this fix. No global or per-atom quantities are stored by this fix for diff --git a/doc/src/read_data.rst b/doc/src/read_data.rst index 18cc24ffff..5b5c951688 100644 --- a/doc/src/read_data.rst +++ b/doc/src/read_data.rst @@ -66,8 +66,8 @@ simulation. The file can be ASCII text or a gzipped text file (detected by a .gz suffix). This is one of 3 ways to specify initial atom coordinates; see the :doc:`read_restart ` and :doc:`create_atoms ` commands for alternative methods. -Also see the explanation of the :doc:`-restart command-line switch ` which can convert a restart file to a data -file. +Also see the explanation of the :doc:`-restart command-line switch +` which can convert a restart file to a data file. This command can be used multiple times to add new atoms and their properties to an existing system by using the *add*, *offset*, and @@ -246,22 +246,22 @@ appear in any order, with a few exceptions as noted below. The keyword *fix* can be used one or more times. Each usage specifies a fix that will be used to process a specific portion of the data -file. Any header line containing *header-string* and any section with -a name containing *section-string* will be passed to the specified +file. Any header line containing *header-string* and any section that +is an exact match to *section-string* will be passed to the specified fix. See the :doc:`fix property/atom ` command for -an example of a fix that operates in this manner. The page for -the fix defines the syntax of the header line(s) and section(s) that -it reads from the data file. Note that the *header-string* can be +an example of a fix that operates in this manner. The doc page for +the fix defines the syntax of the header line(s) and section that it +reads from the data file. Note that the *header-string* can be specified as NULL, in which case no header lines are passed to the -fix. This means that it can infer the length of its Section from +fix. This means the fix can infer the length of its Section from standard header settings, such as the number of atoms. The formatting of individual lines in the data file (indentation, spacing between words and numbers) is not important except that header and section keywords (e.g. atoms, xlo xhi, Masses, Bond Coeffs) must -be capitalized as shown and can't have extra white-space between their -words - e.g. two spaces or a tab between the 2 words in "xlo xhi" or -the 2 words in "Bond Coeffs", is not valid. +be capitalized as shown and cannot have extra white-space between +their words - e.g. two spaces or a tab between the 2 words in "xlo +xhi" or the 2 words in "Bond Coeffs", is not valid. ---------- diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 3acaf6535e..3f70d242b1 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -1551,8 +1551,6 @@ 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/read_data.cpp b/src/read_data.cpp index 12ad6c3b8c..c33c65f676 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -509,21 +509,6 @@ void ReadData::command(int narg, char **arg) while (strlen(keyword)) { - // if special fix matches, it processes section - - if (nfix) { - int i; - for (i = 0; i < nfix; i++) - if (strcmp(keyword,fix_section[i]) == 0) { - if (firstpass) fix(fix_index[i],keyword); - else skip_lines(modify->fix[fix_index[i]]-> - read_data_skip_lines(keyword)); - parse_keyword(0); - break; - } - if (i < nfix) continue; - } - if (strcmp(keyword,"Atoms") == 0) { atomflag = 1; if (firstpass) { @@ -728,8 +713,22 @@ void ReadData::command(int narg, char **arg) if (firstpass) impropercoeffs(1); else skip_lines(nimpropertypes); - } else error->all(FLERR,"Unknown identifier in data file: {}", - keyword); + // if specified fix matches, it processes section + + } else if (nfix) { + int i; + for (i = 0; i < nfix; i++) + if (strcmp(keyword,fix_section[i]) == 0) { + if (firstpass) fix(fix_index[i],keyword); + else skip_lines(modify->fix[fix_index[i]]-> + read_data_skip_lines(keyword)); + parse_keyword(0); + break; + } + if (i == nfix) + error->all(FLERR,"Unknown identifier in data file: {}",keyword); + + } else error->all(FLERR,"Unknown identifier in data file: {}",keyword); parse_keyword(0); } diff --git a/src/utils.cpp b/src/utils.cpp index 7a7a03946e..528908807c 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -656,9 +656,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; }