Atomate installation - Run a test workflow error

I am going through “Run a test workflow” on Installing atomate — atomate 1.0.3 documentation. Options 1 and 3 work fine for me. However, with Options 2 and 4, I get the following error:

Traceback (most recent call last):
File “/storage/home/njh5724/.conda/envs/atomate_env/bin/atwf”, line 294, in
args.func(args)
File “/storage/home/njh5724/.conda/envs/atomate_env/bin/atwf”, line 92, in add_wf
add_to_lpad(wf, write_namefile=False)
File “/storage/home/njh5724/.conda/envs/atomate_env/bin/atwf”, line 52, in add_to_lpad
lpad.add_wf(workflow)
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/fireworks/core/launchpad.py”, line 409, in add_wf
self.workflows.insert_one(wf.to_db_dict())
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/collection.py”, line 669, in insert_one
self._insert_one(
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/collection.py”, line 609, in _insert_one
self.__database.client._retryable_write(acknowledged, _insert_command, session)
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/mongo_client.py”, line 1523, in _retryable_write
return self._retry_with_session(retryable, func, s, bulk)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/mongo_client.py”, line 1421, in _retry_with_session
return self._retry_internal(
^^^^^^^^^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/_csot.py”, line 107, in csot_wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/mongo_client.py”, line 1462, in _retry_internal
).run()
^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/mongo_client.py”, line 2315, in run
return self._read() if self._is_read else self._write()
^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/mongo_client.py”, line 2422, in _write
return self._func(self._session, conn, self._retryable) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/collection.py”, line 597, in _insert_command
result = conn.command(
^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/helpers.py”, line 322, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/pool.py”, line 996, in command
self._raise_connection_failure(error)
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/pool.py”, line 968, in command
return command(
^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/network.py”, line 151, in command
request_id, msg, size, max_doc_size = message._op_msg(
^^^^^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/message.py”, line 762, in _op_msg
return op_msg_uncompressed(flags, command, identifier, docs, opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bson.errors.InvalidDocument: cannot encode object: True, of type: <class 'numpy.bool
’>

I am using:
atomate 1.1.0
pymongo 4.6.0
pymatgen 2023.10.11
fireworks 2.0.3
custodian 2023.10.9

Any help or feedback is much appreciated!

Nigel Hew,
Penn State Postdoc
Phases Research Lab

I’m also getting the following error after running mgdb query -c /storage/home/njh5724/work/atomate/config/db.json --props task_id formula_pretty output.energy_per_atom:

Traceback (most recent call last):
File “/storage/home/njh5724/.conda/envs/atomate_env/bin/mgdb”, line 442, in
args.func(args)
File “/storage/home/njh5724/.conda/envs/atomate_env/bin/mgdb”, line 114, in query_db
qe = QueryEngine(
^^^^^^^^^^^^
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymatgen/db/query_engine.py”, line 147, in init
self.db.authenticate(user, password)
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/pymongo/collection.py”, line 3501, in call
raise TypeError(
TypeError: ‘Collection’ object is not callable. If you meant to call the ‘authenticate’ method on a ‘Database’ object it is failing because no such method exists.

Hi Nigel,

Two things you can try:

  1. Check your MongoDB connection directly using Pymongo. This step can help you exclude the most common bugs of atomate running.
  2. Downgrade your pymatgen version to see if it is related to recent changes in pymatgen (more frequently updated) inconsistent with our latest version of 1.1.0. If so, you can ping us or submit an issue on GitHub. Then we will investigate it.

Best,
Zhuoying

Thanks for the reply @Zhuoying .

  1. I can connect to MongoDB from the Penn State cluster.
  2. I tried downgrading the pymatgen version but unfortunately it still doesnt work. I’ve tried pymatgen>=2023.7.20. Another error that I get with pymatgen==2023.7.20 is:

Traceback (most recent call last):
File “/storage/home/njh5724/.conda/envs/atomate_env/bin/atwf”, line 19, in
from atomate.vasp.workflows.presets import core
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/atomate/vasp/workflows/init.py”, line 1, in
from .presets.core import (
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/atomate/vasp/workflows/presets/core.py”, line 14, in
from atomate.vasp.powerups import (
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/atomate/vasp/powerups.py”, line 21, in
from atomate.vasp.firetasks.glue_tasks import CheckBandgap, CheckStability
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/atomate/vasp/firetasks/init.py”, line 16, in
from .parse_outputs import (
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/atomate/vasp/firetasks/parse_outputs.py”, line 35, in
from atomate.vasp.database import VaspCalcDb
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/atomate/vasp/database.py”, line 11, in
from maggma.stores.aws import S3Store
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/maggma/stores/init.py”, line 2, in
from maggma.core import Store
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/maggma/core/init.py”, line 2, in
from maggma.core.builder import Builder
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/maggma/core/builder.py”, line 11, in
from maggma.core.store import Store
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/maggma/core/store.py”, line 16, in
from maggma.utils import LU_KEY_ISOFORMAT
File “/storage/home/njh5724/.conda/envs/atomate_env/lib/python3.11/site-packages/maggma/utils.py”, line 19, in
from pydantic._internal._utils import lenient_issubclass
ModuleNotFoundError: No module named ‘pydantic._internal’

Should I just go ahead and start using atomate2 instead?

Nigel
Penn State Postdoc
Phases Research Lab