Unverified Commit 9bedd0d0 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1584 from akohlmey/bonded-hybrid-restart

Correct restarting of bonded hybrid styles for table styles
parents f4df5176 18730e0f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -143,6 +143,16 @@ instructions on how to use the accelerated styles effectively.

:line

[Restart info:]

This angle style writes the settings for the "angle_style table"
command to "binary restart files"_restart.html, so a angle_style
command does not need to specified in an input script that reads a
restart file.  However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files.  Thus,
angle_coeff commands do need to be specified in the restart input
script.

[Restrictions:]

This angle style can only be used if LAMMPS was built with the
+10 −0
Original line number Diff line number Diff line
@@ -140,6 +140,16 @@ instructions on how to use the accelerated styles effectively.

:line

[Restart info:]

This bond style writes the settings for the "bond_style table"
command to "binary restart files"_restart.html, so a bond_style
command does not need to specified in an input script that reads a
restart file.  However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files.  Thus,
bond_coeff commands do need to be specified in the restart input
script.

[Restrictions:]

This bond style can only be used if LAMMPS was built with the MOLECULE
+10 −0
Original line number Diff line number Diff line
@@ -191,6 +191,16 @@ switch"_Run_options.html when you invoke LAMMPS, or you can use the
See the "Speed packages"_Speed_packages.html doc page for more
instructions on how to use the accelerated styles effectively.

[Restart info:]

This dihedral style writes the settings for the "dihedral_style table"
command to "binary restart files"_restart.html, so a dihedral_style
command does not need to specified in an input script that reads a
restart file.  However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files.  Thus,
dihedral_coeff commands do need to be specified in the restart input
script.

[Restrictions:]

This dihedral style can only be used if LAMMPS was built with the
+10 −0
Original line number Diff line number Diff line
@@ -189,6 +189,16 @@ Note that one file can contain many sections, each with a tabulated
potential. LAMMPS reads the file section by section until it finds one
that matches the specified keyword.

[Restart info:]

This dihedral style writes the settings for the "dihedral_style table/cut"
command to "binary restart files"_restart.html, so a dihedral_style
command does not need to specified in an input script that reads a
restart file.  However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files.  Thus,
dihedral_coeff commands do need to be specified in the restart input
script.

[Restrictions:]

This dihedral style can only be used if LAMMPS was built with the
+20 −3
Original line number Diff line number Diff line
@@ -277,6 +277,25 @@ double AngleTable::equilibrium_angle(int i)
 ------------------------------------------------------------------------- */

void AngleTable::write_restart(FILE *fp)
{
  write_restart_settings(fp);
}

/* ----------------------------------------------------------------------
    proc 0 reads from restart file, bcasts
 ------------------------------------------------------------------------- */

void AngleTable::read_restart(FILE *fp)
{
  read_restart_settings(fp);
  allocate();
}

/* ----------------------------------------------------------------------
   proc 0 writes to restart file
 ------------------------------------------------------------------------- */

void AngleTable::write_restart_settings(FILE *fp)
{
  fwrite(&tabstyle,sizeof(int),1,fp);
  fwrite(&tablength,sizeof(int),1,fp);
@@ -286,7 +305,7 @@ void AngleTable::write_restart(FILE *fp)
    proc 0 reads from restart file, bcasts
 ------------------------------------------------------------------------- */

void AngleTable::read_restart(FILE *fp)
void AngleTable::read_restart_settings(FILE *fp)
{
  if (comm->me == 0) {
    fread(&tabstyle,sizeof(int),1,fp);
@@ -294,8 +313,6 @@ void AngleTable::read_restart(FILE *fp)
  }
  MPI_Bcast(&tabstyle,1,MPI_INT,0,world);
  MPI_Bcast(&tablength,1,MPI_INT,0,world);

  allocate();
}

/* ---------------------------------------------------------------------- */
Loading