Fixed typos in compute efield/atom and bug with set charge for atom_style dieletric
This commit is contained in:
@ -855,8 +855,11 @@ void Set::set(int keyword)
|
||||
else if (keyword == VX) atom->v[i][0] = dvalue;
|
||||
else if (keyword == VY) atom->v[i][1] = dvalue;
|
||||
else if (keyword == VZ) atom->v[i][2] = dvalue;
|
||||
else if (keyword == CHARGE) atom->q[i] = dvalue;
|
||||
else if (keyword == MASS) {
|
||||
else if (keyword == CHARGE) {
|
||||
atom->q[i] = dvalue;
|
||||
// ensure that scaled charges are consistent the new charge value
|
||||
if (atom->epsilon) atom->q_scaled[i] = dvalue / atom->epsilon[i];
|
||||
} else if (keyword == MASS) {
|
||||
if (dvalue <= 0.0) error->one(FLERR,"Invalid mass in set command");
|
||||
atom->rmass[i] = dvalue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user