You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to provide an intuitive search feature. Users should be able to type chemical formulas in all lowercase, or all uppercase, or mixed case, and the software should be able to detect whether the input looks like a molecular formula.
Status Quo
Currently the software can only parse chemical formulas when the element symbols have the first letter capitalized, and the 2nd letter miniscule if it exists. I think this makes sense, so it seems like there should be a separate method to test and convert arbitrary strings, before attempting to parse them. Perhaps I'm wrong about this, and case-insensitive formula parsing would not have performance or accuracy costs, but that needs to be investigated.
Non Goals
This new formula detection code need not take into account whether the formula makes sense chemically. For example, a user might enter a substring of a formula where the charge of the ions does not add up correctly. Don't worry about this for now. Perhaps the search is just a partial formula. See issue #63.
Bonus Features
Once we get the initial substring search working correctly for molecular formulas, we might want to look into more options.
Search for equivalent formulas. Given the search term "OH2", match "H2O".
These may not be performant given the current data architecture. We could solve this by caching empirical or even equivalent formulas at the expense of storage capacity, but the app is not presently designed to accommodate those performance optimizations.
Goal & Context
I'd like to provide an intuitive search feature. Users should be able to type chemical formulas in all lowercase, or all uppercase, or mixed case, and the software should be able to detect whether the input looks like a molecular formula.
Status Quo
Currently the software can only parse chemical formulas when the element symbols have the first letter capitalized, and the 2nd letter miniscule if it exists. I think this makes sense, so it seems like there should be a separate method to test and convert arbitrary strings, before attempting to parse them. Perhaps I'm wrong about this, and case-insensitive formula parsing would not have performance or accuracy costs, but that needs to be investigated.
Non Goals
This new formula detection code need not take into account whether the formula makes sense chemically. For example, a user might enter a substring of a formula where the charge of the ions does not add up correctly. Don't worry about this for now. Perhaps the search is just a partial formula. See issue #63.
Bonus Features
Once we get the initial substring search working correctly for molecular formulas, we might want to look into more options.
These may not be performant given the current data architecture. We could solve this by caching empirical or even equivalent formulas at the expense of storage capacity, but the app is not presently designed to accommodate those performance optimizations.
Prerequisites
This depends on: #48
The text was updated successfully, but these errors were encountered: