Commit af3d0ca3 authored by sjplimp's avatar sjplimp Committed by GitHub
Browse files

Merge pull request #593 from akohlmey/collected-bug-fixes-and-small-updates

Collected bug fixes and small updates
parents 5c13b087 c24e316b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ These are the sample problems and their output in the various
sub-directories:

accelerate: use of all the various accelerator packages
airebo:   example for using AIREBO and AIREBO-M
balance:  dynamic load balancing, 2d system
body:     body particles, 2d system
cmap:     CMAP 5-body contributions to CHARMM force field
+20 −0
Original line number Diff line number Diff line
@@ -1617,6 +1617,12 @@ void FixShake::shake3(int m)

    lamda01 = lamda01_new;
    lamda02 = lamda02_new;

    // stop iterations before we have a floating point overflow
    // max double is < 1.0e308, so 1e150 is a reasonable cutoff

    if (fabs(lamda01) > 1e150 || fabs(lamda02) > 1e150) done = 1;

    niter++;
  }

@@ -1854,6 +1860,13 @@ void FixShake::shake4(int m)
    lamda01 = lamda01_new;
    lamda02 = lamda02_new;
    lamda03 = lamda03_new;

    // stop iterations before we have a floating point overflow
    // max double is < 1.0e308, so 1e150 is a reasonable cutoff

    if (fabs(lamda01) > 1e150 || fabs(lamda02) > 1e150
        || fabs(lamda03) > 1e150) done = 1;

    niter++;
  }

@@ -2097,6 +2110,13 @@ void FixShake::shake3angle(int m)
    lamda01 = lamda01_new;
    lamda02 = lamda02_new;
    lamda12 = lamda12_new;

    // stop iterations before we have a floating point overflow
    // max double is < 1.0e308, so 1e150 is a reasonable cutoff

    if (fabs(lamda01) > 1e150 || fabs(lamda02) > 1e150
        || fabs(lamda12) > 1e150) done = 1;

    niter++;
  }

+1 −1
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ double PairLJCutTholeLong::init_one(int i, int j)
  lj3[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],12.0);
  lj4[i][j] = 4.0 * epsilon[i][j] * pow(sigma[i][j],6.0);

  if (offset_flag) {
  if (offset_flag && (cut_lj[i][j] > 0.0)) {
    double ratio = sigma[i][j] / cut_lj[i][j];
    offset[i][j] = 4.0 * epsilon[i][j] * (pow(ratio,12.0) - pow(ratio,6.0));
  } else offset[i][j] = 0.0;
+0 −3
Original line number Diff line number Diff line
@@ -296,7 +296,6 @@ void PairMorseSmoothLinear::read_restart(FILE *fp)
void PairMorseSmoothLinear::write_restart_settings(FILE *fp)
{
  fwrite(&cut_global,sizeof(double),1,fp);
  // fwrite(&offset_flag,sizeof(int),1,fp);
  fwrite(&mix_flag,sizeof(int),1,fp);
}

@@ -308,11 +307,9 @@ void PairMorseSmoothLinear::read_restart_settings(FILE *fp)
{
  if (comm->me == 0) {
    fread(&cut_global,sizeof(double),1,fp);
    // fread(&offset_flag,sizeof(int),1,fp);
    fread(&mix_flag,sizeof(int),1,fp);
  }
  MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
  // MPI_Bcast(&offset_flag,1,MPI_INT,0,world);
  MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
}

+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ int Make_List(int n, int num_intrs, int type, reax_list *l, MPI_Comm comm)
  l->num_intrs = num_intrs;

  if (l->index) sfree(l->index, "list:index");
  if (l->end_index) sfree(l->index, "list:end_index");
  if (l->end_index) sfree(l->end_index, "list:end_index");
  l->index = (int*) smalloc( n * sizeof(int), "list:index", comm );
  l->end_index = (int*) smalloc( n * sizeof(int), "list:end_index", comm );

Loading