Skip to content

Commit 7679919

Browse files
MAde calculation from JSON for ACSD possible
1 parent 4f222c2 commit 7679919

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

mala/network/descriptor_scoring_optimizer.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
descriptor_input_types_descriptor_scoring = descriptor_input_types + [
2323
"numpy",
2424
"openpmd",
25+
"json",
2526
]
2627
target_input_types_descriptor_scoring = target_input_types + [
2728
"numpy",
@@ -491,6 +492,14 @@ def _calculate_descriptors(self, snapshot, description, original_units):
491492
elif description["input"] is None:
492493
# In this case, only the output is processed.
493494
pass
495+
elif description["input"] == "json":
496+
# In this case, only the output is processed.
497+
descriptor_calculation_kwargs["units"] = original_units["input"]
498+
tmp_input, local_size = (
499+
self._descriptor_calculator.calculate_from_json(
500+
snapshot["input"], **descriptor_calculation_kwargs
501+
)
502+
)
494503

495504
else:
496505
raise Exception(

0 commit comments

Comments
 (0)