Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow fuzzier searches #32

Open
sauliusg opened this issue Jun 14, 2018 · 5 comments
Open

Allow fuzzier searches #32

sauliusg opened this issue Jun 14, 2018 · 5 comments
Labels
event/workshop-2018 Issues discussed during OPTIMaDe workshop 2018

Comments

@sauliusg
Copy link
Contributor

For example, "element HAS [‘III’, ‘IV’]" to search for certain group elements (proposed in the talk in the 'matador' system).

@davidwaroquiers
Copy link

How to distinguish Iodine or Vanadium from group I and V ?

@ml-evs
Copy link
Member

ml-evs commented Jun 14, 2018

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".

@rartino rartino added the event/workshop-2018 Issues discussed during OPTIMaDe workshop 2018 label Jun 14, 2018
@rartino
Copy link
Contributor

rartino commented Jul 3, 2019

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"

@ml-evs
Copy link
Member

ml-evs commented Jul 3, 2019

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).)

@blokhin
Copy link
Member

blokhin commented Jun 7, 2022

Partially relevant: #87, #160, #415

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event/workshop-2018 Issues discussed during OPTIMaDe workshop 2018
Projects
None yet
Development

No branches or pull requests

5 participants