diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index 826e1aeeb9..06405312ab 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -157,8 +157,8 @@ int ComputeBondLocal::compute_bonds(int flag) atom2 = atom->map(bond_atom[atom1][i]); } else { tagprev = tag[atom1] - iatom - 1; - btype = atom->map(onemols[imol]->bond_type[atom1][i]); - atom2 = atom->map(onemols[imol]->bond_atom[atom1][i]+tagprev); + btype = atom->map(onemols[imol]->bond_type[iatom][i]); + atom2 = atom->map(onemols[imol]->bond_atom[iatom][i]+tagprev); } if (atom2 < 0 || !(mask[atom2] & groupbit)) continue; diff --git a/src/dump_image.cpp b/src/dump_image.cpp index bc8256817c..c6fd9be3ca 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -766,7 +766,7 @@ void DumpImage::create_image() atom2 = atom->map(bond_atom[atom1][m]); } else { tagprev = tag[i] - iatom - 1; - btype = atom->map(onemols[imol]->bond_type[atom1][m]); + btype = atom->map(onemols[imol]->bond_type[iatom][m]); atom2 = atom->map(onemols[imol]->bond_atom[iatom][m]+tagprev); }