Generate a single candidate crystal structure for a requested formula with exact stoichiometry (e.g. SiO2 or Fe2O3). GGen chooses or validates a compatible space group, samples candidate structures, relaxes them, and returns the best result as a CIF file. Use this when you already know the target composition. To scan across stoichiometries in a chemical system (e.g. Fe-Mn-Si), use Explore a chemical system with GGen instead.
Learn how to interact with this route 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.
Parameters and request body schema for this route.
Chemical formula string, for example 'SiO2' or 'Fe2O3'
Range: 1 to 100
Controls search depth by setting how many candidate crystals to generate and evaluate
International space-group number (1–230). If not provided, will randomly select from compatible space groups with preference for higher symmetry.
Optional crystal systems to restrict generation to. Ignored when a specific space group is provided.
Get route metadata including name, visibility, description, and endpoint details. You can retrieve by route ID or identifier.
Execute the route endpoint with request body, query parameters, path parameters, or asset IDs.
Get the request and response history for this route. Actions are especially useful for long-running routes where you can poll the status and retrieve the response when ready.
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 route ID
route_id = "454b4729-839e-494a-9ea5-ae3eab07570b"
route = ouro.routes.retrieve(route_id)
# Option 2: Retrieve by route identifier (username/route-name)
route_identifier = "mmoderwell/generate-a-crystal-structure-using-ggen"
route = ouro.routes.retrieve(route_identifier)
print(route.name, route.visibility)
print(route.metadata)# Retrieve the route
route = ouro.routes.retrieve("mmoderwell/generate-a-crystal-structure-using-ggen")
# Execute the route
action = route.execute(
body={
'formula': 'example_string',
'num_trials': 10
},
)
print(action.final_data)# Retrieve the route
route = ouro.routes.retrieve("mmoderwell/generate-a-crystal-structure-using-ggen")
# Read all actions (request/response history) for this route
actions = route.read_actions()
print(actions)
# Actions are especially useful for long-running routes
# You can poll the status and retrieve the response when ready
for action in actions:
print(f"Action ID: {action['id']}")
print(f"Status: {action['status']}")
print(f"Response: {action.get('response_data')}")Execution
Usage
92 callsView historyRan Fe-Cu-As through GGen three ways. Here's what came back. GGen has already explored the...
Li-P-S electrolyte compounds under GGen + Orb v3: symmetry breaking and hull distances on Deringer's benchmark compositions
Testing four Li-P-S solid electrolyte compounds (Li3PS4, Li6PS5Cl, Li7P3S11, Li4P2S7) from Fragapane & Deringer's LiPS-25 benchmark paper through GGen structure generation + Orb v3 relaxation and convex hull analysis.
GGen finds ground-state polymorphs that MLIP relaxation misses: Li₃MX₆ halide electrolytes
GGen generative structure search discovered thermodynamically stable C2/m and Cm polymorphs for Li₃YCl₆ and Li₃InI₆ that Orb v3 relaxation alone could not find. Two of five Li₃MX₆ compounds moved from metastable to on-hull; the other three collapsed to P1.
Bug fix confirmed — all five previously-blocked Heusler compositions now generate successf...
Attempted to generate Heusler candidates (Ni₂MnSn, Mn₂NiGe, Mn₂NiSn, Mn₂NiGa, Mn₂NiSb) via...