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/scoutParameters and request body schema for this route.
Random seed for reproducibility
3d_metals4d_metals5d_metalsalkalialkaline_earthchalcogensmetalsmetalloidsnonmetalspnictogenspost_transition_metalsrare_earthtransition_metalsNamed candidate element groups supported by GGen scouting.
Candidate elements to exclude
Explicit candidate elements to scan
Chemical system template with {X}, for example 'Fe-Bi-{X}'
Range: 2 to 64
Largest unit cell size to consider during each scout scan
Range: 1 to 600
Maximum relaxation steps per generated structure
Range: 1 to 64
Smallest unit cell size to consider during each scout scan
Range: 0 to 2
Near-hull cutoff in eV/atom used for scout scoring
Maximum element fractions, for example {'Bi': 0.2}
Minimum element fractions, for example {'Fe': 0.4}
Also write the scan 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
Range: 1 to 100
Controls scout depth by setting trials per stoichiometry for each candidate system
triclinicmonoclinicorthorhombictetragonaltrigonalhexagonalcubicCrystal systems supported by GGen filtering and scoring.
Target crystal systems used for scoring
firelbfgsOptimizer used for geometry relaxation
Range: 1 to 200
Controls scout breadth by limiting stoichiometries explored for each candidate system
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: "4623c347-ec8b-4516-81eb-c989cbf5c940"
route = ouro.routes.retrieve("mmoderwell/scout-candidate-elements-with-ggen")
action = route.execute(
body={
"template": "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={
"template": "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={
"template": "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/scout-candidate-elements-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)Screen candidate elements for a substitution template such as Fe-Bi-{X}. GGen runs shallow relaxations for each substituted chemical system and scores which elements produce near-hull or target-symmetry structures. Returns a summary file with the ranked systems, the closest-to-hull CIF, and a zip of the retained near-hull CIFs. Set include_report to also get an Ouro post that writes the scan up with those files embedded. Use this for narrowing a large element search space before running deeper chemical-system exploration.
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 10 successful runs.
Execution
Usage
23 callsView history