Closed lucydot closed 1 year ago
Hi Lucy,@lucydot, I am updating the script; almost done. The bands should be working. There is still an issue with the DOS. It's a bug in this temporary ASE version; @ajjackson has already submitted the fix; you may try using his branch.
git fetch "https://gitlab.com/ajjackson/ase.git" 'mixin-eigenvalues'
git checkout -b 'ase-mixin-eigenvalues' FETCH_HEAD
Hopefully, it will be merged in hours, and we can use ASE's master branch directly.
@lucydot, in this new version, the calculate
method expects three arguments, the Atoms object with the system description, in this case, si_fcc
, the properties you want to calculate, and the system_changes, these are lists that may also be left empty. e.g.
nscf_calc.calculate(si_fcc, properties=[], system_changes=[])
Just for coherence with what I am doing, I put properties=['eigenvalues']
I think in my draft Calculator tutorial I showed how instead of calling .calculate() (which is a rather stateful procedural kind of programming...) one can use atoms.get_properties() to request the results directly. This triggers the calculation, so belongs more to a functional / lazy-evaluation programming style. It may not work as expected with every calculator yet, though...
Not saying we have to do it one way or the other, there are use-cases for both at the moment.
get_properties
work, at least for the SCF, and I use it also in this part. For the bands and nscf calculation, though, I am not sure because, being non-self-consistent most of the properties are not computed and so not reported in the output, and the espresso calculator looks for all of them.
P.S. I checked atoms.get_properties
works without problem, I have updated the pull request for chapter 9
I've just installed the latest master branch from ASE and can confirm that I can get a bandstructure and DOS on my laptop 👍 - thanks @pietrodelugas and @ajjackson .
I was upgrading from previous ASE and weirdly I found I had to use --force-reinstall
when getting the latest from master: pip install git+https://gitlab.com/ase/ase.git@master --force-reinstall
, as an FYI.
It makes sense to be consistent and use the atoms.get_properties()
throughout where we can. Will also add a note in the tutorial about the alternative .calculate()
method as seems a useful teaching point which could open up a nice discussion on various programming paradigms.
Hi @pietrodelugas,
Using: ase-3.21.1 , qe-7.1
I'm running through the tutorial script you sent across.
I've adapted it slightly to use profiles. The scf runs as expected:
However when I try to calculate the bandstructure:
I get an error: