Open ipcamit opened 2 years ago
Try this instead:
property_map = {
'energy-forces': [{
# ColabFit name: {'field': ASE field name, 'units': str}
'energy': {'field': 'Energy', 'units': 'eV'},
'forces': {'field': 'forces', 'units': 'eV/Ang'},
# 'stress': {'field': 'virial', 'units': 'GPa'},
# 'per-atom': {'field': 'per-atom', 'units': None},
'_settings': {
'_method': 'VASP',
'_description': 'A static VASP calculation',
'_files': None,
'_labels': ['Monkhorst-Pack'],
'xc-functional': {'field': 'xcf', 'units': None}
}
}]
}
Awhile back we changed the property map to be able to accept multiple maps for a single property type, so it's expecting property_map['energy-forces-stress']
to be a list of dictionaries.
You may also need to remove the underscores from _method
, _description
, _files
, and _labels
. We changed this in recent versions of the code, but I'm not sure what version you're working with.
EDIT: I'll leave this issue open as a reminder that I need to go through the docstrings to make sure they're up to date.
Thanks, that solves it. I am using the latest version, master branch (aa2d1e3b). I couldnt find updated version in documentation so i used the function doc-string in colabfit-tools/tools/dataset.py
for hint, and that function still lists older format
Line 285 - 302
property_map = {
'energy-forces-stress': {
# ColabFit name: {'field': ASE field name, 'units': str}
'energy': {'field': 'energy', 'units': 'eV'},
'forces': {'field': 'forces', 'units': 'eV/Ang'},
'stress': {'field': 'virial', 'units': 'GPa'},
'per-atom': {'field': 'per-atom', 'units': None},
'_settings': {
'_method': 'VASP',
'_description': 'A static VASP calculation',
'_files': None,
'_labels': ['Monkhorst-Pack'],
'xc-functional': {'field': 'xcf', 'units': None}
}
}
}
Can anyone provide working example of
_settings
property map keys? I deviced the following from source code doc stringsBut I get the following error in
insert_data
class