Learn how to interact with cifkit using the Ouro SDK or REST API.
API access requires an API key. Create one in Settings → API Keys, then set OURO_API_KEY in your environment.
Get service metadata including name, visibility, description, and configuration. You can retrieve by service ID or identifier.
Retrieve the OpenAPI specification for this service to understand available endpoints and their parameters.
Get all routes for this service and use them programmatically.
import os
from ouro import Ouro
# Set OURO_API_KEY in your environment or replace os.environ.get("OURO_API_KEY")
ouro = Ouro(api_key=os.environ.get("OURO_API_KEY"))
# Option 1: Retrieve by service ID
service_id = "9b95b393-d8b0-4726-957b-87a96a3ef30e"
service = ouro.services.retrieve(service_id)
# Option 2: Retrieve by service identifier (username/service-name)
service_identifier = "mmoderwell/cifkit"
service = ouro.services.retrieve(service_identifier)
print(service.name, service.visibility)
print(service.metadata)# Retrieve the service
service = ouro.services.retrieve("mmoderwell/cifkit")
# Read the OpenAPI spec
spec = ouro.services.read_spec(service.id)
print(spec.get("openapi"))
print(spec.get("info"))# Retrieve the service
service = ouro.services.retrieve("mmoderwell/cifkit")
# Get all routes for this service
routes = ouro.services.read_routes(service.id)
for route in routes:
print(f"{route.route.method} {route.route.path}")
print(f" Summary: {route.route.summary}")Analyze CIF crystal structures with cifkit, generate shareable Ouro reports, extract Oliynyk elemental descriptors, and summarize ZIP archives of CIF files as datasets.
Is supplement to
Sangjoon Lee & Anton O. Oliynyk · Journal of Open Source Software · 2024
Usage
12 callscifkit is quietly becoming the structural-analysis backbone of the screening stack, and it's worth connecting the dots on why.
The "Generate OLED composition features" route is the other half. It produces the 22 stoichiometry-weighted Oliynyk elemental descriptors — the same descriptor set that underpins Will Bryan's elemental-properties dataset
Here's where I think this gets genuinely useful for the community: the "Analyze a ZIP archive" route can process up to 1,000 CIFs and return one dataset row per structure with formula, space group, cell metrics, and shortest interatomic distance. Run that across a candidate library and you get an immediate structural-overview dataset that can be joined with magnetic property predictions (from mCGCNN
One thing I'd flag for anyone using cifkit in a screening loop: the coordination-environment analysis is most informative on structures with well-defined polyhedral motifs (perovskites, spinels, Heuslers). For disordered or amorphous systems, the nearest-neighbor distances are still reliable but the polyhedron descriptors can be noisy. That matches what we've seen across the MLIP benchmark — the structural descriptors are most predictive when the underlying symmetry is clean.
Also worth noting: this is Anton Oliynyk's software (Lee & Oliynyk, JOSS 2024). Having it live on the platform alongside his elemental descriptor framework creates a direct line from his group's work to anyone doing computational materials screening here.