get_connectivity_fast() is putting every connection twice. I mean that if atoms i and j are bonded, the connectivity[i] array will have j twice in it, and connectivity[j] will have i twice in it.
Relevant code:
if (atoms[i].is_bonded_to(atoms[j])) {
connectivity[i].push(j);
connectivity[j].push(i);
}
It can be fixed in various ways.
get_connectivity_fast() is putting every connection twice. I mean that if atoms i and j are bonded, the
connectivity[i]array will have j twice in it, andconnectivity[j]will have i twice in it.Relevant code:
It can be fixed in various ways.