-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search of (A-B)-(A-B)-(...) rings in ring_statistics #86
Comments
Perhaps generating all rings and then filtering based on type afterwards would be a simpler approach? |
Thanks for reply, i think the shortest path of A-A-A... rings and A-B-A-B... rings should be different, and a little modification of the shortest path algorithm forA-B-A-B rings should be better? |
Thinking about this a little more, I think you could actually do it with no modifications to the shortest path algorithm, just by passing a custom |
You can also explicitly remove A-A and B-B- neighbors from the neighbor list. Try the following (untested): import _matscipy
from matscipy.neighbours import neighbour_list
i, j, r = neighbour_list('ijD', a, cutoff)
n = a.numbers
mask = a[i] != a[j] # True for differing elements
i = i[mask]
j = j[mask]
r = r[mask]
d = _matscipy.distances_on_graph(i, j)
ring =_matscipy.find_sp_rings(i, j, r, d, maxlength) |
Thanks a lot, i checked the rings in my 816 atoms in AB2, and the rings i get are all A-B-A-B, it helps me a lot. |
Hello,
I was searching for rings in compound AB2, and the only type of rings i need is (A-B)-(A-B)-(...). I modified functions step_colser(), step_away() and find_shortest_distances() with type[j] != type[j], but it say "Distance map and graph do not match". How can i do with it ?
Best regard,
yunai
The text was updated successfully, but these errors were encountered: