Large chunk files in MongoDB database

It seems I encounter new problem every week :sweat_smile:
After doing many different trials recently for another problem, I noticed the cloud MongoDB database was full after just a few calculations (I am using a free account) That was not happening before, with very similar calculations (slab calculation mainly)
After checking the database I saw there are very large chunks files in the database : aeccar0_fs.chunks, aeccar2_fs.chunks chgcar_fs.chunks, locpot_fs.chunks

Unfortunately I can’t check if these files were here when it was working fine since I have to reset the database regularly. But they should have been not so big since I was able to do dozens of calculations before reaching the database limit.

I am working with specific VaspInputSet (to choose smaller KPOINTS grids) but I don’t think it should be related. I checked if there was any recent version of atomate since the problem appeared after I did an update but I found nothing.

I suppose the chunk files should be deleted once the workflow finished but for unknown reason, there are still here…
Could it be related to MongoDB ?

For example a script I am using :

from pymatgen import Structure, Lattice, MPRester, Molecule
from matplotlib import pyplot as plt
from fireworks import Workflow
from atomate.vasp.fireworks.core import StaticFW

mpr = MPRester(‘APIkey’)

from fireworks import LaunchPad
lpad = LaunchPad.auto_load()

from atomate.vasp.workflows.presets.core import wf_static
from pymatgen.io.ase import AseAtomsAdaptor
from ase.io import read
from pymatgen.io.vasp.sets import MPRelaxSet, MPStaticSet

atoms = read(‘POSCAR’, format=‘vasp’)

struct = AseAtomsAdaptor.get_structure(atoms)
db_file=‘/path/config/db.json’
my_custom_input_set = MPStaticSet(struct, force_gamma=True, user_kpoints_settings={“grid_density”: 400})

fw = StaticFW(structure=struct, db_file=db_file, vasp_input_set=my_custom_input_set)
wf = Workflow([fw],name=’ Slab static wf’)
lpad.add_wf(wf)

And after qlaunch singleshot

POSCAR is just a Ni slab with O atom. Nothing particular.

Ni O
1.0000000000000000
4.9579470785404727 0.0000000000000000 0.0000000000000003
0.0000000000000008 4.9579470785404718 0.0000000000000003
0.0000000000000000 0.0000000000000000 31.5043954578388856
24 1
Cartesian
0.0000000000000000 0.0000000000000001 17.0115959999999973
0.0000000000000004 2.4789735392702359 17.0115959999999973
2.4789735392702363 0.0000000000000001 17.0115959999999973
2.4789735392702368 2.4789735392702359 17.0115959999999973
1.2394867696351184 1.2394867696351179 18.7644949999999966
1.2394867696351188 3.7184603089053541 18.7644949999999966
3.7184603089053549 1.2394867696351179 18.7644949999999966
3.7184603089053549 3.7184603089053541 18.7644949999999966
0.0000000000000000 0.0000000000000001 13.5057979999999986
0.0000000000000004 2.4789735392702359 13.5057979999999986
2.4789735392702363 0.0000000000000001 13.5057979999999986
2.4789735392702368 2.4789735392702359 13.5057979999999986
1.2394867696351184 1.2394867696351179 15.2586969999999980
1.2394867696351188 3.7184603089053541 15.2586969999999980
3.7184603089053549 1.2394867696351179 15.2586969999999980
3.7184603089053549 3.7184603089053541 15.2586969999999980
0.0000000000000000 0.0000000000000001 10.0000000000000000
0.0000000000000004 2.4789735392702359 10.0000000000000000
2.4789735392702363 0.0000000000000001 10.0000000000000000
2.4789735392702368 2.4789735392702359 10.0000000000000000
1.2394867696351184 1.2394867696351179 11.7528989999999993
1.2394867696351188 3.7184603089053541 11.7528989999999993
3.7184603089053549 1.2394867696351179 11.7528989999999993
3.7184603089053549 3.7184603089053541 11.7528989999999993
1.2394867696351182 1.2394867696351177 21.5043954578388856

Hi Florian,

This is something that has been fixed on GitHub but not yet pushed to PyPi. If you try installing atomate from source this should fix the issue.

Alternatively, you can edit atomate/vasp/config.py and adjust the line that says STORE_VOLUMETRIC_DATA = (...). The old default was to store all volumetric files in the database (i.e., “chgcar”, “aeccar0”, “aeccar2”, “elfcar”, “locpot”) whereas the new default is to store none (i.e., set STORE_VOLUMETRIC_DATA = () .

In the future we will allow controlling this behaviour using a settings file or env_chk.

Please let me know if you run into further trouble.

Best,
Alex

Thank you very much, it worked !
I downloaded the source code and modified the line before installing.