-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Growth direction of zigzag heteroribbons #648
Conversation
I don't know if that is intended, but it creates periodic defects, and also the 4 square atoms has a non-conforming bond-length? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #648 +/- ##
=======================================
Coverage 87.65% 87.66%
=======================================
Files 364 364
Lines 48520 48518 -2
=======================================
+ Hits 42531 42532 +1
+ Misses 5989 5986 -3
☔ View full report in Codecov by Sentry. |
You're right! My example was not good, here is a better one: g = sisl.geom.graphene_heteroribbon([(5, 6), (7, 3), 5], kind='zigzag')
g.plot(axes="xy", atoms_scale=0.6, nsc=[2, 1, 1])
g = sisl.geom.graphene_heteroribbon([(5, 6), (6, 3)], kind='zigzag')
g.plot(axes="xy", atoms_scale=0.6, nsc=[2, 1, 1]) |
Hmm this last mistaken structure happens only after your commit or it also happens before the commit? I guess there was a reason I set the growth axis different, maybe it doesn't work if you change it. If it worked before I guess we could rotate at the end when all coordinates are determined. |
But in this last example if you set the junction at the center properly the one at the boundary will be wrong, so there's really no right solution, no? Still I think when appending the second section the code doesn't know that it is the last one, so it's probably still a bug. |
Before this commit there was no heteroribbon. The segments were stacked vertically with vacuum gaps in between, for instance: g = sisl.geom.graphene_heteroribbon([(5, 2), (7, 2)], kind='zigzag')
g.plot(axes="xy", atoms_scale=0.6, nsc=[4, 1, 1]) |
This is very strange, has the growth axis changed in |
All I can think of is the swap of graphene lattice vectors in #489. |
So I guess the heteroribbon tests did not catch the change of the axis order, what should I do here? Let me know when I should merge! |
Hmm I guess we could merge this and fix the edge cases later. It is better to have something that produces good ribbons sometimes than something that creates parallel ribbons 😅 |
when @tfrederiksen acknowledges, I'll merge, thanks! |
Green light from my side to merge. Should we open an issue with the aim to address the zigzag heteroribbons more generally later? |
Ok, i'll merge |
The growth direction for heteroribbons should be the
x
-axis also forkind=zigzag
. This PR produces expected structures, eg.:isort .
andblack .
at top-leveldocs/
CHANGELOG.md