How to run this route from Python with the Ouro SDK.
API access requires an API key. Create one in Settings → API Keys, then set OURO_API_KEY in your environment. Install the SDK with pip install ouro-py.
POST /ggen/exploreParameters and request body schema for this route.
Random seed for reproducibility
Chemical system to explore, for example 'Fe-Mn-Si' or 'Li-Co-O'
Range: 2 to 64
Largest unit cell size to consider during structure generation
Range: 1 to 600
Maximum relaxation steps per generated structure
Range: 1 to 64
Smallest unit cell size to consider during structure generation
Range: 1 to 200
Controls search depth by setting how many candidate structures GGen tries for each stoichiometry
Specific space group number or symbol to target
Range: 0 to 2
Near-hull cutoff in eV/atom for reporting promising phases
Maximum element fractions, for example {'Bi': 0.2}
Minimum element fractions, for example {'Fe': 0.4}
Skip formulas already in the unified database instead of giving them another chance at a better polymorph
Also write the run up as an Ouro post with the output files embedded. Off by default: the files are returned on their own, and a public post is announced in the team feed
triclinicmonoclinicorthorhombictetragonaltrigonalhexagonalcubicCrystal systems supported by GGen filtering and scoring.
Optional crystal systems to target
firelbfgsOptimizer used for geometry relaxation
Range: 1 to 200
Controls search breadth by limiting how many stoichiometries GGen explores
Only generate formulas containing all requested elements
Include phase diagram HTML in the result bundle when possible
Each run saves these to Ouro. Read them by name from action.final_data.
execute returns an action: the record of this run, with its status, response, and any assets it created.
This route is long-running. Start it without waiting, then collect the result when it's done.
By default a failed run comes back as an action with status error. Pass raise_on_error=True to raise an exception instead.
Every run is saved as an action. List yours, or read the logs of a single run. See the Python SDK reference for everything an action carries.
import os
from ouro import Ouro
ouro = Ouro(api_key=os.environ.get("OURO_API_KEY"))
# The ID also works, and stays the same if the route is renamed: "25945f7c-d83a-45ba-8c40-30b69d9a3df7"
route = ouro.routes.retrieve("mmoderwell/explore-a-chemical-system-with-ggen")
action = route.execute(
body={
"system": "example_string",
},
)
print(action.status) # "success" or "error"
print(action.final_data)
# Assets the run created are keyed by output name
report = action.final_data["report"]
print(report["id"])# Returns as soon as the run is accepted
action = route.execute(
body={
"system": "example_string",
},
wait=False,
)
print(action.id, action.status)
# Later, even from another process
action = ouro.routes.poll_action(str(action.id), poll_interval=5, timeout=1800)
print(action.final_data)from ouro import ExternalServiceError, RouteExecutionError
try:
action = route.execute(
body={
"system": "example_string",
},
raise_on_error=True,
)
except ExternalServiceError as exc:
# The API behind this route failed
print(exc.status_code, exc.retryable)
except RouteExecutionError as exc:
print(exc.action_id, exc.status, exc.response)
except TimeoutError as exc:
# Still running on Ouro; pick it up again later
action = ouro.routes.poll_action(exc.action_id, timeout=None)route = ouro.routes.retrieve("mmoderwell/explore-a-chemical-system-with-ggen")
# Your runs of this route
actions = route.read_actions()
for action in actions:
print(action.id, action.status, action.created_at)
# One run and its logs
action = ouro.routes.retrieve_action("your-action-id")
for entry in action.read_logs(chronological=True):
print(entry.level, entry.message)Explore a full chemical system by generating candidate crystal structures across stoichiometries, relaxing them, and ranking the results by thermodynamic stability. Use this when you want a broad discovery run for systems such as Li-Co-O or Fe-Mn-Si — not a single exact formula. For a known stoichiometry (e.g. Fe2O3), use Generate a crystal structure using GGen instead. Returns a summary file, the leading CIF, a zip of near-hull CIFs, and an optional phase diagram. Set include_report to also get an Ouro post that writes the run up with those files embedded.
Pricing
USDYou pay for the seconds a run takes. The most it can cost is held while it runs and the rest is returned. Failed runs are free.
Median and 95th percentile of the last 88 successful runs.
Execution
Usage
95 callsView history