OPTIMADE
OPTIMADE copied to clipboard
Allow fuzzier searches
For example, "element HAS [‘III’, ‘IV’]" to search for certain group elements (proposed in the talk in the 'matador' system).
How to distinguish Iodine or Vanadium from group I and V ?
In matador all macros are enclosed by square brackets to avoid such issues. This makes sense to me as any macro query would need to be expanded into e.g. "Li or Na or K..." etc. Alternatively, we could just agree upon more descriptive names, e.g. "group-I".
Would this need be satisfied by instead just standardizing a property that is a list of element groups? E.g.,
element_groups HAS "III", "IV"
I'm struggling to think of an example that can't be trivially handled by the client doing a large OR
query. I know this is an issue arising from my talk last year, but perhaps this wouldn't be as useful as I previously thought!
With element_groups
, the query "give me all [II]TiO3 compounds" is still quite cumbersome, and would need to do something with elements_ratios
of Ti and O, the order of which changes depending on the alphabetical ordering of the unknown [II] element, likewise substring matching the chemical formula would fallover for the same reason. Expanding the macro would give you e.g. formula_reduced = "BeO3Ti" OR formula_reduced = "MgO3Ti" OR formula_reduced = "CaO3Ti" OR formula_reduced = "O3SrTi OR...
which is probably appropriate for the client to just perform themselves.
Adding element_groups
would of course allow for e.g. "give me all III-V compounds" without needing to mess around with ratios, though I'm not sure its worth the overhead for every database to add a new queryable property.
(In matador we store stoichiometry as a list of (elem, conc)
tuples in the cell scaled to the least common element e.g. [('O', 3), ('Sr', 1), ('Ti', 1)]
so you can loop over searches for the possible group II sublists ('Be', 1), ('Mg', 1), ...
and keep ('O', 3), ('Ti', 3)
.)
Partially relevant: https://github.com/Materials-Consortia/OPTIMADE/issues/87, https://github.com/Materials-Consortia/OPTIMADE/pull/160, https://github.com/Materials-Consortia/OPTIMADE/pull/415