You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entering a cutoff radius and max_nieghbors does not produce the expected number of edges.
With a simple cubic structure (lattice parameter = 1 Angstrom) and setting cutoff=1.001 and max_nieghbors=12, nearest_neighbor_edges() produces 18 edges - which is both more edges than are within the specified cutoff and more than specified max_nieghbors.
Under these conditions the expected result should be 6 edges.
Cause: the if min_nbrs < max_neighbors: branch is activated since there are less than 12 neighbors within the radius.
This results in the parameter max_nieghbors actually becoming a minimum on the number of neighbors.
Potential solution: include an additional extend_radius flag as a parameter of nearest_neighbor_edges() that when True would activate this branch and when False would constrain the graph to the specified cutoff radius.
Example
In [0]: atoms
Out [0]: Cu
1.0
1 0 0
0 1 0
0 0 1
Cu
1
Cartesian
0.0 0.0 0.0
Entering a
cutoff
radius andmax_nieghbors
does not produce the expected number of edges.With a simple cubic structure (lattice parameter = 1 Angstrom) and setting
cutoff=1.001
andmax_nieghbors=12
,nearest_neighbor_edges()
produces 18 edges - which is both more edges than are within the specified cutoff and more than specified max_nieghbors.Under these conditions the expected result should be 6 edges.
Cause: the
if min_nbrs < max_neighbors:
branch is activated since there are less than 12 neighbors within the radius.This results in the parameter
max_nieghbors
actually becoming a minimum on the number of neighbors.Potential solution: include an additional
extend_radius
flag as a parameter ofnearest_neighbor_edges()
that whenTrue
would activate this branch and whenFalse
would constrain the graph to the specifiedcutoff
radius.Example
Should be 6 edges.
The text was updated successfully, but these errors were encountered: