Unverified Commit 0666607c authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #815 from akohlmey/collected-small-fixes

Collected small cleanups, fixes, and enhancements
parents 77efd3df b1d3b56a
Loading
Loading
Loading
Loading
+21 −14
Original line number Diff line number Diff line
@@ -15,10 +15,11 @@ read_data file keyword args ... :pre
file = name of data file to read in :ulb,l
zero or more keyword/arg pairs may be appended :l
keyword = {add} or {offset} or {shift} or {extra/atom/types} or {extra/bond/types} or {extra/angle/types} or {extra/dihedral/types} or {extra/improper/types} or {extra/bond/per/atom} or {extra/angle/per/atom} or {extra/dihedral/per/atom} or {extra/improper/per/atom} or {group} or {nocoeff} or {fix} :l
  {add} arg = {append} or {Nstart} or {merge}
    append = add new atoms with IDs appended to current IDs
    Nstart = add new atoms with IDs starting with Nstart
    merge = add new atoms with their IDs unchanged
  {add} arg = {append} or {IDoffset} or {IDoffset MOLoffset} or {merge}
    append = add new atoms with atom IDs appended to current IDs
    IDoffset = add new atoms with atom IDs having IDoffset added
    MOLoffset = add new atoms with molecule IDs having MOLoffset added (only when molecule IDs are enabled)
    merge = add new atoms with their atom IDs (and molecule IDs) unchanged
  {offset} args = toff boff aoff doff ioff
    toff = offset to add to atom types
    boff = offset to add to bond types
@@ -120,20 +121,26 @@ boundary, then the atoms may become far apart if the box size grows.
This will separate the atoms in the bond, which can lead to "lost"
bond atoms or bad dynamics.

The three choices for the {add} argument affect how the IDs of atoms
in the data file are treated.  If {append} is specified, atoms in the
data file are added to the current system, with their atom IDs reset
so that an atomID = M in the data file becomes atomID = N+M, where N
is the largest atom ID in the current system.  This rule is applied to
all occurrences of atom IDs in the data file, e.g. in the Velocity or
Bonds section.  If {Nstart} is specified, then {Nstart} is a numeric
value is given, e.g. 1000, so that an atomID = M in the data file
becomes atomID = 1000+M.  If {merge} is specified, the data file atoms
The three choices for the {add} argument affect how the atom IDs and
molecule IDs of atoms in the data file are treated.  If {append} is
specified, atoms in the data file are added to the current system,
with their atom IDs reset so that an atomID = M in the data file
becomes atomID = N+M, where N is the largest atom ID in the current
system.  This rule is applied to all occurrences of atom IDs in the
data file, e.g. in the Velocity or Bonds section. This is also done
for molecule IDs, if the atom style does support molecule IDs or
they are enabled via fix property/atom. If {IDoffset} is specified,
then {IDoffset} is a numeric value is given, e.g. 1000, so that an
atomID = M in the data file becomes atomID = 1000+M. For systems
with enabled molecule IDs, another numerical argument {MOLoffset}
is required representing the equivalent offset for molecule IDs.
If {merge} is specified, the data file atoms
are added to the current system without changing their IDs.  They are
assumed to merge (without duplication) with the currently defined
atoms.  It is up to you to insure there are no multiply defined atom
IDs, as LAMMPS only performs an incomplete check that this is the case
by insuring the resulting max atomID >= the number of atoms.
by insuring the resulting max atomID >= the number of atoms. For
molecule IDs, there is no check done at all.

The {offset} and {shift} keywords can only be used if the {add}
keyword is also specified.
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ PairLJClass2CoulLong::~PairLJClass2CoulLong()
      memory->destroy(offset);
    }
  }
  if (ftable) free_tables();
}

/* ---------------------------------------------------------------------- */
+1 −1
Original line number Diff line number Diff line
@@ -364,7 +364,7 @@ void PairEDIPMulti::edip_fc(double r, Param *param, double &f, double &fdr)
  double c = param->cutoffC;
  double alpha = param->alpha;
  double x;
  double v1, v2, v3;
  double v1, v2;

  if(r < c + 1E-6)
  {
+1 −0
Original line number Diff line number Diff line
@@ -1700,6 +1700,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
    jnum = numneigh[i];
    offseti = offset[itype];
    lj1i = lj1[itype]; lj2i = lj2[itype]; lj3i = lj3[itype]; lj4i = lj4[itype];
    fxtmp = fytmp = fztmp = 0.0;

    for (jj = 0; jj < jnum; jj++) {
      j = jlist[jj];
+3 −2
Original line number Diff line number Diff line
@@ -822,8 +822,8 @@ void Atom::deallocate_topology()
   call style-specific routine to parse line
------------------------------------------------------------------------- */

void Atom::data_atoms(int n, char *buf, tagint id_offset, int type_offset,
                      int shiftflag, double *shift)
void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset,
                      int type_offset, int shiftflag, double *shift)
{
  int m,xptr,iptr;
  imageint imagedata;
@@ -948,6 +948,7 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, int type_offset,
        coord[2] >= sublo[2] && coord[2] < subhi[2]) {
      avec->data_atom(xdata,imagedata,values);
      if (id_offset) tag[nlocal-1] += id_offset;
      if (mol_offset) molecule[nlocal-1] += mol_offset;
      if (type_offset) {
        type[nlocal-1] += type_offset;
        if (type[nlocal-1] > ntypes)
Loading