lotus-sparql-examples

A set of SPARQL examples that are used in LOTUS

View the Project on GitHub lotusnprod/lotus-sparql-examples

wd_chemicals_chemical_entities_smiles_canonical_no_isomeric

rq turtle/ttl

Type of chemical entities with canonical SMILES.

Use at


PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: Type of chemical entities with canonical SMILES
SELECT ?structure ?smiles WHERE {
    ?structure wdt:P31 wd:Q113145171.
    ?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:Q113145171"]):::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