Draw Bond-Currents with sisl
See original GitHub issueHi Nick,
I got a tutorial on calculating the bond-current from your answer here.
And I tried to draw the bonding current of graphene. But the atom is not shown in the graph, and the image does not seem to be correct.
This is the code:
import os
import numpy as np
import sisl
# Now read in the AV file
av = sisl.get_sile('graphene_scat.TBT.AV.nc')
geom = av.geom
J_orb = av.orbital_current('Left', E=2, isc=[None] * 3)
J_a = av.atom_current_from_orbital(J_orb, activity=False)
#J_v = av.vector_current_from_orbital(J_orb)
# Now create plot
from matplotlib.colors import Colormap
from matplotlib.mlab import griddata
import matplotlib.pyplot as plt
def mmlinspace(a, axis, N):
m, M = np.min(a[:, axis]), np.max(a[:, axis])
return np.linspace(m, M, N)
N_x, N_y = 2000, 2000
x = mmlinspace(geom.xyz, 0, N_x)
y = mmlinspace(geom.xyz, 1, N_y)
xi, yi = np.meshgrid(x, y)
zi = griddata(geom.xyz[:, 0], geom.xyz[:, 1], J_a, xi, yi, interp='linear')
cm = Colormap('inferno')
plt.contourf(xi, yi, zi, cmap=plt.cm.plasma)
plt.savefig('test2.png')
plt.show()
My question is how to set “J_orb” correct in the code, and If I expect to get both the atom and bond-current, What changes should I make for this code?
Best Regards~
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Positive valued bond-currents plotted as line segments of ...
We select only positive bond currents and for each of them we draw a segment ... sisl is a Python package used to...
Read more >arXiv:2109.03790v2 [cond-mat.mes-hall] 19 Jan 2022
Equilibrium bond currents are obtained inserting the equilibrium density matrix and ... one must draw on detailed microscopic calculations,.
Read more >Modelling polycrystalline materials and interfaces
sis [213–216]. The focus is on symmetrical tilt GBs over a wide range GB orientations to draw out trends across the three materials....
Read more >Current-induced atomic forces in gated graphene ... - CORE
the pristine graphene, bond currents obtain smaller values and ... We draw the force arrows at both atoms of a bond to indicate...
Read more >Duality in a Model of Layered Superfluids and Sliding Phases
sis. I attended a number of Colloquia and departmental meetings at City Tech ... x Jµ is the winding number along µ direction;...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes,it resolved. And thanks a lot for your help!Cheers!XD
I will consider this issue resolved 😃