Re: [Kwant] regarding installation of kwant

2018-05-04 Thread Rafal Skolasinski
You are welcome.

On Fri, 4 May 2018, 08:53 shyam lochan bora, 
wrote:

> Thank you so much sir..
>
>
> Regards
>
> Shyam Lochan Bora
>
> On Thu, May 3, 2018 at 7:04 PM, Rafal Skolasinski <
> r.j.skolasin...@gmail.com> wrote:
>
>> Hello again,
>>
>> Installing conda should be as easy as
>> ```
>> wget
>> https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
>> bash Miniconda3-latest-Linux-x86_64.sh
>> ```
>>
>> be sure to update ``.bashrc`` as the installation script recommends.
>> Please refer to conda [documentation](https://conda.io) for more
>> information and basic usage.
>>
>> Once conda is set you can install most commonly used scientific packages
>> and kwant with
>> ```
>> conda install -c conda-forge anaconda kwant
>> ```
>>
>>
>> Happy kwanting!
>> Rafal
>>
>>
>>
>>
>>
>> --
>> Rafał Skolasiński
>>
>> GitHub: https://github.com/RafalSkolasinski
>> Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski
>>
>> On 3 May 2018 at 13:19, shyam lochan bora 
>> wrote:
>>
>>> Sure sir, Could you please provide the details how to install python and
>>> kwant using conda.
>>>
>>>
>>> Thanking you
>>>
>>> Regards
>>> Shyam lochan bora
>>>
>>> On Thu, May 3, 2018 at 4:46 PM, Rafal Skolasinski <
>>> r.j.skolasin...@gmail.com> wrote:
>>>
 What happens if you start notebook without "--matplotlib=inline"?

 Do you mind trying to install everything via conda?
 It should provide the most reliable experience regarding your whole
 Python setup.

 Best,
 Rafal





 --
 Rafał Skolasiński

 GitHub: https://github.com/RafalSkolasinski
 Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski

 On 3 May 2018 at 13:10, shyam lochan bora 
 wrote:

> Dear sir,
> I installed the ipython notebook using pip install command
> and started it using
> ipython notebook --matplotlib=inline
>  when I import kwant in the notebook
> "1525364968533 addons.productions warn failed downloading
> xml,status:0, resason :error"
> this occured in the terminal.
>
>
> Regards
> Shyam Lochan Bora
>
>
> On Thu, May 3, 2018 at 4:26 PM, Rafal Skolasinski <
> r.j.skolasin...@gmail.com> wrote:
>
>> Hi,
>>
>> Please use the option "Reply All".
>> Also how do you start the "ipython notebook", how did you install it.
>>
>> Best,
>> Rafal
>>
>>
>>
>>
>>
>> --
>> Rafał Skolasiński
>>
>> GitHub: https://github.com/RafalSkolasinski
>> Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski
>>
>> On 3 May 2018 at 12:54, shyam lochan bora 
>> wrote:
>>
>>> Dear sir ,
>>>  I am running ubuntu 16.4.
>>> In windows 10 ,kwant is installed and i am running it from notepad++
>>> In Ubuntu i am trying to use it  from ipython notebook..
>>> Thank you sir. I will provide you the error message.
>>>
>>>
>>>
>>> Regards
>>> Shyam Lochan Bora
>>>
>>>
>>> On Thu, May 3, 2018 at 4:16 PM, Rafal Skolasinski <
>>> r.j.skolasin...@gmail.com> wrote:
>>>
 Hi,

 Which version of Ubuntu do you run and how did you install Jupyter
 Notebook?
 Could you provide a full error message that you see in the notebook?

 I cannot help you with Windows 10, maybe someone else have
 experience with it?

 Best,
 Rafal






 --
 Rafał Skolasiński

 GitHub: https://github.com/RafalSkolasinski
 Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski

 On 3 May 2018 at 12:35, shyam lochan bora 
 wrote:

> Dear Sir,
>  Yesterday i was able to install kwant on my windows 10
> succesfully but in Ubuntu 16.4
> I am not able to install it.
> I was trying to install it by giving the following commands
> "sudo apt-add-repository -s ppa:kwant-project/ppa
> sudo apt- get update
> sudo apt-get install python3-kwant python-kwant-doc"
> everything was good but when i tried to import kwant from my
> ipython notebook error occurs.
> Could you please provide me the detailed instructions and
> requirements to install kwant in ubuntu and could you please tell how 
> to
> install jupiter notebook in windows 10.
>
> Thanking you.
>
> Regards
> Shyam Lochan Bora.
>
>
> On Wed, May 2, 2018 at 7:44 PM, Rafal Skolasinski <
> r.j.skolasin...@gmail.com> wrote:
>
>> Hi,
>>
>> Could you provide more detailed description of the problem on
>> Ubuntu?
>>
>> Best,
>> Rafal
>>
>> On Wed, 2 May 2018, 16:11 shyam lochan bora, <
>

Re: [Kwant] regarding installation of kwant

2018-05-04 Thread shyam lochan bora
Thank you so much sir..


Regards

Shyam Lochan Bora

On Thu, May 3, 2018 at 7:04 PM, Rafal Skolasinski  wrote:

> Hello again,
>
> Installing conda should be as easy as
> ```
> wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
> bash Miniconda3-latest-Linux-x86_64.sh
> ```
>
> be sure to update ``.bashrc`` as the installation script recommends.
> Please refer to conda [documentation](https://conda.io) for more
> information and basic usage.
>
> Once conda is set you can install most commonly used scientific packages
> and kwant with
> ```
> conda install -c conda-forge anaconda kwant
> ```
>
>
> Happy kwanting!
> Rafal
>
>
>
>
>
> --
> Rafał Skolasiński
>
> GitHub: https://github.com/RafalSkolasinski
> Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski
>
> On 3 May 2018 at 13:19, shyam lochan bora  wrote:
>
>> Sure sir, Could you please provide the details how to install python and
>> kwant using conda.
>>
>>
>> Thanking you
>>
>> Regards
>> Shyam lochan bora
>>
>> On Thu, May 3, 2018 at 4:46 PM, Rafal Skolasinski <
>> r.j.skolasin...@gmail.com> wrote:
>>
>>> What happens if you start notebook without "--matplotlib=inline"?
>>>
>>> Do you mind trying to install everything via conda?
>>> It should provide the most reliable experience regarding your whole
>>> Python setup.
>>>
>>> Best,
>>> Rafal
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Rafał Skolasiński
>>>
>>> GitHub: https://github.com/RafalSkolasinski
>>> Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski
>>>
>>> On 3 May 2018 at 13:10, shyam lochan bora 
>>> wrote:
>>>
 Dear sir,
 I installed the ipython notebook using pip install command
 and started it using
 ipython notebook --matplotlib=inline
  when I import kwant in the notebook
 "1525364968533 addons.productions warn failed downloading xml,status:0,
 resason :error"
 this occured in the terminal.


 Regards
 Shyam Lochan Bora


 On Thu, May 3, 2018 at 4:26 PM, Rafal Skolasinski <
 r.j.skolasin...@gmail.com> wrote:

> Hi,
>
> Please use the option "Reply All".
> Also how do you start the "ipython notebook", how did you install it.
>
> Best,
> Rafal
>
>
>
>
>
> --
> Rafał Skolasiński
>
> GitHub: https://github.com/RafalSkolasinski
> Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski
>
> On 3 May 2018 at 12:54, shyam lochan bora 
> wrote:
>
>> Dear sir ,
>>  I am running ubuntu 16.4.
>> In windows 10 ,kwant is installed and i am running it from notepad++
>> In Ubuntu i am trying to use it  from ipython notebook..
>> Thank you sir. I will provide you the error message.
>>
>>
>>
>> Regards
>> Shyam Lochan Bora
>>
>>
>> On Thu, May 3, 2018 at 4:16 PM, Rafal Skolasinski <
>> r.j.skolasin...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Which version of Ubuntu do you run and how did you install Jupyter
>>> Notebook?
>>> Could you provide a full error message that you see in the notebook?
>>>
>>> I cannot help you with Windows 10, maybe someone else have
>>> experience with it?
>>>
>>> Best,
>>> Rafal
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Rafał Skolasiński
>>>
>>> GitHub: https://github.com/RafalSkolasinski
>>> Kwant GitLab: https://gitlab.kwant-project.org/r-j-skolasinski
>>>
>>> On 3 May 2018 at 12:35, shyam lochan bora 
>>> wrote:
>>>
 Dear Sir,
  Yesterday i was able to install kwant on my windows 10 succesfully
 but in Ubuntu 16.4
 I am not able to install it.
 I was trying to install it by giving the following commands
 "sudo apt-add-repository -s ppa:kwant-project/ppa
 sudo apt- get update
 sudo apt-get install python3-kwant python-kwant-doc"
 everything was good but when i tried to import kwant from my
 ipython notebook error occurs.
 Could you please provide me the detailed instructions and
 requirements to install kwant in ubuntu and could you please tell how 
 to
 install jupiter notebook in windows 10.

 Thanking you.

 Regards
 Shyam Lochan Bora.


 On Wed, May 2, 2018 at 7:44 PM, Rafal Skolasinski <
 r.j.skolasin...@gmail.com> wrote:

> Hi,
>
> Could you provide more detailed description of the problem on
> Ubuntu?
>
> Best,
> Rafal
>
> On Wed, 2 May 2018, 16:11 shyam lochan bora, <
> shyamlocha...@gmail.com> wrote:
>
>> dear sir,
>>  I am unable to install kwant on windows and ubuntu after
>> following the instructions.
>> please help me in this regard.
>>
>>
>>
>>
>> Thank you
>>
>>>

Re: [Kwant] Visualize current through a 2D cut for a 3D system

2018-05-04 Thread Joseph Weston
Hi again,

> Hello Joseph,
>
> One problem that I see is that I can only get neighbors() from
> Builders and lattices (using site.family).
>
> Using something like this:
>
> def first_neighbors(to_site, from_site):
>   return to_site in from_site.family.neighbors(1)
>
> is a good idea, but am I really comparing two sites?
>
> 
> for i in x.family.neighbors(1):
>     print(i)
>
> HoppingKind((1, 0, 0), )
> HoppingKind((0, 1, 0), )
> ---
>

Ah, sorry I was confused.


> Also, since this is very expensive computationally, is there any other
> way to find the hopping distance between two sites?

Sure! If the sites are from the same lattice then you can just take the
difference of the "tags" of the sites:

    delta = to_site.tag - from_site.tag

'delta' will be an integer array: the position of the site in the basis
of lattice vectors. If the sites are from different
lattices then you probably can't do better than comparing the realspace
positions:

    realspace_delta = to_site.pos - from_site.pos

Happy Kwanting,

Joe




Re: [Kwant] Visualize current through a 2D cut for a 3D system

2018-05-04 Thread elchatz



Thank you. That's great.



Quoting Joseph Weston :


Hi again,


Hello Joseph,

One problem that I see is that I can only get neighbors() from
Builders and lattices (using site.family).

Using something like this:

def first_neighbors(to_site, from_site):
  return to_site in from_site.family.neighbors(1)

is a good idea, but am I really comparing two sites?


for i in x.family.neighbors(1):
    print(i)

HoppingKind((1, 0, 0), )
HoppingKind((0, 1, 0), )
---



Ah, sorry I was confused.



Also, since this is very expensive computationally, is there any other
way to find the hopping distance between two sites?


Sure! If the sites are from the same lattice then you can just take the
difference of the "tags" of the sites:

    delta = to_site.tag - from_site.tag

'delta' will be an integer array: the position of the site in the basis
of lattice vectors. If the sites are from different
lattices then you probably can't do better than comparing the realspace
positions:

    realspace_delta = to_site.pos - from_site.pos

Happy Kwanting,

Joe




--
Dr. Eleni Chatzikyriakou
Computational Physics lab
Aristotle University of Thessaloniki
elch...@auth.gr - tel:+30 2310 998109