move citeme call(s) to places where labelmaps are used

This commit is contained in:
Axel Kohlmeyer
2024-11-15 11:01:19 -05:00
parent 6796dc34ad
commit 38d53877c5

View File

@ -43,8 +43,6 @@ LabelMap::LabelMap(LAMMPS *_lmp, int _natomtypes, int _nbondtypes, int _nanglety
Pointers(_lmp), natomtypes(_natomtypes), nbondtypes(_nbondtypes), nangletypes(_nangletypes), Pointers(_lmp), natomtypes(_natomtypes), nbondtypes(_nbondtypes), nangletypes(_nangletypes),
ndihedraltypes(_ndihedraltypes), nimpropertypes(_nimpropertypes) ndihedraltypes(_ndihedraltypes), nimpropertypes(_nimpropertypes)
{ {
if (lmp->citeme) lmp->citeme->add(cite_type_label_framework);
lmap2lmap.atom = lmap2lmap.bond = lmap2lmap.angle = lmap2lmap.dihedral = lmap2lmap.improper = lmap2lmap.atom = lmap2lmap.bond = lmap2lmap.angle = lmap2lmap.dihedral = lmap2lmap.improper =
nullptr; nullptr;
reset_type_labels(); reset_type_labels();
@ -112,6 +110,8 @@ void LabelMap::modify_lmap(int narg, char **arg)
if ((narg < 1) || ((narg > 2) && ((narg % 2) == 0))) if ((narg < 1) || ((narg > 2) && ((narg % 2) == 0)))
error->all(FLERR, "Incorrect number of arguments for labelmap command"); error->all(FLERR, "Incorrect number of arguments for labelmap command");
if (lmp->citeme) lmp->citeme->add(cite_type_label_framework);
int ntypes; int ntypes;
std::vector<std::string> *labels; std::vector<std::string> *labels;
std::unordered_map<std::string, int> *labels_map; std::unordered_map<std::string, int> *labels_map;
@ -238,6 +238,8 @@ int LabelMap::find_or_create(const std::string &mylabel, std::vector<std::string
auto search = labels_map.find(mylabel); auto search = labels_map.find(mylabel);
if (search != labels_map.end()) return search->second; if (search != labels_map.end()) return search->second;
if (lmp->citeme) lmp->citeme->add(cite_type_label_framework);
// if no match found, create new label at next available index // if no match found, create new label at next available index
// label map assumed to be intialized with numeric index // label map assumed to be intialized with numeric index
// user labels are assumed to be alphanumeric (not a number) // user labels are assumed to be alphanumeric (not a number)