Skip to content

BUG: Unable to run phonons with force fields and FileStore #1438

@computron

Description

@computron

Describe the bug
I am trying to run a phonon calculation. The calculation appears to run OK in that

  • Phonon band structure PDF is correctly printed
  • Several YAML files seem to be correctly printed

Issues:

  • The PDF of Phonon DOS seems to be not openable / corrupted
  • I also get the following error (my blob_output.yaml file is also corrupted after this):
2026-03-25 08:14:58,274 INFO generate_frequencies_eigenvectors failed with exception:
TypeError: 'NoneType' object is not callable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/jobflow/managers/local.py", line 117, in _run_job
    response = job.run(store=store)
               ^^^^^^^^^^^^^^^^^^^^
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/jobflow/core/job.py", line 695, in run
    store.update(data, key=["uuid", "index"], save=save)
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/jobflow/core/store.py", line 360, in update
    store.update(blobs, key="blob_uuid")
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/maggma/stores/mongolike.py", line 747, in update
    self.update_json_file()
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/maggma/stores/mongolike.py", line 770, in update_json_file
    bytesdata = orjson.dumps(
                ^^^^^^^^^^^^^
TypeError: Type is not JSON serializable: ScalarFloat

To Reproduce
Steps to reproduce the behavior:

  1. Set up jobflow.yaml as in this example:

jobflow_filestore.yaml

  1. Run the following script:

ff_phonon.py

The full trace of execution is:

(atomate2) computron:test_scripts ajain$ python ff_phonon.py 
2026-03-25 08:14:01,012 INFO Started executing jobs locally
2026-03-25 08:14:01,017 INFO Starting job - Force field relax (254ed4ae-d944-4d92-99ae-23229508fff1)
2026-03-25 08:14:05,620 INFO Finished job - Force field relax (254ed4ae-d944-4d92-99ae-23229508fff1)
2026-03-25 08:14:05,620 INFO Starting job - get_supercell_size (db50f5ed-b577-48b1-be9d-d34c46ffc8b2)
2026-03-25 08:14:05,687 INFO Finished job - get_supercell_size (db50f5ed-b577-48b1-be9d-d34c46ffc8b2)
2026-03-25 08:14:05,687 INFO Starting job - Force field static (acda7fc8-4f6b-45df-aea7-1baad0378aa7)
2026-03-25 08:14:06,041 INFO Finished job - Force field static (acda7fc8-4f6b-45df-aea7-1baad0378aa7)
2026-03-25 08:14:06,041 INFO Starting job - generate_phonon_displacements (404c4c95-49e6-4029-85c4-d0b27813795b)
/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/jobflow/core/job.py:629: UserWarning: Initial magnetic moments will not be considered for the determination of the symmetry of the structure and thus will be removed now.
  response = function(*self.function_args, **self.function_kwargs)
2026-03-25 08:14:09,002 INFO Finished job - generate_phonon_displacements (404c4c95-49e6-4029-85c4-d0b27813795b)
2026-03-25 08:14:09,003 INFO Starting job - run_phonon_displacements (220f2348-bac7-47c4-8034-79dc11627a59)
2026-03-25 08:14:09,156 INFO Finished job - run_phonon_displacements (220f2348-bac7-47c4-8034-79dc11627a59)
2026-03-25 08:14:09,182 INFO Starting job - Force field static 1/1 (f68ed623-cb82-4395-9ea2-edc265557e83)
2026-03-25 08:14:13,127 INFO Finished job - Force field static 1/1 (f68ed623-cb82-4395-9ea2-edc265557e83)
2026-03-25 08:14:13,128 INFO Starting job - store_inputs (220f2348-bac7-47c4-8034-79dc11627a59, 2)
2026-03-25 08:14:13,152 INFO Finished job - store_inputs (220f2348-bac7-47c4-8034-79dc11627a59, 2)
2026-03-25 08:14:13,153 INFO Starting job - generate_frequencies_eigenvectors (9e576f73-c979-4b92-9041-db8db78cfc85)
The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.
2026-03-25 08:14:58,274 INFO generate_frequencies_eigenvectors failed with exception:
TypeError: 'NoneType' object is not callable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/jobflow/managers/local.py", line 117, in _run_job
    response = job.run(store=store)
               ^^^^^^^^^^^^^^^^^^^^
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/jobflow/core/job.py", line 695, in run
    store.update(data, key=["uuid", "index"], save=save)
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/jobflow/core/store.py", line 360, in update
    store.update(blobs, key="blob_uuid")
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/maggma/stores/mongolike.py", line 747, in update
    self.update_json_file()
  File "/Users/ajain/Documents/code_venvs/atomate2/lib/python3.11/site-packages/maggma/stores/mongolike.py", line 770, in update_json_file
    bytesdata = orjson.dumps(
                ^^^^^^^^^^^^^
TypeError: Type is not JSON serializable: ScalarFloat

2026-03-25 08:14:58,410 INFO Finished executing jobs locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions