A set of SPARQL examples that are used in LOTUS
Chemical classes defined by SMARTS.
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: Chemical classes defined by SMARTS
SELECT * WHERE {
    VALUES ?instance {
        wd:Q15711994 # group of isomeric entities
        wd:Q17339814 # group or class of chemical substances
        wd:Q47154513 # structural class of chemical entities
        wd:Q55640599 # group of chemical entities
        wd:Q56256173 # class of chemical entities with similar applications or functions
        wd:Q56256178 # class of chemical entities with similar source or occurrence
        wd:Q55662456 # group of ortho, meta, para isomers
        # wd:Q59199015 # group of stereoisomers # TODO see later on when fast enough
        wd:Q72070508 # group or class of chemical entities
        wd:Q74892521 # imprecise class of chemical entities
    }
    ?class wdt:P31 ?instance.
    ?class wdt:P8533 ?structure.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?class"):::projected 
  v1("?instance"):::projected 
  v3("?structure"):::projected 
  bind0[/VALUES ?instance/]
  bind0-->v1
  bind00(["wd:Q15711994"])
  bind00 --> bind0
  bind01(["wd:Q17339814"])
  bind01 --> bind0
  bind02(["wd:Q47154513"])
  bind02 --> bind0
  bind03(["wd:Q55640599"])
  bind03 --> bind0
  bind04(["wd:Q56256173"])
  bind04 --> bind0
  bind05(["wd:Q56256178"])
  bind05 --> bind0
  bind06(["wd:Q55662456"])
  bind06 --> bind0
  bind07(["wd:Q72070508"])
  bind07 --> bind0
  bind08(["wd:Q74892521"])
  bind08 --> bind0
  v2 --"wdt:P31"-->  v1
  v2 --"wdt:P8533"-->  v3