Pybinding

Latest version: v0.9.5

Safety actively analyzes 613568 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.9.5

It has been a long time since the last version was released. The Python ecosystem has changed
quite a bit in the meantime and this has led to a number of compatibility issues when installing
or running pybinding. The main purpose of this new version is to bring this library back to life
with lots of compatibility fixes and general modernization.

That said, a couple of new features have also snuck in: site and hopping generators should help
with the creation of more general models that were not possible before. They make it possible to
create heterostructures and systems with various forms of disorder.

Thank you to [MAndelkovic (Miša Anđelković)](https://github.com/MAndelkovic)
for making this release possible! And thanks to everyone who reported the various issues.

Necromancy

* Fixed compatibility issues with Python 3.7 and 3.8. Notably, this fixes the deadlocks as
reported in [17](https://github.com/dean0x7d/pybinding/issues/17),
[21](https://github.com/dean0x7d/pybinding/issues/21), and
[23](https://github.com/dean0x7d/pybinding/issues/23).

* Fixed compatibility with new versions of `matplotlib`: the `allow_rasterization` import error
([11](https://github.com/dean0x7d/pybinding/issues/11)), various warnings, and smaller visual
glitches.

* Fixed installation errors due to the encoding of the `changelog.md` file
([7](https://github.com/dean0x7d/pybinding/issues/7)).

* Fixed failure to compile the project from source code because the Eigen library's download URL
changed ([14](https://github.com/dean0x7d/pybinding/issues/14)).

* Fixed deprecation warnings from the latest versions of `numpy`.

* Fixed documentation generation with `sphinx` v2.x.

* Dropped support for Python 3.5. You must have Python 3.6 or newer to install this version.

General bug fixes

* Fixed reversed order of `Lattice.reciprocal_vectors()`: it should be `a_n * b_n = 2pi` but it was
accidentally `a_n * b_{N-n} = 2pi`.

* Fixed incorrect Hamiltonian construction in cases where complex hoppings were used together
with translational symmetry.

New features

* Added `site_generator` which can be used to add new sites independent of the main `Lattice`
definition. This is useful for creating heterostructures or defects with various add-atoms.
See the new "Generators" section of the tutorial.

* `hopping_generator` has been promoted to a regular feature and added to the tutorial. It's
useful for creating additional local hoppings around existing sites or connecting completely new
sites which were added by a `site_generator`.

* Added `System.count_neighbors()` which counts the neighbors each site has. Useful for finding
edge atoms. Generators can request `system` as an argument so that they can stitch new atoms
to the edges. See the API reference for `site_generator` and `hopping_generator`.

* `site_state_modifier`s and `site_position_modifier`s can now be freely ordered. Before this,
all state modifiers would be evaluated first and then all position modifiers. Now, they will
be evaluated in the exact order in which they are given to `Model`. Take care: this may change
the behavior of some existing models but it will give more control to create new models which
not possible before.

0.9.4

* Fixed issues with multi-orbital models: matrix onsite terms were not set correctly if all the
elements on the main diagonal were zero ([5](https://github.com/dean0x7d/pybinding/issues/5)),
hopping terms were being applied asymmetrically for large multi-orbital systems
([6](https://github.com/dean0x7d/pybinding/issues/6)). Thanks to
[oroszl (László Oroszlány)](https://github.com/oroszl) for reporting the issues.

* Fixed KPM Hamiltonian scaling for models with all zeros on the main diagonal but asymmetric
spectrum bounds (non-zero KPM scaling factor `b`).

* Fixed compilation on certain Linux distributions
([4](https://github.com/dean0x7d/pybinding/issues/4)). Thanks to
[nu11us (Will Eggleston)](https://github.com/nu11us) for reporting the issue.

* Fixed compilation with Visual Studio 2017.

* Improved support for plotting slices of multi-layer systems. See "Plotting Guide" > "Model
structure" > "Slicing layers" in the documentation.

0.9.3

* Added support for Kwant v1.3.x and improved `Model.tokwant()` exporting of multi-orbital models.

* Fixed errors when compiling with GCC 6.

0.9.2

New KPM features and improvements

* Added a method for calculating spatial LDOS using KPM. See the "Kernel Polynomial Method"
tutorial page and the `KPM.calc_spatial_ldos` API reference.

* Improved single-threaded performance of `KPM.calc_dos` by ~2x by switching to a more efficient
vectorization method. (Multiple random starter vectors are now computed simultaneously and
accelerated using SIMD intrinsics.)

* Various KPM methods now take advantage of multiple threads. This improves performance depending
on the number of cores on the target machine. (However, for large systems performance is limited
by RAM bandwidth, not necessarily core count.)

* LDOS calculations for multiple orbitals also take advantage of the same vectorization and
multi-threading improvements. Single-orbital LDOS does not benefit from this but it has received
its own modest performance tweaks.

* Long running KPM calculation now have a progress indicator and estimated completion time.

General improvements and bug fixes

* `StructureMap` can now be sliced using a shape. E.g. `s = pb.rectangle(5, 5); smap2 = smap[s]`
which returns a smaller structure map cut down to the given shape.

* Plotting the structure of large or periodic systems is slightly faster now.

* Added 2D periodic supercells to the "Shape and symmetry" section of the tutorial.

* Added a few more examples to the "Plotting guide" (view rotation, separating sites and hoppings
and composing multiple plots).

* Fixed broken documentation links when using the online search function.

* Fixed slow Hamiltonian build when hopping generators are used.

0.9.1

* Fixed an issue with multi-orbital models where onsite/hopping modifiers would return unexpected
results if a new `energy` array was returned (rather than being modified in place).

* Fixed `Solver.calc_spatial_ldos` and `Solver.calc_probability` returning single-orbital results
for multi-orbital models.

* Fixed slicing of `Structure` objects and made access to the `data` property of `SpatialMap` and
`StructureMap` mutable again.

0.9.0

Updated requirements

* This version includes extensive internal improvements and raises the minimum requirements for
installation. Starting with this release, only Python >= 3.5 is supported. Newer versions of the
scientific Python packages are also required: numpy >= 1.12, scipy >= 0.19 and matplotlib >= 2.0.

* On Linux, the minimum compiler requirements have also been increased to get access to C++14 for
the core of the library. To compile from source, you'll need GCC >= 5.0 or clang >= 3.5.

Multi-orbital models

* Improved support for models with multiple orbitals, spins and any additional degrees of freedom.
These can now be specified simply by inputing a matrix as the onsite or hopping term (instead of
a scalar value). For more details, see the "Multi-orbital models" section of the documentation.

* Lifted all limits on the number of sublattices and hoppings which can be defined in a `Lattice`
object. The previous version was limited to a maximum of 128 onsite and hopping terms per unit
cell (but those could be repeated an unlimited number of times to form a complete system). All
restrictions are now removed so that the unit cell size is only limited by available memory.
In addition, the memory usage of the internal system format has been reduced.

* Added a 3-band model of group 6 transition metal dichalcogenides to the Material Repository.
The available TMDs include: MoS2, WS2, MoSe2, WSe2, MoTe2, WTe2. These are all monolayers.

Composite shapes

* Complicated system geometries can now be created easily by composing multiple simple shapes.
This is done using set operations, e.g. unions, intersections, etc. A complete guide for this
functionality is available in the "Composite shapes" section of the documentation.

Kernel polynomial method

* The KPM implementation has been revised and significantly expanded. A guide and several examples
are available in the "Kernel polynomial method" section of the documentation (part 9 of the
Tutorial). For a complete overview of the available methods and kernels, see the `chebyshev`
section of the API reference.

* New builtin computation methods include the stochastically-evaluated density of states (DOS)
and electrical conductivity (using the Kubo-Bastin approach).

* The new low-level interface produces KPM expansion moments which allows users to create their
own KPM-based computation routines.

* The performance of various KPM computations has been significantly improved for CPUs with AVX
support (~1.5x speedup on average, but also up to 2x in some cases with complex numbers).

Miscellaneous

* Added the `pb.save()` and `pb.load()` convenience functions for getting result objects into/out
of files. The data is saved in a compressed binary format (Python's builtin `pickle` format with
protocol 4 and gzip). Loaded files can be immediately plotted: `result = pb.load("file.pbz")`
and then `result.plot()` to see the data.

* The eigenvalue solvers now have a `calc_ldos` method for computing the local density of states
as a function of energy (in addition to the existing `calc_spatial_ldos`).

* Improved plotting of `Lattice` objects. The view can now be rotated by passing the `axis="xz"`
argument, or any other combination of x, y and z to define the plotting plane.

Deprecations and breaking changes

* Added `Lattice.add_aliases()` method. The old `Lattice.add_sublattice(..., alias=name)` way of
creating aliases is deprecated.

* The `greens` module has been deprecated. This functionality is now covered by the KPM methods.

* The internal storage format of the `Lattice` and `System` classes has been revised. This
shouldn't affect most users who don't need access to the low-level data.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.