Make modifications to results.material.topology easier
Creating the correct structure for results.material.topology
is currently quite cumbersome. There is plenty of opportunities for making mistakes in creating a valid topology that the visualizer can also read. This situation should be improved by defining helper functions for standard actions related to topology. These helpers should include:
-
Function for adding new items to the graph. This function will handle assigning the parent/child relationship correctly along with adding the system to the final list. -
Function for adding default system information such as number of atoms, number of elements etc. Another option would be to use derived values, but especially in experiments, this information may not be possible to derive. -
Modify the existing topology creation to use these new helpers, separate topology creation to it's own module. -
Add test helper for asserting that a topology has the correct structure and all required fields.
Edited by Lauri Himanen