Git Product home page Git Product logo

Comments (3)

dean0x7d avatar dean0x7d commented on September 20, 2024

Depending on your situation, there are two options:

  1. Reorganize the Lattice definition to work around the limit.
  2. Or change a variable in the C++ source code to increase the available memory.

Exactly how to apply option 1 would depend on the unit cell you're building. I'm guessing it's either a large supercell or a model with a large number of orbitals per lattice site. The hopping limit is actually a limit of the number of unique hopping energies that can be saved. In the case of a supercell, this means that you can work around the limit by creating the supercell with a small set of constant energy hoppings and then applying any position dependent behavior via @pb.hopping_energy_modifier. But again, this depends on what kind of model you're building, so let me know if you need something more specific.

For option 2, you could just go into the C++ source and change this line v0.8.1-Lattice.hpp#L11 from std::int8_t to std::int16_t which would bump the limit up to ~32000 unique hopping energies. You would need to recompile the package. The advanced installation guide has the instructions for that here. I recommend that you also use git checkout v0.8.1 so that you apply the change to the latest stable version rather than the master branch (development is well under way for v0.9 on master).

Let me know if need any help either way. I'd also be curious to know what kind of model hit the limit, if you can share more details. Version v0.9 should resolve the limit for multi-orbital models, but perhaps I should take a look at lifting the supercell limits sooner rather than later.

from pybinding.

markd87 avatar markd87 commented on September 20, 2024

Thanks very much.

The tight binding model is for a single layer of InSe, with 4 atoms in the unit cell (hexagonal lattice), each atom has 4 orbitals s, px, py, pz and I consider hopping to nearest and next-nearest neighbours between In and Se, In and In, and Se and Se. The total number of parameters including on-site energies is 37.

So I will try to increase the memory for that variable.

from pybinding.

dean0x7d avatar dean0x7d commented on September 20, 2024

Yes, that would definitely go over the limit due to 4 orbitals per site + next-nearest. The memory increase workaround should do well until v0.9 brings better multi-orbital support.

from pybinding.

Related Issues (20)

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.