{
 "openapi": "3.1.0",
 "info": {
  "title": "MolAstria API: open data and compute",
  "version": "1.0",
  "description": "Two parts. Open data (tag \"open data\"): static, read-only JSON, no key, no sign-up, no rate limit, CORS open; each dataset is one whole file, filter on your side; text fields are bilingual objects { zh, en }; schemas are inferred from the published data. Compute (tag \"compute\", server https://api.molastria.com): calculations with machine-learned potentials for a free API key made on https://molastria.com/pro/account.html; submit, then poll. The compute is the RTX 2080 in the site owner's computer: best effort, and it may be offline. Do not build anything with a deadline on it.",
  "license": {
   "name": "Creative Commons Attribution 4.0 International",
   "identifier": "CC-BY-4.0"
  },
  "contact": {
   "url": "https://molastria.com/api/"
  }
 },
 "servers": [
  {
   "url": "https://molastria.com/api/v1",
   "description": "Open data (static files)"
  }
 ],
 "tags": [
  {
   "name": "open data"
  },
  {
   "name": "compute",
   "description": "The compute is the RTX 2080 in the site owner's computer: best effort, and it may be offline. Do not build anything with a deadline on it."
  }
 ],
 "paths": {
  "/index.json": {
   "get": {
    "operationId": "listDatasets",
    "summary": "List every dataset with its entry count and check date",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/index"
        }
       }
      }
     }
    },
    "tags": [
     "open data"
    ],
    "security": []
   }
  },
  "/resources.json": {
   "get": {
    "operationId": "get_resources",
    "summary": "Resource catalogue: databases, software, datasets and courses (253 entries, whole file)",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/resources"
        }
       }
      }
     }
    },
    "tags": [
     "open data"
    ],
    "security": []
   }
  },
  "/journals.json": {
   "get": {
    "operationId": "get_journals",
    "summary": "Journal guide: computational-chemistry journals and preprint servers (48 entries, whole file)",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/journals"
        }
       }
      }
     }
    },
    "tags": [
     "open data"
    ],
    "security": []
   }
  },
  "/scimodels.json": {
   "get": {
    "operationId": "get_scimodels",
    "summary": "Science foundation models: model cards and official prices (27 entries, whole file)",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/scimodels"
        }
       }
      }
     }
    },
    "tags": [
     "open data"
    ],
    "security": []
   }
  },
  "/videos.json": {
   "get": {
    "operationId": "get_videos",
    "summary": "Teaching videos: courses and tutorials on YouTube and Bilibili (189 entries, whole file)",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/videos"
        }
       }
      }
     }
    },
    "tags": [
     "open data"
    ],
    "security": []
   }
  },
  "/terms.json": {
   "get": {
    "operationId": "get_terms",
    "summary": "Term table: computational-chemistry synonyms in Chinese and English (161 entries, whole file)",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/terms"
        }
       }
      }
     }
    },
    "tags": [
     "open data"
    ],
    "security": []
   }
  },
  "/v1/status": {
   "servers": [
    {
     "url": "https://api.molastria.com",
     "description": "Account service (the compute API)"
    }
   ],
   "get": {
    "operationId": "computeStatus",
    "tags": [
     "compute"
    ],
    "summary": "Whether the GPU answered the last probe and how often it was online over the last 7 days. No key.",
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeStatus"
        }
       }
      }
     }
    }
   }
  },
  "/v1/me": {
   "servers": [
    {
     "url": "https://api.molastria.com",
     "description": "Account service (the compute API)"
    }
   ],
   "get": {
    "operationId": "computeMe",
    "tags": [
     "compute"
    ],
    "summary": "The key's tier and today's uses",
    "security": [
     {
      "apiKey": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeMe"
        }
       }
      }
     },
     "401": {
      "description": "No key, or a key that is not valid",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     }
    }
   }
  },
  "/v1/models": {
   "servers": [
    {
     "url": "https://api.molastria.com",
     "description": "Account service (the compute API)"
    }
   ],
   "get": {
    "operationId": "computeModels",
    "tags": [
     "compute"
    ],
    "summary": "Models, the calculations each one does, what each calculation costs, and whether the GPU is online",
    "security": [
     {
      "apiKey": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeModels"
        }
       }
      }
     },
     "401": {
      "description": "No key, or a key that is not valid",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     }
    }
   }
  },
  "/v1/jobs": {
   "servers": [
    {
     "url": "https://api.molastria.com",
     "description": "Account service (the compute API)"
    }
   ],
   "post": {
    "operationId": "computeSubmit",
    "tags": [
     "compute"
    ],
    "summary": "Queue a calculation; answers at once with the job id. Poll GET /v1/jobs/{id}.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ComputeJobRequest"
       },
       "example": {
        "smiles": "CCO",
        "job": "opt",
        "model": "uma-s-1p2p1"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "A result the service had already computed (cached: true)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeJob"
        }
       }
      }
     },
     "202": {
      "description": "Queued",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeJob"
        }
       }
      }
     },
     "400": {
      "description": "A field is missing or outside its range",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     },
     "401": {
      "description": "No key, or a key that is not valid",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     },
     "403": {
      "description": "A model whose licence does not allow the API (licence)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     },
     "429": {
      "description": "Out of uses for today (quota_exceeded), a job already queued or running (job_in_progress), or the API as a whole is at its total for today (api_busy)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     },
     "503": {
      "description": "The GPU is offline (offline) or the API is switched off (unavailable)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     }
    }
   }
  },
  "/v1/jobs/{id}": {
   "servers": [
    {
     "url": "https://api.molastria.com",
     "description": "Account service (the compute API)"
    }
   ],
   "get": {
    "operationId": "computeJob",
    "tags": [
     "compute"
    ],
    "summary": "The state of a job: queued, running, done (with result) or error. Finished jobs are kept for an hour.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9a-f]{16}$"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeJob"
        }
       }
      }
     },
     "401": {
      "description": "No key, or a key that is not valid",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     },
     "404": {
      "description": "No such job",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     },
     "503": {
      "description": "The GPU is offline (offline) or the API is switched off (unavailable)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ComputeError"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "index": {
    "type": "object",
    "properties": {
     "api": {
      "type": "string"
     },
     "schema": {
      "type": "string"
     },
     "license": {
      "type": "object",
      "properties": {
       "id": {
        "type": "string"
       },
       "name": {
        "type": "string"
       },
       "url": {
        "type": "string"
       },
       "attribution": {
        "type": "string"
       },
       "scope": {
        "type": "object",
        "properties": {
         "zh": {
          "type": "string"
         },
         "en": {
          "type": "string"
         }
        },
        "required": [
         "zh",
         "en"
        ]
       }
      },
      "required": [
       "id",
       "name",
       "url",
       "attribution",
       "scope"
      ]
     },
     "attribution": {
      "type": "string"
     },
     "docs": {
      "type": "string"
     },
     "updated": {
      "type": "string"
     },
     "endpoints": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "title": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "count": {
         "type": "integer"
        },
        "updated": {
         "type": "string"
        },
        "page": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "url",
        "title",
        "count",
        "updated",
        "page"
       ]
      }
     },
     "client": {
      "type": "object",
      "properties": {
       "javascript": {
        "type": "string"
       },
       "embed": {
        "type": "string"
       }
      },
      "required": [
       "javascript",
       "embed"
      ]
     },
     "openapi": {
      "type": "string"
     },
     "agent": {
      "type": "object",
      "properties": {
       "name": {
        "type": "string"
       },
       "kind": {
        "type": "string"
       },
       "download": {
        "type": "string"
       },
       "page": {
        "type": "string"
       }
      },
      "required": [
       "name",
       "kind",
       "download",
       "page"
      ]
     }
    },
    "required": [
     "api",
     "schema",
     "license",
     "attribution",
     "docs",
     "updated",
     "endpoints",
     "client",
     "openapi",
     "agent"
    ]
   },
   "resources": {
    "type": "object",
    "properties": {
     "api": {
      "type": "string"
     },
     "schema": {
      "type": "string"
     },
     "license": {
      "type": "string"
     },
     "attribution": {
      "type": "string"
     },
     "docs": {
      "type": "string"
     },
     "dataset": {
      "type": "string"
     },
     "updated": {
      "type": "string"
     },
     "count": {
      "type": "integer"
     },
     "categories": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "code": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        },
        "count": {
         "type": "integer"
        }
       },
       "required": [
        "code",
        "zh",
        "en",
        "count"
       ]
      }
     },
     "items": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "number": {
         "type": "integer"
        },
        "name": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "page": {
         "type": "string"
        },
        "category_code": {
         "type": "string"
        },
        "description": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "access": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "agent_integration": {
         "type": "string"
        }
       },
       "required": [
        "number",
        "name",
        "url",
        "page",
        "category_code",
        "description",
        "access",
        "agent_integration"
       ]
      }
     }
    },
    "required": [
     "api",
     "schema",
     "license",
     "attribution",
     "docs",
     "dataset",
     "updated",
     "count",
     "categories",
     "items"
    ]
   },
   "journals": {
    "type": "object",
    "properties": {
     "api": {
      "type": "string"
     },
     "schema": {
      "type": "string"
     },
     "license": {
      "type": "string"
     },
     "attribution": {
      "type": "string"
     },
     "docs": {
      "type": "string"
     },
     "dataset": {
      "type": "string"
     },
     "updated": {
      "type": "string"
     },
     "count": {
      "type": "integer"
     },
     "categories": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "publishers": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "open_access_models": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "article_types": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "guidance_fields": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "link_names": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "items": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "name": {
         "type": "string"
        },
        "abbreviation": {
         "type": "string"
        },
        "short": {
         "type": "string"
        },
        "page": {
         "type": "string"
        },
        "category": {
         "type": "string"
        },
        "publisher": {
         "type": "string"
        },
        "issn": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "type": {
            "type": "string"
           },
           "value": {
            "type": "string"
           }
          },
          "required": [
           "type",
           "value"
          ]
         }
        },
        "open_access": {
         "type": "string"
        },
        "article_types": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "links": {
         "type": "object",
         "properties": {
          "home": {
           "type": "string"
          },
          "guide": {
           "type": "string"
          },
          "submit": {
           "type": "string"
          },
          "policy": {
           "type": "string"
          },
          "extra": {
           "type": "string"
          },
          "oa": {
           "type": "string"
          },
          "about": {
           "type": "string"
          },
          "info": {
           "type": "string"
          },
          "types": {
           "type": "string"
          },
          "process": {
           "type": "string"
          },
          "shop": {
           "type": "string"
          }
         },
         "required": [
          "home"
         ]
        },
        "guidance": {
         "type": "object",
         "properties": {
          "scope": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "types": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "oa": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "review": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "preprint": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "data": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "si": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "tpl": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          },
          "num": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            },
            "sources": {
             "type": "array",
             "items": {
              "type": "object"
             }
            }
           },
           "required": [
            "zh",
            "en",
            "sources"
           ]
          }
         },
         "required": [
          "scope"
         ]
        },
        "name_zh": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "name",
        "abbreviation",
        "short",
        "page",
        "category",
        "publisher",
        "issn",
        "open_access",
        "article_types",
        "links",
        "guidance"
       ]
      }
     }
    },
    "required": [
     "api",
     "schema",
     "license",
     "attribution",
     "docs",
     "dataset",
     "updated",
     "count",
     "categories",
     "publishers",
     "open_access_models",
     "article_types",
     "guidance_fields",
     "link_names",
     "items"
    ]
   },
   "scimodels": {
    "type": "object",
    "properties": {
     "api": {
      "type": "string"
     },
     "schema": {
      "type": "string"
     },
     "license": {
      "type": "string"
     },
     "attribution": {
      "type": "string"
     },
     "docs": {
      "type": "string"
     },
     "dataset": {
      "type": "string"
     },
     "updated": {
      "type": "string"
     },
     "count": {
      "type": "integer"
     },
     "groups": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "access_kinds": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "items": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "resource_number": {
         "type": "integer"
        },
        "name": {
         "type": "string"
        },
        "page": {
         "type": "string"
        },
        "group": {
         "type": "string"
        },
        "organisation": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "year": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "size": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "licence": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "access": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "cost": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "what": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "special": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "input": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "output": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "limits": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "links": {
         "type": "object",
         "properties": {
          "hugging_face": {
           "type": [
            "null",
            "string"
           ]
          },
          "announcement": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "zh": {
              "type": "string"
             },
             "en": {
              "type": "string"
             }
            },
            "required": [
             "url",
             "zh",
             "en"
            ]
           }
          },
          "more_hugging_face": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "url": {
              "type": "string"
             },
             "zh": {
              "type": "string"
             },
             "en": {
              "type": "string"
             }
            },
            "required": [
             "url",
             "zh",
             "en"
            ]
           }
          },
          "code": {
           "type": "string"
          }
         },
         "required": [
          "hugging_face",
          "announcement"
         ]
        },
        "try_online": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "url": {
            "type": "string"
           },
           "zh": {
            "type": "string"
           },
           "en": {
            "type": "string"
           }
          },
          "required": [
           "url",
           "zh",
           "en"
          ]
         }
        },
        "name_en": {
         "type": "string"
        },
        "try_online_none": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        }
       },
       "required": [
        "id",
        "resource_number",
        "name",
        "page",
        "group",
        "organisation",
        "year",
        "access",
        "cost",
        "what",
        "special",
        "input",
        "output",
        "limits",
        "links"
       ]
      }
     },
     "prices": {
      "type": "object",
      "properties": {
       "updated": {
        "type": "string"
       },
       "unit": {
        "type": "object",
        "properties": {
         "zh": {
          "type": "string"
         },
         "en": {
          "type": "string"
         }
        },
        "required": [
         "zh",
         "en"
        ]
       },
       "exchange_rate": {
        "type": "object",
        "properties": {
         "cny_per_usd": {
          "type": "number"
         },
         "date": {
          "type": "string"
         },
         "source": {
          "type": "string"
         },
         "label": {
          "type": "object",
          "properties": {
           "zh": {
            "type": "string"
           },
           "en": {
            "type": "string"
           }
          },
          "required": [
           "zh",
           "en"
          ]
         }
        },
        "required": [
         "cny_per_usd",
         "date",
         "source",
         "label"
        ]
       },
       "items": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "model": {
           "type": "string"
          },
          "science_model": {
           "type": "string"
          },
          "provider": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           },
           "required": [
            "zh",
            "en"
           ]
          },
          "currency": {
           "type": "string"
          },
          "input": {
           "type": "number"
          },
          "output": {
           "type": "number"
          },
          "note": {
           "type": "object",
           "properties": {
            "zh": {
             "type": "string"
            },
            "en": {
             "type": "string"
            }
           },
           "required": [
            "zh",
            "en"
           ]
          },
          "source": {
           "type": "string"
          },
          "tier": {
           "type": "string"
          },
          "model_en": {
           "type": "string"
          }
         },
         "required": [
          "id",
          "model",
          "provider",
          "currency",
          "input",
          "output",
          "note",
          "source"
         ]
        }
       }
      },
      "required": [
       "updated",
       "unit",
       "exchange_rate",
       "items"
      ]
     }
    },
    "required": [
     "api",
     "schema",
     "license",
     "attribution",
     "docs",
     "dataset",
     "updated",
     "count",
     "groups",
     "access_kinds",
     "items",
     "prices"
    ]
   },
   "videos": {
    "type": "object",
    "properties": {
     "api": {
      "type": "string"
     },
     "schema": {
      "type": "string"
     },
     "license": {
      "type": "string"
     },
     "attribution": {
      "type": "string"
     },
     "docs": {
      "type": "string"
     },
     "dataset": {
      "type": "string"
     },
     "updated": {
      "type": "string"
     },
     "count": {
      "type": "integer"
     },
     "topics": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "zh": {
         "type": "string"
        },
        "en": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "zh",
        "en"
       ]
      }
     },
     "items": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "platform": {
         "type": "string"
        },
        "kind": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "page": {
         "type": "string"
        },
        "title": {
         "type": "string"
        },
        "channel": {
         "type": "string"
        },
        "topic": {
         "type": "string"
        },
        "language": {
         "type": "string"
        },
        "level": {
         "type": "string"
        },
        "parts": {
         "type": "integer"
        },
        "official_upload": {
         "type": "boolean"
        },
        "note": {
         "type": "object",
         "properties": {
          "zh": {
           "type": "string"
          },
          "en": {
           "type": "string"
          }
         },
         "required": [
          "zh",
          "en"
         ]
        },
        "subtitles": {
         "type": "string"
        },
        "year": {
         "type": "string"
        },
        "reupload": {
         "type": "boolean"
        },
        "original": {
         "type": "string"
        },
        "software": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "duration": {
         "type": "string"
        }
       },
       "required": [
        "id",
        "platform",
        "kind",
        "url",
        "page",
        "title",
        "channel",
        "topic",
        "language",
        "level",
        "note"
       ]
      }
     }
    },
    "required": [
     "api",
     "schema",
     "license",
     "attribution",
     "docs",
     "dataset",
     "updated",
     "count",
     "topics",
     "items"
    ]
   },
   "terms": {
    "type": "object",
    "properties": {
     "api": {
      "type": "string"
     },
     "schema": {
      "type": "string"
     },
     "license": {
      "type": "string"
     },
     "attribution": {
      "type": "string"
     },
     "docs": {
      "type": "string"
     },
     "dataset": {
      "type": "string"
     },
     "updated": {
      "type": "string"
     },
     "count": {
      "type": "integer"
     },
     "items": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "terms": {
         "type": "array",
         "items": {
          "type": "string"
         }
        }
       },
       "required": [
        "terms"
       ]
      }
     }
    },
    "required": [
     "api",
     "schema",
     "license",
     "attribution",
     "docs",
     "dataset",
     "updated",
     "count",
     "items"
    ]
   },
   "ComputeUsage": {
    "type": "object",
    "description": "Today's uses of the account (shared with what it runs on the site).",
    "properties": {
     "used": {
      "type": "integer"
     },
     "limit": {
      "type": "integer"
     },
     "remaining": {
      "type": "integer"
     },
     "reset": {
      "type": "integer",
      "description": "Unix time at which the count starts again"
     }
    },
    "required": [
     "used",
     "limit",
     "remaining",
     "reset"
    ]
   },
   "ComputeError": {
    "type": "object",
    "properties": {
     "error": {
      "type": "object",
      "properties": {
       "code": {
        "type": "string",
        "description": "For programs.",
        "examples": [
         "unauthorized",
         "invalid_request",
         "quota_exceeded",
         "job_in_progress",
         "offline",
         "api_busy",
         "licence",
         "not_found",
         "too_many_requests",
         "region",
         "unavailable"
        ]
       },
       "message": {
        "type": "string",
        "description": "English"
       },
       "message_zh": {
        "type": "string",
        "description": "Chinese"
       }
      },
      "required": [
       "code",
       "message",
       "message_zh"
      ]
     }
    },
    "required": [
     "error"
    ]
   },
   "ComputeJobRequest": {
    "type": "object",
    "description": "Exactly one of smiles and xyz (a reaction brings its species in params.reaction instead; protein MD its PDB ID in params.pdb_id). At most 30 heavy atoms and 120 atoms.",
    "properties": {
     "job": {
      "type": "string",
      "enum": [
       "sp",
       "opt",
       "freq",
       "conf",
       "scan",
       "md",
       "rxn",
       "ipea",
       "spin",
       "bde",
       "pa",
       "pmd"
      ],
      "default": "ipea",
      "description": "sp single point, opt optimisation, freq frequencies and thermochemistry, conf conformer search, scan dihedral scan, md molecular dynamics, rxn reaction energy, ipea ionisation energy and electron affinity, spin spin-state gaps, bde bond dissociation energy, pa proton affinity, pmd protein molecular dynamics (model openmm-amber14 only: Amber ff14SB + implicit water on a PDB entry). GET /v1/models says which model does which."
     },
     "model": {
      "type": "string",
      "enum": [
       "uma-s-1p2p1",
       "uma-s-1p2",
       "uma-s-1p2p1-ft-d4rev",
       "uma-s-1p1",
       "allscaip-md-conserving-all-omol",
       "allscaip-md-direct-all-omol",
       "esen-sm-conserving-all-omol",
       "esen-sm-direct-all-omol",
       "esen-md-direct-all-omol",
       "ani-2x",
       "gfn2-xtb",
       "gfn2-xtb-alpb-water",
       "gfn1-xtb",
       "gfn-ff",
       "openmm-amber14"
      ],
      "default": "uma-s-1p2p1"
     },
     "smiles": {
      "type": "string",
      "maxLength": 200
     },
     "xyz": {
      "type": "string",
      "maxLength": 12000,
      "description": "Standard XYZ text: atom count, a comment line, then \"symbol x y z\" lines."
     },
     "charge": {
      "type": "integer",
      "minimum": -2,
      "maximum": 2,
      "default": 0
     },
     "spin": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4,
      "default": 1,
      "description": "Spin multiplicity. Models that are not \"charged\" take 0 and 1 only."
     },
     "params": {
      "type": "object",
      "description": "Per job, all optional unless marked: opt {fmax}; freq {temperature, symmetry}; conf {n, temperature, window_kcal}; scan {atoms (required, four atom indices), start, end, points}; md {temperature, timestep_fs, steps, friction}; rxn {reaction (required, reaction SMILES), thermo, temperature}; ipea {mode}; spin {spins}; bde {bond (required, two atom indices), thermo, temperature}; pa {site (required, atom index), mode, thermo, temperature}; pmd {pdb_id (required, e.g. 1L2Y), chains (e.g. A; empty for every protein chain), ps (1-100, default 20; over 20 costs 10 uses), temperature (250-400 K)}."
     }
    },
    "required": [
     "job"
    ]
   },
   "ComputeJob": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "description": "Absent when a cached result comes straight back."
     },
     "status": {
      "type": "string",
      "enum": [
       "queued",
       "running",
       "done",
       "error"
      ]
     },
     "position": {
      "type": "integer",
      "description": "Place in the queue while queued"
     },
     "cached": {
      "type": "boolean"
     },
     "result": {
      "type": "object",
      "description": "Depends on the job; energies in eV, lengths in Å."
     },
     "error": {
      "type": "string"
     },
     "cost": {
      "type": "integer",
      "description": "Uses this job took (on submit)"
     },
     "usage": {
      "$ref": "#/components/schemas/ComputeUsage"
     }
    },
    "required": [
     "status"
    ]
   },
   "ComputeMe": {
    "type": "object",
    "properties": {
     "tier": {
      "type": "string",
      "enum": [
       "free",
       "pro"
      ]
     },
     "usage": {
      "$ref": "#/components/schemas/ComputeUsage"
     },
     "key": {
      "type": "object",
      "properties": {
       "prefix": {
        "type": "string"
       },
       "name": {
        "type": "string"
       },
       "created": {
        "type": "integer"
       }
      }
     }
    }
   },
   "ComputeModels": {
    "type": "object",
    "properties": {
     "online": {
      "type": "boolean"
     },
     "gpu": {
      "type": "string"
     },
     "models": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string",
         "enum": [
          "uma-s-1p2p1",
          "uma-s-1p2",
          "uma-s-1p2p1-ft-d4rev",
          "uma-s-1p1",
          "allscaip-md-conserving-all-omol",
          "allscaip-md-direct-all-omol",
          "esen-sm-conserving-all-omol",
          "esen-sm-direct-all-omol",
          "esen-md-direct-all-omol",
          "ani-2x",
          "gfn2-xtb",
          "gfn2-xtb-alpb-water",
          "gfn1-xtb",
          "gfn-ff",
          "openmm-amber14"
         ]
        },
        "ready": {
         "type": "boolean"
        },
        "queue": {
         "type": "integer"
        },
        "charged": {
         "type": "boolean",
         "description": "Handles charge and spin"
        },
        "jobs": {
         "type": "array",
         "items": {
          "type": "string",
          "enum": [
           "sp",
           "opt",
           "freq",
           "conf",
           "scan",
           "md",
           "rxn",
           "ipea",
           "spin",
           "bde",
           "pa",
           "pmd"
          ]
         }
        }
       }
      }
     },
     "costs": {
      "type": "object",
      "additionalProperties": {
       "type": "integer"
      },
      "description": "Uses per job"
     },
     "cost_with_thermo": {
      "type": "integer"
     },
     "note": {
      "type": "object",
      "description": "The compute is the RTX 2080 in the site owner's computer: best effort, and it may be offline. Do not build anything with a deadline on it.",
      "properties": {
       "zh": {
        "type": "string"
       },
       "en": {
        "type": "string"
       }
      }
     }
    }
   },
   "ComputeStatus": {
    "type": "object",
    "properties": {
     "online": {
      "type": [
       "boolean",
       "null"
      ],
      "description": "The last probe; null when there is no recent probe"
     },
     "checked": {
      "type": [
       "integer",
       "null"
      ],
      "description": "Unix time of that probe"
     },
     "gpu": {
      "type": "string"
     },
     "uptime": {
      "type": "object",
      "properties": {
       "window_days": {
        "type": "integer"
       },
       "every_minutes": {
        "type": "integer"
       },
       "samples": {
        "type": "integer"
       },
       "ratio": {
        "type": [
         "number",
         "null"
        ]
       },
       "days": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string",
           "format": "date",
           "description": "UTC"
          },
          "samples": {
           "type": "integer"
          },
          "ratio": {
           "type": [
            "number",
            "null"
           ]
          }
         }
        }
       }
      }
     },
     "note": {
      "type": "object",
      "description": "The compute is the RTX 2080 in the site owner's computer: best effort, and it may be offline. Do not build anything with a deadline on it.",
      "properties": {
       "zh": {
        "type": "string"
       },
       "en": {
        "type": "string"
       }
      }
     }
    }
   }
  },
  "securitySchemes": {
   "apiKey": {
    "type": "http",
    "scheme": "bearer",
    "description": "An API key (mola_…) made on the account page."
   }
  }
 }
}
