save style names alongside the classes when using read_data nocoeff

this fixes #2673
This commit is contained in:
Axel Kohlmeyer
2021-03-19 10:06:02 -04:00
parent 2e7e5aeac4
commit b9bc226e39
2 changed files with 26 additions and 1 deletions

View File

@ -1479,7 +1479,8 @@ void Neighbor::print_pairwise_info()
rq = requests[i];
if (rq->pair) {
char *pname = force->pair_match_ptr((Pair *) rq->requestor);
out += fmt::format(" ({}) pair {}",i+1,pname);
if (pname) out += fmt::format(" ({}) pair {}",i+1,pname);
else out += fmt::format(" ({}) pair (none)",i+1);
} else if (rq->fix) {
out += fmt::format(" ({}) fix {}",i+1,((Fix *) rq->requestor)->style);
} else if (rq->compute) {