KeyError: 'n_max_sc_steps is not a valid setting'

24 views
Skip to first unread message

Abdul Muhaymin

unread,
Sep 20, 2023, 9:54:52 AM9/20/23
to koopmans-users
Dear users,

I have been following the tutorials from the Hubbard-Koopmans School 2022 (https://github.com/materialscloud-org/hubbard-koopmans-2022). I followed the installation instruction from Koopman's website. But when I try to run the calculation, it gives me the following error:
```
Traceback (most recent call last):
  File "/home/ubuntu/venvs/koopmans/bin/koopmans", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/opt/koopmans/src/koopmans/cli/main.py", line 26, in main
    workflow = read(args.json)
  File "/home/ubuntu/opt/koopmans/src/koopmans/io/_generic.py", line 36, in read
    out = read_json(fd, **kwargs)
  File "/home/ubuntu/opt/koopmans/src/koopmans/io/_json.py", line 32, in read_json
    parameters = WorkflowSettingsDict(**utils.parse_dict(bigdct.get('workflow', {})))
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_workflow.py", line 131, in __init__
    super().__init__(settings=settings, physicals=['alpha_conv_thr', 'convergence_threshold'], **kwargs)
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_utils.py", line 230, in __init__
    super().__init__(valid=[s.name for s in settings],
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_utils.py", line 95, in __init__
    self.update(**kwargs)
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_utils.py", line 165, in update
    self.__setitem__(key, kwargs[key])
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_workflow.py", line 170, in __setitem__
    return super().__setitem__(key, value)
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_utils.py", line 147, in __setitem__
    self._check_before_setitem(key, value)
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_utils.py", line 235, in _check_before_setitem
    super()._check_before_setitem(key, value)
  File "/home/ubuntu/opt/koopmans/src/koopmans/settings/_utils.py", line 174, in _check_before_setitem
    raise KeyError(f'{key} is not a valid setting')
KeyError: 'n_max_sc_steps is not a valid setting'
```

Now when I compared the input file of ozone.json from the koopman's website with the one in the aforementioned github repo, I see that there are some differences. Should I consider that tutorial obsolete and use the webpage from now on?

Thanks
Abdul Muhaymin
Graduate Student, Bilkent University

Edward Linscott

unread,
Sep 20, 2023, 10:01:04 AM9/20/23
to koopmans-users
Dear Abdul Muhaymin,

Thanks for getting in touch! Indeed, the input files from the 2022 school are now outdated.

There are several places where you can find up-to-date tutorials
Note that the 2023 school files will eventually become outdated, too, whereas the website is kept constantly up-to-date.

Good luck!
Edward

Abdul Muhaymin

unread,
Sep 20, 2023, 10:13:33 AM9/20/23
to koopmans-users
Dear Edward,

Thank you for your prompt reply. I understand now. I have just one additional question related to this. Even though the tutorial files are now outdated, would you recommend going through tutorial videos of 2022 school in order to understand some concepts? Will that be helpful/worthy to go over? I am asking this because the 'hands-on' sessions are only recorded for the 2022 school as you mentioned.

Sincerely,
Abdul  

Edward Linscott

unread,
Sep 20, 2023, 10:17:04 AM9/20/23
to koopmans-users
Dear Abdul,

I would recommend sticking with the most recent version of koopmans.

If you are attached to the idea of following a video for the tutorial, you should still be able to roughly follow alongside the 2022 video but using the updated files. There will be a few minor discrepancies but the main takeaways should be the same.

Best,
Edward 

Reply all
Reply to author
Forward
0 new messages