use get_(fix|compute)_by_id() instead of find_(fix|compute)()
This commit is contained in:
@ -151,24 +151,14 @@ void ResetMolIDs::create_computes(char *fixid, char *groupid)
|
||||
// 'fixid' allows for creating independent instances of the computes
|
||||
|
||||
idfrag = fmt::format("{}_reset_mol_ids_FRAGMENT_ATOM",fixid);
|
||||
if (singleflag)
|
||||
modify->add_compute(fmt::format("{} {} fragment/atom single yes",idfrag,groupid));
|
||||
else
|
||||
modify->add_compute(fmt::format("{} {} fragment/atom single no",idfrag,groupid));
|
||||
auto use_single = singleflag ? "yes" : "no";
|
||||
cfa = (ComputeFragmentAtom *)
|
||||
modify->add_compute(fmt::format("{} {} fragment/atom single {}",idfrag,groupid,use_single));
|
||||
|
||||
idchunk = fmt::format("{}_reset_mol_ids_CHUNK_ATOM",fixid);
|
||||
if (compressflag)
|
||||
modify->add_compute(fmt::format("{} {} chunk/atom molecule compress yes",
|
||||
idchunk,groupid));
|
||||
|
||||
int icompute = modify->find_compute(idfrag);
|
||||
cfa = (ComputeFragmentAtom *) modify->compute[icompute];
|
||||
|
||||
|
||||
if (compressflag) {
|
||||
icompute = modify->find_compute(idchunk);
|
||||
cca = (ComputeChunkAtom *) modify->compute[icompute];
|
||||
}
|
||||
cca = (ComputeChunkAtom *)
|
||||
modify->add_compute(fmt::format("{} {} chunk/atom molecule compress yes",idchunk,groupid));
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user