[SPAM] Troubles calculating Z2 (graphene)

Dominik Gresch greschd at phys.ethz.ch
Thu Nov 24 12:03:42 CET 2016

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 
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 
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

to your script. Note that this statement should be before any other 
imports which use matplotlib (so before "import z2pack").



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

More information about the Z2Pack mailing list