bugfix for writing data files with atom style dielectric
This commit is contained in:
@ -147,6 +147,24 @@ void AtomVecDielectric::data_atom_post(int ilocal)
|
||||
mu_one[3] = sqrt(mu_one[0] * mu_one[0] + mu_one[1] * mu_one[1] + mu_one[2] * mu_one[2]);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
restore original data for writing the data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecDielectric::pack_data_pre(int ilocal)
|
||||
{
|
||||
atom->q[ilocal] = q_unscaled[ilocal];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
undo restore and get back to post read data state
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecDielectric::pack_data_post(int ilocal)
|
||||
{
|
||||
atom->q[ilocal] /= epsilon[ilocal];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
initialize other atom quantities after AtomVec::unpack_restart()
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -37,6 +37,8 @@ class AtomVecDielectric : public AtomVec {
|
||||
void unpack_restart_init(int) override;
|
||||
int property_atom(const std::string &) override;
|
||||
void pack_property_atom(int, double *, int, int) override;
|
||||
void pack_data_pre(int) override;
|
||||
void pack_data_post(int) override;
|
||||
|
||||
protected:
|
||||
int *num_bond, *num_angle, *num_dihedral, *num_improper;
|
||||
|
||||
Reference in New Issue
Block a user