Dear Users,
I am trying to build my system using multiple files read option in read_data command (version 23Oct2015). Here is the commands I have used.
Dear Users,
I am trying to build my system using multiple files read option in read_data command (version 23Oct2015). Here is the commands I have used.
Please post your input script and small versions
of your data file(s) that trigger the problem.
Steve
Dear Steve,
Please find the attached Input script file and data files.
Thank You.
bulk.lammpsdata (780 KB)
in.lammps_replicate (453 Bytes)
molecule1.lammpsdata (1.63 KB)
Dear Steve,
Please find the attached Input script file and data files.
you need to apply the following change to read_data.cpp
diff --git a/src/read_data.cpp b/src/read_data.cpp
index dfafa8a..ea68d50 100644
--- a/src/read_data.cpp
+++ b/src/read_data.cpp
@@ -881,19 +881,19 @@ void ReadData::header(int firstpass)
} else if (strstr(line,"bonds")) {
sscanf(line,BIGINT_FORMAT,&nbonds);
if (addflag == NONE) atom->nbonds = nbonds;
- else atom->nbonds += nbonds;
+ else if (firstpass) atom->nbonds += nbonds;
} else if (strstr(line,"angles")) {
sscanf(line,BIGINT_FORMAT,&nangles);
if (addflag == NONE) atom->nangles = nangles;
- else atom->nangles += nangles;
+ else if (firstpass) atom->nangles += nangles;
} else if (strstr(line,"dihedrals")) {
sscanf(line,BIGINT_FORMAT,&ndihedrals);
if (addflag == NONE) atom->ndihedrals = ndihedrals;
- else atom->ndihedrals += ndihedrals;
+ else if (firstpass) atom->ndihedrals += ndihedrals;
} else if (strstr(line,"impropers")) {
sscanf(line,BIGINT_FORMAT,&nimpropers);
if (addflag == NONE) atom->nimpropers = nimpropers;
- else atom->nimpropers += nimpropers;
+ else if (firstpass) atom->nimpropers += nimpropers;
// Atom class type settings are only set by first data file
axel.