Closed liamhuber closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Updated everything here to pyiron_ontology-0.1.0.
Also updated the logic so that when I search for downstream conditions, only paths where both input and output are otyped actually shows up.
Had to drop the unit conversion, because that's not supported in the ontology library any more (at least for now), but everything else was a pretty straightforward conversion.
Happiest check was to set up the graph pictured above and see struct.outputs.ports.structure.get_downstream_requirements()[0].is_a
change from [atomistics.Bulk, atomistics.ThreeD]
to [atomistics.Structure]
when we disconnect the Lammps node from CalcMurnhaghan (where struct
is the BulkStructure node). (This ought to be included in the tests, but given the current developments over in pyiron_contrib between pyiron v1.0 and graph based workflows, I don't want to go overboard spending time on tests here right now...)
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
This is the base PR for integrating ontological typing with pyiron_ontology. The ontology module is still under active development and not even available as a dependency on conda forge yet. This will stay as a draft until that dependency is available.
WARNING: the binder link will fail because the
pyiron_ontology
dependency is not yet listed!Since the ontology module is still quite new, I'll be actively developing it together with ironflow until I'm satisfied enough to release it on conda. To get far enough along the ironflow development to really know what I even need from pyiron_ontology would make this a beast of a PR, so I'll use the stacked-PR paradigm again.
In this particular PR, I lay the most fundamental groundwork:
otype
, to track ontological typingand convert input to generic units in outputNote that for now I plan to keep all the type checking with the dtype. On the one hand, this makes node definitions a bit verbose, as both
dtype
andotype
should be defined. On the other hand...np.linspace
as user input. There is a field in the ontology for user input, so we could get fancy here at some point, but for now let's keep it simple and let users manually feed in data of the correct dtype if they want.As of this PR, you can send Murnaghan output to the material property node and get it correctly converted to the generic units. When building up the graph, where both input and output are ontologically typed, input validation now also confirms that the ontological type being input matches the ontological conditions, and these conditions are collected by traversing the graph downstream and collecting all downstream conditions. Thus, in the simple graph below, the Lammps structure input is aware that it needs a bulk-like structure.
From here on out we'll make stacked PR's to handle the recommender system. Then hopefully merge and get a release based on a conda-forge version of pyiron_ontology, then extend everything to the surface energy use-case.
Edit: Stacked PRs (to be) merged in