Good morning, I am trying to learn how to run the Z2Pack, since it would be really useful for my research project. After some trials, I could get the expected results for two examples you offer: Bi and Bi2Se3. Now I would like to test some known system, like graphene, to check if what I'm doing is correct. Well, it may not be the case, since I can't get Z2=1. Would you, please, give me a hint? I attach the "run.py" file, scf and wannier90 inputs. I also add the pseudopotential (it was generated using the code by Andrea del Corso, within the QE package). Thanks in advance, Jimena Olmos Asar
Hello Asar, I don't think graphene is a good example since the graphene is nearly gapless even with SOC. The gap check in Z2PACK will always fail.
Liucus
在2016-11-18 19:49:37,Jimena Olmos Asarjimenaolmos@gmail.com写道:
Good morning,
I am trying to learn how to run the Z2Pack, since it would be really useful for my research project. After some trials, I could get the expected results for two examples you offer: Bi and Bi2Se3. Now I would like to test some known system, like graphene, to check if what I'm doing is correct. Well, it may not be the case, since I can't get Z2=1. Would you, please, give me a hint? I attach the "run.py" file, scf and wannier90 inputs. I also add the pseudopotential (it was generated using the code by Andrea del Corso, within the QE package).
Thanks in advance,
Jimena Olmos Asar
Hi Jimena,
First of all, I think your problem might just be this: The surface should be lambda t1, t2: [t1, t2 / 2, 0] not lambda t1, t2: [t1, t2, 0]. This is because the Z2 invariant is calculated between the two time-reversal invariant lines, not across the full BZ.
Here are a few other remarks:
As Liucus noted, a problem arises when the direct band gap is very small. In principle the Z2 invariant can be calculated whenever the direct band gap is not zero anywhere on the surface you are calculating. However, the default values for the convergence parameters are better suited for common "well-behaved" systems. When the band gap is very small at some point, the Wannier charge centers can move very quickly. As a consequence, you should use a large number of starting lines (you've done that already), and 'min_neighbour_dist' should usually be rather small (this is just the smallest possible distance between calculated Wannier charge center lines before the iteration stops).
Note that the 'gap_tol' doesn't check for the band gap -- the gap in question here is the gap in the Wannier charge center spectrum (the check makes sure the middle of the gap is not too close to a neighbouring WCC). Z2Pack doesn't have knowledge of the band gap itself, but it just so happens that systems where the band gap is small are also troublesome for the 'gap_tol' check.
I tried to run your input files, but it seems the nscf and pw2wan input files are missing. If the problem persists, please send me these so I can try to solve the problem.
Best regards,
Dominik
On 21.11.2016 01:52, liubi@mail.ustc.edu.cn wrote:
Hello Asar, I don't think graphene is a good example since the graphene is nearly gapless even with SOC. The gap check in Z2PACK will always fail.
Liucus
在2016-11-18 19:49:37,Jimena Olmos Asarjimenaolmos@gmail.com mailto:jimenaolmos@gmail.com写道:
Good morning, I am trying to learn how to run the Z2Pack, since it would be really useful for my research project. After some trials, I could get the expected results for two examples you offer: Bi and Bi2Se3. Now I would like to test some known system, like graphene, to check if what I'm doing is correct. Well, it may not be the case, since I can't get Z2=1. Would you, please, give me a hint? I attach the "run.py" file, scf and wannier90 inputs. I also add the pseudopotential (it was generated using the code by Andrea del Corso, within the QE package). Thanks in advance, Jimena Olmos Asar
EDIT: It should be lambda t1, t2: [t1 / 2, t2, 0]. The second parameter should always go across the full BZ, or back into the same point.
On 21.11.2016 17:32, Dominik Gresch wrote:
Hi Jimena,
First of all, I think your problem might just be this: The surface should be lambda t1, t2: [t1, t2 / 2, 0] not lambda t1, t2: [t1, t2, 0]. This is because the Z2 invariant is calculated between the two time-reversal invariant lines, not across the full BZ.
Here are a few other remarks:
As Liucus noted, a problem arises when the direct band gap is very small. In principle the Z2 invariant can be calculated whenever the direct band gap is not zero anywhere on the surface you are calculating. However, the default values for the convergence parameters are better suited for common "well-behaved" systems. When the band gap is very small at some point, the Wannier charge centers can move very quickly. As a consequence, you should use a large number of starting lines (you've done that already), and 'min_neighbour_dist' should usually be rather small (this is just the smallest possible distance between calculated Wannier charge center lines before the iteration stops).
Note that the 'gap_tol' doesn't check for the band gap -- the gap in question here is the gap in the Wannier charge center spectrum (the check makes sure the middle of the gap is not too close to a neighbouring WCC). Z2Pack doesn't have knowledge of the band gap itself, but it just so happens that systems where the band gap is small are also troublesome for the 'gap_tol' check.
I tried to run your input files, but it seems the nscf and pw2wan input files are missing. If the problem persists, please send me these so I can try to solve the problem.
Best regards,
Dominik
On 21.11.2016 01:52, liubi@mail.ustc.edu.cn wrote:
Hello Asar, I don't think graphene is a good example since the graphene is nearly gapless even with SOC. The gap check in Z2PACK will always fail.
Liucus
在2016-11-18 19:49:37,Jimena Olmos Asarjimenaolmos@gmail.com mailto:jimenaolmos@gmail.com写道:
Good morning, I am trying to learn how to run the Z2Pack, since it would be really useful for my research project. After some trials, I could get the expected results for two examples you offer: Bi and Bi2Se3. Now I would like to test some known system, like graphene, to check if what I'm doing is correct. Well, it may not be the case, since I can't get Z2=1. Would you, please, give me a hint? I attach the "run.py" file, scf and wannier90 inputs. I also add the pseudopotential (it was generated using the code by Andrea del Corso, within the QE package). Thanks in advance, Jimena Olmos Asar
Dear Liucius and Dominik, thank you very much for your answers. Both of them were really useful. Sorry I am replying this late, but I wanted to do some tests before bringing my news. As Dominik said, my surface was wrong. So I corrected it, and tried again for graphene. However, and probably because of what Liucius said, the z2 was 0 again. In the convergence report, there was one check that didn't pass (MoveCheck). Anyway, I moved to other system: PbCF2 (Scientific Reports, http://www.nature.com/articles/srep26123). The surface I calculated was the same as for graphene, and I could get z2=1. So, thank you! I would ask you, if you don't mind, one more question. Is there a way to obtain the data in a text form to plot them myself? I am working on a cluster, and I can not plot through matplotlib. I added in the running file the flags print(result.wcc) and print(result.t), but the format of the output isn't very friendly. Thank you again for your help, Jimena
Dear Jimena,
There is no built-in text output, no. You can of course print the python objects in any way you like. For example, the following code would produce a CSV format:
print(', '.join(['t'] + ['wcc' + str(i) for i in range(len(result.wcc[0]))])) for t, w in zip(result.t, result.wcc): print(', '.join(['{}'] * (len(w) + 1)).format(t, *w))
If the problem is just that you can't plot on the cluster, it might be easier to just save the data on the cluster, move the file to your machine, and then load it there (using z2pack.save, z2pack.load http://z2pack.ethz.ch/doc/2.0/tutorial_surface.html#saving-and-loading-the-r...) to plot.
Finally, in my experience it usually works to plot directly on the cluster if you use the 'agg' backend for matplotlib. To do this, just add
import matplotlib matplotlib.use('Agg')
to your script. Note that this statement should be before any other imports which use matplotlib (so before "import z2pack").
Best,
Dominik
On 24.11.2016 11:36, Jimena Olmos Asar wrote:
Dear Liucius and Dominik, thank you very much for your answers. Both of them were really useful. Sorry I am replying this late, but I wanted to do some tests before bringing my news. As Dominik said, my surface was wrong. So I corrected it, and tried again for graphene. However, and probably because of what Liucius said, the z2 was 0 again. In the convergence report, there was one check that didn't pass (MoveCheck). Anyway, I moved to other system: PbCF2 (Scientific Reports, http://www.nature.com/articles/srep26123). The surface I calculated was the same as for graphene, and I could get z2=1. So, thank you! I would ask you, if you don't mind, one more question. Is there a way to obtain the data in a text form to plot them myself? I am working on a cluster, and I can not plot through matplotlib. I added in the running file the flags print(result.wcc) and print(result.t), but the format of the output isn't very friendly. Thank you again for your help, Jimena
Thank you very much for your help. Best regards, Jimena