read/write settings in restart files for bonded hybrid styles
this allows to properly restart table styles, which require additional settings unlike all other bonded styles.
This commit is contained in:
@ -324,6 +324,7 @@ void AngleHybrid::write_restart(FILE *fp)
|
||||
n = strlen(keywords[m]) + 1;
|
||||
fwrite(&n,sizeof(int),1,fp);
|
||||
fwrite(keywords[m],sizeof(char),n,fp);
|
||||
styles[m]->write_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -349,6 +350,7 @@ void AngleHybrid::read_restart(FILE *fp)
|
||||
if (me == 0) fread(keywords[m],sizeof(char),n,fp);
|
||||
MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
|
||||
styles[m] = force->new_angle(keywords[m],0,dummy);
|
||||
styles[m]->read_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -325,6 +325,7 @@ void BondHybrid::write_restart(FILE *fp)
|
||||
n = strlen(keywords[m]) + 1;
|
||||
fwrite(&n,sizeof(int),1,fp);
|
||||
fwrite(keywords[m],sizeof(char),n,fp);
|
||||
styles[m]->write_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,6 +351,7 @@ void BondHybrid::read_restart(FILE *fp)
|
||||
if (me == 0) fread(keywords[m],sizeof(char),n,fp);
|
||||
MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
|
||||
styles[m] = force->new_bond(keywords[m],0,dummy);
|
||||
styles[m]->read_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -309,6 +309,7 @@ void DihedralHybrid::write_restart(FILE *fp)
|
||||
n = strlen(keywords[m]) + 1;
|
||||
fwrite(&n,sizeof(int),1,fp);
|
||||
fwrite(keywords[m],sizeof(char),n,fp);
|
||||
styles[m]->write_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,6 +335,7 @@ void DihedralHybrid::read_restart(FILE *fp)
|
||||
if (me == 0) fread(keywords[m],sizeof(char),n,fp);
|
||||
MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
|
||||
styles[m] = force->new_dihedral(keywords[m],0,dummy);
|
||||
styles[m]->read_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -306,6 +306,7 @@ void ImproperHybrid::write_restart(FILE *fp)
|
||||
n = strlen(keywords[m]) + 1;
|
||||
fwrite(&n,sizeof(int),1,fp);
|
||||
fwrite(keywords[m],sizeof(char),n,fp);
|
||||
styles[m]->write_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,6 +332,7 @@ void ImproperHybrid::read_restart(FILE *fp)
|
||||
if (me == 0) fread(keywords[m],sizeof(char),n,fp);
|
||||
MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
|
||||
styles[m] = force->new_improper(keywords[m],0,dummy);
|
||||
styles[m]->read_restart_settings(fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ class Pair : protected Pointers {
|
||||
int dispersionflag; // 1 if compatible with LJ/dispersion solver
|
||||
int tip4pflag; // 1 if compatible with TIP4P solver
|
||||
int dipoleflag; // 1 if compatible with dipole solver
|
||||
int spinflag; // 1 if compatible with spin solver
|
||||
int spinflag; // 1 if compatible with spin solver
|
||||
int reinitflag; // 1 if compatible with fix adapt and alike
|
||||
|
||||
int tail_flag; // pair_modify flag for LJ tail correction
|
||||
|
||||
Reference in New Issue
Block a user