You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,6 @@ Of course, improvements to documents outside the documentation, such such as thi
31
31
32
32
## Contributing to the code
33
33
34
-
If you would like to contribute to the code itself, please have a look at the [developer's guide](http://z2pack.ethz.ch/doc/2.1/devguide/index.html). Before you start working on something, it's usually a good idea to submit an issue describing what you're trying to do. That way, you can get feedback on how to solve the issue before starting to code.
34
+
If you would like to contribute to the code itself, please have a look at the [developer's guide](https://z2pack.greschd.ch/en/latest/devguide/). Before you start working on something, it's usually a good idea to submit an issue describing what you're trying to do. That way, you can get feedback on how to solve the issue before starting to code.
35
35
36
36
New features should be added by branching off from the latest development branch (``dev/current``). Once you've started working on something, you can create a pull request if you would like to have some feedback on the code. You can put ``[WIP]`` (work in progress) in the PR title to let us know if you're still working on the code. To simplify the review and merging of pull requests, it is good practice to add only one feature in each PR. This is not a strict rule however -- use your best judgment to determine whether a set of changes are a logical unit.
Copy file name to clipboardExpand all lines: doc/source/links.rst
+14-6
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,22 @@ Links
7
7
8
8
The development of Z2Pack is hosted on GitHub. Here you can find the full code / input files for our examples. On the `issues <https://github.com/Z2PackDev/Z2Pack/issues>`_ page you can see what is currently being worked on, and ask questions or make suggestions for new features.
Copy file name to clipboardExpand all lines: doc/source/tutorial/new.rst
+12-12
Original file line number
Diff line number
Diff line change
@@ -5,54 +5,54 @@ What's new in Z2Pack 2.0
5
5
6
6
.. rubric :: First, the bad news
7
7
8
-
Let's get the elephant out of the room: Z2Pack version 2 is **not** backwards compatible to the previous versions. Furthermore, it is compatible only with Python 3.4 or newer. Because I know that it can be frustrating having to re-write your code when some library changes, I hesitated a long while to do this. However, there are now many things that I could solve in a more elegant way and - more importantly - I believe it will be much easier to add features to this new version. If you have code that is already running in the previous version of Z2Pack, or you cannot switch to Python 3.4 yet, here's the deal: I will **keep supporting** the last version of Z2Pack 1.X as long as there is any need for it. I have also changed the website such that old versions of the documentation are now available `here <http://z2pack.ethz.ch/doc/version.html>`_.
8
+
Let's get the elephant out of the room: Z2Pack version 2 is **not** backwards compatible to the previous versions. Furthermore, it is compatible only with Python 3.4 or newer. Because I know that it can be frustrating having to re-write your code when some library changes, I hesitated a long while to do this. However, there are now many things that I could solve in a more elegant way and - more importantly - I believe it will be much easier to add features to this new version. If you have code that is already running in the previous version of Z2Pack, or you cannot switch to Python 3.4 yet, here's the deal: I will **keep supporting** the last version of Z2Pack 1.X as long as there is any need for it.
9
9
10
10
.. rubric :: And now for the good news
11
11
12
12
I strongly believe that the package has become more well-structured and easier to use. Many of the things that were an afterthought in the previous version, such as how to restart a calculation or calculating just a single line, are now built into the core of Z2Pack. As a result, some of the quirks of the previous version have been eliminated. In the following sections, I will highlight some of the more prominent improvements.
13
13
14
14
.. rubric :: Tight-binding models on steroids
15
15
16
-
The previous version of Z2Pack contained a submodule for creating tight-binding models. This module has now matured and became its own package: `TBmodels <http://z2pack.ethz.ch/tbmodels>`_. Obviously, TBmodels is still compatible with Z2Pack. Among other improvements, evaluating a tight-binding model is now much faster. The improvement is particularly noticeable for first-principles derived tight-binding models which are much larger than other effective models. To give you a rough idea, for one particular model evaluating the Hamiltonian is about **650** times faster.
16
+
The previous version of Z2Pack contained a submodule for creating tight-binding models. This module has now matured and became its own package: `TBmodels <https://tbmodels.greschd.ch>`_. Obviously, TBmodels is still compatible with Z2Pack. Among other improvements, evaluating a tight-binding model is now much faster. The improvement is particularly noticeable for first-principles derived tight-binding models which are much larger than other effective models. To give you a rough idea, for one particular model evaluating the Hamiltonian is about **650** times faster.
17
17
18
18
.. rubric :: Saving results: going away from pickle
19
19
20
-
Saving results was previously done with the :py:mod:`pickle` module. As I've learned since writing the first version of Z2Pack, there are various reasons why this is not ideal. Most importantly, objects serialized with :py:mod:`pickle` might not be deserializable when one of the modules involved has changed. The full reasoning can be seen in a `PyCon 2014 talk by Alex Gaynor <https://www.youtube.com/watch?v=7KnfGDajDQw>`_ . By switching to ``msgpack`` as a default serializer, this problem is solved.
20
+
Saving results was previously done with the :py:mod:`pickle` module. As I've learned since writing the first version of Z2Pack, there are various reasons why this is not ideal. Most importantly, objects serialized with :py:mod:`pickle` might not be deserializable when one of the modules involved has changed. The full reasoning can be seen in a `PyCon 2014 talk by Alex Gaynor <https://www.youtube.com/watch?v=7KnfGDajDQw>`_ . By switching to ``msgpack`` as a default serializer, this problem is solved.
21
21
22
-
Another improvement in the saving process is that the calculation continues while the saving is done in a separate thread. This is particularly useful for smaller systems, where the cost of saving might be comparable or even higher than that of creating the results.
22
+
Another improvement in the saving process is that the calculation continues while the saving is done in a separate thread. This is particularly useful for smaller systems, where the cost of saving might be comparable or even higher than that of creating the results.
23
23
24
-
Finally, saving is now done in a way that ensures that the files cannot be corrupted, even if the program crashes whilst saving. This is done by first saving to a separate temporary file and then moving that file to replace the previous version.
24
+
Finally, saving is now done in a way that ensures that the files cannot be corrupted, even if the program crashes whilst saving. This is done by first saving to a separate temporary file and then moving that file to replace the previous version.
25
25
26
26
.. rubric :: New way of calculating the Wannier charge centers
27
27
28
-
One of the changes at the core of Z2Pack is how Wannier charge centers are calculated. In both versions, they are calculated from a series of overlap matrices :math:`M_0, ..., M_{n-1}`.
28
+
One of the changes at the core of Z2Pack is how Wannier charge centers are calculated. In both versions, they are calculated from a series of overlap matrices :math:`M_0, ..., M_{n-1}`.
29
29
30
-
In the previous version, a singular value decomposition
30
+
In the previous version, a singular value decomposition
31
31
32
32
.. math ::
33
33
34
34
M = V \Sigma W^\dagger
35
-
35
+
36
36
is first performed for each of the overlap matrices. Then the product
Copy file name to clipboardExpand all lines: doc/source/tutorial/system.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ includes only the upper band (because the index starts at 0).
53
53
54
54
Tight-binding models - :mod:`z2pack.tb`
55
55
---------------------------------------
56
-
For tight-binding models, the `TBmodels <http://z2pack.ethz.ch/tbmodels>`_ package (which started its life as a part of Z2Pack) is used. TBmodels uses its :py:class:`tbmodels.Model` class to describe a tight-binding model. There are several ways to create those, described in the `TBmodels tutorial <http://z2pack.ethz.ch/tbmodels/tutorial.html>`_ . Instances of :py:class:`tbmodels.Model` can be used to construct Z2Pack systems, using the :class:`z2pack.tb.System` class.
56
+
For tight-binding models, the `TBmodels <https://tbmodels.greschd.ch>`_ package (which started its life as a part of Z2Pack) is used. TBmodels uses its :py:class:`tbmodels.Model` class to describe a tight-binding model. There are several ways to create those, described in the `TBmodels tutorial <https://tbmodels.greschd.ch/en/latest/tutorial.html>`_ . Instances of :py:class:`tbmodels.Model` can be used to construct Z2Pack systems, using the :class:`z2pack.tb.System` class.
57
57
58
58
The following code shows how to create a Z2Pack system from a tight-binding model given in Wannier90's ``*_hr.dat`` format.
0 commit comments