{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ivive-app/json-schema/ivive-app-prediction-response-schema.json",
  "title": "PredictionResponse",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ivive-app-openapi.json#/components/schemas/PredictionResponse",
  "properties": {
    "fu_p": {
      "$ref": "#/$defs/RangedValue",
      "description": "Random forest on RDKit descriptors, ~3,600 structures."
    },
    "fu_inc": {
      "type": "number",
      "title": "Fu Inc",
      "description": "Kilford 2008 / Hallifax & Houston 2006 from RDKit logP."
    },
    "logp": {
      "type": "number",
      "title": "Logp",
      "description": "RDKit Crippen logP."
    },
    "applicability": {
      "$ref": "#/$defs/Applicability"
    },
    "ionizable": {
      "items": {
        "type": "string",
        "enum": [
          "acid",
          "base"
        ]
      },
      "type": "array",
      "title": "Ionizable",
      "description": "Groups mostly charged at pH 7.4, from substructure patterns (carboxylic acid, tetrazole, aliphatic amine, amidine). The pKa is not predicted: this only says that treating the compound as neutral in Vss is probably wrong."
    },
    "known_animal_pk": {
      "anyOf": [
        {
          "$ref": "#/$defs/KnownAnimalPK"
        },
        {
          "type": "null"
        }
      ],
      "description": "Published rat/dog/monkey in-vivo plasma CL, if this structure is a drug in the PKSmart animal compilation. A literature lookup, not a prediction: a novel compound never matches, and anything that does has a published human CL too."
    },
    "structure_cl": {
      "$ref": "#/$defs/StructureCL",
      "description": "Human plasma CL from an extra-trees model on the same descriptors, trained on ~1,200 drugs with observed IV clearance. Independent of every IVIVE input, so it is a check on the mechanistic result rather than a part of it. Human only."
    },
    "structure_vdss": {
      "$ref": "#/$defs/StructureVdss",
      "description": "Human Vss from gradient boosting on the same descriptors, trained on ~1,200 drugs with observed IV Vss. A second opinion on the Schmitt 2008 path, which it beats on unseen structures while covering human only."
    }
  },
  "type": "object",
  "required": [
    "fu_p",
    "fu_inc",
    "logp",
    "applicability",
    "structure_cl",
    "structure_vdss"
  ],
  "$defs": {
    "Applicability": {
      "properties": {
        "max_similarity": {
          "type": "number",
          "title": "Max Similarity",
          "description": "Tanimoto (Morgan r2) to the nearest fu,p training structure."
        },
        "status": {
          "type": "string",
          "enum": [
            "in_domain",
            "borderline",
            "out_of_domain"
          ],
          "title": "Status"
        }
      },
      "type": "object",
      "required": [
        "max_similarity",
        "status"
      ],
      "title": "Applicability"
    },
    "KnownAnimalPK": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "cl_rat": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cl Rat"
        },
        "cl_dog": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cl Dog"
        },
        "cl_monkey": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cl Monkey"
        },
        "fu_p_rat": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fu P Rat"
        },
        "cl_human": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cl Human",
          "description": "Published human plasma CL, mL/min/kg, where the compilation has one"
        },
        "source": {
          "type": "string",
          "title": "Source"
        }
      },
      "type": "object",
      "required": [
        "name",
        "source"
      ],
      "title": "KnownAnimalPK",
      "description": "Published animal clearance for a drug already in the literature.\n\nA lookup, not a prediction, and it only ever matches a known drug. `cl_human` is carried\nbecause that is the catch: if this matched, the human answer is already published."
    },
    "RangedValue": {
      "properties": {
        "value": {
          "type": "number",
          "title": "Value"
        },
        "low": {
          "type": "number",
          "title": "Low",
          "description": "Lower end of the range holding the measured value for half of held-out drugs."
        },
        "high": {
          "type": "number",
          "title": "High"
        },
        "coverage": {
          "type": "number",
          "title": "Coverage"
        }
      },
      "type": "object",
      "required": [
        "value",
        "low",
        "high",
        "coverage"
      ],
      "title": "RangedValue"
    },
    "StructureCL": {
      "properties": {
        "value": {
          "type": "number",
          "title": "Value",
          "description": "Plasma clearance, mL/min/kg."
        },
        "low": {
          "type": "number",
          "title": "Low"
        },
        "high": {
          "type": "number",
          "title": "High"
        },
        "coverage": {
          "type": "number",
          "title": "Coverage"
        },
        "applicability": {
          "$ref": "#/$defs/Applicability"
        }
      },
      "type": "object",
      "required": [
        "value",
        "low",
        "high",
        "coverage",
        "applicability"
      ],
      "title": "StructureCL",
      "description": "Human plasma CL predicted from structure alone: a second opinion, not an IVIVE input."
    },
    "StructureVdss": {
      "properties": {
        "value": {
          "type": "number",
          "title": "Value",
          "description": "Volume of distribution at steady state, L/kg."
        },
        "low": {
          "type": "number",
          "title": "Low"
        },
        "high": {
          "type": "number",
          "title": "High"
        },
        "coverage": {
          "type": "number",
          "title": "Coverage"
        },
        "applicability": {
          "$ref": "#/$defs/Applicability"
        }
      },
      "type": "object",
      "required": [
        "value",
        "low",
        "high",
        "coverage",
        "applicability"
      ],
      "title": "StructureVdss",
      "description": "Human Vss predicted from structure alone: a second opinion on the Schmitt 2008 result."
    }
  }
}