Re: [Kwant] continuous vs discrete leads

2017-08-07 Thread Joseph Weston
Dear Patrik, The line that fails is > dn_lead.fill(template, lat1, lat1(0, 0, -2)) > did you read the documentation for the "fill" method of builders? The documentation says that the second argument, called "shape", should be a function that takes a site and returns true or false depending on

Re: [Kwant] small correction in the documentation

2017-07-31 Thread Joseph Weston
Hi Adel, Thanks for the fix! Can you please report this as a bug on the Kwant Gitlab [1]? You'll have to create an account, but we have gmail OAuth enabled (so you can log in with your gmail account). If you feel like it you can also submit proposed modifications either as patches to the dev

Re: [Kwant] up/down conductance

2017-07-21 Thread Joseph Weston
Hi Patrik, > I was trying to get up/down conductance through the system > from one end to the other, similar to the conductance from lead 0 to > lead 1. > > What would be the equivalent of conductance from lead 0 to lead 1 (in > the 'if trans'), but for either up or down spin? Ah, this is a

Re: [Kwant] Current in a closed system

2017-07-18 Thread Joseph Weston
Hi Adel, Thanks for the very astute observations! I admit this had me worried for a little bit, but I'm now confident that I understand what is going on. While this is not a bug in Kwant, it is confusing and the tutorial is not showing what it is meant to, so thank you for pointing this out >

Re: [Kwant] "typo" in the documentation?

2017-07-14 Thread Joseph Weston
Hi Tibor, > > on ordering of propagating modes. In the documentation > > https://kwant-project.org/doc/1/reference/generated/kwant.physics.PropagatingModes > > it says: > > "modes with negative velocity are ordered from larger to lower momenta" > > Shouldn't it be: > > "modes with negative

Re: [Kwant] Making heterostructures of different lattice constants

2017-07-12 Thread Joseph Weston
Hi Jonathan, > In the documentation it is written thjat the tight binding > approximation is good for all quantum states with a wave length > considerably larger than the lattice constant a. Now, if you are > dealing with a system made out of a single material, then you can just > choose a to be

Re: [Kwant] Discretizing continuous Hamiltonians

2017-07-07 Thread Joseph Weston
Hi Hosein, > We have a collection of tools for working with continuum models in > Kwant 1.3. If we give it a Dirac equation, can we get the honeycomb > lattice? Discretizer doesn't know anything about honeycomb lattices; it just uses finite differences on a square lattice to construct the tight

Re: [Kwant] Number of orbitals

2017-07-06 Thread Joseph Weston
Dear Hosein, > How to define the number of orbitals when constructing the site > families? In tutorial2.7, it is defined using: lat = > kwant.lattice.square(norbs=2). For a new defined lattice with spin > degree included, how to define the number of orbitals. For example, > graphene =

Re: [Kwant] Local densities and currents

2017-07-04 Thread Joseph Weston
> Dear Joe, > Thanks a lot for clarifying these points for me. So the local > densities and local currents in Tutorial 2.7 correspond to the > scattering state incoming in mode 0 of lead 0. > I still feel confused. Why we only consider a *single* scattering > state from one lead? Because you

Re: [Kwant] Local densities and currents

2017-07-04 Thread Joseph Weston
HI Hosein, > I want to use kwant to calculate the local densities and currents, but > I do not understand some of the code lines. For the local density of > states, we can obtain it from: > wf = kwant.wave_function(sys, energy) >

Re: [Kwant] distinguishing bands belonging to different orbitals

2017-06-29 Thread Joseph Weston
Hi again Tibor, > > If I use your example code, in the step where > > H = H_k(lead.finalized()), > > the matrix H is diagonal in k-space, and would be block-diagonal in > (electron,hole)-space, where each block is N-by-N (generally not > diagonal), where N is the number of sites in the unit cell

Re: [Kwant] Multiple CPUs when calculating S-matrix

2017-06-27 Thread Joseph Weston
Hi Sverre, > When I calculate the scattering matrix (kwant.smatrix()) it seems that only > one CPU (I have 12 in total) is working, while the others are idle. Is there > a (simple) way to make all the CPUs work together when using kwant.smatrix ? > Maybe similar improvements can be done for

Re: [Kwant] distinguishing bands belonging to different orbitals

2017-06-26 Thread Joseph Weston
Hi Tibor, > Hi all! > > I would like to plot bandstructure of a graphene lead with electron > and hole structure (i.e. norbs=2), > while distinguishing (e.g. with color) between electron and hole bands. > > ... > > Is there an easy way to get the bands just for electrons? Something like > >

Re: [Kwant] about hopping between different lattices (Lattice description instead of orbital description)

2017-06-19 Thread Joseph Weston
Hi, > I am trying to calculate and plot dispersion relation for a 4x4 > matrix model. But I want to use 4 different lattices with names a_up, > b_up,a_down, B_down. That is my basis. But I am not able to reproduce > the same structure when I am using four different lattices instead 4x4 >

Re: [Kwant] What's the difference between the wavefunction and the eigen vector?

2017-06-19 Thread Joseph Weston
Hi, > > I am so confused of the wave function we get from : > wf = kwant.solvers.default.wave_function(some_sys, some_energy) > and the eigen vector we can get form the; > ham=sys.hamiltonian_submatrix(args=[Zeeman]) eval,evec=la.eigh(ham) The first is a scattering state with energy

Re: [Kwant] use of a function to define the on-site energy in the leads

2017-05-23 Thread Joseph Weston
Hi Sebastiano, > I have seen most of the examples of Kwant usage, but somehow I miss the > usage of functions to define the on-site energy of lattice sites in the > leads. I have attached a simple Kwant script which includes the following > lines > > - > > sym =

Re: [Kwant] eigenvalues test in wraparound module

2017-05-15 Thread Joseph Weston
Hi, > Thank you Joseph for the highlight. It make sens since the tests on a > square lattice seemed working fine. > > I checked the 'plot_2d_bands' function but could not identify the > transformation you were mentioning. Could you help me in this please? It requires a bit of reading but we

Re: [Kwant] Finite bias current

2017-05-04 Thread Joseph Weston
Hi, > My question is about calculating total current for a finite bias in a > nanowire. > I looked at the Datta book and try to implement it in KWANT but I can not > get > a reliable answer, I think I made a mistake somewhere but I can not find it. If you want help you are going to need to be

Re: [Kwant] Installing kwant 1.2.2 on Fedora 24

2017-04-28 Thread Joseph Weston
Hi Nefta, > Seems like kwant could not link against the already installed MUMPS-devel > libraries. To solve that, Joe and I removed kwant and installed it again > but this time from source and created a build.conf file that contains the > following lines: > > [mumps] > libraries = zmumps

Re: [Kwant] Plotting 2D maps for 3D systems

2017-04-26 Thread Joseph Weston
Hi John, If I understand correctly you are trying to visualize the square magnitude of some wavefunction of a 2D section of a 3D system. This problem has 2 parts: first the relevant wavefunctions components must be extracted from the wavefunction defined over the full (3D) system, and then these

Re: [Kwant] Query regarding Carbon Nano Tube (CNT) simulation using Kwant 1.2.2

2017-04-20 Thread Joseph Weston
Hi, Try searching the mailing list archive for "carbon nanotube": https://www.mail-archive.com/search?l=kwant-discuss%40kwant-project.org=carbon+nanotube=0=0 It throws up quite a few hits. Happy Kwanting, Joe signature.asc Description: PGP signature

Re: [Kwant] installing kwant 1.1.2 for python 2.7 on the enthought canopy environment

2017-04-19 Thread Joseph Weston
Hi, You can just explicitly specify the Kwant version that you want: pip install kwant==1.1 > I am a new user of kwant and I have some troubles in installing kwant on > the Enthought Canopy environment. > I have always used this environment for my numerical work with Python > and it is

Re: [Kwant] combining two s matrices

2017-04-13 Thread Joseph Weston
Dear Prof. Chan, > Dear Kwant developer, > Is it possible to combine the s matrices for two structures to obtain the s > matrix of a large system? The evanescent modes in a lead can be excited, does > the s matrix or some other object contain the evanescent mode information so > that it can be

Re: [Kwant] Making 3D leads in a monoatomic lattice

2017-04-13 Thread Joseph Weston
Hi, > The error is not completely opague of course; something seems to be > problematic about the lattice vectors and the proposed symmetry. Indeed, the lattice and the symmetry you defined are not compatible: > lat = kwant.lattice.general([(0, a, a), (a, 0, a), (a, a, 0)]) > ... >

Re: [Kwant] Wrapping leads around a channel

2017-04-13 Thread Joseph Weston
Hi Sam, Thanks for the clarification. > I'm trying to study a system where a contact has been patterned around the > outer edge of a channel. Initially I have tried attaching one lead oriented > along the z-direction (similar to the Hanle valve example in the Kwant > paper), which allows me

Re: [Kwant] Wrapping leads around a channel

2017-04-12 Thread Joseph Weston
Hi Sam, > I am working on trying to create a system where there is a lead which wraps > around the edge of a sample. > > For example, I have included a code which generates a square scattering > region with two contacts, one extending vertically and the other extending > horizontally. What I

Re: [Kwant] transmission through a barrier of zero height

2017-03-29 Thread Joseph Weston
Hi, > OK... I think I should learn Python better. Could You point me to some > Python's topic which explains why in the case of > syst[graphene.shape(stripe, (0,0))] = onsite > _U argument is passed to the 'potential' function, > and in the case of > lead1[graphene.shape(lead1_shape, (0, 0))] =

Re: [Kwant] transmission through a barrier of zero height

2017-03-29 Thread Joseph Weston
Hi, > And how can I set lead1's potential correctly? What is wrong in my script > zigzag.py? I have the same function onsite both for scattering region and > for leads: > > def *potential*( site, _U ): > x, y = site.pos > return _U if x >= 0 else 0 > > def *onsite*(

Re: [Kwant] transmission through a barrier of zero height

2017-03-29 Thread Joseph Weston
Hi, > Joe, great thanks for Your explaination. It would be quite hard for me to > understand from the code documentation that it is the submatrix method is > the thing which I need. But could You say is the function below calculates > averaged over all modes transparency adequately? > > tblock =

Re: [Kwant] transmission through a barrier of zero height

2017-03-27 Thread Joseph Weston
Hi again, > But now my question it seems about Kwant's functional, i.e. > is it possible to calculate with it the transmission (in the sense of > probability) through the barrier (single and double)? So, if the Landauer's > formula gives the conductivity as > G=2e^2/h * T(E) * M(E) (for zero

Re: [Kwant] transmission through a barrier of zero height

2017-03-27 Thread Joseph Weston
Hi, > This means that kwant takes into account also some regions outside the > leads e.g. bulk metal contacts. > > As a result some dependence on E is obtained even for the case of zero > depth of the potential whell and it is not identically one. > > So, is it possible to obtain in Kwant the

Re: [Kwant] Using args in hamiltonian-function

2017-03-27 Thread Joseph Weston
Hi Camilla, > (am using the development version, 1.3) > > > I am trying to plot the potential of my system and I want to use the > hamiltonian(ind,ind,*args) function, but I don't understand how to use the > args. Normally, I would give a vector with the values of the args as input, > but

Re: [Kwant] function for current density calculation

2017-03-26 Thread Joseph Weston
Hi, > In the discussion thread about calculation of current density, it is > mentioned for the function defined for current as follows only work for 1 > orbital per site. Does the expression work for system with spin? I guess the > Hamiltonian matrix element for sites I and j will be a matrix

Re: [Kwant] periodic boundary conditions on the lead

2017-03-21 Thread Joseph Weston
Hi Sergey, > Dear Colleagues, > There has already been a discussion on this subject back in 2014, > (https://www.mail-archive.com/kwant-discuss@kwant-project.org/msg00124.html) > > but I am not quite sure I understand the proper solution. > I made a lead with rectangular unit cell and naive

Re: [Kwant] update Kwant to newer versions.

2017-03-16 Thread Joseph Weston
Hi, I should probably preface this with the disclaimer that I am not a Windows user. However, as nobody more knowledgeable has replied to this so far, I will attempt to do so. > I have a version of Kwant 1.02 installed for python 2.7 in a window computer. > If I want to update it, do I need to

Re: [Kwant] Graphene band structure with more than 3 nearest-neighbors

2017-03-14 Thread Joseph Weston
Hi again, > I had already tried that, but I get extra bands that I would like to get > rid of. You could try using Christoph Groth's "wraparound" module [1] (just download the "wraparound.py" module and put it next to your script to be able to "import wraparound"). This will convert your Builder

Re: [Kwant] Graphene band structure with more than 3 nearest-neighbors

2017-03-14 Thread Joseph Weston
Hi, > When I plot the system, I see the hoppings have been added successfully, > but the band structure calculation returns the following error: > > ValueError: Further-than-nearest-neighbor cells are connected by hopping > > > Can you please give me some advice on how to fix this error?

Re: [Kwant] Problems with memory allocation (?) in KWANT 1.3

2017-03-09 Thread Joseph Weston
Hi Camilla, Thanks for the bug report! > I am currently trying to write a program to try to calculate the spin Hall > angle in a 4-terminal normal metal using Kwant 1.3 and the conservation law > module. The scattering region is a square 40x40. I run in to a problem when > trying to run it.

Re: [Kwant] (no subject)

2017-03-07 Thread Joseph Weston
Hi, > I am using kwant1.3, I have read the new two threads [1] and [2], and I > have read [3]. However, I am still unable to compute and plot the local > density current for my system in the scattering region. In general you should aim to give more information about precisely what it is that is

Re: [Kwant] Wavefunction inside scattering region + spin

2017-03-05 Thread Joseph Weston
Hi again, > I have now tried to calculate spin currents between sites via > kwant.operator.Current() and by manually slicing out spin up/down parts of > the wavefunction. > The last part of code (from the last email) you suggested to use to get out > the ordering of the spin currents would

Re: [Kwant] Wavefunction inside scattering region + spin

2017-03-02 Thread Joseph Weston
Hi again, > for (i, j), spin_current in zip(syst.graph, spin_current): > print('spin current from site {} to {} is {}' > .format(syst.sites[j].tag, syst.sites[j].tag)) This snippet should have read for (i, j), J in zip(syst.graph, spin_current):

Re: [Kwant] performance issue with Kwant on CentOS with mpi4py

2017-03-02 Thread Joseph Weston
Hi, > When I run a code on a single processor, it works fine. When I add more > CPUs, each calculation takes longer time. Code builds a system with > hopping, on-site repulsion and SOC, with leads, then I calculate the > scattering matrix of it. Did you make sure to set the number of threads

Re: [Kwant] Wavefunction inside scattering region + spin

2017-03-01 Thread Joseph Weston
Hi Sverre, > My goal is to calculate spin currents between sites, Indeed this is something that you will have to do manually in Kwant 1.2. In Kwant 1.3 we will introduce the concept of "operators" that will allow you to easily define and evaluate spin currents on wavefunctions. > - What is

Re: [Kwant] seg fault at test run on CentOS

2017-02-27 Thread Joseph Weston
Hi, > I do not have Anaconda installed. It appears to be a major software (400MB > size). Indeed Anaconda is a large package. There is, however, a stripped down version called Miniconda [1], which installs just the "conda" tool and a version of Python (rather than the whole scientific Python

Re: [Kwant] seg fault at test run on CentOS

2017-02-27 Thread Joseph Weston
Hi, To expand on Bas' answer I believe that this is related to the fact that somehow Kwant has not been linked correctly against system libraries. Indeed Bas' solution to use 'conda' may be the quickest way to get kwant working (if you already have a working Anaconda installation), however we

Re: [Kwant] (no subject)

2017-02-08 Thread Joseph Weston
Hi, > a) Regarding the edge disorder, I cannot remove the disorder in the edges > with the leads (I saw your recent previous discussion) I am not sure what you mean by this. From what I can see from your model there is no disorder in your leads: lead0 = kwant.Builder(sym0)

Re: [Kwant] Current density

2017-01-11 Thread Joseph Weston
Hi again! > > #m is the mode number > > def Current(m,lead_nbr=0): > > current=2* array([Wf(lead_nbr)[m]]).T * > > tsys.hamiltonian_submatrix(args=[phi])* > > (Wf(lead_nbr)[m].conj()) > > return current.imag > > Thanks a lot for the code snippet! I now understand why my code takes so >

Re: [Kwant] putting disorder (kwant.digest.uniform) in graphene with shape function

2017-01-11 Thread Joseph Weston
Hi, > kwant.plotter.plot(sys_2['sys'],site_color=lambda site: > sys_2['sys'][site],colorbar = True, cmap='gist_heat') The line lambda site: sys_2['sys'][site] defines a function that takes a site and returns a **function** (i.e. the onsite function). You actually want to return the **value

Re: [Kwant] Using Kwant for finding tunneling probability from metal to vacuum

2016-12-19 Thread Joseph Weston
Hi, > I modified the 1st tutorial code to include the rectangular barrier (see my > code in [2]). I have attached the figures i got from the code > (conductance.png and rect_trans.png). If i have understood correctly, then > Kwant outputs the conductance depending on excitation energy. And the >

Re: [Kwant] How do I get the index for a given site?

2016-12-17 Thread Joseph Weston
Hi, > I'm doing a self consistent calculation and I need the matrix element for a > site when setting the coupling. > I got it working but I wanted to know if there was a correct way. > Here is my code which uses scipy.spatial. > > def onsite(site, Delta=None, coords=None): > if (Delta is

Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-17 Thread Joseph Weston
Hi, > So my final question is then. What is the unit cell? Doesn't a square lattice > only have one site per unit cell? Or is it the number of interface sites? The unit cell is whatever you define it to be with your choice of translational symmetry and sites that you add to the system. In the

Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Joseph Weston
Hi, > I think I am getting there, so for a system with two bands each row has 4 > elements which corresponds to 2 left-going and 2 right-going modes. Is that > correct? If you evaluate the modes at an energy at which both bands are open, then yes. You will need to refer to the documentation

Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Joseph Weston
Hi, > Thank you. This might be a silly question, but what is the meaning of > orbitals here? Is it not only 1? When I say "orbitals" it's really a shorthand for "degrees of freedom". If you have a lead with 2 sites in the unit cell, and each one has a single degree of freedom associated with it

Re: [Kwant] Question about lead_info[].wave_functions[]

2016-11-16 Thread Joseph Weston
Hi Camilla, > I have a question regarding the lead_info[x].wave_functions[x]. I am not sure > what this is actually returning? I tried to run the function on your > quantum_wire_revisited.py-system, like this > > prop = sm.lead_info[0] > print(prop.wave_functions[0]) > > with W = 2,

Re: [Kwant] smatrix for up and down spin channels in graphene with KM Hamiltonian

2016-11-16 Thread Joseph Weston
Hi again, > I took the model where only nearest neighbor hopping exists. > > If I attach two leads (one at the Left and the other at the Right) for up > spin only, and calculate smatrix(1,0), it shows step-like behaviour as a > function of E. The same plot I got for the down spin only. > > If I

Re: [Kwant] smatrix for up and down spin channels in graphene with KM Hamiltonian

2016-11-16 Thread Joseph Weston
Hi, > I'm trying to get the transmission coefficients for up and down spin > channels in graphene with Kane-Mele Hamiltonian (including Rashba term). > So it needs to write the Hamiltonian for up and down spin separately. > > I started with this, > sys=kwant.Builder() >

Re: [Kwant] Problem with holoview

2016-11-07 Thread Joseph Weston
Hello, > I encounter problems with running the code in [1]. I guess it is not quite > related to kwant but caused by matplotlib and holoview. Since part of the > code relies on the function "spectrum", I appreciate any idea for tackling > the error, which is shown in the attached figure. Thanks.

Re: [Kwant] Hopping between different lattices and families

2016-11-03 Thread Joseph Weston
Hi, > Looking at the code you initially posted, it seems that you do not have > any spin degree of freedom in your system. This is a necessary condition > for Majoranas. Look again more closely at the Hamiltonians from the > literature (e.g. > https://arxiv.org/abs/1003.1145). You will see that

Re: [Kwant] Hopping between different lattices and families

2016-11-03 Thread Joseph Weston
Hi, > I want to implement a p-wave superconductor using two lattices (for electrons > and holes). I've done that using Pauli matrices with no problem. The thing is > that I expect to get Majorana zero energy modes, but I don't. I belive that > the problem is the way that I am defining the

Re: [Kwant] The reference distance a is too small

2016-11-01 Thread Joseph Weston
Hi, (sending again, as I forgot to CC the mailing list in my reply) > I am trying to make sense of the error message I get when trying to plot > using kwant.plotter map(). The error message is "the reference distance a is > too small", and a is the lattice spacing. What is the meaning of this

Re: [Kwant] Velocities

2016-07-29 Thread Joseph Weston
Hi, sorry for the late reply, Can you point me to the correct direction of where to look at the > documentation to figure out how to make a vorticity plot in kwant? > > Essentially, I want to attach leads to a graphene flake. I want to find > the vorticity around each closed hexagon. Which

Re: [Kwant] Inconsistent calculation result

2016-07-26 Thread Joseph Weston
Hi, Hi Kwant Users > > I notice an inconsistency in calculation result using Python IDLE (3.5.1, > Anaconda3). > > The issue is that every time I execute the same code, it gives me a > different result.The test code that I use is the example code for graphene > quantum dot calculation (2.7.1) . >

Re: [Kwant] Kwant kkghosh

2016-06-14 Thread Joseph Weston
Hello Kamal, Dear Joseph Weston, > Very many thanks for your instruction to run my code successfully. But, it > did not work, instead > it sent message "run time error" after showing the system plot. Yes, I > simply changed to > kwant.plotter.bands(sys.leads[0],show=False

Re: [Kwant] kkghosh

2016-06-13 Thread Joseph Weston
Dear Kamal, I ran your code and got the following error: TypeError: Expecting an instance of InfiniteSystem. The reason is because you are passing a `FiniteSystem` (with leads attached) to `kwant.plotter.bands`, however `bands` expects an `InfiniteSystem`, i.e. *a finalized lead*. For

Re: [Kwant] slow code to setup hoppings

2016-05-25 Thread Joseph Weston
Whoops, I was a bit too hasty! in fact `filter` takes the filtering function first and the iterator to filter second, so sites_to_join = filter(pairs_of_sites, crit) should be sites_to_join = filter(crit, pairs_of_sites) Happy Kwanting, Joe

Re: [Kwant] ensuring Hermitian hopping

2016-05-10 Thread Joseph Weston
Hi, I ran your script and the first line output is: SnakesStripe.py:31: RuntimeWarning: invalid value encountered in arctanh return -exp(-0.5j * phi * (xi - xj) * arctanh(((yi + yj)-2*45*sqrt(3))/smooth)) You are passing a number >1 to `arctanh`, most probably. You're using Numpy's arctanh,

Re: [Kwant] Position dependent effective mass by discretization interface.

2016-04-18 Thread Joseph Weston
Hi again, A colleague just pointed out this article [1] where they use different discretization schemes. I believe that your question is sufficiently broad (try "nonuniform finite differences" as a search term) that this will have been addressed in other publications too. Happy Kwanting, Joe

Re: [Kwant] Position dependent effective mass by discretization interface.

2016-04-18 Thread Joseph Weston
Hi, I think there will probably be some interplay between physical effects (due to the abrupt interface between two materials with different effective masses) and artificial effects (due to the discretization of the model). It would not surprise me that you get unphysical effects for

Re: [Kwant] Wavefunction at each site

2016-04-14 Thread Joseph Weston
Hi, you can get the indices of all the sites in the finialized system by using the `sites` property of finalized systems. After that , it's just a case of writing a function that can filter this list based on whether a site is on the `edge` or not. You would have to define this filtering

Re: [Kwant] Onsite Coulomb energy

2016-04-14 Thread Joseph Weston
Hi, > I am brginner in kwant trying to investigate a graphene ribbon with onsite Coulomb > energy U, where the electron density at each site should be determined > self-consistently. Firstly I should point out that currently Kwant can handle non-interacting systems only. Adding mean-field

Re: [Kwant] Scattering Matrix

2016-04-06 Thread Joseph Weston
Hi again, - calculate the modes of the leads by solving a small linear system defined > on a lead unit cell (equation 6 in the Kwant paper) > I was wrong about this step, it's actually a generalized eigenvalue problem that needs to be solved for the eigenvalue of the translation operator and

Re: [Kwant] Scattering Matrix

2016-04-05 Thread Joseph Weston
Hi James, For an understanding of how Kwant calculates scattering properties, I would recommend reading the Kwant paper: http://iopscience.iop.org/1367-2630/16/6/063065/article The basic idea can be summarized as follows: - calculate the modes of the leads by solving a small linear system

Re: [Kwant] Spin LDOS

2016-03-24 Thread Joseph Weston
Hello again, And print(prob.shape), it returns (2,9686). 2 is the number of available > modes and 9686 is the number of orbital elements. > This is correct. This is why your `reshape` confused me, because it would mean that you were mixing all your modes up. > If I understand correctly, the

Re: [Kwant] Spin LDOS

2016-03-22 Thread Joseph Weston
Hello, If you read the documentation for `kwant.wave_function`, you'll see that it returns a 2D array where the first index numbers the modes. I would suggest that you print the shape of the output of `kwant.wave_function` and then think about what you're trying to achieve with the `reshape` in

Re: [Kwant] lattice_general

2016-02-02 Thread Joseph Weston
Hi Kamal, If you look in the source code for `kwant.lattice.general` you'll see that the function returns a monatomic lattice when the `basis` argument is `None`. As you provided a (albeit single-site) basis, a Polyatomic lattice is constructed. Saying:

Re: [Kwant] plot eigenvectors of a closed system

2015-12-10 Thread Joseph Weston
Hi Weiyuan, > I want to consider a system with spin, so the hopping is a matrix. How to > change the the kwant code to plot the eigenvectors of system that spin is > considered. The short answer is that you can't do it using `kwant.map`. `kwant.map` plots a _scalar_ field defined over sites,

Re: [Kwant] Declare hopping between different type of lattices

2015-12-09 Thread Joseph Weston
Yes, this is what the function `lattice.shape` is for: http://kwant-project.org/doc/1/reference/generated/kwant.lattice.Polyatomic#kwant.lattice.Polyatomic.shape Joe On 9 December 2015 at 15:23, Sudin Ganguly wrote: > The idea: 'cutting out the desired shape' is very

Re: [Kwant] Declare hopping between different type of lattices

2015-12-08 Thread Joseph Weston
Hi, > I wanted to create a Y-shaped 3 terminal structure. For that, I declared 3 > different type of lattices, namely lat_a,lat_b and lat_c. Why do you have 3 different lattices? When I run your sample code I see that the 3 different lattices are actually the same. What are you trying to

Re: [Kwant] High symmetry band structure calculation

2015-11-29 Thread Joseph Weston
Hi, > Is there an easy way to produce band structure plot over certain high > symmetry point in brillouin zone? I'm not sure what you mean by this; could you expand? > In order to calculate the bandstructure of certain lattice, graphene for > example, One has to define a lead with periodicity

Re: [Kwant] Periodic BC in kwant

2015-10-23 Thread Joseph Weston
Hi, > I was bit hasty in raising the issue. I apologize for that. I was > missing an argument in the function the snippet is part of. I will try > to remove this thread as it of not much value, expect for the fact that > you should try to more careful before raising an issue :) No need to

Re: [Kwant] Periodic BC in kwant

2015-10-22 Thread Joseph Weston
Hi, This should work no problem, and it does work for me. Can you attach a full example script that can be run? Thanks, Joe On 22 October 2015 at 23:13, R Mathew wrote: > Hi, > > I am trying to simulate a finite size quantum hall strip with periodic > boundary in one

Re: [Kwant] How do we add atomic number detail?

2015-09-13 Thread Joseph Weston
Hi, Kwant is kind of general in terms of the type of tight-binding models it can simulate. On one hand you can start from a discrete model in terms of atoms and orbitals, but you can also take a continuous model and get a tight-binding model by discretizing it (see here

Re: [Kwant] Honeycomb HE

2015-08-25 Thread Joseph Weston
Hi, Did you already do a search on the mailing list for calculating Hall conductance? I remember that a similar question has been asked before, and you may get a more comprehensive answer there. How to attach another pair of leads at 13 x 15 and 23 x 25 with y = 10 and y =0? I'm not

Re: [Kwant] Python 3 support

2015-08-10 Thread Joseph Weston
, Aug 8, 2015 at 11:26 PM, Joseph Weston joseph.westo...@gmail.com wrote: Dear all, Here's an update on the progress. The Python 3 port is complete, all tests pass (on my machine) and the docs build. You can find these changes on my Github: https://github.com/jbweston/kwant/tree

Re: [Kwant] Python 3 support

2015-08-08 Thread Joseph Weston
Dear all, Here's an update on the progress. The Python 3 port is complete, all tests pass (on my machine) and the docs build. You can find these changes on my Github: https://github.com/jbweston/kwant/tree/python3 Although the tests run on my machine, I haven't tested it anywhere else yet

[Kwant] Python 3 support

2015-08-07 Thread Joseph Weston
Dear Kwant users, I am looking to port Kwant 1.0.4 to Python 3 ahead of the development work on Kwant 2.0, which will begin soon. Kwant 2.0 will be fully Python 3 from the start, and so it will be useful to have the existing Kwant 1.x as Python 3 to serve as a base for Kwant 2.0. In addition, any

Re: [Kwant] Nearest neighbor Hamiltonian elements (Current density maps)

2015-08-01 Thread Joseph Weston
Hi Sam, I've included an ipython notebook for anyone who might want to check it out (hopefully it works): http://nbviewer.ipython.org/github/samlagasse/LaGasse_QT/blob/master/QHE_currentdensity.ipynb Neat! Thanks for sharing, it's really good to have some publicly available examples of Kwant

Re: [Kwant] defining hopping in the lead

2015-07-31 Thread Joseph Weston
Hi, Dear Joe, I guess it should be [1] instead of [0] in your correction. We need not Id , but a unit shift. Well you first need to add all hoppings in a unit cell so we need to the identity group element, [0], and then we want hoppings from one unit cell to the next, so the group element

Re: [Kwant] defining hopping in the lead

2015-07-30 Thread Joseph Weston
Hi, Dear Developers, Could you help with defining the hopping in the lead, please. My problem is that in the non-finalized system, sites() contains only one copy on the lead unit cell and I fail to write a correct hopping that would make the lead connected. Yes, because the Builder that

Re: [Kwant] Nearest neighbor Hamiltonian elements (Current density maps)

2015-07-28 Thread Joseph Weston
Hi, Kwant finalized systems have a graph which can be efficiently queried to get the neighbours of a site (neighbours here means that they are joined by a hopping) you can do: ... lat = kwant.lattice.honeycomb() sys = make_system(lat) fsys = sys.finalized() i =

[Kwant] [PATCH] initialize numpy arrays to zero

2015-07-24 Thread Joseph Weston
a patch. Joe From e31bc65a0812dcbcc69147bd17fa6b3feaf548cc Mon Sep 17 00:00:00 2001 From: Joseph Weston joseph.westo...@gmail.com Date: Fri, 24 Jul 2015 22:27:30 +0200 Subject: [PATCH] initialize numpy arrays to zero Before this commit, if there was a lead for which the inter-cell hopping matrix

Re: [Kwant] Quantum Hall effect

2015-07-21 Thread Joseph Weston
no attribute 'family' I have read several examples using HoppingKind to define the hopping. I don't know what's wrong in my case. Could you please help me with that? Thank you very much. Best, T.C. On 20 July 2015 at 17:01, Joseph Weston joseph.wes...@cea.fr wrote: Hi, I apologize

Re: [Kwant] Magneto-resistance disorder average

2015-07-09 Thread Joseph Weston
Hi, I've defined the hopping function like def hopx1(site1, site2, B, salt): y1 = site1.pos[1] y2 = site2.pos[1] return 1j*(t2/4)*exp(-1j * B * (y2+y1)/2) *sigma_y the salt argument, which also appears in the onsite term makes this hopping function work. Though

Re: [Kwant] Magneto-resistance disorder average

2015-07-09 Thread Joseph Weston
Hi, Hi Joe, I've tried using something like def onsite(site, B, salt): return 0.05 * gauss(repr(site),salt='config1')*sigma_0-m*sigma_z So, usually one would do: def onsite(site, B, salt): return 0.05 * gauss(repr(site),salt=salt)*sigma_0-m*sigma_z

Re: [Kwant] Kwant.greens_function

2015-05-18 Thread Joseph Weston
Hi, Dear all, Since I used NEGF in my previous study, I want to use Green's function in Kwant. I have tried a simple Kwant program to check my understanding of kwant.greens_function and lead.selfenergy(energy), but it gives wrong results. I used Fisher-Lee relation to calculate the

Re: [Kwant] About the Green's function

2015-05-13 Thread Joseph Weston
Hi, Dear authors, I found a description for the greens_function in the Kwant document: This function can be used to calculate the conductance and other transport properties of a system, so, we can also use the fisher-lee relation to calculate the conductance in Kwant? Absolutely! In fact,

Re: [Kwant] [PROVENANCE INTERNET] Re: bug in kwant installation requirement in PyPi

2015-05-04 Thread Joseph Weston
Hi, Thanks for letting us know about the problems with “pip”. The state of python packaging has been messy, only recently there has been some progress [1]. The way Kwant is packaged reflects the documentation on Python packaging for Python 2.7. We’ll see how we can improve things. I think

Re: [Kwant] what is the wave function inside the system?

2015-04-28 Thread Joseph Weston
Hi, I'd like to add to Christoph's answer Thanks for feedback, but I am still confused. Let me make an example: there are two leads 0 and 1, the lead 0 is filled more than lead 1; from the leads 0 there is an outgoing mode exp(i k x), which is normalized by flux in the leads; the wave

Re: [Kwant] hall resistance

2015-03-05 Thread Joseph Weston
Hi, I am a researcher from UFT-Brazil. I am trying to calculate Hall and longitudinal resistances at six terminal bar with antidots. I have some doubts about the order assigned to the leads because i create them in pairs. I sent part of the python code. The lead numbering starts from 0 and

Re: [Kwant] kwant.plotter.plot site_color 'order' on tutorial

2015-03-05 Thread Joseph Weston
Hi Julien, I'd like to add to Michael's response with respect to the randomness of `kwant.digest`. You wrote: - I get the same color for each atom when I run several times. Is this because 'kwant.digest.uniform' is not so random? It seems as if you are expecting that the site colours should

<    1   2   3   >