refactor/simplify code due to changes in Modify

This commit is contained in:
Axel Kohlmeyer
2021-08-06 21:30:32 -04:00
parent f23b04f9b6
commit 68c15ebf04
11 changed files with 43 additions and 79 deletions

View File

@ -302,9 +302,8 @@ void Respa::init()
// if supported, we also store torques on a per-level basis
std::string cmd = fmt::format("RESPA all RESPA {}",nlevels);
if (atom->torque_flag) modify->add_fix(cmd + " torque");
else modify->add_fix(cmd);
fix_respa = (FixRespa *) modify->fix[modify->nfix-1];
if (atom->torque_flag) cmd += " torque";
fix_respa = (FixRespa *) modify->add_fix(cmd);
// insure respa inner/middle/outer is using Pair class that supports it