sisl
sisl copied to clipboard
Plotting bond/orbital-current maps sisl.viz
Describe the feature
Like #77 it would be nice with an intrinsic bond-current plotting functionality. Possibly allowing to extract individual orbitals contributions (@pfebrer ping)
Some things that I have generally found intriguing:
- [ ] plotting bond-currents (
tbt.bond_current(elec, energy)
) - [ ] scaling atoms according to the atomic current (
tbt.atom_current(elec, energy)
)
These could be really cool in sisl.viz
Perhaps this could also be a good lesson for me to learn about viz, i.e. once #446 is in, this could be a bit easier it seems.
Nicee! Yes once #446 is in it will be fairly easy. If it's just plotting the magnitude of the currents it will be trivial. If you need to plot the direction of the bond current with an arrow then that's a bit more difficult because there's nothing implementing "directional bonds" yet, but it shouldn't be too hard.
Nicee! Yes once #446 is in it will be fairly easy. If it's just plotting the magnitude of the currents it will be trivial. If you need to plot the direction of the bond current with an arrow then that's a bit more difficult because there's nothing implementing "directional bonds" yet, but it shouldn't be too hard.
I think it should plot like forces? No?
I am not sure I fully understand the problem you are foreseeing? Isn't it just getting a starting point and vector and then plotting that? Is viz doing anything differently?
Yes sure you can do it like that if you want. I was thinking more in terms of the bonds that the plot shows, but you can do it by plotting an arrow on each atom instead. But the problem then would be (if you wanted a smooth interface with the current implementation) that currently the support for arrows in GeometryPlot
is linked to the atoms, in the sense that it accepts one arrow per atom.
But once the other PR is in we can think of the best way of merging this feature. I think the best way should probably be through bond styling, since this is a bond property. (i.e. have some way of specifying the directionality of the bond and then if the bonds are directional plot them with arrows instead of lines)
But the bond currents are not *bond currents * in the strictest sense, they are just like forces with non-bond directions. So I don't think there is anything prohibiting it?
Aaah ok, I didn't know that. And there is one per atom?
Aaah ok, I didn't know that. And there is one per atom?
Yes. That is what people generally do. :)
Then there's no problem! One can already plot them with the current API: https://zerothi.github.io/sisl/visualization/viz_module/showcase/GeometryPlot.html#Drawing-arrows.
So it would be just a matter of providing an even smoother interface for this specific case (if needed).
Ok, so I should try your wiz in the viz and learn it! ;)
I'll get to it when time allows!