Giter Site home page Giter Site logo

z2packdev / tbmodels Goto Github PK

View Code? Open in Web Editor NEW
35.0 5.0 27.0 11.64 MB

A tool for creating and manipulating tight-binding models.

Home Page: https://tbmodels.greschd.ch

License: Apache License 2.0

Shell 0.40% Python 99.60%
solid-state-physics tight-binding python

tbmodels's People

Contributors

aeantipov avatar dependabot[bot] avatar greschd avatar mailhexu avatar minkyu-p avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

tbmodels's Issues

band selection in construct_kdotp part

In the function MODEL_TB.construct_kdotp(k_star, order=2), the program will construct the kp model with same band number as the given TB model.

Is it possible to construct a kp model with much less band number, for example 3 bands around Gamma from a multy-band W90 model?

Thank you very much,
Yang

Check if per-matrix sparsity (automatic) makes sense

Currently, the hopping matrices can either all be stored as dense matrices, or all sparse. It might make sense to mix sparse and dense matrices though.

Since there's anyway a compatibility layer in the form of _array_cast and empty_matrix, it might not be too hard to implement.

What's more difficult is probably adjusting the sparsity dynamically. A good starting point could be analyzing the matrices in set_sparse, and then set each according to some heuristic for the filling factor (adjustable?).

To be checked:

  • Find some models where mixed sparse / dense provides measurable benefit.
  • Find cut-off where storing dense / sparse is more efficient
  • Check impact on Hamiltonian evaluation
  • Are there places where matrix manipulation relies on it all being the same data type?

Make 'pos=None' handling consistent

Currently, setting pos=None in the constructor will set all positions to the origin. There are few places in the code that rely on this behavior, but also some places where pos is not None is explicitly checked.

We need to decide if pos=None should be possible, and then either remove the pos is None checks or add them where they are missing.

Converting WANNIERT_HR.dat for unit cell to that of SUPPERCELL

Hi,
By using the following commands I have tried to produce wannier_hr.dat file for silicon supercell. the file is produced in model3.
But the values are different. The model2 file is differing from wannier_hr.dat file of the silicon unit cell, too.
The next problem is belonging to model4, this command does not run.
I would appreciate your comments.
import tbmodels
import numpy as np
model = tbmodels.Model.from_wannier_folder(folder='/d......./TBmodels-trunk/examples/silicon/build/', prefix='silicon')
supercell_model = model.supercell((4, 4, 1))
model2=model.to_hr_file('model_hr.dat')
model3=supercell_model.to_hr_file('supercell_model_hr.dat')
model4 = tbmodels.Model.from_hr_file('model_hr.dat')

win parser should properly consider units

Now, if units are specified, the win parser fails.

E.g. with this in the .win:

begin atoms_cart
ang
W 0. 0. 0.
end atoms_cart

it fails. The same for begin unit_cell_cart.

For now, as we only use ang (that anyway is the default) we just strip in the parser the following lines:

lines = (l for l in lines if 'ang' != l)

but of course it is subideal.
One should read the first line after 'begin', that could be already a value, or contain either bohr or ang.
If specified, one should use this as units (and convert the values where needed).
If not specified, one should check the global flag that specifies units for the whole file, and if not specified, assume the default is angstrom.

Evaluate HDF5 or SQLite for saving Models

JSON / msgpack is sub-optimal because the complex data type has a lot of overhead. Write generic from_file and to_file functions that dispatch according to the file ending.

Check unit cell convention

Use unit cell vectors as rows. This will become important when implementing the new features (from full_feature branch).

Fix behavior of symmetrize for full_group=False

Right now, it only considers the first power of the generators. However, this does not necessarily produce all symmetries in the group. Instead, all powers up to the order of the symmetry should be included.

Allow for symmetrizing the positions

Match the closest possible position when symmetrizing, to avoid having to set the positions manually (or to zero) for symmetrization to work.

Factor out unit cell / structure code

In many places, there is now code which deals with unit cells / structures (related to the uc and pos parameters), and how they transform. This should be factored out to a separate module, since it is not specific to TBmodels.

Examples:

  • Model.__add__: checks if the UC / positions match
  • reciprocal_lattice
  • Reading from Wannier90 output. Here it might pay off to use pymatgen as an intermediate parsing step, and then go from there to our type.

pymatgen.Lattice and pymatgen.Structure unfortunately only support 3D systems, so they are not an option to simply use.

Is it possible that the Kwant-interface can deal with Polyatomic

Hi Dominik,

I just found that your Tbmodels code group all the orbitals into one site when interfacing with kwant.

Is there a way to deal with Polyatomic case that simulate the real system which has different sites and different orbitals on each site?

Thanks
Xiangru

Parsing the _r file to obtain dipole elements

I have written a little modification that can read wannier90's *_r.dat output and create the transition dipole elements. If this is relevant, I could try to match the style of the project and create a pull request. I might need some help with the proper implementation, since I'am unsure if I should also go for the possibility of sparse matrices and how to deal with iterators properly.

Implement pos_kind='atom'

Implement reading the orbital positions from the atomic positions. For this, the orbital - atom correspondence needs to be made from the projections in the .win file.

Improve performance of "listable" hamilton evaluation for large models

When using the new "listable" mode of the Hamiltonian evaluation for large matrices, the multiplication between the exponential and hopping matrices seems to scale badly.

This needs to be investigated and fixed, without affecting the performance for many k-points on small models too much.

Real space Eigenfunctions

Dear Developers,
Thanks for making the code available for users.

May I ask if it is possible to obtain real-space eigenfunctions from wannier90 output using TB models?

Thanks in advance!

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.