Commit 57c7db4e authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1320 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 622edf4d
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -192,14 +192,20 @@ void AngleHybrid::coeff(int which, int narg, char **arg)
    if (strcmp(arg[1],keywords[m]) == 0) break;
  if (m == nstyles) error->all("Angle coeff for hybrid has invalid style");

  // set low-level coefficients for each angletype
  // replace 2nd arg with i, call coeff() with no 1st arg
  // move 1st arg to 2nd arg
  // just copy ptrs, since arg[] points into original input line

  arg[1] = arg[0];

  // invoke sub-style coeff() starting with 1st arg

  if (styles[m]) styles[m]->coeff(which,narg-1,&arg[1]);

  // set setflag and which type maps to which sub-style
  // if sub-style is NULL for "none", still set setflag

  for (int i = ilo; i <= ihi; i++) {
    sprintf(arg[1],"%d",i);
    map[i] = m;
    if (styles[m]) styles[m]->coeff(which,narg-1,&arg[1]);
    if (styles[m] == NULL) setflag[i] = 1;
    else setflag[i] = styles[m]->setflag[i];
  }
+10 −4
Original line number Diff line number Diff line
@@ -191,14 +191,20 @@ void BondHybrid::coeff(int narg, char **arg)
    if (strcmp(arg[1],keywords[m]) == 0) break;
  if (m == nstyles) error->all("Bond coeff for hybrid has invalid style");

  // set low-level coefficients for each bondtype
  // replace 2nd arg with i, call coeff() with no 1st arg
  // move 1st arg to 2nd arg
  // just copy ptrs, since arg[] points into original input line

  arg[1] = arg[0];

  // invoke sub-style coeff() starting with 1st arg

  if (styles[m]) styles[m]->coeff(narg-1,&arg[1]);

  // set setflag and which type maps to which sub-style
  // if sub-style is NULL for "none", still set setflag

  for (int i = ilo; i <= ihi; i++) {
    sprintf(arg[1],"%d",i);
    map[i] = m;
    if (styles[m]) styles[m]->coeff(narg-1,&arg[1]);
    setflag[i] = 1;
  }
}
+10 −4
Original line number Diff line number Diff line
@@ -194,14 +194,20 @@ void DihedralHybrid::coeff(int which, int narg, char **arg)
    if (strcmp(arg[1],keywords[m]) == 0) break;
  if (m == nstyles) error->all("Dihedral coeff for hybrid has invalid style");

  // set low-level coefficients for each dihedraltype
  // replace 2nd arg with i, call coeff() with no 1st arg
  // move 1st arg to 2nd arg
  // just copy ptrs, since arg[] points into original input line

  arg[1] = arg[0];

  // invoke sub-style coeff() starting with 1st arg

  if (styles[m]) styles[m]->coeff(which,narg-1,&arg[1]);

  // set setflag and which type maps to which sub-style
  // if sub-style is NULL for "none", still set setflag

  for (int i = ilo; i <= ihi; i++) {
    sprintf(arg[1],"%d",i);
    map[i] = m;
    if (styles[m]) styles[m]->coeff(which,narg-1,&arg[1]);
    if (styles[m] == NULL) setflag[i] = 1;
    else setflag[i] = styles[m]->setflag[i];
  }
+10 −4
Original line number Diff line number Diff line
@@ -194,14 +194,20 @@ void ImproperHybrid::coeff(int which, int narg, char **arg)
    if (strcmp(arg[1],keywords[m]) == 0) break;
  if (m == nstyles) error->all("Improper coeff for hybrid has invalid style");

  // set low-level coefficients for each impropertype
  // replace 2nd arg with i, call coeff() with no 1st arg
  // move 1st arg to 2nd arg
  // just copy ptrs, since arg[] points into original input line

  arg[1] = arg[0];

  // invoke sub-style coeff() starting with 1st arg

  if (styles[m]) styles[m]->coeff(which,narg-1,&arg[1]);

  // set setflag and which type maps to which sub-style
  // if sub-style is NULL for "none", still set setflag

  for (int i = ilo; i <= ihi; i++) {
    sprintf(arg[1],"%d",i);
    map[i] = m;
    if (styles[m]) styles[m]->coeff(which,narg-1,&arg[1]);
    if (styles[m] == NULL) setflag[i] = 1;
    else setflag[i] = styles[m]->setflag[i];
  }
+3 −2
Original line number Diff line number Diff line
@@ -272,9 +272,10 @@ void PairHybrid::coeff(int narg, char **arg)
  }

  // move 1st/2nd args to 2nd/3rd args
  // just copy ptrs, since arg[] points into original input line

  sprintf(arg[2],"%s",arg[1]);
  sprintf(arg[1],"%s",arg[0]);
  arg[2] = arg[1];
  arg[1] = arg[0];

  // invoke sub-style coeff() starting with 1st arg

Loading