Giter VIP home page Giter VIP logo

wannier90-utils's Introduction

wannier90-utils

https://travis-ci.org/jimustafa/wannier90-utils.svg?branch=master https://coveralls.io/repos/github/jimustafa/wannier90-utils/badge.svg?branch=master Documentation Status

About

This package was developed during the course of my graduate studies at UC Berkeley in the field of condensed matter physics. Its purpose is to provide a Python library for reading/writing and manipulating data associated with the wannier90 code [1].

Requirements

  • Python 3.6+
  • NumPy
  • SciPy

Installing

To install, clone the repository and run:

python setup.py install

License

This software is free to use under the BSD license. See LICENSE.txt for more information.

wannier90-utils's People

Contributors

jimustafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wannier90-utils's Issues

w90io.read_hr takes long time on windows

I have tried to use read_hr function on both windows and mac. It works smoothly on Mac, while it takes forever on windows(>15mins). It should not be related to computer performance as the windows computer should perform better than macbook. When I interrupt the kernal it always stops at this line:

KeyboardInterrupt Traceback (most recent call last)
in
----> 1 HR, Rvectors, Rweights = w90io.read_hr('wannier90_hr.dat')

D:\machine learning\python\lib\site-packages\wannier90_utils-0.1.0-py3.7.egg\w90utils\io_hr.py in read_hr(fname)
23
24 istart_hr = 3+ndegen_lines
---> 25 raw_data = np.fromstring(''.join(contents[istart_hr:]), sep='\n').reshape((-1, 7))
26
27 hr = raw_data[:, 5] + 1j*raw_data[:, 6]

KeyboardInterrupt:

Wannier centers inconsistent with Wannier90 when 'guiding_centres' is used.

I've encountered a case where the Wannier centers computed by Wannier90 and wannier90-utils are inconsistent. Unfortunately I'm not allowed to share the input files[*], but the root cause is that in

rv[i] = -1 * np.sum(bwv * np.imag(np.log(mii[:, i]))[:, np.newaxis], axis=0)

the np.imag(np.log(mii[:, i])) is well-defined only up to multiples of 2ฯ€.

This is the same "branch cut" problem that is worked around in Wannier90 by setting the guiding_centres=.true. option.

I'm not sure what the best approach would be here - do you think it would make sense to add a similar option that selects the closest Wannier center to a given "reference"?

[*] I'll try to come up with some other example that reproduces this behavior..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.