Skip to content

duplicated entries in connectivity arrays #6

@wojdyr

Description

@wojdyr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions