initialize LabelMap class through constructor, properly wipe out old data

This commit is contained in:
Axel Kohlmeyer
2022-09-03 10:39:55 -04:00
parent fc67df3b5f
commit 2eca1eecdc
4 changed files with 180 additions and 194 deletions

View File

@ -533,13 +533,8 @@ void ReadData::command(int narg, char **arg)
// allocate space for type label map
if (firstpass) {
lmap = new LabelMap(lmp);
lmap->natomtypes = ntypes;
lmap->nbondtypes = nbondtypes;
lmap->nangletypes = nangletypes;
lmap->ndihedraltypes = ndihedraltypes;
lmap->nimpropertypes = nimpropertypes;
lmap->allocate_type_labels();
delete lmap;
lmap = new LabelMap(lmp,ntypes,nbondtypes,nangletypes,ndihedraltypes,nimpropertypes);
}
// customize for new sections