Closed RedStar-Iron closed 1 year ago
Thanks for looking at the Lobster part of the code. @naik-aakash and I will check your suggestion carefully.
I think the bug is coming from the fact that the overwriting of the dict. We will look into it more carefully to not break other parts of the code!
Hi @RedStar-Iron, Thanks for the suggestion. Can you also please post the steps to reproduce the issue? It would help me address it properly
Hi @naik-aakash ,
When I run the code below, it gives me None
for the FLOAT_KEYWORDS.
structure = Poscar.from_file("POSCAR").structure
potcar = Potcar.from_file("POTCAR")
lobsterin = Lobsterin.from_file(file)
basisfunctions = lobsterin.get_basis(structure, potcar.symbols)
lobsterin['basisfunctions'] = basisfunctions
lobsterin.write_lobsterin("lobsterin")
Yup, I have also already reproduced the issue and have started with a fix. Will start the WIP pull request in a minute.
@RedStar-Iron we have worked on a fix for both of your issues. However, we investigated that it does not matter if cohpsteps is a float or int (see here https://github.com/materialsproject/pymatgen/pull/3439#issuecomment-1791469518)
https://github.com/materialsproject/pymatgen/blob/15dc77da508c6824a2e7cc41e983f797c64815c4/pymatgen/io/lobster/inputs.py#L271-L272
key
inself.get(key)
should be lower, then it can be found in Lobsterin.FLOAT_KEYWORDS.And the cohpsteps might need to be a positive integer.
So I just revised it to: