diff --git a/APIs/optimade.local/1.1.0/openapi.yaml b/APIs/optimade.local/1.1.0/openapi.yaml new file mode 100644 index 000000000000..ee7d526f7fbe --- /dev/null +++ b/APIs/optimade.local/1.1.0/openapi.yaml @@ -0,0 +1,4415 @@ +openapi: 3.0.2 +servers: + - url: http://optimade.local +info: + description: >- + The [Open Databases Integration for Materials Design (OPTIMADE) + consortium](https://www.optimade.org/) aims to make materials databases + interoperational by developing a common REST API. + + + This specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.16.0) v0.16.0. + title: OPTIMADE API + version: 1.1.0 + x-apisguru-categories: + - open_data + x-origin: + - format: openapi + url: https://raw.githubusercontent.com/Materials-Consortia/OPTIMADE/master/schemas/openapi_schema.json + version: "3.0" + x-providerName: optimade.local +paths: + /info: + get: + operationId: get_info_info_get + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/InfoResponse" + description: Successful Response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Implemented + "553": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Version Not Supported + summary: Get Info + tags: + - Info + "/info/{entry}": + get: + operationId: get_entry_info_info__entry__get + parameters: + - in: path + name: entry + required: true + schema: + title: Entry + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EntryInfoResponse" + description: Successful Response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Implemented + "553": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Version Not Supported + summary: Get Entry Info + tags: + - Info + /links: + get: + operationId: get_links_links_get + parameters: + - description: A filter string, in the format described in section API Filtering + Format Specification of the specification. + in: query + name: filter + required: false + schema: + default: "" + description: A filter string, in the format described in section API Filtering + Format Specification of the specification. + title: Filter + type: string + - description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + in: query + name: response_format + required: false + schema: + default: json + description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + title: Response Format + type: string + - description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + in: query + name: email_address + required: false + schema: + default: "" + description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + format: email + title: Email Address + type: string + - description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + in: query + name: response_fields + required: false + schema: + default: "" + description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Response Fields + type: string + - description: >- + If supporting sortable queries, an implementation MUST use the + `sort` query parameter with format as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-sorting). + + + An implementation MAY support multiple sort fields for a single query. + + If it does, it again MUST conform to the JSON API 1.0 specification. + + + If an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`. + + If a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name. + + The set of field names, with `sortable` equal to `true` are allowed to be used in the "sort fields" list according to its definition in the JSON API 1.0 specification. + + The field `sortable` is in addition to each property description and other OPTIONAL fields. + + An example is shown in the section Entry Listing Info Endpoints. + in: query + name: sort + required: false + schema: + default: "" + description: >- + If supporting sortable queries, an implementation MUST use the + `sort` query parameter with format as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-sorting). + + + An implementation MAY support multiple sort fields for a single query. + + If it does, it again MUST conform to the JSON API 1.0 specification. + + + If an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`. + + If a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name. + + The set of field names, with `sortable` equal to `true` are allowed to be used in the "sort fields" list according to its definition in the JSON API 1.0 specification. + + The field `sortable` is in addition to each property description and other OPTIONAL fields. + + An example is shown in the section Entry Listing Info Endpoints. + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Sort + type: string + - description: >- + Sets a numerical limit on the number of entries returned. + + See [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination). + + The API implementation MUST return no more than the number specified. + + It MAY return fewer. + + The database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned). + + The default limit value is up to the API implementation to decide. + + Example: `http://example.com/optimade/v1/structures?page_limit=100` + in: query + name: page_limit + required: false + schema: + default: 20 + description: >- + Sets a numerical limit on the number of entries returned. + + See [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination). + + The API implementation MUST return no more than the number specified. + + It MAY return fewer. + + The database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned). + + The default limit value is up to the API implementation to decide. + + Example: `http://example.com/optimade/v1/structures?page_limit=100` + minimum: 0 + title: Page Limit + type: integer + - description: >- + RECOMMENDED for use with _offset-based_ pagination: using + `page_offset` and `page_limit` is RECOMMENDED. + + Example: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`. + in: query + name: page_offset + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _offset-based_ pagination: using + `page_offset` and `page_limit` is RECOMMENDED. + + Example: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`. + minimum: 0 + title: Page Offset + type: integer + - description: >- + RECOMMENDED for use with _page-based_ pagination: using + `page_number` and `page_limit` is RECOMMENDED. + + It is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based. + + Example: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`. + in: query + name: page_number + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _page-based_ pagination: using + `page_number` and `page_limit` is RECOMMENDED. + + It is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based. + + Example: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`. + minimum: 0 + title: Page Number + type: integer + - description: "RECOMMENDED for use with _cursor-based_ pagination: using + `page_cursor` and `page_limit` is RECOMMENDED." + in: query + name: page_cursor + required: false + schema: + default: 0 + description: "RECOMMENDED for use with _cursor-based_ pagination: using + `page_cursor` and `page_limit` is RECOMMENDED." + minimum: 0 + title: Page Cursor + type: integer + - description: >- + RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED. + + Example: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`. + in: query + name: page_above + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED. + + Example: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`. + minimum: 0 + title: Page Above + type: integer + - description: "RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED." + in: query + name: page_below + required: false + schema: + default: 0 + description: "RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED." + minimum: 0 + title: Page Below + type: integer + - description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + in: query + name: include + required: false + schema: + default: references + description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON + API 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + title: Include + type: string + - description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + in: query + name: api_hint + required: false + schema: + default: "" + description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + pattern: (v[0-9]+(\.[0-9]+)?)? + title: Api Hint + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/LinksResponse" + description: Successful Response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Implemented + "553": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Version Not Supported + summary: Get Links + tags: + - Links + /references: + get: + operationId: get_references_references_get + parameters: + - description: A filter string, in the format described in section API Filtering + Format Specification of the specification. + in: query + name: filter + required: false + schema: + default: "" + description: A filter string, in the format described in section API Filtering + Format Specification of the specification. + title: Filter + type: string + - description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + in: query + name: response_format + required: false + schema: + default: json + description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + title: Response Format + type: string + - description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + in: query + name: email_address + required: false + schema: + default: "" + description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + format: email + title: Email Address + type: string + - description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + in: query + name: response_fields + required: false + schema: + default: "" + description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Response Fields + type: string + - description: >- + If supporting sortable queries, an implementation MUST use the + `sort` query parameter with format as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-sorting). + + + An implementation MAY support multiple sort fields for a single query. + + If it does, it again MUST conform to the JSON API 1.0 specification. + + + If an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`. + + If a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name. + + The set of field names, with `sortable` equal to `true` are allowed to be used in the "sort fields" list according to its definition in the JSON API 1.0 specification. + + The field `sortable` is in addition to each property description and other OPTIONAL fields. + + An example is shown in the section Entry Listing Info Endpoints. + in: query + name: sort + required: false + schema: + default: "" + description: >- + If supporting sortable queries, an implementation MUST use the + `sort` query parameter with format as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-sorting). + + + An implementation MAY support multiple sort fields for a single query. + + If it does, it again MUST conform to the JSON API 1.0 specification. + + + If an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`. + + If a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name. + + The set of field names, with `sortable` equal to `true` are allowed to be used in the "sort fields" list according to its definition in the JSON API 1.0 specification. + + The field `sortable` is in addition to each property description and other OPTIONAL fields. + + An example is shown in the section Entry Listing Info Endpoints. + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Sort + type: string + - description: >- + Sets a numerical limit on the number of entries returned. + + See [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination). + + The API implementation MUST return no more than the number specified. + + It MAY return fewer. + + The database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned). + + The default limit value is up to the API implementation to decide. + + Example: `http://example.com/optimade/v1/structures?page_limit=100` + in: query + name: page_limit + required: false + schema: + default: 20 + description: >- + Sets a numerical limit on the number of entries returned. + + See [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination). + + The API implementation MUST return no more than the number specified. + + It MAY return fewer. + + The database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned). + + The default limit value is up to the API implementation to decide. + + Example: `http://example.com/optimade/v1/structures?page_limit=100` + minimum: 0 + title: Page Limit + type: integer + - description: >- + RECOMMENDED for use with _offset-based_ pagination: using + `page_offset` and `page_limit` is RECOMMENDED. + + Example: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`. + in: query + name: page_offset + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _offset-based_ pagination: using + `page_offset` and `page_limit` is RECOMMENDED. + + Example: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`. + minimum: 0 + title: Page Offset + type: integer + - description: >- + RECOMMENDED for use with _page-based_ pagination: using + `page_number` and `page_limit` is RECOMMENDED. + + It is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based. + + Example: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`. + in: query + name: page_number + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _page-based_ pagination: using + `page_number` and `page_limit` is RECOMMENDED. + + It is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based. + + Example: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`. + minimum: 0 + title: Page Number + type: integer + - description: "RECOMMENDED for use with _cursor-based_ pagination: using + `page_cursor` and `page_limit` is RECOMMENDED." + in: query + name: page_cursor + required: false + schema: + default: 0 + description: "RECOMMENDED for use with _cursor-based_ pagination: using + `page_cursor` and `page_limit` is RECOMMENDED." + minimum: 0 + title: Page Cursor + type: integer + - description: >- + RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED. + + Example: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`. + in: query + name: page_above + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED. + + Example: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`. + minimum: 0 + title: Page Above + type: integer + - description: "RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED." + in: query + name: page_below + required: false + schema: + default: 0 + description: "RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED." + minimum: 0 + title: Page Below + type: integer + - description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + in: query + name: include + required: false + schema: + default: references + description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON + API 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + title: Include + type: string + - description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + in: query + name: api_hint + required: false + schema: + default: "" + description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + pattern: (v[0-9]+(\.[0-9]+)?)? + title: Api Hint + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ReferenceResponseMany" + description: Successful Response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Implemented + "553": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Version Not Supported + summary: Get References + tags: + - References + "/references/{entry_id}": + get: + operationId: get_single_reference_references__entry_id__get + parameters: + - in: path + name: entry_id + required: true + schema: + title: Entry Id + type: string + - description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + in: query + name: response_format + required: false + schema: + default: json + description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + title: Response Format + type: string + - description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + in: query + name: email_address + required: false + schema: + default: "" + description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + format: email + title: Email Address + type: string + - description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + in: query + name: response_fields + required: false + schema: + default: "" + description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Response Fields + type: string + - description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + in: query + name: include + required: false + schema: + default: references + description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON + API 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + title: Include + type: string + - description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + in: query + name: api_hint + required: false + schema: + default: "" + description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + pattern: (v[0-9]+(\.[0-9]+)?)? + title: Api Hint + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ReferenceResponseOne" + description: Successful Response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Implemented + "553": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Version Not Supported + summary: Get Single Reference + tags: + - References + /structures: + get: + operationId: get_structures_structures_get + parameters: + - description: A filter string, in the format described in section API Filtering + Format Specification of the specification. + in: query + name: filter + required: false + schema: + default: "" + description: A filter string, in the format described in section API Filtering + Format Specification of the specification. + title: Filter + type: string + - description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + in: query + name: response_format + required: false + schema: + default: json + description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + title: Response Format + type: string + - description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + in: query + name: email_address + required: false + schema: + default: "" + description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + format: email + title: Email Address + type: string + - description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + in: query + name: response_fields + required: false + schema: + default: "" + description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Response Fields + type: string + - description: >- + If supporting sortable queries, an implementation MUST use the + `sort` query parameter with format as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-sorting). + + + An implementation MAY support multiple sort fields for a single query. + + If it does, it again MUST conform to the JSON API 1.0 specification. + + + If an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`. + + If a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name. + + The set of field names, with `sortable` equal to `true` are allowed to be used in the "sort fields" list according to its definition in the JSON API 1.0 specification. + + The field `sortable` is in addition to each property description and other OPTIONAL fields. + + An example is shown in the section Entry Listing Info Endpoints. + in: query + name: sort + required: false + schema: + default: "" + description: >- + If supporting sortable queries, an implementation MUST use the + `sort` query parameter with format as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-sorting). + + + An implementation MAY support multiple sort fields for a single query. + + If it does, it again MUST conform to the JSON API 1.0 specification. + + + If an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`. + + If a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name. + + The set of field names, with `sortable` equal to `true` are allowed to be used in the "sort fields" list according to its definition in the JSON API 1.0 specification. + + The field `sortable` is in addition to each property description and other OPTIONAL fields. + + An example is shown in the section Entry Listing Info Endpoints. + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Sort + type: string + - description: >- + Sets a numerical limit on the number of entries returned. + + See [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination). + + The API implementation MUST return no more than the number specified. + + It MAY return fewer. + + The database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned). + + The default limit value is up to the API implementation to decide. + + Example: `http://example.com/optimade/v1/structures?page_limit=100` + in: query + name: page_limit + required: false + schema: + default: 20 + description: >- + Sets a numerical limit on the number of entries returned. + + See [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination). + + The API implementation MUST return no more than the number specified. + + It MAY return fewer. + + The database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned). + + The default limit value is up to the API implementation to decide. + + Example: `http://example.com/optimade/v1/structures?page_limit=100` + minimum: 0 + title: Page Limit + type: integer + - description: >- + RECOMMENDED for use with _offset-based_ pagination: using + `page_offset` and `page_limit` is RECOMMENDED. + + Example: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`. + in: query + name: page_offset + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _offset-based_ pagination: using + `page_offset` and `page_limit` is RECOMMENDED. + + Example: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`. + minimum: 0 + title: Page Offset + type: integer + - description: >- + RECOMMENDED for use with _page-based_ pagination: using + `page_number` and `page_limit` is RECOMMENDED. + + It is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based. + + Example: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`. + in: query + name: page_number + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _page-based_ pagination: using + `page_number` and `page_limit` is RECOMMENDED. + + It is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based. + + Example: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`. + minimum: 0 + title: Page Number + type: integer + - description: "RECOMMENDED for use with _cursor-based_ pagination: using + `page_cursor` and `page_limit` is RECOMMENDED." + in: query + name: page_cursor + required: false + schema: + default: 0 + description: "RECOMMENDED for use with _cursor-based_ pagination: using + `page_cursor` and `page_limit` is RECOMMENDED." + minimum: 0 + title: Page Cursor + type: integer + - description: >- + RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED. + + Example: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`. + in: query + name: page_above + required: false + schema: + default: 0 + description: >- + RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED. + + Example: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`. + minimum: 0 + title: Page Above + type: integer + - description: "RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED." + in: query + name: page_below + required: false + schema: + default: 0 + description: "RECOMMENDED for use with _value-based_ pagination: using + `page_above`/`page_below` and `page_limit` is RECOMMENDED." + minimum: 0 + title: Page Below + type: integer + - description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + in: query + name: include + required: false + schema: + default: references + description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON + API 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + title: Include + type: string + - description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + in: query + name: api_hint + required: false + schema: + default: "" + description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + pattern: (v[0-9]+(\.[0-9]+)?)? + title: Api Hint + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/StructureResponseMany" + description: Successful Response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Implemented + "553": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Version Not Supported + summary: Get Structures + tags: + - Structures + "/structures/{entry_id}": + get: + operationId: get_single_structure_structures__entry_id__get + parameters: + - in: path + name: entry_id + required: true + schema: + title: Entry Id + type: string + - description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + in: query + name: response_format + required: false + schema: + default: json + description: >- + The output format requested (see section Response Format). + + Defaults to the format string 'json', which specifies the standard output format described in this specification. + + Example: `http://example.com/v1/structures?response_format=xml` + title: Response Format + type: string + - description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + in: query + name: email_address + required: false + schema: + default: "" + description: >- + An email address of the user making the request. + + The email SHOULD be that of a person and not an automatic system. + + Example: `http://example.com/v1/structures?email_address=user@example.com` + format: email + title: Email Address + type: string + - description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + in: query + name: response_fields + required: false + schema: + default: "" + description: >- + A comma-delimited set of fields to be provided in the output. + + If provided, these fields MUST be returned along with the REQUIRED fields. + + Other OPTIONAL fields MUST NOT be returned when this parameter is present. + + Example: `http://example.com/v1/structures?response_fields=last_modified,nsites` + pattern: ([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)? + title: Response Fields + type: string + - description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON API + 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + in: query + name: include + required: false + schema: + default: references + description: >- + A server MAY implement the JSON API concept of returning [compound + documents](https://jsonapi.org/format/1.0/#document-compound-documents) + by utilizing the `include` query parameter as specified by [JSON + API 1.0](https://jsonapi.org/format/1.0/#fetching-includes). + + + All related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields. + + + The value of `include` MUST be a comma-separated list of "relationship paths", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes). + + If relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made. + + + The **default value** for `include` is `references`. + + This means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`. + + Note, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields. + + + > **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`. + title: Include + type: string + - description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + in: query + name: api_hint + required: false + schema: + default: "" + description: If the client provides the parameter, the value SHOULD have the + format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version + and MINOR is a minor version of the API. For example, if a client + appends `api_hint=v1.0` to the query string, the hint provided is + for major version 1 and minor version 0. + pattern: (v[0-9]+(\.[0-9]+)?)? + title: Api Hint + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/StructureResponseOne" + description: Successful Response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "501": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Implemented + "553": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Version Not Supported + summary: Get Single Structure + tags: + - Structures + /versions: + get: + description: Respond with the text/csv representation for the served versions. + operationId: get_versions_versions_get + responses: + "200": + content: + text/csv; header=present: + schema: + type: string + description: Successful Response + summary: Get Versions + tags: + - Versions +components: + schemas: + Aggregate: + description: Enumeration of aggregate values + enum: + - ok + - test + - staging + - no + title: Aggregate + Assembly: + description: >- + A description of groups of sites that are statistically correlated. + + + - **Examples** (for each entry of the assemblies list): + - `{"sites_in_groups": [[0], [1]], "group_probabilities: [0.3, 0.7]}`: the first site and the second site never occur at the same time in the unit cell. + Statistically, 30 % of the times the first site is present, while 70 % of the times the second site is present. + - `{"sites_in_groups": [[1,2], [3]], "group_probabilities: [0.3, 0.7]}`: the second and third site are either present together or not present; they form the first group of atoms for this assembly. + The second group is formed by the fourth site. Sites of the first group (the second and the third) are never present at the same time as the fourth site. + 30 % of times sites 1 and 2 are present (and site 3 is absent); 70 % of times site 3 is present (and sites 1 and 2 are absent). + properties: + group_probabilities: + description: >- + Statistical probability of each group. It MUST have the same length + as `sites_in_groups`. + + It SHOULD sum to one. + + See below for examples of how to specify the probability of the occurrence of a vacancy. + + The possible reasons for the values not to sum to one are the same as already specified above for the `concentration` of each `species`. + items: + type: number + title: Group Probabilities + type: array + sites_in_groups: + description: >- + Index of the sites (0-based) that belong to each group for each + assembly. + + + - **Examples**: + - `[[1], [2]]`: two groups, one with the second site, one with the third. + - `[[1,2], [3]]`: one group with the second and third site, one with the fourth. + items: + items: + type: integer + type: array + title: Sites In Groups + type: array + required: + - sites_in_groups + - group_probabilities + title: Assembly + type: object + Attributes: + description: >- + Members of the attributes object ("attributes") represent + information about the resource object in which it's defined. + + The keys for Attributes MUST NOT be: + relationships + links + id + type + properties: {} + title: Attributes + type: object + AvailableApiVersion: + description: A JSON object containing information about an available API version + properties: + url: + description: A string specifying a versioned base URL that MUST adhere to the + rules in section Base URL + format: uri + maxLength: 65536 + minLength: 1 + pattern: .+/v[0-1](\.[0-9]+)*/?$ + title: Url + type: string + version: + description: >- + A string containing the full version number of the API served at + that versioned base URL. + + The version number string MUST NOT be prefixed by, e.g., 'v'. + + Examples: `1.0.0`, `1.0.0-rc.2`. + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + title: Version + type: string + required: + - url + - version + title: AvailableApiVersion + type: object + BaseInfoAttributes: + description: Attributes for Base URL Info endpoint + properties: + api_version: + description: |- + Presently used full version of the OPTIMADE API. + The version number string MUST NOT be prefixed by, e.g., "v". + Examples: `1.0.0`, `1.0.0-rc.2`. + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + title: Api Version + type: string + available_api_versions: + description: A list of dictionaries of available API versions at other base URLs + items: + $ref: "#/components/schemas/AvailableApiVersion" + title: Available Api Versions + type: array + available_endpoints: + description: List of available endpoints (i.e., the string to be appended to the + versioned base URL). + items: + type: string + title: Available Endpoints + type: array + entry_types_by_format: + additionalProperties: + items: + type: string + type: array + description: Available entry endpoints as a function of output formats. + title: Entry Types By Format + type: object + formats: + default: + - json + description: List of available output formats. + items: + type: string + title: Formats + type: array + is_index: + default: false + description: If true, this is an index meta-database base URL (see section Index + Meta-Database). If this member is not provided, the client MUST + assume this is not an index meta-database base URL (i.e., the + default is for `is_index` to be `false`). + title: Is Index + type: boolean + required: + - api_version + - available_api_versions + - available_endpoints + - entry_types_by_format + title: BaseInfoAttributes + type: object + BaseInfoResource: + description: Resource objects appear in a JSON API document to represent resources. + properties: + attributes: + $ref: "#/components/schemas/BaseInfoAttributes" + id: + pattern: ^/$ + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ResourceLinks" + description: a links object containing links related to the resource. + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about a + resource that can not be represented as an attribute or + relationship. + title: Meta + relationships: + allOf: + - $ref: "#/components/schemas/Relationships" + description: >- + [Relationships + object](https://jsonapi.org/format/1.0/#document-resource-object-relationships) + + describing relationships between the resource and other JSON API resources. + title: Relationships + type: + pattern: ^info$ + title: Type + type: string + required: + - id + - type + - attributes + title: BaseInfoResource + type: object + BaseRelationshipMeta: + description: Specific meta field for base relationship resource + properties: + description: + description: OPTIONAL human-readable description of the relationship + title: Description + type: string + required: + - description + title: BaseRelationshipMeta + type: object + BaseRelationshipResource: + description: Minimum requirements to represent a relationship resource + properties: + id: + description: Resource ID + title: Id + type: string + meta: + allOf: + - $ref: "#/components/schemas/BaseRelationshipMeta" + description: Relationship meta field. MUST contain 'description' if supplied. + title: Meta + type: + description: Resource type + title: Type + type: string + required: + - id + - type + title: BaseRelationshipResource + type: object + DataType: + description: >- + Optimade Data Types + + + See the section "Data types" in the OPTIMADE API specification for more information. + enum: + - string + - integer + - float + - boolean + - timestamp + - list + - dictionary + - unknown + title: DataType + EntryInfoProperty: + properties: + description: + description: A human-readable description of the entry property + title: Description + type: string + sortable: + description: >- + Defines whether the entry property can be used for sorting with the + "sort" parameter. + + If the entry listing endpoint supports sorting, this key MUST be present for sortable properties with value `true`. + title: Sortable + type: boolean + type: + allOf: + - $ref: "#/components/schemas/DataType" + description: >- + The type of the property's value. + + This MUST be any of the types defined in the Data types section. + + For the purpose of compatibility with future versions of this specification, a client MUST accept values that are not `string` values specifying any of the OPTIMADE Data types, but MUST then also disregard the `type` field. + + Note, if the value is a nested type, only the outermost type should be reported. + + E.g., for the entry resource `structures`, the `species` property is defined as a list of dictionaries, hence its `type` value would be `list`. + title: Type + unit: + description: >- + The physical unit of the entry property. + + This MUST be a valid representation of units according to version 2.1 of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html). + + It is RECOMMENDED that non-standard (non-SI) units are described in the description for the property. + title: Unit + type: string + required: + - description + title: EntryInfoProperty + type: object + EntryInfoResource: + properties: + description: + description: Description of the entry. + title: Description + type: string + formats: + description: List of output formats available for this type of entry. + items: + type: string + title: Formats + type: array + output_fields_by_format: + additionalProperties: + items: + type: string + type: array + description: Dictionary of available output fields for this entry type, where + the keys are the values of the `formats` list and the values are the + keys of the `properties` dictionary. + title: Output Fields By Format + type: object + properties: + additionalProperties: + $ref: "#/components/schemas/EntryInfoProperty" + description: A dictionary describing queryable properties for this entry type, + where each key is a property name. + title: Properties + type: object + required: + - formats + - description + - properties + - output_fields_by_format + title: EntryInfoResource + type: object + EntryInfoResponse: + description: errors are not allowed + properties: + data: + allOf: + - $ref: "#/components/schemas/EntryInfoResource" + description: OPTIMADE information for an entry endpoint + title: Data + errors: + description: A list of unique errors + items: + $ref: "#/components/schemas/Error" + title: Errors + type: array + uniqueItems: true + included: + description: A list of unique included resources + items: + $ref: "#/components/schemas/Resource" + title: Included + type: array + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - data + - meta + title: EntryInfoResponse + type: object + EntryRelationships: + description: This model wraps the JSON API Relationships to include + type-specific top level keys. + properties: + references: + allOf: + - $ref: "#/components/schemas/ReferenceRelationship" + description: Object containing links to relationships with entries of the + `references` type. + title: References + structures: + allOf: + - $ref: "#/components/schemas/StructureRelationship" + description: Object containing links to relationships with entries of the + `structures` type. + title: Structures + title: EntryRelationships + type: object + EntryResource: + description: The base model for an entry resource. + properties: + attributes: + allOf: + - $ref: "#/components/schemas/EntryResourceAttributes" + description: >- + A dictionary, containing key-value pairs representing the entry's + properties, except for `type` and `id`. + + Database-provider-specific properties need to include the database-provider-specific prefix (see section on Database-Provider-Specific Namespace Prefixes). + title: Attributes + id: + description: >- + An entry's ID as defined in section Definition of Terms. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response. + + - **Examples**: + - `"db/1234567"` + - `"cod/2000000"` + - `"cod/2000000@1234567"` + - `"nomad/L1234567890"` + - `"42"` + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ResourceLinks" + description: a links object containing links related to the resource. + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about a + resource that can not be represented as an attribute or + relationship. + title: Meta + relationships: + allOf: + - $ref: "#/components/schemas/EntryRelationships" + description: >- + A dictionary containing references to other entries according to + the description in section Relationships encoded as [JSON API + Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships). + + The OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object. + title: Relationships + type: + description: >- + The name of the type of an entry. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response. + - MUST be an existing entry type. + - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL. + + - **Example**: `"structures"` + title: Type + type: string + required: + - id + - type + - attributes + title: EntryResource + type: object + EntryResourceAttributes: + description: Contains key-value pairs representing the entry's properties. + properties: + immutable_id: + description: >- + The entry's immutable ID (e.g., an UUID). This is important for + databases having preferred IDs that point to "the latest version" of + a record, but still offer access to older variants. This ID maps to + the version-specific record, in case it changes in the future. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + + - **Examples**: + - `"8bd3e750-b477-41a0-9b11-3a799f21b44f"` + - `"fjeiwoj,54;@=%<>#32"` (Strings that are not URL-safe are allowed.) + title: Immutable Id + type: string + last_modified: + description: >- + Date and time representing when the entry was last modified. + + + - **Type**: timestamp. + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property. + + - **Example**: + - As part of JSON response format: `"2007-04-05T14:30:20Z"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.) + format: date-time + title: Last Modified + type: string + required: + - last_modified + title: EntryResourceAttributes + type: object + Error: + description: An error response + properties: + code: + description: an application-specific error code, expressed as a string value. + title: Code + type: string + detail: + description: A human-readable explanation specific to this occurrence of the + problem. + title: Detail + type: string + id: + description: A unique identifier for this particular occurrence of the problem. + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ErrorLinks" + description: A links object storing about + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about the + error. + title: Meta + source: + allOf: + - $ref: "#/components/schemas/ErrorSource" + description: An object containing references to the source of the error + title: Source + status: + description: the HTTP status code applicable to this problem, expressed as a + string value. + title: Status + type: string + title: + description: A short, human-readable summary of the problem. It **SHOULD NOT** + change from occurrence to occurrence of the problem, except for + purposes of localization. + title: Title + type: string + title: Error + type: object + ErrorLinks: + description: A Links object specific to Error objects + properties: + about: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A link that leads to further details about this particular + occurrence of the problem. + title: About + title: ErrorLinks + type: object + ErrorResponse: + description: errors MUST be present and data MUST be skipped + properties: + data: + anyOf: + - $ref: "#/components/schemas/Resource" + - items: + $ref: "#/components/schemas/Resource" + type: array + description: Outputted Data + title: Data + uniqueItems: true + errors: + description: A list of OPTIMADE-specific JSON API error objects, where the field + detail MUST be present. + items: + $ref: "#/components/schemas/OptimadeError" + title: Errors + type: array + uniqueItems: true + included: + description: A list of unique included resources + items: + $ref: "#/components/schemas/Resource" + title: Included + type: array + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - meta + - errors + title: ErrorResponse + type: object + ErrorSource: + description: an object containing references to the source of the error + properties: + parameter: + description: a string indicating which URI query parameter caused the error. + title: Parameter + type: string + pointer: + description: a JSON Pointer [RFC6901] to the associated entity in the request + document [e.g. "/data" for a primary data object, or + "/data/attributes/title" for a specific attribute]. + title: Pointer + type: string + title: ErrorSource + type: object + Implementation: + description: Information on the server implementation + properties: + homepage: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A [JSON API links + object](http://jsonapi.org/format/1.0/#document-links) pointing to + the homepage of the implementation. + title: Homepage + issue_tracker: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A [JSON API links + object](http://jsonapi.org/format/1.0/#document-links) pointing to + the implementation's issue tracker. + title: Issue Tracker + maintainer: + allOf: + - $ref: "#/components/schemas/ImplementationMaintainer" + description: A dictionary providing details about the maintainer of the + implementation. + title: Maintainer + name: + description: name of the implementation + title: Name + type: string + source_url: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A [JSON API links + object](http://jsonapi.org/format/1.0/#document-links) pointing to + the implementation source, either downloadable archive or version + control system. + title: Source Url + version: + description: version string of the current implementation + title: Version + type: string + title: Implementation + type: object + ImplementationMaintainer: + description: Details about the maintainer of the implementation + properties: + email: + description: the maintainer's email address + format: email + title: Email + type: string + required: + - email + title: ImplementationMaintainer + type: object + InfoResponse: + description: errors are not allowed + properties: + data: + allOf: + - $ref: "#/components/schemas/BaseInfoResource" + description: The implementations /info data + title: Data + errors: + description: A list of unique errors + items: + $ref: "#/components/schemas/Error" + title: Errors + type: array + uniqueItems: true + included: + description: A list of unique included resources + items: + $ref: "#/components/schemas/Resource" + title: Included + type: array + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - data + - meta + title: InfoResponse + type: object + JsonApi: + description: An object describing the server's implementation + properties: + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: Non-standard meta information + title: Meta + version: + default: "1.0" + description: Version of the json API used + title: Version + type: string + title: JsonApi + type: object + Link: + description: "A link **MUST** be represented as either: a string containing the + link's URL or a link object." + properties: + href: + description: a string containing the link’s URL. + format: uri + maxLength: 65536 + minLength: 1 + title: Href + type: string + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about the + link. + title: Meta + required: + - href + title: Link + type: object + LinkType: + description: Enumeration of link_type values + enum: + - child + - root + - external + - providers + title: LinkType + LinksResource: + description: A Links endpoint resource object + properties: + attributes: + allOf: + - $ref: "#/components/schemas/LinksResourceAttributes" + description: A dictionary containing key-value pairs representing the Links + resource's properties. + title: Attributes + id: + description: >- + An entry's ID as defined in section Definition of Terms. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response. + + - **Examples**: + - `"db/1234567"` + - `"cod/2000000"` + - `"cod/2000000@1234567"` + - `"nomad/L1234567890"` + - `"42"` + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ResourceLinks" + description: a links object containing links related to the resource. + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about a + resource that can not be represented as an attribute or + relationship. + title: Meta + relationships: + allOf: + - $ref: "#/components/schemas/EntryRelationships" + description: >- + A dictionary containing references to other entries according to + the description in section Relationships encoded as [JSON API + Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships). + + The OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object. + title: Relationships + type: + description: These objects are described in detail in the section Links Endpoint + pattern: ^links$ + title: Type + type: string + required: + - id + - type + - attributes + title: LinksResource + type: object + LinksResourceAttributes: + description: Links endpoint resource object attributes + properties: + aggregate: + allOf: + - $ref: "#/components/schemas/Aggregate" + default: ok + description: >- + A string indicating whether a client that is following links to + aggregate results from different OPTIMADE implementations should + follow this link or not. + + This flag SHOULD NOT be indicated for links where `link_type` is not `child`. + + + If not specified, clients MAY assume that the value is `ok`. + + If specified, and the value is anything different than `ok`, the client MUST assume that the server is suggesting not to follow the link during aggregation by default (also if the value is not among the known ones, in case a future specification adds new accepted values). + + + Specific values indicate the reason why the server is providing the suggestion. + + A client MAY follow the link anyway if it has reason to do so (e.g., if the client is looking for all test databases, it MAY follow the links marked with `aggregate`=`test`). + + + If specified, it MUST be one of the values listed in section Link Aggregate Options. + title: Aggregate + base_url: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: JSON API links object, pointing to the base URL for this + implementation + title: Base Url + description: + description: Human-readable description for the OPTIMADE API implementation, + e.g., for use in clients to show a description to the end-user. + title: Description + type: string + homepage: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: JSON API links object, pointing to a homepage URL for this + implementation + title: Homepage + link_type: + allOf: + - $ref: "#/components/schemas/LinkType" + description: >- + The type of the linked relation. + + MUST be one of these values: 'child', 'root', 'external', 'providers'. + title: Link Type + name: + description: Human-readable name for the OPTIMADE API implementation, e.g., for + use in clients to show the name to the end-user. + title: Name + type: string + no_aggregate_reason: + description: >- + An OPTIONAL human-readable string indicating the reason for + suggesting not to aggregate results following the link. + + It SHOULD NOT be present if `aggregate`=`ok`. + title: No Aggregate Reason + type: string + required: + - name + - description + - base_url + - homepage + - link_type + title: LinksResourceAttributes + type: object + LinksResponse: + description: errors are not allowed + properties: + data: + anyOf: + - items: + $ref: "#/components/schemas/LinksResource" + type: array + - items: + type: object + type: array + description: List of unique OPTIMADE links resource objects + title: Data + uniqueItems: true + errors: + description: A list of unique errors + items: + $ref: "#/components/schemas/Error" + title: Errors + type: array + uniqueItems: true + included: + anyOf: + - items: + $ref: "#/components/schemas/EntryResource" + type: array + - items: + type: object + type: array + title: Included + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - data + - meta + title: LinksResponse + type: object + Meta: + description: Non-standard meta-information that can not be represented as an + attribute or relationship. + properties: {} + title: Meta + type: object + OptimadeError: + description: detail MUST be present + properties: + code: + description: an application-specific error code, expressed as a string value. + title: Code + type: string + detail: + description: A human-readable explanation specific to this occurrence of the + problem. + title: Detail + type: string + id: + description: A unique identifier for this particular occurrence of the problem. + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ErrorLinks" + description: A links object storing about + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about the + error. + title: Meta + source: + allOf: + - $ref: "#/components/schemas/ErrorSource" + description: An object containing references to the source of the error + title: Source + status: + description: the HTTP status code applicable to this problem, expressed as a + string value. + title: Status + type: string + title: + description: A short, human-readable summary of the problem. It **SHOULD NOT** + change from occurrence to occurrence of the problem, except for + purposes of localization. + title: Title + type: string + required: + - detail + title: OptimadeError + type: object + Periodicity: + description: Integer enumeration of dimension_types values + enum: + - 0 + - 1 + title: Periodicity + type: integer + Person: + description: A person, i.e., an author, editor or other. + properties: + firstname: + description: First name of the person. + title: Firstname + type: string + lastname: + description: Last name of the person. + title: Lastname + type: string + name: + description: Full name of the person, REQUIRED. + title: Name + type: string + required: + - name + title: Person + type: object + Provider: + description: Information on the database provider of the implementation. + properties: + description: + description: a longer description of the database provider + title: Description + type: string + homepage: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: a [JSON API links + object](http://jsonapi.org/format/1.0#document-links) pointing to + homepage of the database provider, either directly as a string, or + as a link object. + title: Homepage + name: + description: a short name for the database provider + title: Name + type: string + prefix: + description: database-provider-specific prefix as found in section + Database-Provider-Specific Namespace Prefixes. + pattern: ^[a-z]([a-z]|[0-9]|_)*$ + title: Prefix + type: string + required: + - name + - description + - prefix + title: Provider + type: object + ReferenceRelationship: + description: Similar to normal JSON API relationship, but with addition of + OPTIONAL meta field for a resource + properties: + data: + anyOf: + - $ref: "#/components/schemas/BaseRelationshipResource" + - items: + $ref: "#/components/schemas/BaseRelationshipResource" + type: array + description: Resource linkage + title: Data + uniqueItems: true + links: + allOf: + - $ref: "#/components/schemas/RelationshipLinks" + description: "a links object containing at least one of the following: self, + related" + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object that contains non-standard meta-information about the + relationship. + title: Meta + title: ReferenceRelationship + type: object + ReferenceResource: + description: >- + The `references` entries describe bibliographic references. + + + The following properties are used to provide the bibliographic details: + + + - **address**, **annote**, **booktitle**, **chapter**, **crossref**, **edition**, **howpublished**, **institution**, **journal**, **key**, **month**, **note**, **number**, **organization**, **pages**, **publisher**, **school**, **series**, **title**, **volume**, **year**: meanings of these properties match the [BibTeX specification](http://bibtexml.sourceforge.net/btxdoc.pdf), values are strings; + + - **bib_type**: type of the reference, corresponding to **type** property in the BibTeX specification, value is string; + + - **authors** and **editors**: lists of *person objects* which are dictionaries with the following keys: + - **name**: Full name of the person, REQUIRED. + - **firstname**, **lastname**: Parts of the person's name, OPTIONAL. + - **doi** and **url**: values are strings. + + - **Requirements/Conventions**: + - **Support**: OPTIONAL support in implementations, i.e., any of the properties MAY be `null`. + - **Query**: Support for queries on any of these properties is OPTIONAL. + If supported, filters MAY support only a subset of comparison operators. + - Every references entry MUST contain at least one of the properties. + properties: + attributes: + $ref: "#/components/schemas/ReferenceResourceAttributes" + id: + description: >- + An entry's ID as defined in section Definition of Terms. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response. + + - **Examples**: + - `"db/1234567"` + - `"cod/2000000"` + - `"cod/2000000@1234567"` + - `"nomad/L1234567890"` + - `"42"` + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ResourceLinks" + description: a links object containing links related to the resource. + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about a + resource that can not be represented as an attribute or + relationship. + title: Meta + relationships: + allOf: + - $ref: "#/components/schemas/EntryRelationships" + description: >- + A dictionary containing references to other entries according to + the description in section Relationships encoded as [JSON API + Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships). + + The OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object. + title: Relationships + type: + description: >- + The name of the type of an entry. + + - **Type**: string. + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response. + - MUST be an existing entry type. + - The entry of type and ID MUST be returned in response to a request for `//` under the versioned base URL. + - **Example**: `"structures"` + pattern: ^references$ + title: Type + type: string + required: + - id + - type + - attributes + title: ReferenceResource + type: object + ReferenceResourceAttributes: + description: |- + Model that stores the attributes of a reference. + + Many properties match the meaning described in the + [BibTeX specification](http://bibtexml.sourceforge.net/btxdoc.pdf). + properties: + address: + description: Meaning of property matches the BiBTeX specification. + title: Address + type: string + annote: + description: Meaning of property matches the BiBTeX specification. + title: Annote + type: string + authors: + description: List of person objects containing the authors of the reference. + items: + $ref: "#/components/schemas/Person" + title: Authors + type: array + bib_type: + description: Type of the reference, corresponding to the **type** property in + the BiBTeX specification. + title: Bib Type + type: string + booktitle: + description: Meaning of property matches the BiBTeX specification. + title: Booktitle + type: string + chapter: + description: Meaning of property matches the BiBTeX specification. + title: Chapter + type: string + crossref: + description: Meaning of property matches the BiBTeX specification. + title: Crossref + type: string + doi: + description: The digital object identifier of the reference. + title: Doi + type: string + edition: + description: Meaning of property matches the BiBTeX specification. + title: Edition + type: string + editors: + description: List of person objects containing the editors of the reference. + items: + $ref: "#/components/schemas/Person" + title: Editors + type: array + howpublished: + description: Meaning of property matches the BiBTeX specification. + title: Howpublished + type: string + immutable_id: + description: >- + The entry's immutable ID (e.g., an UUID). This is important for + databases having preferred IDs that point to "the latest version" of + a record, but still offer access to older variants. This ID maps to + the version-specific record, in case it changes in the future. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + + - **Examples**: + - `"8bd3e750-b477-41a0-9b11-3a799f21b44f"` + - `"fjeiwoj,54;@=%<>#32"` (Strings that are not URL-safe are allowed.) + title: Immutable Id + type: string + institution: + description: Meaning of property matches the BiBTeX specification. + title: Institution + type: string + journal: + description: Meaning of property matches the BiBTeX specification. + title: Journal + type: string + key: + description: Meaning of property matches the BiBTeX specification. + title: Key + type: string + last_modified: + description: >- + Date and time representing when the entry was last modified. + + + - **Type**: timestamp. + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property. + + - **Example**: + - As part of JSON response format: `"2007-04-05T14:30:20Z"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.) + format: date-time + title: Last Modified + type: string + month: + description: Meaning of property matches the BiBTeX specification. + title: Month + type: string + note: + description: Meaning of property matches the BiBTeX specification. + title: Note + type: string + number: + description: Meaning of property matches the BiBTeX specification. + title: Number + type: string + organization: + description: Meaning of property matches the BiBTeX specification. + title: Organization + type: string + pages: + description: Meaning of property matches the BiBTeX specification. + title: Pages + type: string + publisher: + description: Meaning of property matches the BiBTeX specification. + title: Publisher + type: string + school: + description: Meaning of property matches the BiBTeX specification. + title: School + type: string + series: + description: Meaning of property matches the BiBTeX specification. + title: Series + type: string + title: + description: Meaning of property matches the BiBTeX specification. + title: Title + type: string + url: + description: The URL of the reference. + format: uri + maxLength: 65536 + minLength: 1 + title: Url + type: string + volume: + description: Meaning of property matches the BiBTeX specification. + title: Volume + type: string + year: + description: Meaning of property matches the BiBTeX specification. + title: Year + type: string + required: + - last_modified + title: ReferenceResourceAttributes + type: object + ReferenceResponseMany: + description: errors are not allowed + properties: + data: + anyOf: + - items: + $ref: "#/components/schemas/ReferenceResource" + type: array + - items: + type: object + type: array + description: List of unique OPTIMADE references entry resource objects + title: Data + uniqueItems: true + errors: + description: A list of unique errors + items: + $ref: "#/components/schemas/Error" + title: Errors + type: array + uniqueItems: true + included: + anyOf: + - items: + $ref: "#/components/schemas/EntryResource" + type: array + - items: + type: object + type: array + title: Included + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - data + - meta + title: ReferenceResponseMany + type: object + ReferenceResponseOne: + description: errors are not allowed + properties: + data: + anyOf: + - $ref: "#/components/schemas/ReferenceResource" + - type: object + description: A single references entry resource + title: Data + errors: + description: A list of unique errors + items: + $ref: "#/components/schemas/Error" + title: Errors + type: array + uniqueItems: true + included: + anyOf: + - items: + $ref: "#/components/schemas/EntryResource" + type: array + - items: + type: object + type: array + title: Included + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - data + - meta + title: ReferenceResponseOne + type: object + RelationshipLinks: + description: >- + A resource object **MAY** contain references to other resource + objects ("relationships"). + + Relationships may be to-one or to-many. + + Relationships can be specified by including a member in a resource's links object. + properties: + related: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A [related resource + link](https://jsonapi.org/format/1.0/#document-resource-object-related-resource-links). + title: Related + self: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: >- + A link for the relationship itself (a 'relationship link'). + + This link allows the client to directly manipulate the relationship. + + When fetched successfully, this link returns the [linkage](https://jsonapi.org/format/1.0/#document-resource-object-linkage) for the related resources as its primary data. + + (See [Fetching Relationships](https://jsonapi.org/format/1.0/#fetching-relationships).) + title: Self + title: RelationshipLinks + type: object + Relationships: + description: >- + Members of the relationships object ("relationships") represent + references from the resource object in which it's defined to other + resource objects. + + Keys MUST NOT be: + type + id + properties: {} + title: Relationships + type: object + Resource: + description: Resource objects appear in a JSON API document to represent resources. + properties: + attributes: + allOf: + - $ref: "#/components/schemas/Attributes" + description: an attributes object representing some of the resource’s data. + title: Attributes + id: + description: Resource ID + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ResourceLinks" + description: a links object containing links related to the resource. + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about a + resource that can not be represented as an attribute or + relationship. + title: Meta + relationships: + allOf: + - $ref: "#/components/schemas/Relationships" + description: >- + [Relationships + object](https://jsonapi.org/format/1.0/#document-resource-object-relationships) + + describing relationships between the resource and other JSON API resources. + title: Relationships + type: + description: Resource type + title: Type + type: string + required: + - id + - type + title: Resource + type: object + ResourceLinks: + description: A Resource Links object + properties: + self: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A link that identifies the resource represented by the resource + object. + title: Self + title: ResourceLinks + type: object + ResponseMeta: + description: |- + A [JSON API meta member](https://jsonapi.org/format/1.0#document-meta) + that contains JSON API meta objects of non-standard + meta-information. + + OPTIONAL additional information global to the query that is not + specified in this document, MUST start with a + database-provider-specific prefix. + properties: + api_version: + description: |- + Presently used full version of the OPTIMADE API. + The version number string MUST NOT be prefixed by, e.g., "v". + Examples: `1.0.0`, `1.0.0-rc.2`. + pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + title: Api Version + type: string + data_available: + description: An integer containing the total number of data resource objects + available in the database for the endpoint. + title: Data Available + type: integer + data_returned: + description: An integer containing the total number of data resource objects + returned for the current `filter` query, independent of pagination. + minimum: 0 + title: Data Returned + type: integer + implementation: + allOf: + - $ref: "#/components/schemas/Implementation" + description: a dictionary describing the server implementation + title: Implementation + last_id: + description: a string containing the last ID returned + title: Last Id + type: string + more_data_available: + description: "`false` if the response contains all data for the request (e.g., a + request issued to a single entry endpoint, or a `filter` query at + the last page of a paginated response) and `true` if the response is + incomplete in the sense that multiple objects match the request, and + not all of them have been included in the response (e.g., a query + with multiple pages that is not at the last page)." + title: More Data Available + type: boolean + provider: + allOf: + - $ref: "#/components/schemas/Provider" + description: information on the database provider of the implementation. + title: Provider + query: + allOf: + - $ref: "#/components/schemas/ResponseMetaQuery" + description: Information on the Query that was requested + title: Query + response_message: + description: response string from the server + title: Response Message + type: string + schema: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: >- + A [JSON API links + object](http://jsonapi.org/format/1.0/#document-links) that points + to a schema for the response. + + If it is a string, or a dictionary containing no `meta` field, the provided URL MUST point at an [OpenAPI](https://swagger.io/specification/) schema. + + It is possible that future versions of this specification allows for alternative schema types. + + Hence, if the `meta` field of the JSON API links object is provided and contains a field `schema_type` that is not equal to the string `OpenAPI` the client MUST not handle failures to parse the schema or to validate the response against the schema as errors. + title: Schema + time_stamp: + description: A timestamp containing the date and time at which the query was + executed. + format: date-time + title: Time Stamp + type: string + warnings: + description: >- + A list of warning resource objects representing non-critical errors + or warnings. + + A warning resource object is defined similarly to a [JSON API error object](http://jsonapi.org/format/1.0/#error-objects), but MUST also include the field `type`, which MUST have the value `"warning"`. + + The field `detail` MUST be present and SHOULD contain a non-critical message, e.g., reporting unrecognized search attributes or deprecated features. + + The field `status`, representing a HTTP response status code, MUST NOT be present for a warning resource object. + + This is an exclusive field for error resource objects. + items: + $ref: "#/components/schemas/Warnings" + title: Warnings + type: array + uniqueItems: true + required: + - query + - api_version + - more_data_available + title: ResponseMeta + type: object + ResponseMetaQuery: + description: Information on the query that was requested. + properties: + representation: + description: >- + A string with the part of the URL following the versioned or + unversioned base URL that serves the API. + + Query parameters that have not been used in processing the request MAY be omitted. + + In particular, if no query parameters have been involved in processing the request, the query part of the URL MAY be excluded. + + Example: `/structures?filter=nelements=2` + title: Representation + type: string + required: + - representation + title: ResponseMetaQuery + type: object + Species: + description: >- + A list describing the species of the sites of this structure. + + + Species can represent pure chemical elements, virtual-crystal atoms representing a + + statistical occupation of a given site by multiple chemical elements, and/or a + + location to which there are attached atoms, i.e., atoms whose precise location are + + unknown beyond that they are attached to that position (frequently used to indicate + + hydrogen atoms attached to another element, e.g., a carbon with three attached + + hydrogens might represent a methyl group, -CH3). + + + - **Examples**: + - `[ {"name": "Ti", "chemical_symbols": ["Ti"], "concentration": [1.0]} ]`: any site with this species is occupied by a Ti atom. + - `[ {"name": "Ti", "chemical_symbols": ["Ti", "vacancy"], "concentration": [0.9, 0.1]} ]`: any site with this species is occupied by a Ti atom with 90 % probability, and has a vacancy with 10 % probability. + - `[ {"name": "BaCa", "chemical_symbols": ["vacancy", "Ba", "Ca"], "concentration": [0.05, 0.45, 0.5], "mass": [0.0, 137.327, 40.078]} ]`: any site with this species is occupied by a Ba atom with 45 % probability, a Ca atom with 50 % probability, and by a vacancy with 5 % probability. The mass of this site is (on average) 88.5 a.m.u. + - `[ {"name": "C12", "chemical_symbols": ["C"], "concentration": [1.0], "mass": [12.0]} ]`: any site with this species is occupied by a carbon isotope with mass 12. + - `[ {"name": "C13", "chemical_symbols": ["C"], "concentration": [1.0], "mass": [13.0]} ]`: any site with this species is occupied by a carbon isotope with mass 13. + - `[ {"name": "CH3", "chemical_symbols": ["C"], "concentration": [1.0], "attached": ["H"], "nattached": [3]} ]`: any site with this species is occupied by a methyl group, -CH3, which is represented without specifying precise positions of the hydrogen atoms. + properties: + attached: + description: If provided MUST be a list of length 1 or more of strings of + chemical symbols for the elements attached to this site, or "X" for + a non-chemical element. + items: + type: string + title: Attached + type: array + chemical_symbols: + description: >- + MUST be a list of strings of all chemical elements composing this + species. Each item of the list MUST be one of the following: + + + - a valid chemical-element name, or + + - the special value `"X"` to represent a non-chemical element, or + + - the special value `"vacancy"` to represent that this site has a non-zero probability of having a vacancy (the respective probability is indicated in the `concentration` list, see below). + + + If any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element, the correct flag MUST be set in the list `structure_features`. + items: + type: string + title: Chemical Symbols + type: array + concentration: + description: >- + MUST be a list of floats, with same length as `chemical_symbols`. + The numbers represent the relative concentration of the + corresponding chemical symbol in this species. The numbers SHOULD + sum to one. Cases in which the numbers do not sum to one typically + fall only in the following two categories: + + + - Numerical errors when representing float numbers in fixed precision, e.g. for two chemical symbols with concentrations `1/3` and `2/3`, the concentration might look something like `[0.33333333333, 0.66666666666]`. If the client is aware that the sum is not one because of numerical precision, it can renormalize the values so that the sum is exactly one. + + - Experimental errors in the data present in the database. In this case, it is the responsibility of the client to decide how to process the data. + + + Note that concentrations are uncorrelated between different site (even of the same species). + items: + type: number + title: Concentration + type: array + mass: + description: |- + If present MUST be a list of floats expressed in a.m.u. + Elements denoting vacancies MUST have masses equal to 0. + items: + type: number + title: Mass + type: array + name: + description: Gives the name of the species; the **name** value MUST be unique in + the `species` list. + title: Name + type: string + nattached: + description: If provided MUST be a list of length 1 or more of integers + indicating the number of attached atoms of the kind specified in the + value of the :field:`attached` key. + items: + type: integer + title: Nattached + type: array + original_name: + description: >- + Can be any valid Unicode string, and SHOULD contain (if specified) + the name of the species that is used internally in the source + database. + + + Note: With regards to "source database", we refer to the immediate source being queried via the OPTIMADE API implementation. + title: Original Name + type: string + required: + - name + - chemical_symbols + - concentration + title: Species + type: object + StructureFeatures: + description: Enumeration of structure_features values + enum: + - disorder + - implicit_atoms + - site_attachments + - assemblies + title: StructureFeatures + StructureRelationship: + description: Similar to normal JSON API relationship, but with addition of + OPTIONAL meta field for a resource + properties: + data: + anyOf: + - $ref: "#/components/schemas/BaseRelationshipResource" + - items: + $ref: "#/components/schemas/BaseRelationshipResource" + type: array + description: Resource linkage + title: Data + uniqueItems: true + links: + allOf: + - $ref: "#/components/schemas/RelationshipLinks" + description: "a links object containing at least one of the following: self, + related" + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object that contains non-standard meta-information about the + relationship. + title: Meta + title: StructureRelationship + type: object + StructureResource: + description: Representing a structure. + properties: + attributes: + $ref: "#/components/schemas/StructureResourceAttributes" + id: + description: >- + An entry's ID as defined in section Definition of Terms. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response. + + - **Examples**: + - `"db/1234567"` + - `"cod/2000000"` + - `"cod/2000000@1234567"` + - `"nomad/L1234567890"` + - `"42"` + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ResourceLinks" + description: a links object containing links related to the resource. + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about a + resource that can not be represented as an attribute or + relationship. + title: Meta + relationships: + allOf: + - $ref: "#/components/schemas/EntryRelationships" + description: >- + A dictionary containing references to other entries according to + the description in section Relationships encoded as [JSON API + Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships). + + The OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object. + title: Relationships + type: + description: >- + The name of the type of an entry. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response. + - MUST be an existing entry type. + - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL. + + - **Examples**: + - `"structures"` + pattern: ^structures$ + title: Type + type: string + required: + - id + - type + - attributes + title: StructureResource + type: object + StructureResourceAttributes: + description: This class contains the Field for the attributes used to represent + a structure, e.g. unit cell, atoms, positions. + properties: + assemblies: + description: >- + A description of groups of sites that are statistically correlated. + + + - **Type**: list of dictionary with keys: + - `sites_in_groups`: list of list of integers (REQUIRED) + - `group_probabilities`: list of floats (REQUIRED) + + - **Requirements/Conventions**: + - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`. + - **Query**: Support for queries on this property is OPTIONAL. + If supported, filters MAY support only a subset of comparison operators. + - The property SHOULD be `null` for entries that have no partial occupancies. + - If present, the correct flag MUST be set in the list `structure_features`. + - Client implementations MUST check its presence (as its presence changes the interpretation of the structure). + - If present, it MUST be a list of dictionaries, each of which represents an assembly and MUST have the following two keys: + - **sites_in_groups**: Index of the sites (0-based) that belong to each group for each assembly. + + Example: `[[1], [2]]`: two groups, one with the second site, one with the third. + Example: `[[1,2], [3]]`: one group with the second and third site, one with the fourth. + + - **group_probabilities**: Statistical probability of each group. It MUST have the same length as `sites_in_groups`. + It SHOULD sum to one. + See below for examples of how to specify the probability of the occurrence of a vacancy. + The possible reasons for the values not to sum to one are the same as already specified above for the `concentration` of each `species`. + + - If a site is not present in any group, it means that it is present with 100 % probability (as if no assembly was specified). + - A site MUST NOT appear in more than one group. + + - **Examples** (for each entry of the assemblies list): + - `{"sites_in_groups": [[0], [1]], "group_probabilities: [0.3, 0.7]}`: the first site and the second site never occur at the same time in the unit cell. + Statistically, 30 % of the times the first site is present, while 70 % of the times the second site is present. + - `{"sites_in_groups": [[1,2], [3]], "group_probabilities: [0.3, 0.7]}`: the second and third site are either present together or not present; they form the first group of atoms for this assembly. + The second group is formed by the fourth site. + Sites of the first group (the second and the third) are never present at the same time as the fourth site. + 30 % of times sites 1 and 2 are present (and site 3 is absent); 70 % of times site 3 is present (and sites 1 and 2 are absent). + + - **Notes**: + - Assemblies are essential to represent, for instance, the situation where an atom can statistically occupy two different positions (sites). + + - By defining groups, it is possible to represent, e.g., the case where a functional molecule (and not just one atom) is either present or absent (or the case where it it is present in two conformations) + + - Considerations on virtual alloys and on vacancies: In the special case of a virtual alloy, these specifications allow two different, equivalent ways of specifying them. + For instance, for a site at the origin with 30 % probability of being occupied by Si, 50 % probability of being occupied by Ge, and 20 % of being a vacancy, the following two representations are possible: + + - Using a single species: + ```json + { + "cartesian_site_positions": [[0,0,0]], + "species_at_sites": ["SiGe-vac"], + "species": [ + { + "name": "SiGe-vac", + "chemical_symbols": ["Si", "Ge", "vacancy"], + "concentration": [0.3, 0.5, 0.2] + } + ] + // ... + } + ``` + + - Using multiple species and the assemblies: + ```json + { + "cartesian_site_positions": [ [0,0,0], [0,0,0], [0,0,0] ], + "species_at_sites": ["Si", "Ge", "vac"], + "species": [ + { "name": "Si", "chemical_symbols": ["Si"], "concentration": [1.0] }, + { "name": "Ge", "chemical_symbols": ["Ge"], "concentration": [1.0] }, + { "name": "vac", "chemical_symbols": ["vacancy"], "concentration": [1.0] } + ], + "assemblies": [ + { + "sites_in_groups": [ [0], [1], [2] ], + "group_probabilities": [0.3, 0.5, 0.2] + } + ] + // ... + } + ``` + + - It is up to the database provider to decide which representation to use, typically depending on the internal format in which the structure is stored. + However, given a structure identified by a unique ID, the API implementation MUST always provide the same representation for it. + + - The probabilities of occurrence of different assemblies are uncorrelated. + So, for instance in the following case with two assemblies: + ```json + { + "assemblies": [ + { + "sites_in_groups": [ [0], [1] ], + "group_probabilities": [0.2, 0.8], + }, + { + "sites_in_groups": [ [2], [3] ], + "group_probabilities": [0.3, 0.7] + } + ] + } + ``` + + Site 0 is present with a probability of 20 % and site 1 with a probability of 80 %. These two sites are correlated (either site 0 or 1 is present). Similarly, site 2 is present with a probability of 30 % and site 3 with a probability of 70 %. + These two sites are correlated (either site 2 or 3 is present). + However, the presence or absence of sites 0 and 1 is not correlated with the presence or absence of sites 2 and 3 (in the specific example, the pair of sites (0, 2) can occur with 0.2*0.3 = 6 % probability; the pair (0, 3) with 0.2*0.7 = 14 % probability; the pair (1, 2) with 0.8*0.3 = 24 % probability; and the pair (1, 3) with 0.8*0.7 = 56 % probability). + items: + $ref: "#/components/schemas/Assembly" + title: Assemblies + type: array + cartesian_site_positions: + description: >- + Cartesian positions of each site in the structure. + + A site is usually used to describe positions of atoms; what atoms can be encountered at a given site is conveyed by the `species_at_sites` property, and the species themselves are described in the `species` property. + + + - **Type**: list of list of floats + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: Support for queries on this property is OPTIONAL. + If supported, filters MAY support only a subset of comparison operators. + - It MUST be a list of length equal to the number of sites in the structure, where every element is a list of the three Cartesian coordinates of a site expressed as float values in the unit angstrom (Å). + - An entry MAY have multiple sites at the same Cartesian position (for a relevant use of this, see e.g., the property `assemblies`). + + - **Examples**: + - `[[0,0,0],[0,0,2]]` indicates a structure with two sites, one sitting at the origin and one along the (positive) *z*-axis, 2 Å away from the origin. + items: + items: + type: number + maxItems: 3 + minItems: 3 + type: array + nullable: true + title: Cartesian Site Positions + type: array + chemical_formula_anonymous: + description: >- + The anonymous formula is the `chemical_formula_reduced`, but where + the elements are instead first ordered by their chemical proportion + number, and then, in order left to right, replaced by anonymous + symbols A, B, C, ..., Z, Aa, Ba, ..., Za, Ab, Bb, ... and so on. + + + - **Type**: string + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property. + However, support for filters using partial string matching with this property is OPTIONAL (i.e., BEGINS WITH, ENDS WITH, and CONTAINS). + + - **Examples**: + - `"A2B"` + - `"A42B42C16D12E10F9G5"` + + - **Querying**: + - A filter that matches an exactly given formula is `chemical_formula_anonymous="A2B"`. + nullable: true + pattern: ^([A-Z][a-z]?\d*)*$ + title: Chemical Formula Anonymous + type: string + chemical_formula_descriptive: + description: >- + The chemical formula for a structure as a string in a form chosen + by the API implementation. + + + - **Type**: string + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - The chemical formula is given as a string consisting of properly capitalized element symbols followed by integers or decimal numbers, balanced parentheses, square, and curly brackets `(`,`)`, `[`,`]`, `{`, `}`, commas, the `+`, `-`, `:` and `=` symbols. The parentheses are allowed to be followed by a number. Spaces are allowed anywhere except within chemical symbols. The order of elements and any groupings indicated by parentheses or brackets are chosen freely by the API implementation. + - The string SHOULD be arithmetically consistent with the element ratios in the `chemical_formula_reduced` property. + - It is RECOMMENDED, but not mandatory, that symbols, parentheses and brackets, if used, are used with the meanings prescribed by [IUPAC's Nomenclature of Organic Chemistry](https://www.qmul.ac.uk/sbcs/iupac/bibliog/blue.html). + + - **Examples**: + - `"(H2O)2 Na"` + - `"NaCl"` + - `"CaCO3"` + - `"CCaO3"` + - `"(CH3)3N+ - [CH2]2-OH = Me3N+ - CH2 - CH2OH"` + + - **Query examples**: + - Note: the free-form nature of this property is likely to make queries on it across different databases inconsistent. + - A filter that matches an exactly given formula: `chemical_formula_descriptive="(H2O)2 Na"`. + - A filter that does a partial match: `chemical_formula_descriptive CONTAINS "H2O"`. + nullable: true + title: Chemical Formula Descriptive + type: string + chemical_formula_hill: + description: >- + The chemical formula for a structure in [Hill + form](https://dx.doi.org/10.1021/ja02046a005) with element symbols + followed by integer chemical proportion numbers. The proportion + number MUST be omitted if it is 1. + + + - **Type**: string + + + - **Requirements/Conventions**: + - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`. + - **Query**: Support for queries on this property is OPTIONAL. + If supported, only a subset of the filter features MAY be supported. + - The overall scale factor of the chemical proportions is chosen such that the resulting values are integers that indicate the most chemically relevant unit of which the system is composed. + For example, if the structure is a repeating unit cell with four hydrogens and four oxygens that represents two hydroperoxide molecules, `chemical_formula_hill` is `"H2O2"` (i.e., not `"HO"`, nor `"H4O4"`). + - If the chemical insight needed to ascribe a Hill formula to the system is not present, the property MUST be handled as unset. + - Element symbols MUST have proper capitalization (e.g., `"Si"`, not `"SI"` for "silicon"). + - Elements MUST be placed in [Hill order](https://dx.doi.org/10.1021/ja02046a005), followed by their integer chemical proportion number. + Hill order means: if carbon is present, it is placed first, and if also present, hydrogen is placed second. + After that, all other elements are ordered alphabetically. + If carbon is not present, all elements are ordered alphabetically. + - If the system has sites with partial occupation and the total occupations of each element do not all sum up to integers, then the Hill formula SHOULD be handled as unset. + - No spaces or separators are allowed. + + - **Examples**: + - `"H2O2"` + + - **Query examples**: + - A filter that matches an exactly given formula is `chemical_formula_hill="H2O2"`. + pattern: ^([A-Z][a-z]?\d*)*$ + title: Chemical Formula Hill + type: string + chemical_formula_reduced: + description: >- + The reduced chemical formula for a structure as a string with + element symbols and integer chemical proportion numbers. + + The proportion number MUST be omitted if it is 1. + + + - **Type**: string + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property. + However, support for filters using partial string matching with this property is OPTIONAL (i.e., BEGINS WITH, ENDS WITH, and CONTAINS). + Intricate queries on formula components are instead suggested to be formulated using set-type filter operators on the multi valued `elements` and `elements_ratios` properties. + - Element symbols MUST have proper capitalization (e.g., `"Si"`, not `"SI"` for "silicon"). + - Elements MUST be placed in alphabetical order, followed by their integer chemical proportion number. + - For structures with no partial occupation, the chemical proportion numbers are the smallest integers for which the chemical proportion is exactly correct. + - For structures with partial occupation, the chemical proportion numbers are integers that within reasonable approximation indicate the correct chemical proportions. The precise details of how to perform the rounding is chosen by the API implementation. + - No spaces or separators are allowed. + + - **Examples**: + - `"H2NaO"` + - `"ClNa"` + - `"CCaO3"` + + - **Query examples**: + - A filter that matches an exactly given formula is `chemical_formula_reduced="H2NaO"`. + nullable: true + pattern: ^([A-Z][a-z]?\d*)*$ + title: Chemical Formula Reduced + type: string + dimension_types: + description: >- + List of three integers. + + For each of the three directions indicated by the three lattice vectors (see property `lattice_vectors`), this list indicates if the direction is periodic (value `1`) or non-periodic (value `0`). + + Note: the elements in this list each refer to the direction of the corresponding entry in `lattice_vectors` and *not* the Cartesian x, y, z directions. + + + - **Type**: list of integers. + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: Support for queries on this property is OPTIONAL. + - MUST be a list of length 3. + - Each integer element MUST assume only the value 0 or 1. + + - **Examples**: + - For a molecule: `[0, 0, 0]` + - For a wire along the direction specified by the third lattice vector: `[0, 0, 1]` + - For a 2D surface/slab, periodic on the plane defined by the first and third lattice vectors: `[1, 0, 1]` + - For a bulk 3D system: `[1, 1, 1]` + items: + $ref: "#/components/schemas/Periodicity" + maxItems: 3 + minItems: 3 + nullable: true + title: Dimension Types + type: array + elements: + description: >- + Symbols of the different elements present in the structure. + + + - **Type**: list of strings. + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - The strings are the chemical symbols, i.e., either a single uppercase letter or an uppercase letter followed by a number of lowercase letters. + - The order MUST be alphabetical. + - MUST refer to the same elements in the same order, and therefore be of the same length, as `elements_ratios`, if the latter is provided. + - Note: This property SHOULD NOT contain the string "X" to indicate non-chemical elements or "vacancy" to indicate vacancies (in contrast to the field `chemical_symbols` for the `species` property). + + - **Examples**: + - `["Si"]` + - `["Al","O","Si"]` + + - **Query examples**: + - A filter that matches all records of structures that contain Si, Al **and** O, and possibly other elements: `elements HAS ALL "Si", "Al", "O"`. + - To match structures with exactly these three elements, use `elements HAS ALL "Si", "Al", "O" AND elements LENGTH 3`. + - Note: length queries on this property can be equivalently formulated by filtering on the `nelements`_ property directly. + items: + type: string + nullable: true + title: Elements + type: array + elements_ratios: + description: >- + Relative proportions of different elements in the structure. + + + - **Type**: list of floats + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - Composed by the proportions of elements in the structure as a list of floating point numbers. + - The sum of the numbers MUST be 1.0 (within floating point accuracy) + - MUST refer to the same elements in the same order, and therefore be of the same length, as `elements`, if the latter is provided. + + - **Examples**: + - `[1.0]` + - `[0.3333333333333333, 0.2222222222222222, 0.4444444444444444]` + + - **Query examples**: + - Note: Useful filters can be formulated using the set operator syntax for correlated values. + However, since the values are floating point values, the use of equality comparisons is generally inadvisable. + - OPTIONAL: a filter that matches structures where approximately 1/3 of the atoms in the structure are the element Al is: `elements:elements_ratios HAS ALL "Al":>0.3333, "Al":<0.3334`. + items: + type: number + nullable: true + title: Elements Ratios + type: array + immutable_id: + description: >- + The entry's immutable ID (e.g., an UUID). This is important for + databases having preferred IDs that point to "the latest version" of + a record, but still offer access to older variants. This ID maps to + the version-specific record, in case it changes in the future. + + + - **Type**: string. + + + - **Requirements/Conventions**: + - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + + - **Examples**: + - `"8bd3e750-b477-41a0-9b11-3a799f21b44f"` + - `"fjeiwoj,54;@=%<>#32"` (Strings that are not URL-safe are allowed.) + title: Immutable Id + type: string + last_modified: + description: >- + Date and time representing when the entry was last modified. + + + - **Type**: timestamp. + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property. + + - **Example**: + - As part of JSON response format: `"2007-04-05T14:30:20Z"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.) + format: date-time + nullable: true + title: Last Modified + type: string + lattice_vectors: + description: >- + The three lattice vectors in Cartesian coordinates, in ångström + (Å). + + + - **Type**: list of list of floats or unknown values. + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: Support for queries on this property is OPTIONAL. + If supported, filters MAY support only a subset of comparison operators. + - MUST be a list of three vectors *a*, *b*, and *c*, where each of the vectors MUST BE a list of the vector's coordinates along the x, y, and z Cartesian coordinates. + (Therefore, the first index runs over the three lattice vectors and the second index runs over the x, y, z Cartesian coordinates). + - For databases that do not define an absolute Cartesian system (e.g., only defining the length and angles between vectors), the first lattice vector SHOULD be set along *x* and the second on the *xy*-plane. + - MUST always contain three vectors of three coordinates each, independently of the elements of property `dimension_types`. + The vectors SHOULD by convention be chosen so the determinant of the `lattice_vectors` matrix is different from zero. + The vectors in the non-periodic directions have no significance beyond fulfilling these requirements. + - The coordinates of the lattice vectors of non-periodic dimensions (i.e., those dimensions for which `dimension_types` is `0`) MAY be given as a list of all `null` values. + If a lattice vector contains the value `null`, all coordinates of that lattice vector MUST be `null`. + + - **Examples**: + - `[[4.0,0.0,0.0],[0.0,4.0,0.0],[0.0,1.0,4.0]]` represents a cell, where the first vector is `(4, 0, 0)`, i.e., a vector aligned along the `x` axis of length 4 Å; the second vector is `(0, 4, 0)`; and the third vector is `(0, 1, 4)`. + items: + items: + type: number + maxItems: 3 + minItems: 3 + type: array + maxItems: 3 + minItems: 3 + nullable: true + title: Lattice Vectors + type: array + nelements: + description: >- + Number of different elements in the structure as an integer. + + + - **Type**: integer + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - MUST be equal to the lengths of the list properties `elements` and `elements_ratios`, if they are provided. + + - **Examples**: + - `3` + + - **Querying**: + - Note: queries on this property can equivalently be formulated using `elements LENGTH`. + - A filter that matches structures that have exactly 4 elements: `nelements=4`. + - A filter that matches structures that have between 2 and 7 elements: `nelements>=2 AND nelements<=7`. + nullable: true + title: Nelements + type: integer + nperiodic_dimensions: + description: >- + An integer specifying the number of periodic dimensions in the + structure, equivalent to the number of non-zero entries in + `dimension_types`. + + + - **Type**: integer + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + - The integer value MUST be between 0 and 3 inclusive and MUST be equal to the sum of the items in the `dimension_types` property. + - This property only reflects the treatment of the lattice vectors provided for the structure, and not any physical interpretation of the dimensionality of its contents. + + - **Examples**: + - `2` should be indicated in cases where `dimension_types` is any of `[1, 1, 0]`, `[1, 0, 1]`, `[0, 1, 1]`. + + - **Query examples**: + - Match only structures with exactly 3 periodic dimensions: `nperiodic_dimensions=3` + - Match all structures with 2 or fewer periodic dimensions: `nperiodic_dimensions<=2` + nullable: true + title: Nperiodic Dimensions + type: integer + nsites: + description: >- + An integer specifying the length of the `cartesian_site_positions` + property. + + + - **Type**: integer + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: MUST be a queryable property with support for all mandatory filter features. + + - **Examples**: + - `42` + + - **Query examples**: + - Match only structures with exactly 4 sites: `nsites=4` + - Match structures that have between 2 and 7 sites: `nsites>=2 AND nsites<=7` + nullable: true + title: Nsites + type: integer + species: + description: >- + A list describing the species of the sites of this structure. + + Species can represent pure chemical elements, virtual-crystal atoms representing a statistical occupation of a given site by multiple chemical elements, and/or a location to which there are attached atoms, i.e., atoms whose precise location are unknown beyond that they are attached to that position (frequently used to indicate hydrogen atoms attached to another element, e.g., a carbon with three attached hydrogens might represent a methyl group, -CH3). + + + - **Type**: list of dictionary with keys: + - `name`: string (REQUIRED) + - `chemical_symbols`: list of strings (REQUIRED) + - `concentration`: list of float (REQUIRED) + - `attached`: list of strings (REQUIRED) + - `nattached`: list of integers (OPTIONAL) + - `mass`: list of floats (OPTIONAL) + - `original_name`: string (OPTIONAL). + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: Support for queries on this property is OPTIONAL. + If supported, filters MAY support only a subset of comparison operators. + - Each list member MUST be a dictionary with the following keys: + - **name**: REQUIRED; gives the name of the species; the **name** value MUST be unique in the `species` list; + - **chemical_symbols**: REQUIRED; MUST be a list of strings of all chemical elements composing this species. + Each item of the list MUST be one of the following: + - a valid chemical-element symbol, or + - the special value `"X"` to represent a non-chemical element, or + - the special value `"vacancy"` to represent that this site has a non-zero probability of having a vacancy (the respective probability is indicated in the `concentration` list, see below). + + If any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element, the correct flag MUST be set in the list `structure_features`. + + - **concentration**: REQUIRED; MUST be a list of floats, with same length as `chemical_symbols`. + The numbers represent the relative concentration of the corresponding chemical symbol in this species. + The numbers SHOULD sum to one. Cases in which the numbers do not sum to one typically fall only in the following two categories: + + - Numerical errors when representing float numbers in fixed precision, e.g. for two chemical symbols with concentrations `1/3` and `2/3`, the concentration might look something like `[0.33333333333, 0.66666666666]`. If the client is aware that the sum is not one because of numerical precision, it can renormalize the values so that the sum is exactly one. + - Experimental errors in the data present in the database. In this case, it is the responsibility of the client to decide how to process the data. + + Note that concentrations are uncorrelated between different sites (even of the same species). + + - **attached**: OPTIONAL; if provided MUST be a list of length 1 or more of strings of chemical symbols for the elements attached to this site, or "X" for a non-chemical element. + + - **nattached**: OPTIONAL; if provided MUST be a list of length 1 or more of integers indicating the number of attached atoms of the kind specified in the value of the `attached` key. + + The implementation MUST include either both or none of the `attached` and `nattached` keys, and if they are provided, they MUST be of the same length. + Furthermore, if they are provided, the `structure_features` property MUST include the string `site_attachments`. + + - **mass**: OPTIONAL. If present MUST be a list of floats, with the same length as `chemical_symbols`, providing element masses expressed in a.m.u. + Elements denoting vacancies MUST have masses equal to 0. + + - **original_name**: OPTIONAL. Can be any valid Unicode string, and SHOULD contain (if specified) the name of the species that is used internally in the source database. + + Note: With regards to "source database", we refer to the immediate source being queried via the OPTIMADE API implementation. + + The main use of this field is for source databases that use species names, containing characters that are not allowed (see description of the list property `species_at_sites`). + + - For systems that have only species formed by a single chemical symbol, and that have at most one species per chemical symbol, SHOULD use the chemical symbol as species name (e.g., `"Ti"` for titanium, `"O"` for oxygen, etc.) + However, note that this is OPTIONAL, and client implementations MUST NOT assume that the key corresponds to a chemical symbol, nor assume that if the species name is a valid chemical symbol, that it represents a species with that chemical symbol. + This means that a species `{"name": "C", "chemical_symbols": ["Ti"], "concentration": [1.0]}` is valid and represents a titanium species (and *not* a carbon species). + - It is NOT RECOMMENDED that a structure includes species that do not have at least one corresponding site. + + - **Examples**: + - `[ {"name": "Ti", "chemical_symbols": ["Ti"], "concentration": [1.0]} ]`: any site with this species is occupied by a Ti atom. + - `[ {"name": "Ti", "chemical_symbols": ["Ti", "vacancy"], "concentration": [0.9, 0.1]} ]`: any site with this species is occupied by a Ti atom with 90 % probability, and has a vacancy with 10 % probability. + - `[ {"name": "BaCa", "chemical_symbols": ["vacancy", "Ba", "Ca"], "concentration": [0.05, 0.45, 0.5], "mass": [0.0, 137.327, 40.078]} ]`: any site with this species is occupied by a Ba atom with 45 % probability, a Ca atom with 50 % probability, and by a vacancy with 5 % probability. The mass of this site is (on average) 88.5 a.m.u. + - `[ {"name": "C12", "chemical_symbols": ["C"], "concentration": [1.0], "mass": [12.0]} ]`: any site with this species is occupied by a carbon isotope with mass 12. + - `[ {"name": "C13", "chemical_symbols": ["C"], "concentration": [1.0], "mass": [13.0]} ]`: any site with this species is occupied by a carbon isotope with mass 13. + - `[ {"name": "CH3", "chemical_symbols": ["C"], "concentration": [1.0], "attached": ["H"], "nattached": [3]} ]`: any site with this species is occupied by a methyl group, -CH3, which is represented without specifying precise positions of the hydrogen atoms. + items: + $ref: "#/components/schemas/Species" + nullable: true + title: Species + type: array + species_at_sites: + description: >- + Name of the species at each site (where values for sites are + specified with the same order of the property + `cartesian_site_positions`). + + The properties of the species are found in the property `species`. + + + - **Type**: list of strings. + + + - **Requirements/Conventions**: + - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`. + - **Query**: Support for queries on this property is OPTIONAL. + If supported, filters MAY support only a subset of comparison operators. + - MUST have length equal to the number of sites in the structure (first dimension of the list property `cartesian_site_positions`). + - Each species name mentioned in the `species_at_sites` list MUST be described in the list property `species` (i.e. for each value in the `species_at_sites` list there MUST exist exactly one dictionary in the `species` list with the `name` attribute equal to the corresponding `species_at_sites` value). + - Each site MUST be associated only to a single species. + **Note**: However, species can represent mixtures of atoms, and multiple species MAY be defined for the same chemical element. + This latter case is useful when different atoms of the same type need to be grouped or distinguished, for instance in simulation codes to assign different initial spin states. + + - **Examples**: + - `["Ti","O2"]` indicates that the first site is hosting a species labeled `"Ti"` and the second a species labeled `"O2"`. + - `["Ac", "Ac", "Ag", "Ir"]` indicating the first two sites contains the `"Ac"` species, while the third and fourth sites contain the `"Ag"` and `"Ir"` species, respectively. + items: + type: string + nullable: true + title: Species At Sites + type: array + structure_features: + description: >- + A list of strings that flag which special features are used by the + structure. + + + - **Type**: list of strings + + + - **Requirements/Conventions**: + - **Support**: MUST be supported by all implementations, MUST NOT be `null`. + - **Query**: MUST be a queryable property. + Filters on the list MUST support all mandatory HAS-type queries. + Filter operators for comparisons on the string components MUST support equality, support for other comparison operators are OPTIONAL. + - MUST be an empty list if no special features are used. + - MUST be sorted alphabetically. + - If a special feature listed below is used, the list MUST contain the corresponding string. + - If a special feature listed below is not used, the list MUST NOT contain the corresponding string. + - **List of strings used to indicate special structure features**: + - `disorder`: this flag MUST be present if any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element. + - `implicit_atoms`: this flag MUST be present if the structure contains atoms that are not assigned to sites via the property `species_at_sites` (e.g., because their positions are unknown). + When this flag is present, the properties related to the chemical formula will likely not match the type and count of atoms represented by the `species_at_sites`, `species` and `assemblies` properties. + - `site_attachments`: this flag MUST be present if any one entry in the `species` list includes `attached` and `nattached`. + - `assemblies`: this flag MUST be present if the property `assemblies` is present. + + - **Examples**: A structure having implicit atoms and using assemblies: `["assemblies", "implicit_atoms"]` + items: + $ref: "#/components/schemas/StructureFeatures" + title: Structure Features + type: array + required: + - last_modified + - elements + - nelements + - elements_ratios + - chemical_formula_descriptive + - chemical_formula_reduced + - chemical_formula_anonymous + - dimension_types + - nperiodic_dimensions + - lattice_vectors + - cartesian_site_positions + - nsites + - species + - species_at_sites + - structure_features + title: StructureResourceAttributes + type: object + StructureResponseMany: + description: errors are not allowed + properties: + data: + anyOf: + - items: + $ref: "#/components/schemas/StructureResource" + type: array + - items: + type: object + type: array + description: List of unique OPTIMADE structures entry resource objects + title: Data + uniqueItems: true + errors: + description: A list of unique errors + items: + $ref: "#/components/schemas/Error" + title: Errors + type: array + uniqueItems: true + included: + anyOf: + - items: + $ref: "#/components/schemas/EntryResource" + type: array + - items: + type: object + type: array + title: Included + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - data + - meta + title: StructureResponseMany + type: object + StructureResponseOne: + description: errors are not allowed + properties: + data: + anyOf: + - $ref: "#/components/schemas/StructureResource" + - type: object + description: A single structures entry resource + title: Data + errors: + description: A list of unique errors + items: + $ref: "#/components/schemas/Error" + title: Errors + type: array + uniqueItems: true + included: + anyOf: + - items: + $ref: "#/components/schemas/EntryResource" + type: array + - items: + type: object + type: array + title: Included + uniqueItems: true + jsonapi: + allOf: + - $ref: "#/components/schemas/JsonApi" + description: Information about the JSON API used + title: Jsonapi + links: + allOf: + - $ref: "#/components/schemas/ToplevelLinks" + description: Links associated with the primary data or errors + title: Links + meta: + allOf: + - $ref: "#/components/schemas/ResponseMeta" + description: A meta object containing non-standard information + title: Meta + required: + - data + - meta + title: StructureResponseOne + type: object + ToplevelLinks: + description: A set of Links objects, possibly including pagination + properties: + first: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: The first page of data + title: First + last: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: The last page of data + title: Last + next: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: The next page of data + title: Next + prev: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: The previous page of data + title: Prev + related: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A related resource link + title: Related + self: + anyOf: + - format: uri + maxLength: 65536 + minLength: 1 + type: string + - $ref: "#/components/schemas/Link" + description: A link to itself + title: Self + title: ToplevelLinks + type: object + Warnings: + description: >- + OPTIMADE-specific warning class based on OPTIMADE-specific JSON API + Error. + + + From the specification: + + + A warning resource object is defined similarly to a JSON API error object, but MUST also include the field type, which MUST have the value "warning". + + The field detail MUST be present and SHOULD contain a non-critical message, e.g., reporting unrecognized search attributes or deprecated features. + + + Note: Must be named "Warnings", since "Warning" is a built-in Python class. + properties: + code: + description: an application-specific error code, expressed as a string value. + title: Code + type: string + detail: + description: A human-readable explanation specific to this occurrence of the + problem. + title: Detail + type: string + id: + description: A unique identifier for this particular occurrence of the problem. + title: Id + type: string + links: + allOf: + - $ref: "#/components/schemas/ErrorLinks" + description: A links object storing about + title: Links + meta: + allOf: + - $ref: "#/components/schemas/Meta" + description: a meta object containing non-standard meta-information about the + error. + title: Meta + source: + allOf: + - $ref: "#/components/schemas/ErrorSource" + description: An object containing references to the source of the error + title: Source + title: + description: A short, human-readable summary of the problem. It **SHOULD NOT** + change from occurrence to occurrence of the problem, except for + purposes of localization. + title: Title + type: string + type: + description: Warnings must be of type "warning" + pattern: ^warning$ + title: Type + type: string + required: + - detail + - type + title: Warnings + type: object