{
  "components": {
    "schemas": {
      "CandidateDocument": {
        "description": "One candidate magnetic ordering. Send its overrides with the same\nstructure to explain or run to prepare inputs for it.",
        "properties": {
          "energy_per_atom_ev": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Energy Per Atom Ev"
          },
          "formula": {
            "title": "Formula",
            "type": "string"
          },
          "is_recommended": {
            "title": "Is Recommended",
            "type": "boolean"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "natoms": {
            "title": "Natoms",
            "type": "integer"
          },
          "overrides": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Overrides",
            "type": "object"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "required": [
          "label",
          "formula",
          "natoms",
          "energy_per_atom_ev",
          "status",
          "is_recommended",
          "overrides"
        ],
        "title": "CandidateDocument",
        "type": "object"
      },
      "Capabilities": {
        "description": "What this installation can prepare: codes, tasks, facts, settings,\npseudopotential tables, HPC profiles, ML models, the warnings catalogue\nand the decision sources.",
        "properties": {
          "codes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Codes",
            "type": "array"
          },
          "core_version": {
            "title": "Core Version",
            "type": "string"
          },
          "facts": {
            "items": {
              "$ref": "#/components/schemas/Fact"
            },
            "title": "Facts",
            "type": "array"
          },
          "hpc_profiles": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Hpc Profiles",
            "type": "array"
          },
          "models": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Models",
            "type": "array"
          },
          "pseudopotential_tables": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Pseudopotential Tables",
            "type": "array"
          },
          "settings": {
            "items": {
              "$ref": "#/components/schemas/Setting"
            },
            "title": "Settings",
            "type": "array"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "title": "Sources",
            "type": "array"
          },
          "tasks": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Tasks",
            "type": "array"
          },
          "vocabulary_version": {
            "title": "Vocabulary Version",
            "type": "string"
          },
          "warnings": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "core_version",
          "vocabulary_version",
          "codes",
          "tasks",
          "facts",
          "settings",
          "pseudopotential_tables",
          "hpc_profiles",
          "models",
          "warnings",
          "sources"
        ],
        "title": "Capabilities",
        "type": "object"
      },
      "ComputeRequestDocument": {
        "additionalProperties": false,
        "description": "A structure plus the calculation to prepare for it.",
        "properties": {
          "code": {
            "const": "quantum_espresso",
            "default": "quantum_espresso",
            "description": "The simulation code to write input for.",
            "title": "Code",
            "type": "string"
          },
          "hpc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An HPC profile id from capabilities' hpc_profiles. May be omitted when exactly one profile is installed.",
            "title": "Hpc"
          },
          "overrides": {
            "additionalProperties": true,
            "description": "Settings to pin, as {key: value} with JSON values. Keys are capabilities' settings[].key and the overridable facts[].key. A key applies to every step of the task that reads it; 'steps.<step>.<key>' sets one step only; a key that no step of the task reads is refused. null leaves a key to the automatic choice. Every value here is recorded as the user's own choice (source 'human').",
            "title": "Overrides",
            "type": "object"
          },
          "structure_content": {
            "description": "The full text of a CIF or POSCAR file. Never a file path: the server does not read paths.",
            "title": "Structure Content",
            "type": "string"
          },
          "structure_format": {
            "anyOf": [
              {
                "enum": [
                  "cif",
                  "poscar"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The format of structure_content. When omitted, it is taken from structure_name's suffix, else from a leading 'data_' line (CIF), else POSCAR.",
            "title": "Structure Format"
          },
          "structure_name": {
            "default": "structure",
            "description": "A file name for the structure, with no directories. A .cif or .poscar suffix sets the format when structure_format is omitted.",
            "title": "Structure Name",
            "type": "string"
          },
          "task": {
            "default": "scf_single_point",
            "description": "The calculation task. capabilities lists each task's steps.",
            "enum": [
              "scf_single_point",
              "dos",
              "band",
              "relax",
              "vc-relax",
              "phonon",
              "relax-phonon",
              "vc-relax-phonon"
            ],
            "title": "Task",
            "type": "string"
          }
        },
        "required": [
          "structure_content"
        ],
        "title": "ComputeRequestDocument",
        "type": "object"
      },
      "ErrorBody": {
        "description": "What failed.",
        "properties": {
          "details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Data for this kind: validation_errors for invalid_request, findings (explain's blocking findings) for advice_incomplete.",
            "title": "Details"
          },
          "kind": {
            "description": "A stable name for the failure, e.g. invalid_request, invalid_setting, advice_incomplete, asset_not_installed.",
            "title": "Kind",
            "type": "string"
          },
          "message": {
            "description": "What failed, written to show the user.",
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "message"
        ],
        "title": "ErrorBody",
        "type": "object"
      },
      "ErrorResponse": {
        "description": "The body of every failure, over HTTP and in MCP tool errors.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "ExplainResponse": {
        "description": "Every decision for the task, the warnings to relay, the findings run\nwould refuse on (empty when run would generate), and each record's\nplace.",
        "properties": {
          "blocking": {
            "items": {
              "$ref": "#/components/schemas/FindingDocument"
            },
            "title": "Blocking",
            "type": "array"
          },
          "layout": {
            "$ref": "#/components/schemas/RecordLayout"
          },
          "records": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ResolvedField_Any_"
            },
            "title": "Records",
            "type": "object"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/RecordWarning"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "records",
          "warnings",
          "blocking",
          "layout"
        ],
        "title": "ExplainResponse",
        "type": "object"
      },
      "Fact": {
        "description": "A judgement about the structure (e.g. is_metal), the approaches that\ncan decide it, and whether overrides can set it.",
        "properties": {
          "approaches": {
            "items": {
              "type": "string"
            },
            "title": "Approaches",
            "type": "array"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "ml_target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ml Target"
          },
          "overridable": {
            "title": "Overridable",
            "type": "boolean"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "values": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Values"
          }
        },
        "required": [
          "key",
          "type",
          "values",
          "ml_target",
          "approaches",
          "overridable",
          "description"
        ],
        "title": "Fact",
        "type": "object"
      },
      "FindingDocument": {
        "description": "Why run refuses to generate: a stable code, the settings involved\n(fields), a message and a one-line summary to show the user, and remedies,\noverride patches that each resolve it (null clears a key).",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "fields": {
            "items": {
              "type": "string"
            },
            "title": "Fields",
            "type": "array"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "remedies": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Remedies",
            "type": "array"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "code",
          "fields",
          "message",
          "remedies",
          "summary"
        ],
        "title": "FindingDocument",
        "type": "object"
      },
      "InlineStructureDocument": {
        "additionalProperties": false,
        "description": "A crystal structure sent as the text of a CIF or POSCAR file.",
        "properties": {
          "structure_content": {
            "description": "The full text of a CIF or POSCAR file. Never a file path: the server does not read paths.",
            "title": "Structure Content",
            "type": "string"
          },
          "structure_format": {
            "anyOf": [
              {
                "enum": [
                  "cif",
                  "poscar"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The format of structure_content. When omitted, it is taken from structure_name's suffix, else from a leading 'data_' line (CIF), else POSCAR.",
            "title": "Structure Format"
          },
          "structure_name": {
            "default": "structure",
            "description": "A file name for the structure, with no directories. A .cif or .poscar suffix sets the format when structure_format is omitted.",
            "title": "Structure Name",
            "type": "string"
          }
        },
        "required": [
          "structure_content"
        ],
        "title": "InlineStructureDocument",
        "type": "object"
      },
      "JsonValue": {},
      "LatticeDocument": {
        "properties": {
          "angles_degrees": {
            "items": {
              "type": "number"
            },
            "title": "Angles Degrees",
            "type": "array"
          },
          "lengths_angstrom": {
            "items": {
              "type": "number"
            },
            "title": "Lengths Angstrom",
            "type": "array"
          },
          "vectors_angstrom": {
            "items": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "title": "Vectors Angstrom",
            "type": "array"
          },
          "volume_angstrom3": {
            "title": "Volume Angstrom3",
            "type": "number"
          }
        },
        "required": [
          "vectors_angstrom",
          "lengths_angstrom",
          "angles_degrees",
          "volume_angstrom3"
        ],
        "title": "LatticeDocument",
        "type": "object"
      },
      "MagneticOrderingsDocument": {
        "description": "A structure's candidate magnetic orderings, ranked by mMACE energy\nper atom when ranked is true.",
        "properties": {
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/CandidateDocument"
            },
            "title": "Candidates",
            "type": "array"
          },
          "ranked": {
            "title": "Ranked",
            "type": "boolean"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "ranked",
          "candidates",
          "warnings"
        ],
        "title": "MagneticOrderingsDocument",
        "type": "object"
      },
      "MagneticOrderingsRequestDocument": {
        "additionalProperties": false,
        "description": "A structure whose candidate magnetic orderings to list.",
        "properties": {
          "structure_content": {
            "description": "The full text of a CIF or POSCAR file. Never a file path: the server does not read paths.",
            "title": "Structure Content",
            "type": "string"
          },
          "structure_format": {
            "anyOf": [
              {
                "enum": [
                  "cif",
                  "poscar"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The format of structure_content. When omitted, it is taken from structure_name's suffix, else from a leading 'data_' line (CIF), else POSCAR.",
            "title": "Structure Format"
          },
          "structure_name": {
            "default": "structure",
            "description": "A file name for the structure, with no directories. A .cif or .poscar suffix sets the format when structure_format is omitted.",
            "title": "Structure Name",
            "type": "string"
          }
        },
        "required": [
          "structure_content"
        ],
        "title": "MagneticOrderingsRequestDocument",
        "type": "object"
      },
      "ModelEvidence": {
        "description": "What the ML model that made a decision returned: its id, asset and\ntarget contract, its own value, details and warnings.",
        "properties": {
          "asset": {
            "title": "Asset",
            "type": "string"
          },
          "details": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Details",
            "type": "object"
          },
          "model_id": {
            "title": "Model Id",
            "type": "string"
          },
          "target_contract": {
            "title": "Target Contract",
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/JsonValue"
          },
          "warnings": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "model_id",
          "asset",
          "target_contract",
          "value",
          "details"
        ],
        "title": "ModelEvidence",
        "type": "object"
      },
      "RankingProgress": {
        "description": "Candidates relaxed so far, of the total.",
        "properties": {
          "done": {
            "title": "Done",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "done",
          "total"
        ],
        "title": "RankingProgress",
        "type": "object"
      },
      "RankingStatus": {
        "description": "A ranking job's state. Queued: position, the rankings ahead of it.\nRunning: progress, null until the first relaxation starts. Done: report.\nFailed: error.",
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "job_id": {
            "title": "Job Id",
            "type": "string"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          },
          "progress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RankingProgress"
              },
              {
                "type": "null"
              }
            ]
          },
          "report": {
            "$ref": "#/components/schemas/MagneticOrderingsDocument"
          },
          "state": {
            "enum": [
              "queued",
              "running",
              "done",
              "failed"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "job_id",
          "state"
        ],
        "title": "RankingStatus",
        "type": "object"
      },
      "RecordLayout": {
        "description": "Where each record belongs, by name: analysis (the structure alone),\nsystem (shared by every step) or one step. Every record is in exactly\none list.",
        "properties": {
          "analysis": {
            "items": {
              "type": "string"
            },
            "title": "Analysis",
            "type": "array"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/StepLayout"
            },
            "title": "Steps",
            "type": "array"
          },
          "system": {
            "items": {
              "type": "string"
            },
            "title": "System",
            "type": "array"
          }
        },
        "required": [
          "analysis",
          "system",
          "steps"
        ],
        "title": "RecordLayout",
        "type": "object"
      },
      "RecordWarning": {
        "description": "A warning as explain and run publish it: the decision's warning plus\nthe record it came from.",
        "properties": {
          "category": {
            "title": "Category",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "level": {
            "enum": [
              "info",
              "warning",
              "error"
            ],
            "title": "Level",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "record": {
            "title": "Record",
            "type": "string"
          }
        },
        "required": [
          "code",
          "level",
          "category",
          "message",
          "record"
        ],
        "title": "RecordWarning",
        "type": "object"
      },
      "ResolvedField_Any_": {
        "additionalProperties": false,
        "properties": {
          "blocked_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blocked By"
          },
          "citations": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Citations",
            "type": "array"
          },
          "derived_from": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Derived From",
            "type": "array"
          },
          "field_sources": {
            "anyOf": [
              {
                "additionalProperties": {
                  "enum": [
                    "human",
                    "ml",
                    "llm",
                    "heuristic"
                  ],
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Field Sources"
          },
          "model": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelEvidence"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "source": {
            "anyOf": [
              {
                "enum": [
                  "human",
                  "ml",
                  "llm",
                  "heuristic"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Note"
          },
          "status": {
            "enum": [
              "resolved",
              "unavailable",
              "blocked"
            ],
            "title": "Status",
            "type": "string"
          },
          "value": {
            "title": "Value"
          }
        },
        "required": [
          "status"
        ],
        "title": "ResolvedField[Any]",
        "type": "object"
      },
      "ResolvedIn": {
        "description": "Where explain and run publish a setting's resolved value: the record,\nand the keys inside its value that lead to the setting (empty for the\nvalue itself, null when the record holds none).",
        "properties": {
          "path": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path"
          },
          "record": {
            "title": "Record",
            "type": "string"
          }
        },
        "required": [
          "record",
          "path"
        ],
        "title": "ResolvedIn",
        "type": "object"
      },
      "RunRequestDocument": {
        "additionalProperties": false,
        "description": "A run request over HTTP, which can return the bundle as a ZIP.",
        "properties": {
          "code": {
            "const": "quantum_espresso",
            "default": "quantum_espresso",
            "description": "The simulation code to write input for.",
            "title": "Code",
            "type": "string"
          },
          "hpc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An HPC profile id from capabilities' hpc_profiles. May be omitted when exactly one profile is installed.",
            "title": "Hpc"
          },
          "overrides": {
            "additionalProperties": true,
            "description": "Settings to pin, as {key: value} with JSON values. Keys are capabilities' settings[].key and the overridable facts[].key. A key applies to every step of the task that reads it; 'steps.<step>.<key>' sets one step only; a key that no step of the task reads is refused. null leaves a key to the automatic choice. Every value here is recorded as the user's own choice (source 'human').",
            "title": "Overrides",
            "type": "object"
          },
          "respond_with": {
            "default": "json",
            "description": "'json' returns the file list, decisions and warnings; 'archive' returns the whole input bundle as a ZIP file.",
            "enum": [
              "json",
              "archive"
            ],
            "title": "Respond With",
            "type": "string"
          },
          "structure_content": {
            "description": "The full text of a CIF or POSCAR file. Never a file path: the server does not read paths.",
            "title": "Structure Content",
            "type": "string"
          },
          "structure_format": {
            "anyOf": [
              {
                "enum": [
                  "cif",
                  "poscar"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The format of structure_content. When omitted, it is taken from structure_name's suffix, else from a leading 'data_' line (CIF), else POSCAR.",
            "title": "Structure Format"
          },
          "structure_name": {
            "default": "structure",
            "description": "A file name for the structure, with no directories. A .cif or .poscar suffix sets the format when structure_format is omitted.",
            "title": "Structure Name",
            "type": "string"
          },
          "task": {
            "default": "scf_single_point",
            "description": "The calculation task. capabilities lists each task's steps.",
            "enum": [
              "scf_single_point",
              "dos",
              "band",
              "relax",
              "vc-relax",
              "phonon",
              "relax-phonon",
              "vc-relax-phonon"
            ],
            "title": "Task",
            "type": "string"
          }
        },
        "required": [
          "structure_content"
        ],
        "title": "RunRequestDocument",
        "type": "object"
      },
      "RunResponse": {
        "description": "The generated files' paths within the bundle, with the same records,\nwarnings and layout as explain; for a published bundle, also its kind and\nabsolute path on the server's machine.",
        "properties": {
          "files": {
            "items": {
              "type": "string"
            },
            "title": "Files",
            "type": "array"
          },
          "kind": {
            "const": "directory",
            "title": "Kind",
            "type": "string"
          },
          "layout": {
            "$ref": "#/components/schemas/RecordLayout"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "records": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ResolvedField_Any_"
            },
            "title": "Records",
            "type": "object"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/RecordWarning"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "files",
          "records",
          "warnings",
          "layout"
        ],
        "title": "RunResponse",
        "type": "object"
      },
      "Setting": {
        "description": "A key that overrides can set: its type, unit, default and allowed\nvalues; the codes, tasks, steps (the <step> of steps.<step>.<key>) and\nprograms it applies to; whether a value belongs to one structure; where\nits resolved value is published; and the approaches that can decide it.",
        "properties": {
          "approaches": {
            "items": {
              "type": "string"
            },
            "title": "Approaches",
            "type": "array"
          },
          "codes": {
            "items": {
              "type": "string"
            },
            "title": "Codes",
            "type": "array"
          },
          "default": {
            "title": "Default"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "enum": {
            "items": {
              "type": "string"
            },
            "title": "Enum",
            "type": "array"
          },
          "enum_from": {
            "title": "Enum From",
            "type": "string"
          },
          "group": {
            "title": "Group",
            "type": "string"
          },
          "items": {
            "title": "Items",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "maxItems": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxitems"
          },
          "minItems": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minitems"
          },
          "ml_target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ml Target"
          },
          "programs": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Programs"
          },
          "resolved_in": {
            "$ref": "#/components/schemas/ResolvedIn"
          },
          "scope": {
            "enum": [
              "system",
              "task",
              "per_step"
            ],
            "title": "Scope",
            "type": "string"
          },
          "steps": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps"
          },
          "structure_specific": {
            "title": "Structure Specific",
            "type": "boolean"
          },
          "tasks": {
            "items": {
              "type": "string"
            },
            "title": "Tasks",
            "type": "array"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit"
          }
        },
        "title": "Setting",
        "type": "object"
      },
      "SpeciesOccupancy": {
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          },
          "occupancy": {
            "title": "Occupancy",
            "type": "number"
          },
          "oxidation_state": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oxidation State"
          },
          "symbol": {
            "title": "Symbol",
            "type": "string"
          }
        },
        "required": [
          "symbol",
          "label",
          "occupancy",
          "oxidation_state"
        ],
        "title": "SpeciesOccupancy",
        "type": "object"
      },
      "StepLayout": {
        "description": "One step of a task: its name and the names of its records.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "records": {
            "items": {
              "type": "string"
            },
            "title": "Records",
            "type": "array"
          }
        },
        "required": [
          "name",
          "records"
        ],
        "title": "StepLayout",
        "type": "object"
      },
      "StructureDocument": {
        "properties": {
          "formula": {
            "title": "Formula",
            "type": "string"
          },
          "lattice": {
            "$ref": "#/components/schemas/LatticeDocument"
          },
          "periodicity": {
            "items": {
              "type": "boolean"
            },
            "title": "Periodicity",
            "type": "array"
          },
          "reduced_formula": {
            "title": "Reduced Formula",
            "type": "string"
          },
          "schema_version": {
            "title": "Schema Version",
            "type": "integer"
          },
          "site_count": {
            "title": "Site Count",
            "type": "integer"
          },
          "sites": {
            "items": {
              "$ref": "#/components/schemas/StructureSite"
            },
            "title": "Sites",
            "type": "array"
          }
        },
        "required": [
          "schema_version",
          "formula",
          "reduced_formula",
          "site_count",
          "lattice",
          "periodicity",
          "sites"
        ],
        "title": "StructureDocument",
        "type": "object"
      },
      "StructureInspection": {
        "description": "A parsed structure: where it came from, its composition, lattice and\nsites, and a canonical CIF of it.",
        "properties": {
          "canonical_cif": {
            "title": "Canonical Cif",
            "type": "string"
          },
          "schema_version": {
            "title": "Schema Version",
            "type": "integer"
          },
          "source": {
            "$ref": "#/components/schemas/StructureSourceDocument"
          },
          "structure": {
            "$ref": "#/components/schemas/StructureDocument"
          }
        },
        "required": [
          "source",
          "structure",
          "canonical_cif",
          "schema_version"
        ],
        "title": "StructureInspection",
        "type": "object"
      },
      "StructureSite": {
        "description": "One site: its coordinates, its label (the CIF's _atom_site_label, a\nPOSCAR's element symbol), which starting_magnetization keys by, and its\nspecies with their occupancies.",
        "properties": {
          "cartesian_coordinates_angstrom": {
            "items": {
              "type": "number"
            },
            "title": "Cartesian Coordinates Angstrom",
            "type": "array"
          },
          "fractional_coordinates": {
            "items": {
              "type": "number"
            },
            "title": "Fractional Coordinates",
            "type": "array"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "species": {
            "items": {
              "$ref": "#/components/schemas/SpeciesOccupancy"
            },
            "title": "Species",
            "type": "array"
          }
        },
        "required": [
          "fractional_coordinates",
          "cartesian_coordinates_angstrom",
          "label",
          "species"
        ],
        "title": "StructureSite",
        "type": "object"
      },
      "StructureSourceDocument": {
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "format": {
            "title": "Format",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "origin": {
            "enum": [
              "inline",
              "path",
              "generated"
            ],
            "title": "Origin",
            "type": "string"
          },
          "sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sha256"
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          }
        },
        "required": [
          "origin",
          "name",
          "format",
          "content",
          "sha256",
          "size_bytes"
        ],
        "title": "StructureSourceDocument",
        "type": "object"
      },
      "Warning": {
        "description": "A warning about a decision: a stable code, a level, the record it\nconcerns (category) and a message to show the user as it is.",
        "properties": {
          "category": {
            "title": "Category",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "level": {
            "enum": [
              "info",
              "warning",
              "error"
            ],
            "title": "Level",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "level",
          "category",
          "message"
        ],
        "title": "Warning",
        "type": "object"
      }
    }
  },
  "info": {
    "description": "Recommends DFT settings for a crystal structure and writes Quantum ESPRESSO input files. Every failure is {\"error\": {\"kind\", \"message\", \"details\"}}.",
    "title": "goldilocks-core",
    "version": "0.4.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/capabilities": {
      "get": {
        "description": "What this server can prepare: codes, tasks and their steps,\nsettings, facts, pseudopotential tables, HPC profiles, ML models and\nthe warnings catalogue. ``?task=`` keeps only that task's settings.",
        "operationId": "get_capabilities_capabilities_get",
        "parameters": [
          {
            "description": "Return only this task, the codes that offer it and the settings it reads. Omit for every task.",
            "in": "query",
            "name": "task",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "scf_single_point",
                    "dos",
                    "band",
                    "relax",
                    "vc-relax",
                    "phonon",
                    "relax-phonon",
                    "vc-relax-phonon"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only this task, the codes that offer it and the settings it reads. Omit for every task.",
              "title": "Task"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          },
          "424": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A runtime asset on the server is missing or damaged: asset_not_installed or asset_corrupt."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A failure on the server, e.g. pseudo_import_error."
          }
        },
        "summary": "Get Capabilities",
        "tags": [
          "discovery"
        ]
      }
    },
    "/explain": {
      "post": {
        "description": "Every decision for the task, without generating files. A request\nrun would refuse is still a 200 here, with its findings in\n``blocking``.",
        "operationId": "explain_explain_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComputeRequestDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplainResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          },
          "424": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A runtime asset on the server is missing or damaged: asset_not_installed or asset_corrupt."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A failure on the server, e.g. pseudo_import_error."
          }
        },
        "summary": "Explain",
        "tags": [
          "inputs"
        ]
      }
    },
    "/health": {
      "get": {
        "description": "The process is up.",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Health Health Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health",
        "tags": [
          "operations"
        ]
      }
    },
    "/inspect": {
      "post": {
        "description": "Parse a structure: its source, composition, lattice and sites,\nwith a canonical CIF.",
        "operationId": "inspect_inspect_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InlineStructureDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StructureInspection"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          },
          "424": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A runtime asset on the server is missing or damaged: asset_not_installed or asset_corrupt."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A failure on the server, e.g. pseudo_import_error."
          }
        },
        "summary": "Inspect",
        "tags": [
          "structures"
        ]
      }
    },
    "/magnetic-orderings": {
      "post": {
        "description": "The structure's candidate magnetic orderings, unranked. Rank them\nwith ``POST /magnetic-orderings/rank``.",
        "operationId": "magnetic_orderings_magnetic_orderings_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MagneticOrderingsRequestDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MagneticOrderingsDocument"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          },
          "424": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A runtime asset on the server is missing or damaged: asset_not_installed or asset_corrupt."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A failure on the server, e.g. pseudo_import_error."
          }
        },
        "summary": "Magnetic Orderings",
        "tags": [
          "structures"
        ]
      }
    },
    "/magnetic-orderings/rank": {
      "post": {
        "description": "Queue a ranking of the structure's candidate orderings by mMACE\nenergy per atom; returns the job's status.",
        "operationId": "submit_ranking_magnetic_orderings_rank_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MagneticOrderingsRequestDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RankingStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          },
          "424": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A runtime asset on the server is missing or damaged: asset_not_installed or asset_corrupt."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A failure on the server, e.g. pseudo_import_error."
          }
        },
        "summary": "Submit Ranking",
        "tags": [
          "structures"
        ]
      }
    },
    "/magnetic-orderings/rank/{job_id}": {
      "delete": {
        "description": "Drop the job, stopping its ranking if it runs.",
        "operationId": "cancel_ranking_magnetic_orderings_rank__job_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unknown_ranking: this server holds no such job."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          }
        },
        "summary": "Cancel Ranking",
        "tags": [
          "structures"
        ]
      },
      "get": {
        "description": "The job's status. Poll at least every 120 s: a queued or running\njob nobody polls for 120 s is dropped. A finished job is kept until\n64 newer jobs finish, and a restart forgets every job.",
        "operationId": "ranking_status_magnetic_orderings_rank__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RankingStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unknown_ranking: this server holds no such job."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          }
        },
        "summary": "Ranking Status",
        "tags": [
          "structures"
        ]
      }
    },
    "/ready": {
      "get": {
        "description": "Every registered runtime asset is installed and intact.",
        "operationId": "ready_ready_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Ready Ready Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "assets_unavailable: a runtime asset is missing."
          }
        },
        "summary": "Ready",
        "tags": [
          "operations"
        ]
      }
    },
    "/run": {
      "post": {
        "description": "Generate the task's input files and submission script, in memory:\nnothing is written on the server. A refused request is a 422\n``advice_incomplete`` with ``details.findings``.",
        "operationId": "run_run_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunRequestDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunResponse"
                }
              },
              "application/zip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "respond_with 'json': the summary below; 'archive': the whole bundle as a ZIP file."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The request was refused: invalid_request, invalid_setting, invalid_structure, invalid_hpc_profile, advice_incomplete (details.findings), generation_error or submission_error."
          },
          "424": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A runtime asset on the server is missing or damaged: asset_not_installed or asset_corrupt."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A failure on the server, e.g. pseudo_import_error."
          }
        },
        "summary": "Run",
        "tags": [
          "inputs"
        ]
      }
    }
  }
}
