Stop Writing OPTIMADE Filter Strings by Hand

You came to analyze data, not debug filter strings A reasonable query for binary silicon-cobalt structures: elements HAS "Si" OR elements HAS "Co" AND nelements = 2. This returns thousands of results: every silicon-containing structure in the database, plus cobalt binaries. The filter is syntactically valid, but AND binds tighter than OR, so the semantics don’t match the English. OPTIMADE (Open Databases Integration for Materials Science) is a standardized REST API for querying computational materials databases. Its filter language is well-designed. It is also genuinely annoying to write correctly on the first try. ...

June 17, 2026 · 6 min · Alloybase