Skip to content

Gwread

Asbjørn Rasmussen requested to merge gwread into master

There was a bug in g0w0.read_contribution. The function ase.utils.opencw was used to "read" a file, however, opencew opens in "create-exclusive-write-mode", which is clearly incorrect for a function called read_contribution. It meant that the file was emptied and the previously calculated contributions were discarded. This had no impact on the results calculated, but it has had a huge performance impact on my calculations.

Read_contribution is used by g0w0.calculate_ks_xc_contribution and g0w0.calculate_exact_exchange both of which may want to save a file. To handle this, I added an if-statement so only master attempts to save. (Previously this was handled by opencew passing a dummy file-descriptor back to g0w0.)

Merge request reports