Elaborating on that:
If one tries the same hamiltonian modification for different regions,
one notices that:
1) for the inner square regions of the type
if abs(x) < a and abs(y) < a:
there is always an effect on the system, for any value of a, down to a=0.
2) Instead, surprisingly, if one makes modifications in the "outer" regions:
if abs(x) > b and abs(y) > b:
then there is no change in the system if b is BELOW r2, but above a
certain threshold, in my system being b* = (r2-6).
3) Further, if instead one makes the changes in regions outside a
circular domain,
if x**2 + y**2 > (r2-2)**2:
then THERE IS a modification to the system conductance.
All this leads one to think that, maybe after the system finalization,
the annulus sites have in fact been reshuffled and "packed" into a more
convenient rectangular (square) shape, whose dimensions are determined
by the total amount of sites.
Here the annulus area is pi*(r2^2-r1^2) ~ 950 sites, if one wants to
pack them in a square, this gives a square side of 31, not far from my
empirical estimate 2b*= 2(r2-6) = 28...
(and the circle of radius (r2-2) tried above indeed crosses that square)
Is it possible?
On 24/3/14 11:47 PM, Joseph Weston wrote:
Hi,
Seems to me that in your onsite function::
def mu(site, p):
(x, y) = site.pos
if abs(x) < r1 and abs(y) < r1:
return p.mu_inside # this is the critical line: changing
mu values inside the ring should not change the ring conductance
else:
return p.mu_ring
the condition ``abs(x) < r1 and abs(y) < r1`` actually describes a
*square* centred on (0, 0) with sides of length ``2 * r1``, and **not**
a circle centred on (0, 0) with radius ``r1``. There are thus some
sites at the corners which are included in this square, the onsites
of which are affected when you change the value of ``mu_inside``.
Changing the onsite function to the following should fix your problem::
def mu(site, p):
(x, y) = site.pos
if x**2 + y**2 < r1**2:
return p.mu_inside # this is the critical line: changing
mu values inside the ring should not change the ring conductance
else:
return p.mu_ring
Regards,
Joe
P.S. I have not tested the above code. You may need to change your
shape function to::
def ring(pos):
(x, y) = pos
rsq = x ** 2 + y ** 2
return (r1 ** 2 <= rsq < r2 ** 2) # changed `<` to `<=`
to avoid some possible annoying edge case