I had a problem with querying the data in the tutorial that pymongo couldn’t find any firetask with label. Wondering where went wrong?
from atomate.vasp.database import VaspCalcDb
from pymatgen.electronic_structure.plotter import DosPlotter, BSPlotter
PATH_TO_MY_DB_JSON = '/path/to/db.json'
atomate_db = VaspCalcDb.from_db_file(PATH_TO_MY_DB_JSON)
line_bs_entry = atomate_db.collection.find_one({'task_label': 'nscf line', 'formula_pretty': 'MgO'})
Return None, but the workflow is there and calculation has finished. If I try,
line_bs_entry = atomate_db.collection.find_one()
return
{‘_id’: ObjectId(‘5cc022227f39695c8df0e9fc’),
‘links’: {‘18’: , ‘19’: , ‘20’: [19, 18], ‘21’: [20]},
‘parent_links’: {‘19’: [20], ‘18’: [20], ‘20’: [21]},
‘nodes’: [18, 19, 20, 21],
‘metadata’: {‘structure’: {‘@module’: ‘pymatgen.core.structure’,
‘@class’: ‘Structure’,
‘charge’: None,
‘lattice’: {‘matrix’: [[2.606553, 0.0, 1.504894],
[0.868851, 2.457482, 1.504894],
[0.0, 0.0, 3.009788]],
‘a’: 3.0097881143105405,
‘b’: 3.0097883300592754,
‘c’: 3.009788,
‘alpha’: 60.000003627588235,
‘beta’: 60.00000125635496,
‘gamma’: 60.000003208803285,
‘volume’: 19.279368831332597},
‘sites’: [{‘species’: [{‘element’: ‘O’, ‘occu’: 1}],
‘abc’: [0.5, 0.5, 0.5],
‘xyz’: [1.737702, 1.228741, 3.009788],
‘label’: ‘O’,
‘properties’: {}},
{‘species’: [{‘element’: ‘Mg’, ‘occu’: 1}],
‘abc’: [0.0, 0.0, 0.0],
‘xyz’: [0.0, 0.0, 0.0],
‘label’: ‘Mg’,
‘properties’: {}}]},
‘nsites’: 2,
‘elements’: [‘Mg’, ‘O’],
‘nelements’: 2,
‘formula’: ‘Mg1 O1’,
‘formula_pretty’: ‘MgO’,
‘formula_reduced_abc’: ‘Mg1 O1’,
‘formula_anonymous’: ‘AB’,
‘chemsys’: ‘Mg-O’,
‘is_ordered’: True,
‘is_valid’: True},
‘state’: ‘FIZZLED’,
‘name’: ‘MgO’,
‘created_on’: datetime.datetime(2019, 4, 24, 8, 45, 20, 989000),
‘updated_on’: datetime.datetime(2019, 4, 24, 16, 42, 56, 608000),
‘fw_states’: {‘21’: ‘COMPLETED’,
‘20’: ‘COMPLETED’,
‘19’: ‘FIZZLED’,
‘18’: ‘COMPLETED’}}