A set of SPARQL examples that are used in LOTUS
Stereoisomers with canonical SMILES.
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: Stereoisomers with canonical SMILES
SELECT ?structure ?smiles WHERE {
?structure wdt:P31 wd:Q59199015.
?structure wdt:P233 ?smiles.
OPTIONAL { ?structure wdt:P2017 ?isomeric. }
FILTER(!(BOUND(?isomeric)))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?isomeric")
v3("?smiles"):::projected
v2("?structure"):::projected
c2(["wd:Q59199015"]):::iri
f0[["not bound(?isomeric)"]]
f0 --> v1
v2 --"wdt:P31"--> c2
v2 --"wdt:P233"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P2017".-> v1
end