Building a Polymer Knowledge Graph with WORLD Platform

Category: Knowledge Engineering Difficulty: Intermediate Duration: ~10 minutes Version: 1.0.0

Scenario

A materials scientist wants to build a knowledge graph of polymers with their properties from the RadonPy dataset, enabling semantic queries and relationship discovery across 1,070 polymer structures.

Interactive Dialog

USER:
I want to explore the RadonPy polymer dataset. What's available in WORLD?
ASSISTANT:
[Calls: world_dataset_list]
RadonPy Dataset Overview
The RadonPy dataset contains molecular simulation data for **1,070 amorphous polymers**. **File**: PI1070.csv (1.6 MB) **Columns**: 157 properties including: - Structural (SMILES, molecular weight) - Quantum mechanical (HOMO, LUMO, dipole) - Thermal (Cp, Cv, thermal conductivity) - Mechanical (density, bulk modulus) - Optical (refractive index)
Citation
Hayashi et al. (2022) "RadonPy: Automated Physical Property Calculation using All-atom Classical Molecular Dynamics Simulations for Polymer Informatics" npj Computational Materials DOI: https://doi.org/10.1038/s41524-022-00906-4
USER:
Let's add some polymers to the knowledge graph. Start with common engineering plastics: Polyethylene, Polypropylene, Polystyrene, PMMA, PET, and Nylon-6.
ASSISTANT:
[Calls: world_thing_add]
Polymers Added to Knowledge Graph
Successfully added 6 engineering plastics as entities: | Polymer | SMILES | Class | |---------|--------|-------| | Polyethylene | *CC* | Polyolefin | | Polypropylene | *CC(C)* | Polyolefin | | Polystyrene | *CC(c1ccccc1)* | Vinyl | | PMMA | *CC(C)(C(=O)OC)* | Acrylic | | PET | *OC(=O)c1ccc(C(=O)OCC)cc1* | Polyester | | Nylon-6 | *NCCCCCC(=O)* | Polyamide |
USER:
Now create relationships between the polymers based on their chemical families.
ASSISTANT:
[Calls: world_relation_add]
Building Polymer Ontology
Created semantic relationships in the knowledge graph: - **is_a**: Classification hierarchy (polymer to class) - **similar_to**: Structural similarity between polymers These relations enable reasoning like: "Find all polyolefins" or "What is similar to PET?"
USER:
Can you query the knowledge graph using SPARQL to find all polyolefins?
ASSISTANT:
[Calls: world_sparql_query]
SPARQL Query
```sparql SELECT ?polymer ?similar WHERE { ?polymer world:is_a world:Polyolefin . OPTIONAL { ?polymer world:similar_to ?similar } } ```
Query Results
| polymer | similar | |---------|--------| | Polyethylene | Polypropylene | | Polypropylene | - |
Insight
SPARQL enables powerful semantic queries across the polymer knowledge graph. You can ask complex questions like: - "Find polymers similar to PET" - "List all polyamides with their properties" - "What classes exist in the ontology?"
USER:
Show me the current state of the knowledge graph.
ASSISTANT:
[Calls: world_stats]
Knowledge Graph Statistics
| Metric | Value | |--------|-------| | Total Things | 9 | | Total Triples | 17 | | Polymers | 6 | | Classes | 3 |
Graph Visualization
``` Polyolefin / \ PE --- PP Vinyl Acrylic Polyester Polyamide | | | | PS PMMA PET --- Nylon-6 ```
USER:
Save this knowledge graph so I can share it with my team.
ASSISTANT:
[Calls: world_save]
Knowledge Graph Saved
The polymer knowledge graph has been exported to `polymer_ontology.ttl`. This file can be: - Loaded back into WORLD with `world_load` - Imported into triple stores (Apache Jena, Blazegraph, GraphDB) - Shared with collaborators - Version controlled in Git - Queried with standard SPARQL tools
Sample TTL Output
```turtle @prefix world: . @prefix rdfs: . world:Polyethylene a world:Polymer ; world:smiles "*CC*" ; world:is_a world:Polyolefin ; world:similar_to world:Polypropylene . world:Polypropylene a world:Polymer ; world:smiles "*CC(C)*" ; world:is_a world:Polyolefin . ```

Learning Outcomes

OK
Authenticate and connect to WORLD platform
Used JWT authentication to access WORLD JSON-RPC API
OK
Browse installed datasets
Listed RadonPy dataset with 1,070 polymers and 157 properties
OK
Create knowledge graph entities
Added 6 polymer entities with SMILES and descriptions
OK
Build semantic relationships
Created is_a and similar_to relations for polymer ontology
OK
Execute SPARQL queries
Queried the graph for polyolefins using SPARQL SELECT
OK
Export knowledge graph
Saved to Turtle format for sharing and interoperability

Key Concepts

Knowledge Graph
A graph-structured database storing entities (things) and their relationships, enabling semantic reasoning and discovery beyond tabular data
SPARQL
Query language for RDF graphs, using triple patterns (subject-predicate-object) to find matching data
Turtle (TTL)
Human-readable serialization format for RDF, using prefix:name notation (e.g., world:Polyethylene)
Ontology
Formal specification of concepts and relationships in a domain, enabling machines to reason about polymer chemistry
Triple
Basic unit of RDF: (subject, predicate, object) - e.g., (Polyethylene, is_a, Polyolefin)
Semantic Relationship
Typed connection between entities (is_a, similar_to, has_property) that captures meaning and enables inference

Tools Working

  • OK world_dataset_list Listed RadonPy dataset with full metadata
  • OK world_thing_add Added 6 polymer entities to graph
  • OK world_relation_add Created 8 semantic relations
  • OK world_sparql_query Executed SPARQL SELECT successfully
  • OK world_stats Retrieved graph statistics (17 triples)
  • OK world_save Exported to polymer_ontology.ttl