Dear all,
I obtained the wavefunction of the system by using
ham = sys.hamiltonian_submatrix()
evecs = la.eigh(ham)[1]
Is the wavefunction corresponding to site i given by evecs[i] ? Thanks!
Best,
Johnny
On 18 April 2016 at 03:44, Abbout Adel
Dear Johnny,
you need just to finalize your system before doing calculation. so : sys=sys.finalized() m=len(sys.sites)
and it will work . Best regards, Adel
On Sun, Apr 17, 2016 at 7:23 PM, Johnny Wu
wrote: Dear Dr. Adel
I could not compute len(sys.sites) since sys.sites is of the type "method". How should I change it? Thanks.
Best, Johnny
On 14 April 2016 at 18:44, Abbout Adel
wrote: Dear Johnny,
if you want to get the index of a site in you system, you can do it as follow:
sys=make_system() sys=sys.finalized()
Positions=[sys.sites[i].pos for i in range(len(sys.sites))] # list of all the positions of the sites
Since you know the form of you system, you can obtain the positions of the sites at the edge. for example if the site at (3,5) is at the edge you can find its index straightforwardly:
Index_i= Positions.index((3,5))
once you know the index of your site, you can do whatever you want. for example delete that site:
del sys[sys.sites[index_i]]
or you can pass it to a function which has site as an argument :
function(sys.sites[index_i])
I hope that this helps
Best regards, Adel www.abboutadelhomepage.com
-- Abbout Adel