Comments (5)
Perhaps generating all rings and then filtering based on type afterwards would be a simpler approach?
from matscipy.
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?
from matscipy.
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 cutoff
dictionary to neighbour_list. If you leave out A-A and B-B from the dictionary they will never considered to be neighbours.
from matscipy.
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)
from matscipy.
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.
Best regards and keep healthy!
from matscipy.
Related Issues (20)
- Documentation appearance HOT 3
- Generalise surface reconstruction code
- Conda-forge build not working for version 0.8.0 HOT 5
- Some fenics log messages are written to stdout instead of stderr HOT 1
- Autogenerate documentation previews on pull requests in CI
- v0.8.1 and v0.9.0 releases HOT 4
- Part of the electrochemistry module does not follow coding style HOT 2
- TST: electrochemistry CLI pipe output test fails in CI ... HOT 3
- Building documentation requires Fenics HOT 4
- Interactive visualisation of atomic structures in documentation is broken HOT 12
- Clean up extra files created by running docs + tests HOT 7
- Improve performance of unittests
- Switch arm64 from Cirrus to GHA HOT 1
- Pair potential for the real part of the Ewald sum HOT 2
- Calling neighborlist in C++ HOT 3
- numpy 2 HOT 4
- ASE neb changes
- Dependency Dashboard
- NGLView visualisations are broken in the published documentation HOT 2
- Action Required: Fix Renovate Configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matscipy.