From 51cb6cec7f368d775dca1176673eeca9fc800e44 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Fri, 31 Jul 2026 09:27:56 -0400 Subject: [PATCH 01/14] Align v1 generation scripts --- .gitignore | 1 + pyproject.toml | 3 - qcschema/README.md | 84 ++++ qcschema/__init__.py | 6 +- qcschema/utils.py | 67 +++ qcschema/v1/__init__.py | 0 qcschema/v1/generate.py | 434 ++++++++++++++++++ qcschema/v1/generator/__init__.py | 0 qcschema/v1/generator/basis.py | 29 ++ qcschema/v1/generator/definitions.py | 134 ++++++ qcschema/v1/generator/dev_schema.py | 83 ++++ qcschema/v1/generator/molecule.py | 118 +++++ qcschema/v1/generator/properties/__init__.py | 1 + .../properties/calcinfo_properties.py | 40 ++ .../v1/generator/properties/cc_properties.py | 95 ++++ .../v1/generator/properties/mp_properties.py | 38 ++ .../generator/properties/properties_base.py | 21 + .../v1/generator/properties/scf_properties.py | 61 +++ qcschema/v1/schemas/qc_schema_input.schema | 1 + qcschema/v1/schemas/qc_schema_molecule.schema | 1 + qcschema/v1/schemas/qc_schema_output.schema | 1 + 21 files changed, 1212 insertions(+), 6 deletions(-) create mode 100644 qcschema/README.md create mode 100644 qcschema/utils.py create mode 100644 qcschema/v1/__init__.py create mode 100644 qcschema/v1/generate.py create mode 100644 qcschema/v1/generator/__init__.py create mode 100644 qcschema/v1/generator/basis.py create mode 100644 qcschema/v1/generator/definitions.py create mode 100644 qcschema/v1/generator/dev_schema.py create mode 100644 qcschema/v1/generator/molecule.py create mode 100644 qcschema/v1/generator/properties/__init__.py create mode 100644 qcschema/v1/generator/properties/calcinfo_properties.py create mode 100644 qcschema/v1/generator/properties/cc_properties.py create mode 100644 qcschema/v1/generator/properties/mp_properties.py create mode 100644 qcschema/v1/generator/properties/properties_base.py create mode 100644 qcschema/v1/generator/properties/scf_properties.py create mode 100644 qcschema/v1/schemas/qc_schema_input.schema create mode 100644 qcschema/v1/schemas/qc_schema_molecule.schema create mode 100644 qcschema/v1/schemas/qc_schema_output.schema diff --git a/.gitignore b/.gitignore index 73c819f..8fb48ef 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ coverage.xml *.cover .hypothesis/ .pytest_cache/ +.ruff_cache/ # Translations *.mo diff --git a/pyproject.toml b/pyproject.toml index 3577047..4e6335e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,3 @@ lint.ignore = [ [tool.ruff.lint.isort] known-first-party = ["qcschema"] - -[tool.ruff.format] -line-length = 120 diff --git a/qcschema/README.md b/qcschema/README.md new file mode 100644 index 0000000..510c0dc --- /dev/null +++ b/qcschema/README.md @@ -0,0 +1,84 @@ +# QCSchema — Quantum Chemistry Schema + +The core qcschema package. + +## Directory structure + +### `data/` — Generated JSON Schema documents +Contains the generated JSON Schema files for all schema versions. + +- **`v1/`** — v1 JSON Schema documents (draft-04, frozen) + - Generated by `qcschema/v1/generate.py` + - `qc_schema_input.schema` — Input specification + - `qc_schema_molecule.schema` — Molecule structure + - `qc_schema_output.schema` — Output specification + +- **`v2/`** — v1.5 enhanced JSON Schema documents (draft-04, frozen) + - Generated by `qcschema/v1_5/generate.py` + - Same three schema files as v1, with wavefunction support + - Version number: 2 (v1.5 is the v2 JSON Schema version) + +- **`qcelemental_v1/` and `qcelemental_v2/`** — Companion schema directories (dev-only) + - Will contain JSON Schema representations of qcelemental's pydantic models + - Generated by scripts in their respective directories (not shipped) + +### `v1/` — v1 schema generator +Modular generator for v1 JSON Schema documents. + +- **`generate.py`** — Main entry point: `python -m qcschema.v1.generate` +- **`generator/`** — Schema component modules (source of truth) + - `molecule.py` — Molecule schema definition + - `definitions.py` — Shared definitions (provenance, error, basis, etc.) + - `basis.py` — Basis set specifications + - `properties/` — Output property definitions + +### `v1_5/` — v1.5 schema generator +Modular generator for v1.5 (v2) JSON Schema documents. Inherits from v1 and adds wavefunction. + +- **`generate.py`** — Main entry point: `python -m qcschema.v1_5.generate` + - Imports and extends `qcschema.v1.generate.build_v1_schemas()` + - Adds wavefunction support to output schema + - Updates version number to 2 +- **`generator/`** — v1.5-specific additions + - `wavefunction/` — Wavefunction schema definitions + +### `qcelemental_v1/` and `qcelemental_v2/` (future) +Placeholders for qcelemental companion schema generation scripts. + +## Version naming + +- **v1**: Original QCSchema (version: 1) + - Frozen, JSON Schema draft-04 +- **v1.5 / v2**: Enhanced QCSchema (version: 2) + - Adds wavefunction support + - Frozen, JSON Schema draft-04 + - Called "v1.5" in directory names, "v2" in version numbers +- **Pydantic v2 API** (future): Separate Python object layer + - Will be built on pydantic v2 + - Uses JSON Schema 2020-12 + +## How schemas are generated + +Schemas are not hand-edited. To regenerate: + +```bash +# Generate v1 schemas to qcschema/data/v1/ +python -m qcschema.v1.generate + +# Generate v1.5 schemas to qcschema/data/v2/ +python -m qcschema.v1_5.generate +``` + +The generators use modular component files in their respective `generator/` subdirectories. v1.5 inherits from v1 and extends it with wavefunction support. + +## Public API + +See `validate.py` and `versions.py` for the main entry points: +- `qcschema.get_schema(schema_type, version)` — Load a schema +- `qcschema.validate(data, schema_type, version)` — Validate an instance + +## Notes + +- v1 and v1.5 schemas are frozen and protected (GOAL.md) +- Schema files are minified JSON (single-line format) +- Companion qcelemental schema generation is dev-only (not shipped) diff --git a/qcschema/__init__.py b/qcschema/__init__.py index e252353..e3d9e4a 100644 --- a/qcschema/__init__.py +++ b/qcschema/__init__.py @@ -2,6 +2,6 @@ The main init functions of the QC Schema project """ -from . import dev -from .validate import validate -from .versions import get_schema, list_versions +from .validate import validate as validate +from .versions import get_schema as get_schema +from .versions import list_versions as list_versions diff --git a/qcschema/utils.py b/qcschema/utils.py new file mode 100644 index 0000000..ae1f77d --- /dev/null +++ b/qcschema/utils.py @@ -0,0 +1,67 @@ +""" +Shared utilities for QCSchema generation and management. +""" + +import copy +import json +from pathlib import Path + + +def assemble_schema(base, properties_dict, definitions_dict): + """ + Assemble a complete schema from base, properties, and definitions. + + Args: + base: Base schema dictionary + properties_dict: Additional properties to add + definitions_dict: Definitions block + + Returns: + Complete schema dictionary + """ + schema = copy.deepcopy(base) + if properties_dict: + schema["properties"].update(properties_dict) + if definitions_dict: + schema["definitions"] = definitions_dict + return schema + + +def write_schema(schema, filepath): + """ + Write a schema to a JSON file (minified, single line, with spacing). + + Args: + schema: Schema dictionary + filepath: Path to write to + """ + Path(filepath).parent.mkdir(parents=True, exist_ok=True) + with open(filepath, "w") as f: + json.dump(schema, f, separators=(", ", ": ")) + + +def read_schema(filepath): + """ + Read a schema from a JSON file. + + Args: + filepath: Path to read from + + Returns: + Schema dictionary + """ + with open(filepath) as f: + return json.load(f) + + +def get_schema_dir(version): + """ + Get the directory path for a given schema version. + + Args: + version: Version string (e.g., '1', '1.5', 'qcelemental_v1') + + Returns: + Path to schemas directory + """ + return Path(__file__).parent / f"{version}" / "schemas" diff --git a/qcschema/v1/__init__.py b/qcschema/v1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/qcschema/v1/generate.py b/qcschema/v1/generate.py new file mode 100644 index 0000000..3d48445 --- /dev/null +++ b/qcschema/v1/generate.py @@ -0,0 +1,434 @@ +#!/usr/bin/env python +""" +Generate v1 JSON Schema documents in frozen v1 format. + +The v1 format is the original QCSchema with classic basis definitions. +This generator produces schemas matching qcschema/data/v1/ (frozen reference). + +Run as: python -m qcschema.v1.generate +""" + +import copy +import sys +from pathlib import Path + +# Add parent to path for imports +sys.path.insert(0, str(Path(__file__).parent.parent.parent)) + +from qcschema import utils + +from .generator.properties.calcinfo_properties import calcinfo_properties +from .generator.properties.mp_properties import mp_properties +from .generator.properties.scf_properties import scf_properties + + +def _build_v1_molecule(): + """Build the frozen v1 molecule schema (original format without schema_name/version).""" + return { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qc_schema_molecule", + "version": 1, + "description": "The physical cartesian representation of the molecular system", + "type": "object", + "properties": { + "symbols": { + "description": "(nat, ) atom symbols in title case.", + "type": "array", + "items": {"type": "string"}, + }, + "geometry": { + "description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", + "type": "array", + "items": {"type": "number"}, + }, + "masses": { + "description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", + "type": "array", + "items": {"type": "number"}, + }, + "name": {"description": "The name of the molecule.", "type": "string"}, + "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, + "molecular_charge": { + "description": "The overall charge of the molecule.", + "type": "number", + "default": 0.0, + }, + "molecular_multiplicity": { + "description": "The overall multiplicity of the molecule.", + "type": "number", + "multipleOf": 1.0, + "default": 1, + }, + "real": { + "description": "(nat, ) list describing if atoms are real (T) or ghost (F).", + "type": "array", + "items": {"type": "boolean"}, + }, + "connectivity": { + "description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": {"type": "number", "minimum": 0, "maximum": 5}, + }, + }, + "fragments": { + "description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", + "type": "array", + "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}, + }, + "fragment_charges": { + "description": "(nfr, ) list of charges associated with each fragment tuple.", + "type": "array", + "items": {"type": "number"}, + }, + "fragment_multiplicities": { + "description": "(nfr, ) list of multiplicities associated with each fragment tuple.", + "type": "array", + "items": {"type": "number", "multipleOf": 1.0}, + }, + "fix_com": { + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", + "type": "boolean", + "default": False, + }, + "fix_orientation": { + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", + "type": "boolean", + "default": False, + }, + "provenance": {"type": "object", "$ref": "#/definitions/provenance"}, + }, + "required": ["symbols", "geometry"], + } + + +def _build_v1_properties(): + """Build v1-specific properties in exact order to match frozen reference.""" + v1_props = {} + + # Order must match data/v1 exactly: + # 1. scf_* + # 2. mp2_same_spin_correlation_energy + # 3. mp2_opposite_spin_correlation_energy + # 4. mp2_singles_energy + # 5. mp2_doubles_energy + # 6. mp2_total_correlation_energy (inserted here, before mp2_total_energy) + # 7. mp2_total_energy + # 8. calcinfo_* + # 9. return_energy + + # Add scf properties + v1_props.update(scf_properties) + + # Add selected mp properties in order, excluding correlation_energy and dipole_moment + mp_order = [ + "mp2_same_spin_correlation_energy", + "mp2_opposite_spin_correlation_energy", + "mp2_singles_energy", + "mp2_doubles_energy", + "mp2_total_energy", + ] + for key in mp_order: + if key in mp_properties: + v1_props[key] = mp_properties[key] + + # Fix mp2 property descriptions to match reference exactly + v1_props["mp2_opposite_spin_correlation_energy"]["description"] = ( + "The unscaled portion of the MP2 correlation energy from opposite-spin or singlet doubles correlations." + ) + v1_props["mp2_same_spin_correlation_energy"]["description"] = ( + "The unscaled portion of the MP2 correlation energy from same-spin or triplet doubles correlations." + ) + v1_props["mp2_total_energy"]["description"] = "The total MP2 energy (MP2 correlatin energy + HF energy)." + + # Add mp2_total_correlation_energy before mp2_total_energy in the dict + # Since we added mp2_total_energy above, we need to remove it, add mp2_total_correlation_energy, then re-add it + mp2_total_energy_def = v1_props.pop("mp2_total_energy") + v1_props["mp2_total_correlation_energy"] = { + "type": "number", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + } + v1_props["mp2_total_energy"] = mp2_total_energy_def + + # Include calcinfo properties + v1_props.update(calcinfo_properties) + + return { + "type": "object", + "properties": v1_props, + "description": "The resulting properties of a computation", + "additionalProperties": False, + } + + +def _build_v1_definitions(): + """Build the frozen v1 definitions with basis_* naming.""" + return { + "error": { + "properties": { + "error_type": { + "description": "The type of error raised.", + "enum": ["convergence_error", "file_error", "memory_error"], + }, + "error_message": {"description": "A description of the raised error.", "type": "string"}, + }, + "required": ["error_type", "error_message"], + "description": "The type of error message raised.", + "additionalProperties": False, + }, + "provenance": { + "properties": { + "creator": { + "description": "The name of the person or program who created this object.", + "type": "string", + }, + "version": { + "description": "The version of the program which created this object, blank otherwise.", + "type": "string", + }, + "routine": { + "description": "The routine of the program which created this object, blank otherwise.", + "type": "string", + }, + }, + "required": ["creator"], + "description": "A short provenance of the object.", + "additionalProperties": True, + }, + "basis_electron_shell": { + "description": "Information for a single electronic shell", + "additionalProperties": False, + "required": ["shell_angular_momentum", "shell_exponents", "shell_coefficients"], + "properties": { + "shell_region": { + "description": "The region this shell describes", + "type": "string", + "enum": ["valence", "polarization", "core", "tight", "diffuse"], + }, + "shell_angular_momentum": { + "description": "Angular momentum (as an array of integers)", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"type": "integer", "minimum": 0}, + }, + "shell_exponents": { + "description": "Exponents for this contracted shell", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + "shell_coefficients": { + "description": "General contraction coefficients for this contracted shell", + "type": "array", + "minItems": 1, + "items": { + "description": "Segmented contraction coefficients", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + }, + }, + }, + "basis_ecp_potential": { + "description": "ECP potential", + "additionalProperties": False, + "required": [ + "potential_ecp_type", + "potential_angular_momentum", + "potential_r_exponents", + "potential_gaussian_exponents", + "potential_coefficients", + ], + "properties": { + "potential_ecp_type": { + "description": "Type of the ECP Potential", + "type": "string", + "enum": ["scalar", "spinorbit"], + }, + "potential_angular_momentum": { + "description": "Angular momentum (as an array of integers)", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"type": "integer", "minimum": 0}, + }, + "potential_r_exponents": { + "description": "Exponents of the r term", + "type": "array", + "minItems": 1, + "items": {"type": "integer"}, + }, + "potential_gaussian_exponents": { + "description": "Exponents of the gaussian term", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + "potential_coefficients": { + "description": "General contraction coefficients for this contracted shell", + "type": "array", + "minItems": 1, + "items": { + "description": "Segmented contraction coefficients", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + }, + }, + }, + "basis_single_data": { + "description": "Data for a single atom/center in the basis set", + "type": "object", + "additionalProperties": False, + "properties": { + "element_electron_shells": { + "description": "(Electronic) shells for this element", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"$ref": "#/definitions/basis_electron_shell"}, + }, + "element_ecp_electrons": { + "description": "Number of electrons replaced by ECP", + "type": "integer", + "minimum": 1, + }, + "element_ecp": { + "description": "Effective Core Potential for this element", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"$ref": "#/definitions/basis_ecp_potential"}, + }, + }, + }, + "basis_spec": { + "description": "Specification for a basis applied to a molecule", + "type": "object", + "additionalProperties": False, + "properties": { + "basis_set_description": {"description": "Brief description of the basis set", "type": "string"}, + "basis_function_type": { + "description": "Type of function for this basis", + "type": "string", + "enum": ["gto", "sto"], + }, + "basis_harmonic_type": { + "description": "Harmonic type (spherical, cartesian)", + "type": "string", + "enum": ["spherical", "cartesian"], + }, + "basis_set_elements": { + "description": "Per-element basis data", + "type": "object", + "additionalProperties": False, + "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}, + }, + "basis_set_atoms": { + "description": "Basis set overrides for particular atoms or centers", + "type": "object", + "additionalProperties": False, + "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}, + }, + }, + }, + } + + +def build_v1_schemas(): + """Build and return v1 schemas (input, output, molecule) in frozen v1 format.""" + + molecule_schema = _build_v1_molecule() + definitions = _build_v1_definitions() + + base_schema = { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qcschema_input", + "version": 1, + "description": "The MolSSI Quantum Chemistry Schema", + "type": "object", + "properties": { + "molecule": molecule_schema, + "schema_name": {"type": "string", "pattern": "\\W*(qc_schema)\\W*"}, + "schema_version": {"type": "integer"}, + "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, + "model": { + "definition": "The method and basis specification requested", + "properties": { + "method": {"type": "string"}, + "basis": {"type": "string"}, + "basis_spec": {"$ref": "#/definitions/basis_spec"}, + }, + "required": ["method"], + "oneOf": [{"required": ["basis"]}, {"required": ["basis_spec"]}], + "description": "The quantum chemistry model to be run.", + }, + "keywords": {"type": "object", "description": "Program specific parameters to be used."}, + "provenance": { + "anyOf": [ + {"type": "object", "$ref": "#/definitions/provenance"}, + {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}, + ] + }, + }, + "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], + "definitions": definitions, + } + + input_schema = copy.deepcopy(base_schema) + input_schema["name"] = "qc_schema_input" + input_schema["properties"]["schema_name"]["pattern"] = "\\W*(qc_schema_input)\\W*" + + output_schema = copy.deepcopy(base_schema) + output_schema["name"] = "qc_schema_output" + output_schema["properties"]["schema_name"]["pattern"] = "\\W*(qc_schema_output)\\W*" + output_schema["required"].extend(["provenance", "properties", "success", "return_result"]) + v1_properties = _build_v1_properties() + output_schema["properties"].update( + { + "properties": v1_properties, + "success": {"type": "boolean"}, + "error": { + "definition": "The type and description of error raised.", + "type": "object", + "$ref": "#/definitions/error", + }, + "return_result": { + "definition": "The primary specified return of the requested computation.", + "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}], + }, + } + ) + + return { + "input": input_schema, + "output": output_schema, + "molecule": molecule_schema, + } + + +def write_schemas(schemas, schema_dir=None): + """Write schemas to disk.""" + if schema_dir is None: + schema_dir = Path(__file__).parent / "schemas" + + schema_dir = Path(schema_dir) + schema_dir.mkdir(parents=True, exist_ok=True) + + utils.write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") + utils.write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") + utils.write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + + return schema_dir + + +if __name__ == "__main__": + schemas = build_v1_schemas() + schema_dir = write_schemas(schemas) + print(f"✓ v1 schemas generated in {schema_dir}/") diff --git a/qcschema/v1/generator/__init__.py b/qcschema/v1/generator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/qcschema/v1/generator/basis.py b/qcschema/v1/generator/basis.py new file mode 100644 index 0000000..17c7269 --- /dev/null +++ b/qcschema/v1/generator/basis.py @@ -0,0 +1,29 @@ +""" +The json-schema for the Basis Set definition +""" + +basis = { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qcschema_basis", + "version": "1.dev", + "description": "The MolSSI Quantum Chemistry Basis Set Schema", + "type": "object", + "required": ["center_data", "atom_map", "name"], + "additionalProperties": False, + "properties": { + "schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, + "schema_version": {"type": "integer"}, + "name": {"description": "Name of the basis set", "type": "string"}, + "description": {"description": "Brief description of the basis set", "type": "string"}, + "center_data": { + "description": "Shared basis data for all atoms/centers in the molecule", + "type": "object", + "additionalProperties": {"$ref": "#/definitions/center_basis"}, + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the molecule to data in center_data", + "type": "array", + "items": {"type": "string"}, + }, + }, +} diff --git a/qcschema/v1/generator/definitions.py b/qcschema/v1/generator/definitions.py new file mode 100644 index 0000000..5d16d5e --- /dev/null +++ b/qcschema/v1/generator/definitions.py @@ -0,0 +1,134 @@ +""" +A list of definitions involved in the JSON schema. +""" + +definitions = {} + +definitions["error"] = { + "properties": { + "error_type": { + "description": "The type of error raised.", + "enum": ["convergence_error", "file_error", "memory_error"], + }, + "error_message": {"description": "A description of the raised error.", "type": "string"}, + }, + "required": ["error_type", "error_message"], + "description": "The type of error message raised.", + "additionalProperties": False, +} + +definitions["provenance"] = { + "properties": { + "creator": {"description": "The name of the person or program who created this object.", "type": "string"}, + "version": { + "description": "The version of the program which created this object, blank otherwise. Suggest that versions be interpretable by PEP 440 (https://www.python.org/dev/peps/pep-0440/).", + "type": "string", + }, + "routine": { + "description": "The routine of the program which created this object, blank otherwise.", + "type": "string", + }, + }, + "required": ["creator", "version", "routine"], + "description": "A short provenance of the object.", + "additionalProperties": True, +} + +definitions["electron_shell"] = { + "description": "Information for a single electronic shell", + "additionalProperties": False, + "required": ["angular_momentum", "harmonic_type", "exponents", "coefficients"], + "properties": { + "angular_momentum": { + "description": "Angular momentum (as an array of integers)", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"type": "integer", "minimum": 0}, + }, + "harmonic_type": { + "description": "Whether this shell is spherical or cartesian", + "type": "string", + "enum": ["spherical", "cartesian"], + }, + "exponents": { + "description": "Exponents for this contracted shell", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + "coefficients": { + "description": "General contraction coefficients for this contracted shell", + "type": "array", + "minItems": 1, + "items": { + "description": "Segmented contraction coefficients", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + }, + }, +} + +definitions["ecp_potential"] = { + "description": "ECP potential", + "additionalProperties": False, + "required": ["ecp_type", "angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"], + "properties": { + "ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, + "angular_momentum": { + "description": "Angular momentum (as an array of integers)", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"type": "integer", "minimum": 0}, + }, + "r_exponents": { + "description": "Exponents of the r term", + "type": "array", + "minItems": 1, + "items": {"type": "integer"}, + }, + "gaussian_exponents": { + "description": "Exponents of the gaussian term", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + "coefficients": { + "description": "General contraction coefficients for this potential", + "type": "array", + "minItems": 1, + "items": { + "description": "Segmented contraction coefficients", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + }, + }, +} + +definitions["center_basis"] = { + "description": "Data for a single atom/center in the basis set", + "type": "object", + "additionalProperties": False, + "properties": { + "electron_shells": { + "description": "(Electronic) shells for this element", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"$ref": "#/definitions/electron_shell"}, + }, + "ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, + "ecp_potentials": { + "description": "Effective Core Potential for this element", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"$ref": "#/definitions/ecp_potential"}, + }, + }, +} diff --git a/qcschema/v1/generator/dev_schema.py b/qcschema/v1/generator/dev_schema.py new file mode 100644 index 0000000..53c3f4b --- /dev/null +++ b/qcschema/v1/generator/dev_schema.py @@ -0,0 +1,83 @@ +""" +Integrates all components of the QC Schema into a single one. +""" + +import copy + +from . import basis, definitions, molecule, properties, wavefunction + +# The base schema definition +base_schema = { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qcschema_input", + "version": "1.dev", + "description": "The MolSSI Quantum Chemistry Schema", + "type": "object", + "properties": { + "molecule": molecule.molecule, + "schema_name": {"type": "string", "pattern": "^(qc_?schema)$"}, + "schema_version": {"type": "integer"}, + "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, + "model": { + "definition": "The method and basis specification requested", + "properties": { + "method": {"type": "string"}, + "basis": { + "anyOf": [ + basis.basis, + {"description": "Name of the basis set to apply to the whole molecule", "type": "string"}, + ] + }, + }, + "required": ["method", "basis"], + "description": "The quantum chemistry model to be run.", + }, + "keywords": {"type": "object", "description": "Program specific parameters to be used."}, + "provenance": { + "anyOf": [ + {"type": "object", "$ref": "#/definitions/provenance"}, + {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}, + ] + }, + }, + "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], + "definitions": definitions.definitions, +} + +# Additional properties to contain in the output +output_properties = { + "properties": properties.properties, + "success": {"type": "boolean"}, + "error": { + "definition": "The type and description of error raised.", + "type": "object", + "$ref": "#/definitions/error", + }, + "return_result": { + "definition": "The primary specified return of the requested computation.", + "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}], + }, +} + +# Snapshot the input dev schema +input_dev_schema = copy.deepcopy(base_schema) +input_dev_schema["name"] = "qcschema_input" +input_dev_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_input)$" + +# Snapshot the input dev schema +output_dev_schema = copy.deepcopy(base_schema) +output_dev_schema["name"] = "qcschema_output" +output_dev_schema["properties"].update(output_properties) +output_dev_schema["properties"]["wavefunction"] = wavefunction.output_wavefunction +output_dev_schema["required"].extend(["provenance", "properties", "success", "return_result"]) +output_dev_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_output)$" + +# Build out the molecule schema +molecule_dev_schema = copy.deepcopy(molecule.molecule) + +# Build out the basis schema +basis_dev_schema = copy.deepcopy(basis.basis) + +# import json +# print(json.dumps(input_dev_schema, indent=2)) +# print(json.dumps(output_dev_schema, indent=2)) diff --git a/qcschema/v1/generator/molecule.py b/qcschema/v1/generator/molecule.py new file mode 100644 index 0000000..9df45bc --- /dev/null +++ b/qcschema/v1/generator/molecule.py @@ -0,0 +1,118 @@ +""" +The json-schema for the Molecule definition +""" + +molecule = { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qcschema_molecule", + "version": "2.dev", + "description": "The MolSSI Quantum Chemistry Molecular Schema. The physical cartesian representation of the molecular system.", + "type": "object", + "properties": { + "schema_name": { + "guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", + "type": "string", + "pattern": "^(qcschema_molecule)$", + }, + "schema_version": {"type": "integer"}, + "symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, + "geometry": { + "description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", + "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", + "type": "array", + "items": {"type": "number"}, + }, + "masses": { + "description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", + "type": "array", + "items": {"type": "number"}, + }, + "atomic_numbers": { + "description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", + "type": "array", + "items": {"type": "number", "multipleOf": 1.0}, + }, + "mass_numbers": { + "description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", + "type": "array", + "items": {"type": "number", "multipleOf": 1.0}, + }, + "atom_labels": { + "description": "(nat, ) atom labels with any user tagging information.", + "type": "array", + "items": {"type": "string"}, + }, + "name": {"description": "The name of the molecule.", "type": "string"}, + "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, + "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, + "molecular_multiplicity": { + "description": "The overall multiplicity of the molecule.", + "type": "number", + "multipleOf": 1.0, + "default": 1, + }, + "real": { + "description": "(nat, ) list describing if atoms are real (T) or ghost (F).", + "type": "array", + "items": {"type": "boolean"}, + }, + "connectivity": { + "description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", + "guidance": "Bonds may be freely reordered and inverted.", + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + {"description": "Atom number (0-indexed) at one end of bond.", "type": "number", "multipleOf": 1.0}, + { + "description": "Atom number (0-indexed) at other end of bond.", + "type": "number", + "multipleOf": 1.0, + }, + { + "description": "Bond order.", + "type": "number", + "minimum": 0, + "maximum": 5, + }, + ], + }, + }, + "fragments": { + "description": "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", + "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "type": "array", + "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}, + }, + "fragment_charges": { + "description": "(nfr, ) list of charges associated with each fragment tuple.", + "type": "array", + "items": {"type": "number"}, + }, + "fragment_multiplicities": { + "description": "(nfr, ) list of multiplicities associated with each fragment tuple.", + "type": "array", + "items": {"type": "number", "multipleOf": 1.0}, + }, + "fix_com": { + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", + "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "type": "boolean", + "default": False, + }, + "fix_orientation": { + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", + "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "type": "boolean", + "default": False, + }, + "fix_symmetry": { + "description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", + "type": "string", + }, + "provenance": {"type": "object", "$ref": "#/definitions/provenance"}, + }, + "required": ["symbols", "geometry", "schema_name", "schema_version"], +} diff --git a/qcschema/v1/generator/properties/__init__.py b/qcschema/v1/generator/properties/__init__.py new file mode 100644 index 0000000..0bf1b0e --- /dev/null +++ b/qcschema/v1/generator/properties/__init__.py @@ -0,0 +1 @@ +from .properties_base import properties as properties diff --git a/qcschema/v1/generator/properties/calcinfo_properties.py b/qcschema/v1/generator/properties/calcinfo_properties.py new file mode 100644 index 0000000..3105986 --- /dev/null +++ b/qcschema/v1/generator/properties/calcinfo_properties.py @@ -0,0 +1,40 @@ +""" +The complete list of the general computation properties. +""" + +calcinfo_properties = {} + +calcinfo_properties["calcinfo_nbasis"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of basis functions for the computation.", +} + +calcinfo_properties["calcinfo_nmo"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of molecular orbitals for the computation.", +} + +calcinfo_properties["calcinfo_nalpha"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of alpha electrons in the computation.", +} + +calcinfo_properties["calcinfo_nbeta"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of beta electrons in the computation.", +} + +calcinfo_properties["calcinfo_natom"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of atoms in the computation.", +} + +calcinfo_properties["return_energy"] = { + "type": "number", + "description": "The energy of the requested method, identical to `return_value` for energy computations.", +} diff --git a/qcschema/v1/generator/properties/cc_properties.py b/qcschema/v1/generator/properties/cc_properties.py new file mode 100644 index 0000000..2cf3e24 --- /dev/null +++ b/qcschema/v1/generator/properties/cc_properties.py @@ -0,0 +1,95 @@ +""" +The complete list of Coupled-Cluster properties. +""" + +cc_properties = {} + +cc_properties["ccsd_same_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", +} + +cc_properties["ccsd_opposite_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", +} + +cc_properties["ccsd_singles_energy"] = { + "type": "number", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", +} + +cc_properties["ccsd_doubles_energy"] = { + "type": "number", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", +} + +cc_properties["ccsd_correlation_energy"] = {"type": "number", "description": "The CCSD correlation energy."} + +cc_properties["ccsd_total_energy"] = { + "type": "number", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", +} + +cc_properties["ccsd_prt_pr_correlation_energy"] = {"type": "number", "description": "The CCSD(T) correlation energy."} + +cc_properties["ccsd_prt_pr_total_energy"] = { + "type": "number", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", +} + +cc_properties["ccsdt_correlation_energy"] = {"type": "number", "description": "The CCSDT correlation energy."} + +cc_properties["ccsdt_total_energy"] = { + "type": "number", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", +} + +cc_properties["ccsdtq_correlation_energy"] = {"type": "number", "description": "The CCSDTQ correlation energy."} + +cc_properties["ccsdtq_total_energy"] = { + "type": "number", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", +} + +cc_properties["ccsd_dipole_moment"] = { + "type": "array", + "description": "The CCSD X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsd_prt_pr_dipole_moment"] = { + "type": "array", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsdt_dipole_moment"] = { + "type": "array", + "description": "The CCSDT X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsdtq_dipole_moment"] = { + "type": "array", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsd_iterations"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of CCSD iterations taken before convergence.", +} + +cc_properties["ccsdt_iterations"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of CCSDT iterations taken before convergence.", +} + +cc_properties["ccsdtq_iterations"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of CCSDTQ iterations taken before convergence.", +} diff --git a/qcschema/v1/generator/properties/mp_properties.py b/qcschema/v1/generator/properties/mp_properties.py new file mode 100644 index 0000000..8e3b6cf --- /dev/null +++ b/qcschema/v1/generator/properties/mp_properties.py @@ -0,0 +1,38 @@ +""" +The complete list of Moller-Plesset properties. +""" + +mp_properties = {} + +mp_properties["mp2_same_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", +} + +mp_properties["mp2_opposite_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", +} + +mp_properties["mp2_singles_energy"] = { + "type": "number", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", +} + +mp_properties["mp2_doubles_energy"] = { + "type": "number", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", +} + +mp_properties["mp2_correlation_energy"] = {"type": "number", "description": "The MP2 correlation energy."} + +mp_properties["mp2_total_energy"] = { + "type": "number", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", +} + +mp_properties["mp2_dipole_moment"] = { + "type": "array", + "description": "The MP2 X, Y, and Z dipole components.", + "items": {"type": "number"}, +} diff --git a/qcschema/v1/generator/properties/properties_base.py b/qcschema/v1/generator/properties/properties_base.py new file mode 100644 index 0000000..fc98162 --- /dev/null +++ b/qcschema/v1/generator/properties/properties_base.py @@ -0,0 +1,21 @@ +""" +The base file for QC Schema properties. +""" + +from .calcinfo_properties import calcinfo_properties +from .cc_properties import cc_properties +from .mp_properties import mp_properties +from .scf_properties import scf_properties + +properties = { + "type": "object", + "properties": {}, + "description": "The resulting properties of a computation", + "additionalProperties": False, +} + +# Update new keys +properties["properties"].update(scf_properties) +properties["properties"].update(mp_properties) +properties["properties"].update(cc_properties) +properties["properties"].update(calcinfo_properties) diff --git a/qcschema/v1/generator/properties/scf_properties.py b/qcschema/v1/generator/properties/scf_properties.py new file mode 100644 index 0000000..6172861 --- /dev/null +++ b/qcschema/v1/generator/properties/scf_properties.py @@ -0,0 +1,61 @@ +""" +The complete list of SCF level properties. +""" + +scf_properties = {} + +scf_properties["scf_one_electron_energy"] = { + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "type": "number", +} + +scf_properties["scf_two_electron_energy"] = { + "type": "number", + "description": "The two-electron energy contribution to the total SCF energy.", +} + +scf_properties["nuclear_repulsion_energy"] = { + "type": "number", + "description": r""" +The nuclear repulsion energy contribution to the total SCF energy. +""", + # .. math:: E_{NN} = \sum_{i, j Date: Fri, 31 Jul 2026 10:10:00 -0400 Subject: [PATCH 02/14] Align v1_5 generation scripts --- qcschema/utils.py | 67 --------- qcschema/v1/generate.py | 7 +- qcschema/v1/utils.py | 20 +++ qcschema/v1_5/__init__.py | 0 qcschema/v1_5/generate.py | 119 ++++++++++++++++ qcschema/v1_5/generator/__init__.py | 0 qcschema/v1_5/generator/basis.py | 29 ++++ qcschema/v1_5/generator/definitions.py | 134 ++++++++++++++++++ qcschema/v1_5/generator/molecule.py | 118 +++++++++++++++ .../v1_5/generator/properties/__init__.py | 1 + .../properties/calcinfo_properties.py | 40 ++++++ .../generator/properties/cc_properties.py | 95 +++++++++++++ .../generator/properties/mp_properties.py | 38 +++++ .../generator/properties/properties_base.py | 21 +++ .../generator/properties/scf_properties.py | 61 ++++++++ .../v1_5/generator/wavefunction/__init__.py | 1 + .../wavefunction/core_wavefunction.py | 38 +++++ .../wavefunction/localized_wavefunction.py | 44 ++++++ .../wavefunction/result_wavefunction.py | 68 +++++++++ .../wavefunction/scf_wavefunction.py | 120 ++++++++++++++++ .../wavefunction/wavefunction_base.py | 24 ++++ qcschema/v1_5/schemas/qc_schema_input.schema | 1 + .../v1_5/schemas/qc_schema_molecule.schema | 1 + qcschema/v1_5/schemas/qc_schema_output.schema | 1 + qcschema/v1_5/utils.py | 21 +++ 25 files changed, 996 insertions(+), 73 deletions(-) delete mode 100644 qcschema/utils.py create mode 100644 qcschema/v1/utils.py create mode 100644 qcschema/v1_5/__init__.py create mode 100644 qcschema/v1_5/generate.py create mode 100644 qcschema/v1_5/generator/__init__.py create mode 100644 qcschema/v1_5/generator/basis.py create mode 100644 qcschema/v1_5/generator/definitions.py create mode 100644 qcschema/v1_5/generator/molecule.py create mode 100644 qcschema/v1_5/generator/properties/__init__.py create mode 100644 qcschema/v1_5/generator/properties/calcinfo_properties.py create mode 100644 qcschema/v1_5/generator/properties/cc_properties.py create mode 100644 qcschema/v1_5/generator/properties/mp_properties.py create mode 100644 qcschema/v1_5/generator/properties/properties_base.py create mode 100644 qcschema/v1_5/generator/properties/scf_properties.py create mode 100644 qcschema/v1_5/generator/wavefunction/__init__.py create mode 100644 qcschema/v1_5/generator/wavefunction/core_wavefunction.py create mode 100644 qcschema/v1_5/generator/wavefunction/localized_wavefunction.py create mode 100644 qcschema/v1_5/generator/wavefunction/result_wavefunction.py create mode 100644 qcschema/v1_5/generator/wavefunction/scf_wavefunction.py create mode 100644 qcschema/v1_5/generator/wavefunction/wavefunction_base.py create mode 100644 qcschema/v1_5/schemas/qc_schema_input.schema create mode 100644 qcschema/v1_5/schemas/qc_schema_molecule.schema create mode 100644 qcschema/v1_5/schemas/qc_schema_output.schema create mode 100644 qcschema/v1_5/utils.py diff --git a/qcschema/utils.py b/qcschema/utils.py deleted file mode 100644 index ae1f77d..0000000 --- a/qcschema/utils.py +++ /dev/null @@ -1,67 +0,0 @@ -""" -Shared utilities for QCSchema generation and management. -""" - -import copy -import json -from pathlib import Path - - -def assemble_schema(base, properties_dict, definitions_dict): - """ - Assemble a complete schema from base, properties, and definitions. - - Args: - base: Base schema dictionary - properties_dict: Additional properties to add - definitions_dict: Definitions block - - Returns: - Complete schema dictionary - """ - schema = copy.deepcopy(base) - if properties_dict: - schema["properties"].update(properties_dict) - if definitions_dict: - schema["definitions"] = definitions_dict - return schema - - -def write_schema(schema, filepath): - """ - Write a schema to a JSON file (minified, single line, with spacing). - - Args: - schema: Schema dictionary - filepath: Path to write to - """ - Path(filepath).parent.mkdir(parents=True, exist_ok=True) - with open(filepath, "w") as f: - json.dump(schema, f, separators=(", ", ": ")) - - -def read_schema(filepath): - """ - Read a schema from a JSON file. - - Args: - filepath: Path to read from - - Returns: - Schema dictionary - """ - with open(filepath) as f: - return json.load(f) - - -def get_schema_dir(version): - """ - Get the directory path for a given schema version. - - Args: - version: Version string (e.g., '1', '1.5', 'qcelemental_v1') - - Returns: - Path to schemas directory - """ - return Path(__file__).parent / f"{version}" / "schemas" diff --git a/qcschema/v1/generate.py b/qcschema/v1/generate.py index 3d48445..cacc3a2 100644 --- a/qcschema/v1/generate.py +++ b/qcschema/v1/generate.py @@ -9,14 +9,9 @@ """ import copy -import sys from pathlib import Path -# Add parent to path for imports -sys.path.insert(0, str(Path(__file__).parent.parent.parent)) - -from qcschema import utils - +from . import utils from .generator.properties.calcinfo_properties import calcinfo_properties from .generator.properties.mp_properties import mp_properties from .generator.properties.scf_properties import scf_properties diff --git a/qcschema/v1/utils.py b/qcschema/v1/utils.py new file mode 100644 index 0000000..78b1bf7 --- /dev/null +++ b/qcschema/v1/utils.py @@ -0,0 +1,20 @@ +""" +Utilities for v1 schema generation. +""" + +import json +from pathlib import Path + + +def write_schema(schema, filepath): + """ + Write a v1 schema to a JSON file (minified, single line, with spacing). + v1 schemas have no trailing newline. + + Args: + schema: Schema dictionary + filepath: Path to write to + """ + Path(filepath).parent.mkdir(parents=True, exist_ok=True) + with open(filepath, "w") as f: + json.dump(schema, f, separators=(", ", ": ")) diff --git a/qcschema/v1_5/__init__.py b/qcschema/v1_5/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/qcschema/v1_5/generate.py b/qcschema/v1_5/generate.py new file mode 100644 index 0000000..a4e99b0 --- /dev/null +++ b/qcschema/v1_5/generate.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python +""" +Generate v1.5 JSON Schema documents from schema component definitions. + +v1.5 includes v1 base schemas plus wavefunction support. + +Can be run as: python -m qcschema.v1_5.generate +Or imported to build schemas programmatically. + +Usage: + python -m qcschema.v1_5.generate + +Output: + - qcschema/data/v2/qc_schema_input.schema + - qcschema/data/v2/qc_schema_molecule.schema + - qcschema/data/v2/qc_schema_output.schema +""" + +import copy +from pathlib import Path + +from . import utils +from .generator import basis, definitions, molecule, properties, wavefunction + + +def build_v1p5_schemas(): + """Build v1.5 schemas (v1 base + wavefunction support).""" + + base_schema = { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qcschema_input", + "version": "1.dev", + "description": "The MolSSI Quantum Chemistry Schema", + "type": "object", + "properties": { + "molecule": molecule.molecule, + "schema_name": {"type": "string", "pattern": "^(qc_?schema)$"}, + "schema_version": {"type": "integer"}, + "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, + "model": { + "definition": "The method and basis specification requested", + "properties": { + "method": {"type": "string"}, + "basis": { + "anyOf": [ + basis.basis, + {"description": "Name of the basis set to apply to the whole molecule", "type": "string"}, + ] + }, + }, + "required": ["method", "basis"], + "description": "The quantum chemistry model to be run.", + }, + "keywords": {"type": "object", "description": "Program specific parameters to be used."}, + "provenance": { + "anyOf": [ + {"type": "object", "$ref": "#/definitions/provenance"}, + {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}, + ] + }, + }, + "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], + "definitions": definitions.definitions, + } + + output_properties = { + "properties": properties.properties, + "success": {"type": "boolean"}, + "error": { + "definition": "The type and description of error raised.", + "type": "object", + "$ref": "#/definitions/error", + }, + "return_result": { + "definition": "The primary specified return of the requested computation.", + "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}], + }, + } + + input_schema = copy.deepcopy(base_schema) + input_schema["name"] = "qcschema_input" + input_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_input)$" + + output_schema = copy.deepcopy(base_schema) + output_schema["name"] = "qcschema_output" + output_schema["version"] = "1.dev" + output_schema["properties"].update(output_properties) + output_schema["properties"]["wavefunction"] = wavefunction.output_wavefunction + output_schema["required"].extend(["provenance", "properties", "success", "return_result"]) + output_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_output)$" + + molecule_schema = copy.deepcopy(molecule.molecule) + + return { + "input": input_schema, + "output": output_schema, + "molecule": molecule_schema, + } + + +def write_schemas(schemas, schema_dir=None): + """Write schemas to disk.""" + if schema_dir is None: + schema_dir = Path(__file__).parent / "schemas" + + schema_dir = Path(schema_dir) + schema_dir.mkdir(parents=True, exist_ok=True) + + utils.write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") + utils.write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") + utils.write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + + return schema_dir + + +if __name__ == "__main__": + schemas = build_v1p5_schemas() + schema_dir = write_schemas(schemas) + print(f"✓ v1.5 schemas generated in {schema_dir}/") diff --git a/qcschema/v1_5/generator/__init__.py b/qcschema/v1_5/generator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/qcschema/v1_5/generator/basis.py b/qcschema/v1_5/generator/basis.py new file mode 100644 index 0000000..17c7269 --- /dev/null +++ b/qcschema/v1_5/generator/basis.py @@ -0,0 +1,29 @@ +""" +The json-schema for the Basis Set definition +""" + +basis = { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qcschema_basis", + "version": "1.dev", + "description": "The MolSSI Quantum Chemistry Basis Set Schema", + "type": "object", + "required": ["center_data", "atom_map", "name"], + "additionalProperties": False, + "properties": { + "schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, + "schema_version": {"type": "integer"}, + "name": {"description": "Name of the basis set", "type": "string"}, + "description": {"description": "Brief description of the basis set", "type": "string"}, + "center_data": { + "description": "Shared basis data for all atoms/centers in the molecule", + "type": "object", + "additionalProperties": {"$ref": "#/definitions/center_basis"}, + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the molecule to data in center_data", + "type": "array", + "items": {"type": "string"}, + }, + }, +} diff --git a/qcschema/v1_5/generator/definitions.py b/qcschema/v1_5/generator/definitions.py new file mode 100644 index 0000000..5d16d5e --- /dev/null +++ b/qcschema/v1_5/generator/definitions.py @@ -0,0 +1,134 @@ +""" +A list of definitions involved in the JSON schema. +""" + +definitions = {} + +definitions["error"] = { + "properties": { + "error_type": { + "description": "The type of error raised.", + "enum": ["convergence_error", "file_error", "memory_error"], + }, + "error_message": {"description": "A description of the raised error.", "type": "string"}, + }, + "required": ["error_type", "error_message"], + "description": "The type of error message raised.", + "additionalProperties": False, +} + +definitions["provenance"] = { + "properties": { + "creator": {"description": "The name of the person or program who created this object.", "type": "string"}, + "version": { + "description": "The version of the program which created this object, blank otherwise. Suggest that versions be interpretable by PEP 440 (https://www.python.org/dev/peps/pep-0440/).", + "type": "string", + }, + "routine": { + "description": "The routine of the program which created this object, blank otherwise.", + "type": "string", + }, + }, + "required": ["creator", "version", "routine"], + "description": "A short provenance of the object.", + "additionalProperties": True, +} + +definitions["electron_shell"] = { + "description": "Information for a single electronic shell", + "additionalProperties": False, + "required": ["angular_momentum", "harmonic_type", "exponents", "coefficients"], + "properties": { + "angular_momentum": { + "description": "Angular momentum (as an array of integers)", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"type": "integer", "minimum": 0}, + }, + "harmonic_type": { + "description": "Whether this shell is spherical or cartesian", + "type": "string", + "enum": ["spherical", "cartesian"], + }, + "exponents": { + "description": "Exponents for this contracted shell", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + "coefficients": { + "description": "General contraction coefficients for this contracted shell", + "type": "array", + "minItems": 1, + "items": { + "description": "Segmented contraction coefficients", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + }, + }, +} + +definitions["ecp_potential"] = { + "description": "ECP potential", + "additionalProperties": False, + "required": ["ecp_type", "angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"], + "properties": { + "ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, + "angular_momentum": { + "description": "Angular momentum (as an array of integers)", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"type": "integer", "minimum": 0}, + }, + "r_exponents": { + "description": "Exponents of the r term", + "type": "array", + "minItems": 1, + "items": {"type": "integer"}, + }, + "gaussian_exponents": { + "description": "Exponents of the gaussian term", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + "coefficients": { + "description": "General contraction coefficients for this potential", + "type": "array", + "minItems": 1, + "items": { + "description": "Segmented contraction coefficients", + "type": "array", + "minItems": 1, + "items": {"type": "string"}, + }, + }, + }, +} + +definitions["center_basis"] = { + "description": "Data for a single atom/center in the basis set", + "type": "object", + "additionalProperties": False, + "properties": { + "electron_shells": { + "description": "(Electronic) shells for this element", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"$ref": "#/definitions/electron_shell"}, + }, + "ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, + "ecp_potentials": { + "description": "Effective Core Potential for this element", + "type": "array", + "minItems": 1, + "uniqueItems": True, + "items": {"$ref": "#/definitions/ecp_potential"}, + }, + }, +} diff --git a/qcschema/v1_5/generator/molecule.py b/qcschema/v1_5/generator/molecule.py new file mode 100644 index 0000000..b5f6621 --- /dev/null +++ b/qcschema/v1_5/generator/molecule.py @@ -0,0 +1,118 @@ +""" +The json-schema for the Molecule definition +""" + +molecule = { + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "qcschema_molecule", + "version": "2.dev", + "description": "The physical cartesian representation of the molecular system", + "type": "object", + "properties": { + "schema_name": { + "guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", + "type": "string", + "pattern": "^(qcschema_molecule)$", + }, + "schema_version": {"type": "integer"}, + "symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, + "geometry": { + "description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", + "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", + "type": "array", + "items": {"type": "number"}, + }, + "masses": { + "description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", + "type": "array", + "items": {"type": "number"}, + }, + "atomic_numbers": { + "description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", + "type": "array", + "items": {"type": "number", "multipleOf": 1.0}, + }, + "mass_numbers": { + "description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", + "type": "array", + "items": {"type": "number", "multipleOf": 1.0}, + }, + "atom_labels": { + "description": "(nat, ) atom labels with any user tagging information.", + "type": "array", + "items": {"type": "string"}, + }, + "name": {"description": "The name of the molecule.", "type": "string"}, + "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, + "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, + "molecular_multiplicity": { + "description": "The overall multiplicity of the molecule.", + "type": "number", + "multipleOf": 1.0, + "default": 1, + }, + "real": { + "description": "(nat, ) list describing if atoms are real (T) or ghost (F).", + "type": "array", + "items": {"type": "boolean"}, + }, + "connectivity": { + "description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", + "guidance": "Bonds may be freely reordered and inverted.", + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + {"description": "Atom number (0-indexed) at one end of bond.", "type": "number", "multipleOf": 1.0}, + { + "description": "Atom number (0-indexed) at other end of bond.", + "type": "number", + "multipleOf": 1.0, + }, + { + "description": "Bond order.", + "type": "number", + "minimum": 0, + "maximum": 5, + }, + ], + }, + }, + "fragments": { + "description": "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", + "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "type": "array", + "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}, + }, + "fragment_charges": { + "description": "(nfr, ) list of charges associated with each fragment tuple.", + "type": "array", + "items": {"type": "number"}, + }, + "fragment_multiplicities": { + "description": "(nfr, ) list of multiplicities associated with each fragment tuple.", + "type": "array", + "items": {"type": "number", "multipleOf": 1.0}, + }, + "fix_com": { + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", + "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "type": "boolean", + "default": False, + }, + "fix_orientation": { + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", + "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "type": "boolean", + "default": False, + }, + "fix_symmetry": { + "description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", + "type": "string", + }, + "provenance": {"type": "object", "$ref": "#/definitions/provenance"}, + }, + "required": ["symbols", "geometry", "schema_name", "schema_version"], +} diff --git a/qcschema/v1_5/generator/properties/__init__.py b/qcschema/v1_5/generator/properties/__init__.py new file mode 100644 index 0000000..0bf1b0e --- /dev/null +++ b/qcschema/v1_5/generator/properties/__init__.py @@ -0,0 +1 @@ +from .properties_base import properties as properties diff --git a/qcschema/v1_5/generator/properties/calcinfo_properties.py b/qcschema/v1_5/generator/properties/calcinfo_properties.py new file mode 100644 index 0000000..3105986 --- /dev/null +++ b/qcschema/v1_5/generator/properties/calcinfo_properties.py @@ -0,0 +1,40 @@ +""" +The complete list of the general computation properties. +""" + +calcinfo_properties = {} + +calcinfo_properties["calcinfo_nbasis"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of basis functions for the computation.", +} + +calcinfo_properties["calcinfo_nmo"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of molecular orbitals for the computation.", +} + +calcinfo_properties["calcinfo_nalpha"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of alpha electrons in the computation.", +} + +calcinfo_properties["calcinfo_nbeta"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of beta electrons in the computation.", +} + +calcinfo_properties["calcinfo_natom"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of atoms in the computation.", +} + +calcinfo_properties["return_energy"] = { + "type": "number", + "description": "The energy of the requested method, identical to `return_value` for energy computations.", +} diff --git a/qcschema/v1_5/generator/properties/cc_properties.py b/qcschema/v1_5/generator/properties/cc_properties.py new file mode 100644 index 0000000..2cf3e24 --- /dev/null +++ b/qcschema/v1_5/generator/properties/cc_properties.py @@ -0,0 +1,95 @@ +""" +The complete list of Coupled-Cluster properties. +""" + +cc_properties = {} + +cc_properties["ccsd_same_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", +} + +cc_properties["ccsd_opposite_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", +} + +cc_properties["ccsd_singles_energy"] = { + "type": "number", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", +} + +cc_properties["ccsd_doubles_energy"] = { + "type": "number", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", +} + +cc_properties["ccsd_correlation_energy"] = {"type": "number", "description": "The CCSD correlation energy."} + +cc_properties["ccsd_total_energy"] = { + "type": "number", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", +} + +cc_properties["ccsd_prt_pr_correlation_energy"] = {"type": "number", "description": "The CCSD(T) correlation energy."} + +cc_properties["ccsd_prt_pr_total_energy"] = { + "type": "number", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", +} + +cc_properties["ccsdt_correlation_energy"] = {"type": "number", "description": "The CCSDT correlation energy."} + +cc_properties["ccsdt_total_energy"] = { + "type": "number", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", +} + +cc_properties["ccsdtq_correlation_energy"] = {"type": "number", "description": "The CCSDTQ correlation energy."} + +cc_properties["ccsdtq_total_energy"] = { + "type": "number", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", +} + +cc_properties["ccsd_dipole_moment"] = { + "type": "array", + "description": "The CCSD X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsd_prt_pr_dipole_moment"] = { + "type": "array", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsdt_dipole_moment"] = { + "type": "array", + "description": "The CCSDT X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsdtq_dipole_moment"] = { + "type": "array", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "items": {"type": "number"}, +} + +cc_properties["ccsd_iterations"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of CCSD iterations taken before convergence.", +} + +cc_properties["ccsdt_iterations"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of CCSDT iterations taken before convergence.", +} + +cc_properties["ccsdtq_iterations"] = { + "type": "number", + "multipleOf": 1.0, + "description": "The number of CCSDTQ iterations taken before convergence.", +} diff --git a/qcschema/v1_5/generator/properties/mp_properties.py b/qcschema/v1_5/generator/properties/mp_properties.py new file mode 100644 index 0000000..8e3b6cf --- /dev/null +++ b/qcschema/v1_5/generator/properties/mp_properties.py @@ -0,0 +1,38 @@ +""" +The complete list of Moller-Plesset properties. +""" + +mp_properties = {} + +mp_properties["mp2_same_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", +} + +mp_properties["mp2_opposite_spin_correlation_energy"] = { + "type": "number", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", +} + +mp_properties["mp2_singles_energy"] = { + "type": "number", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", +} + +mp_properties["mp2_doubles_energy"] = { + "type": "number", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", +} + +mp_properties["mp2_correlation_energy"] = {"type": "number", "description": "The MP2 correlation energy."} + +mp_properties["mp2_total_energy"] = { + "type": "number", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", +} + +mp_properties["mp2_dipole_moment"] = { + "type": "array", + "description": "The MP2 X, Y, and Z dipole components.", + "items": {"type": "number"}, +} diff --git a/qcschema/v1_5/generator/properties/properties_base.py b/qcschema/v1_5/generator/properties/properties_base.py new file mode 100644 index 0000000..fc98162 --- /dev/null +++ b/qcschema/v1_5/generator/properties/properties_base.py @@ -0,0 +1,21 @@ +""" +The base file for QC Schema properties. +""" + +from .calcinfo_properties import calcinfo_properties +from .cc_properties import cc_properties +from .mp_properties import mp_properties +from .scf_properties import scf_properties + +properties = { + "type": "object", + "properties": {}, + "description": "The resulting properties of a computation", + "additionalProperties": False, +} + +# Update new keys +properties["properties"].update(scf_properties) +properties["properties"].update(mp_properties) +properties["properties"].update(cc_properties) +properties["properties"].update(calcinfo_properties) diff --git a/qcschema/v1_5/generator/properties/scf_properties.py b/qcschema/v1_5/generator/properties/scf_properties.py new file mode 100644 index 0000000..6172861 --- /dev/null +++ b/qcschema/v1_5/generator/properties/scf_properties.py @@ -0,0 +1,61 @@ +""" +The complete list of SCF level properties. +""" + +scf_properties = {} + +scf_properties["scf_one_electron_energy"] = { + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "type": "number", +} + +scf_properties["scf_two_electron_energy"] = { + "type": "number", + "description": "The two-electron energy contribution to the total SCF energy.", +} + +scf_properties["nuclear_repulsion_energy"] = { + "type": "number", + "description": r""" +The nuclear repulsion energy contribution to the total SCF energy. +""", + # .. math:: E_{NN} = \sum_{i, j) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", "type": "boolean", "default": false}, "fix_symmetry": {"description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", "type": "string"}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry", "schema_name", "schema_version"]}, "schema_name": {"type": "string", "pattern": "^(qc_?schema_input)$"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"anyOf": [{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_basis", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Basis Set Schema", "type": "object", "required": ["center_data", "atom_map", "name"], "additionalProperties": false, "properties": {"schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, "schema_version": {"type": "integer"}, "name": {"description": "Name of the basis set", "type": "string"}, "description": {"description": "Brief description of the basis set", "type": "string"}, "center_data": {"description": "Shared basis data for all atoms/centers in the molecule", "type": "object", "additionalProperties": {"$ref": "#/definitions/center_basis"}}, "atom_map": {"description": "Mapping of all atoms/centers in the molecule to data in center_data", "type": "array", "items": {"type": "string"}}}}, {"description": "Name of the basis set to apply to the whole molecule", "type": "string"}]}}, "required": ["method", "basis"], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise. Suggest that versions be interpretable by PEP 440 (https://www.python.org/dev/peps/pep-0440/).", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator", "version", "routine"], "description": "A short provenance of the object.", "additionalProperties": true}, "electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["angular_momentum", "harmonic_type", "exponents", "coefficients"], "properties": {"angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "harmonic_type": {"description": "Whether this shell is spherical or cartesian", "type": "string", "enum": ["spherical", "cartesian"]}, "exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["ecp_type", "angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"], "properties": {"ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this potential", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "center_basis": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/electron_shell"}}, "ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "ecp_potentials": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/ecp_potential"}}}}}} diff --git a/qcschema/v1_5/schemas/qc_schema_molecule.schema b/qcschema/v1_5/schemas/qc_schema_molecule.schema new file mode 100644 index 0000000..891b131 --- /dev/null +++ b/qcschema/v1_5/schemas/qc_schema_molecule.schema @@ -0,0 +1 @@ +{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": "2.dev", "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"schema_name": {"guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", "type": "string", "pattern": "^(qcschema_molecule)$"}, "schema_version": {"type": "integer"}, "symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "atomic_numbers": {"description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "mass_numbers": {"description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "atom_labels": {"description": "(nat, ) atom labels with any user tagging information.", "type": "array", "items": {"type": "string"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "guidance": "Bonds may be freely reordered and inverted.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": [{"description": "Atom number (0-indexed) at one end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Atom number (0-indexed) at other end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Bond order.", "type": "number", "minimum": 0, "maximum": 5}]}}, "fragments": {"description": "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", "type": "boolean", "default": false}, "fix_symmetry": {"description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", "type": "string"}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry", "schema_name", "schema_version"]} diff --git a/qcschema/v1_5/schemas/qc_schema_output.schema b/qcschema/v1_5/schemas/qc_schema_output.schema new file mode 100644 index 0000000..a0ca2cc --- /dev/null +++ b/qcschema/v1_5/schemas/qc_schema_output.schema @@ -0,0 +1 @@ +{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_output", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": "2.dev", "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"schema_name": {"guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", "type": "string", "pattern": "^(qcschema_molecule)$"}, "schema_version": {"type": "integer"}, "symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "atomic_numbers": {"description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "mass_numbers": {"description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "atom_labels": {"description": "(nat, ) atom labels with any user tagging information.", "type": "array", "items": {"type": "string"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "guidance": "Bonds may be freely reordered and inverted.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": [{"description": "Atom number (0-indexed) at one end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Atom number (0-indexed) at other end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Bond order.", "type": "number", "minimum": 0, "maximum": 5}]}}, "fragments": {"description": "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", "type": "boolean", "default": false}, "fix_symmetry": {"description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", "type": "string"}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry", "schema_name", "schema_version"]}, "schema_name": {"type": "string", "pattern": "^(qc_?schema_output)$"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"anyOf": [{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_basis", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Basis Set Schema", "type": "object", "required": ["center_data", "atom_map", "name"], "additionalProperties": false, "properties": {"schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, "schema_version": {"type": "integer"}, "name": {"description": "Name of the basis set", "type": "string"}, "description": {"description": "Brief description of the basis set", "type": "string"}, "center_data": {"description": "Shared basis data for all atoms/centers in the molecule", "type": "object", "additionalProperties": {"$ref": "#/definitions/center_basis"}}, "atom_map": {"description": "Mapping of all atoms/centers in the molecule to data in center_data", "type": "array", "items": {"type": "string"}}}}, {"description": "Name of the basis set to apply to the whole molecule", "type": "string"}]}}, "required": ["method", "basis"], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}, "properties": {"type": "object", "properties": {"scf_one_electron_energy": {"description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", "type": "number"}, "scf_two_electron_energy": {"type": "number", "description": "The two-electron energy contribution to the total SCF energy."}, "nuclear_repulsion_energy": {"type": "number", "description": "\nThe nuclear repulsion energy contribution to the total SCF energy.\n"}, "scf_vv10_energy": {"type": "number", "description": "The VV10 functional energy contribution to the total SCF energy."}, "scf_xc_energy": {"type": "number", "description": "The functional energy contribution to the total SCF energy."}, "scf_dispersion_correction_energy": {"type": "number", "description": "\nThe dispersion correction appended to an underlying functional\nwhen a DFT-D method is requested.\n"}, "scf_dipole_moment": {"type": "array", "description": "The X, Y, and Z dipole components.", "items": {"type": "number"}}, "scf_total_energy": {"type": "number", "description": "\nThe total electronic energy of the SCF stage of the calculation.\nThis is represented as the sum of the ... quantities.\n"}, "scf_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of SCF iterations taken before convergence."}, "mp2_same_spin_correlation_energy": {"type": "number", "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling."}, "mp2_opposite_spin_correlation_energy": {"type": "number", "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling."}, "mp2_singles_energy": {"type": "number", "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF."}, "mp2_doubles_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_correlation_energy": {"type": "number", "description": "The MP2 correlation energy."}, "mp2_total_energy": {"type": "number", "description": "The total MP2 energy (MP2 correlation energy + HF energy)."}, "mp2_dipole_moment": {"type": "array", "description": "The MP2 X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsd_same_spin_correlation_energy": {"type": "number", "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling."}, "ccsd_opposite_spin_correlation_energy": {"type": "number", "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling."}, "ccsd_singles_energy": {"type": "number", "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF."}, "ccsd_doubles_energy": {"type": "number", "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations."}, "ccsd_correlation_energy": {"type": "number", "description": "The CCSD correlation energy."}, "ccsd_total_energy": {"type": "number", "description": "The total CCSD energy (CCSD correlation energy + HF energy)."}, "ccsd_prt_pr_correlation_energy": {"type": "number", "description": "The CCSD(T) correlation energy."}, "ccsd_prt_pr_total_energy": {"type": "number", "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy)."}, "ccsdt_correlation_energy": {"type": "number", "description": "The CCSDT correlation energy."}, "ccsdt_total_energy": {"type": "number", "description": "The total CCSDT energy (CCSDT correlation energy + HF energy)."}, "ccsdtq_correlation_energy": {"type": "number", "description": "The CCSDTQ correlation energy."}, "ccsdtq_total_energy": {"type": "number", "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy)."}, "ccsd_dipole_moment": {"type": "array", "description": "The CCSD X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsd_prt_pr_dipole_moment": {"type": "array", "description": "The CCSD(T) X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsdt_dipole_moment": {"type": "array", "description": "The CCSDT X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsdtq_dipole_moment": {"type": "array", "description": "The CCSDTQ X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsd_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of CCSD iterations taken before convergence."}, "ccsdt_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of CCSDT iterations taken before convergence."}, "ccsdtq_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of CCSDTQ iterations taken before convergence."}, "calcinfo_nbasis": {"type": "number", "multipleOf": 1.0, "description": "The number of basis functions for the computation."}, "calcinfo_nmo": {"type": "number", "multipleOf": 1.0, "description": "The number of molecular orbitals for the computation."}, "calcinfo_nalpha": {"type": "number", "multipleOf": 1.0, "description": "The number of alpha electrons in the computation."}, "calcinfo_nbeta": {"type": "number", "multipleOf": 1.0, "description": "The number of beta electrons in the computation."}, "calcinfo_natom": {"type": "number", "multipleOf": 1.0, "description": "The number of atoms in the computation."}, "return_energy": {"type": "number", "description": "The energy of the requested method, identical to `return_value` for energy computations."}}, "description": "The resulting properties of a computation", "additionalProperties": false}, "success": {"type": "boolean"}, "error": {"definition": "The type and description of error raised.", "type": "object", "$ref": "#/definitions/error"}, "return_result": {"definition": "The primary specified return of the requested computation.", "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}]}, "wavefunction": {"type": "object", "properties": {"basis": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_basis", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Basis Set Schema", "type": "object", "required": ["center_data", "atom_map", "name"], "additionalProperties": false, "properties": {"schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, "schema_version": {"type": "integer"}, "name": {"description": "Name of the basis set", "type": "string"}, "description": {"description": "Brief description of the basis set", "type": "string"}, "center_data": {"description": "Shared basis data for all atoms/centers in the molecule", "type": "object", "additionalProperties": {"$ref": "#/definitions/center_basis"}}, "atom_map": {"description": "Mapping of all atoms/centers in the molecule to data in center_data", "type": "array", "items": {"type": "string"}}}}, "orbitals_a": {"type": "string", "description": "Alpha-spin orbitals in the AO basis of the primary return. "}, "orbitals_b": {"type": "string", "description": "Beta-spin orbitals in the AO basis of the primary return."}, "density_a": {"type": "string", "description": "Alpha-spin density in the AO basis of the primary return."}, "density_b": {"type": "string", "description": "Beta-spin density in the AO basis of the primary return."}, "fock_a": {"type": "string", "description": "Alpha-spin Fock matrix in the AO basis of the primary return."}, "fock_b": {"type": "string", "description": "Beta-spin Fock matrix in the AO basis of the primary return."}, "eigenvalues_a": {"type": "string", "description": "Alpha-spin orbital eigenvalues of the primary return."}, "eigenvalues_b": {"type": "string", "description": "Beta-spin orbital eigenvalues of the primary return."}, "occupations_a": {"type": "string", "description": "Alpha-spin orbital occupations of the primary return."}, "occupations_b": {"type": "string", "description": "Beta-spin orbital occupations of the primary return."}, "scf_orbitals_a": {"type": "array", "description": "SCF alpha-spin orbitals in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "scf_orbitals_b": {"type": "array", "description": "SCF beta-spin orbitals in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "scf_density_a": {"type": "array", "description": "SCF alpha-spin density in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_density_b": {"type": "array", "description": "SCF beta-spin density in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_fock_a": {"type": "array", "description": "SCF alpha-spin Fock matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_fock_b": {"type": "array", "description": "SCF beta-spin Fock matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_coulomb_a": {"type": "array", "description": "SCF alpha-spin Coulomb matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_coulomb_b": {"type": "array", "description": "SCF beta-spin Coulomb matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_exchange_a": {"type": "array", "description": "SCF alpha-spin exchange matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_exchange_b": {"type": "array", "description": "SCF beta-spin exchange matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_eigenvalues_a": {"type": "array", "description": "SCF alpha-spin orbital eigenvalues.", "items": {"type": "number"}, "shape": ["nmo"]}, "scf_eigenvalues_b": {"type": "array", "description": "SCF beta-spin orbital eigenvalues.", "items": {"type": "number"}, "shape": ["nmo"]}, "scf_occupations_a": {"type": "array", "description": "SCF alpha-spin orbital occupations.", "items": {"type": "number"}, "shape": ["nmo"]}, "scf_occupations_b": {"type": "array", "description": "SCF beta-spin orbital occupations.", "items": {"type": "number"}, "shape": ["nmo"]}, "localized_orbitals_a": {"type": "array", "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "localized_orbitals_b": {"type": "array", "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "localized_fock_a": {"type": "array", "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nmo", "nmo"]}, "localized_fock_b": {"type": "array", "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nmo", "nmo"]}, "h_core_a": {"type": "array", "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "h_core_b": {"type": "array", "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "h_effective_a": {"type": "array", "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "h_effective_b": {"type": "array", "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}}, "description": "Wavefunction properties resulting from a computation.Matrix quantities are stored in column-major order.", "additionalProperties": false, "required": ["basis"]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model", "provenance", "properties", "success", "return_result"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise. Suggest that versions be interpretable by PEP 440 (https://www.python.org/dev/peps/pep-0440/).", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator", "version", "routine"], "description": "A short provenance of the object.", "additionalProperties": true}, "electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["angular_momentum", "harmonic_type", "exponents", "coefficients"], "properties": {"angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "harmonic_type": {"description": "Whether this shell is spherical or cartesian", "type": "string", "enum": ["spherical", "cartesian"]}, "exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["ecp_type", "angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"], "properties": {"ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this potential", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "center_basis": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/electron_shell"}}, "ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "ecp_potentials": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/ecp_potential"}}}}}} diff --git a/qcschema/v1_5/utils.py b/qcschema/v1_5/utils.py new file mode 100644 index 0000000..e452aba --- /dev/null +++ b/qcschema/v1_5/utils.py @@ -0,0 +1,21 @@ +""" +Utilities for v1.5 schema generation. +""" + +import json +from pathlib import Path + + +def write_schema(schema, filepath): + """ + Write a v1.5 schema to a JSON file (minified, single line, with spacing). + v1.5 schemas (v2 format) have a trailing newline. + + Args: + schema: Schema dictionary + filepath: Path to write to + """ + Path(filepath).parent.mkdir(parents=True, exist_ok=True) + with open(filepath, "w") as f: + json.dump(schema, f, separators=(", ", ": ")) + f.write("\n") From fcadbe22f3d1af048e100574e6455988a101cc67 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Fri, 31 Jul 2026 12:39:38 -0400 Subject: [PATCH 03/14] Update testing and remove old dirs --- pyproject.toml | 11 + qcschema/data/__init__.py | 5 - qcschema/data/v1/__init__.py | 0 qcschema/data/v1/qc_schema_input.schema | 1 - qcschema/data/v1/qc_schema_molecule.schema | 1 - qcschema/data/v1/qc_schema_output.schema | 1 - qcschema/data/v2/__init__.py | 0 qcschema/data/v2/qc_schema_input.schema | 1 - qcschema/data/v2/qc_schema_molecule.schema | 1 - qcschema/data/v2/qc_schema_output.schema | 1 - qcschema/dev/__init__.py | 0 qcschema/dev/basis.py | 48 ---- qcschema/dev/definitions.py | 176 --------------- qcschema/dev/dev_schema.py | 112 --------- qcschema/dev/molecule.py | 169 -------------- qcschema/dev/properties/__init__.py | 1 - .../dev/properties/calcinfo_properties.py | 40 ---- qcschema/dev/properties/cc_properties.py | 137 ----------- qcschema/dev/properties/mp_properties.py | 53 ----- qcschema/dev/properties/properties_base.py | 21 -- qcschema/dev/properties/scf_properties.py | 69 ------ qcschema/dev/wavefunction/__init__.py | 1 - .../dev/wavefunction/core_wavefunction.py | 38 ---- .../wavefunction/localized_wavefunction.py | 44 ---- .../dev/wavefunction/result_wavefunction.py | 68 ------ qcschema/dev/wavefunction/scf_wavefunction.py | 121 ---------- .../dev/wavefunction/wavefunction_base.py | 26 --- qcschema/v1/generate.py | 2 +- qcschema/v1/utils.py | 14 +- qcschema/v1_5/generate.py | 6 +- qcschema/v1_5/utils.py | 16 +- qcschema/validate.py | 64 +++++- qcschema/versions.py | 213 +++++++++++++----- tests/conftest.py | 125 ++++++++++ tests/test_failures.py | 12 +- tests/test_packaging.py | 12 +- tests/test_schema.py | 57 +---- 37 files changed, 410 insertions(+), 1257 deletions(-) delete mode 100644 qcschema/data/__init__.py delete mode 100644 qcschema/data/v1/__init__.py delete mode 100644 qcschema/data/v1/qc_schema_input.schema delete mode 100644 qcschema/data/v1/qc_schema_molecule.schema delete mode 100644 qcschema/data/v1/qc_schema_output.schema delete mode 100644 qcschema/data/v2/__init__.py delete mode 100644 qcschema/data/v2/qc_schema_input.schema delete mode 100644 qcschema/data/v2/qc_schema_molecule.schema delete mode 100644 qcschema/data/v2/qc_schema_output.schema delete mode 100644 qcschema/dev/__init__.py delete mode 100644 qcschema/dev/basis.py delete mode 100644 qcschema/dev/definitions.py delete mode 100644 qcschema/dev/dev_schema.py delete mode 100644 qcschema/dev/molecule.py delete mode 100644 qcschema/dev/properties/__init__.py delete mode 100644 qcschema/dev/properties/calcinfo_properties.py delete mode 100644 qcschema/dev/properties/cc_properties.py delete mode 100644 qcschema/dev/properties/mp_properties.py delete mode 100644 qcschema/dev/properties/properties_base.py delete mode 100644 qcschema/dev/properties/scf_properties.py delete mode 100644 qcschema/dev/wavefunction/__init__.py delete mode 100644 qcschema/dev/wavefunction/core_wavefunction.py delete mode 100644 qcschema/dev/wavefunction/localized_wavefunction.py delete mode 100644 qcschema/dev/wavefunction/result_wavefunction.py delete mode 100644 qcschema/dev/wavefunction/scf_wavefunction.py delete mode 100644 qcschema/dev/wavefunction/wavefunction_base.py create mode 100644 tests/conftest.py diff --git a/pyproject.toml b/pyproject.toml index 4e6335e..0565194 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,3 +61,14 @@ lint.ignore = [ [tool.ruff.lint.isort] known-first-party = ["qcschema"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +python_files = ["test_*.py"] +python_classes = ["Test*"] +python_functions = ["test_*"] +addopts = "-v --tb=short" +# Note: If you encounter "ModuleNotFoundError: No module named 'qcelemental.models._v1v2'" +# from a pytest plugin, it means an external package has a pytest11 entry point that fails. +# Run with: PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=. pytest tests/ +# See tests/conftest.py for more information. diff --git a/qcschema/data/__init__.py b/qcschema/data/__init__.py deleted file mode 100644 index 951a37c..0000000 --- a/qcschema/data/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -Full versions of the schema will be inserted here. - -python -c "import qcschema, json; print(json.dumps(qcschema.get_schema('output', 'dev')))" -""" diff --git a/qcschema/data/v1/__init__.py b/qcschema/data/v1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/qcschema/data/v1/qc_schema_input.schema b/qcschema/data/v1/qc_schema_input.schema deleted file mode 100644 index f5c3db2..0000000 --- a/qcschema/data/v1/qc_schema_input.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_input", "version": 1, "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]}, "schema_name": {"type": "string", "pattern": "\\W*(qc_schema_input)\\W*"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"type": "string"}, "basis_spec": {"$ref": "#/definitions/basis_spec"}}, "required": ["method"], "oneOf": [{"required": ["basis"]}, {"required": ["basis_spec"]}], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise.", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator"], "description": "A short provenance of the object.", "additionalProperties": true}, "basis_electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["shell_angular_momentum", "shell_exponents", "shell_coefficients"], "properties": {"shell_region": {"description": "The region this shell describes", "type": "string", "enum": ["valence", "polarization", "core", "tight", "diffuse"]}, "shell_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "shell_exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "shell_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["potential_ecp_type", "potential_angular_momentum", "potential_r_exponents", "potential_gaussian_exponents", "potential_coefficients"], "properties": {"potential_ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "potential_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "potential_r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "potential_gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "potential_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_single_data": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"element_electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_electron_shell"}}, "element_ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "element_ecp": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_ecp_potential"}}}}, "basis_spec": {"description": "Specification for a basis applied to a molecule", "type": "object", "additionalProperties": false, "properties": {"basis_set_description": {"description": "Brief description of the basis set", "type": "string"}, "basis_function_type": {"description": "Type of function for this basis", "type": "string", "enum": ["gto", "sto"]}, "basis_harmonic_type": {"description": "Harmonic type (spherical, cartesian)", "type": "string", "enum": ["spherical", "cartesian"]}, "basis_set_elements": {"description": "Per-element basis data", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}, "basis_set_atoms": {"description": "Basis set overrides for particular atoms or centers", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}}}}} \ No newline at end of file diff --git a/qcschema/data/v1/qc_schema_molecule.schema b/qcschema/data/v1/qc_schema_molecule.schema deleted file mode 100644 index ef57893..0000000 --- a/qcschema/data/v1/qc_schema_molecule.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]} \ No newline at end of file diff --git a/qcschema/data/v1/qc_schema_output.schema b/qcschema/data/v1/qc_schema_output.schema deleted file mode 100644 index d70c3bb..0000000 --- a/qcschema/data/v1/qc_schema_output.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_output", "version": 1, "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]}, "schema_name": {"type": "string", "pattern": "\\W*(qc_schema_output)\\W*"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"type": "string"}, "basis_spec": {"$ref": "#/definitions/basis_spec"}}, "required": ["method"], "oneOf": [{"required": ["basis"]}, {"required": ["basis_spec"]}], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}, "properties": {"type": "object", "properties": {"scf_one_electron_energy": {"description": "The one-electron (core Hamiltonina) energy contribution to the total SCF energy.", "type": "number"}, "scf_two_electron_energy": {"type": "number", "description": "The two-electron energy contribution to the total SCF energy."}, "nuclear_repulsion_energy": {"type": "number", "description": "\nThe nuclear repulsion energy contribution to the total SCF energy.\n"}, "scf_vv10_energy": {"type": "number", "description": "The VV10 functional energy contribution to the total SCF energy."}, "scf_xc_energy": {"type": "number", "description": "The functional energy contribution to the total SCF energy."}, "scf_dispersion_correction_energy": {"type": "number", "description": "\nThe dispersion correction appended to an underlying functional\nwhen a DFT-D method is requested.\n"}, "scf_dipole_moment": {"type": "array", "description": "The X, Y, and Z dipole components.", "items": {"type": "number"}}, "scf_total_energy": {"type": "number", "description": "\nThe total electronic energy of the SCF stage of the calculation.\nThis is represented as the sum of the ... quantities.\n"}, "scf_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of SCF iterations taken before convergence."}, "mp2_same_spin_correlation_energy": {"type": "number", "description": "The unscaled portion of the MP2 correlation energy from same-spin or triplet doubles correlations."}, "mp2_opposite_spin_correlation_energy": {"type": "number", "description": "The unscaled portion of the MP2 correlation energy from opposite-spin or singlet doubles correlations."}, "mp2_singles_energy": {"type": "number", "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF."}, "mp2_doubles_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_total_correlation_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_total_energy": {"type": "number", "description": "The total MP2 energy (MP2 correlatin energy + HF energy)."}, "calcinfo_nbasis": {"type": "number", "multipleOf": 1.0, "description": "The number of basis functions for the computation."}, "calcinfo_nmo": {"type": "number", "multipleOf": 1.0, "description": "The number of molecular orbitals for the computation."}, "calcinfo_nalpha": {"type": "number", "multipleOf": 1.0, "description": "The number of alpha electrons in the computation."}, "calcinfo_nbeta": {"type": "number", "multipleOf": 1.0, "description": "The number of beta electrons in the computation."}, "calcinfo_natom": {"type": "number", "multipleOf": 1.0, "description": "The number of atoms in the computation."}, "return_energy": {"type": "number", "description": "The energy of the requested method, idential to `return_value` for energy computations."}}, "description": "The resulting properties of a computation", "additionalProperties": false}, "success": {"type": "boolean"}, "error": {"definition": "The type and description of error raised.", "type": "object", "$ref": "#/definitions/error"}, "return_result": {"definition": "The primary specified return of the requested computation.", "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model", "provenance", "properties", "success", "return_result"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise.", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator"], "description": "A short provenance of the object.", "additionalProperties": true}, "basis_electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["shell_angular_momentum", "shell_exponents", "shell_coefficients"], "properties": {"shell_region": {"description": "The region this shell describes", "type": "string", "enum": ["valence", "polarization", "core", "tight", "diffuse"]}, "shell_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "shell_exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "shell_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["potential_ecp_type", "potential_angular_momentum", "potential_r_exponents", "potential_gaussian_exponents", "potential_coefficients"], "properties": {"potential_ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "potential_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "potential_r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "potential_gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "potential_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_single_data": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"element_electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_electron_shell"}}, "element_ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "element_ecp": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_ecp_potential"}}}}, "basis_spec": {"description": "Specification for a basis applied to a molecule", "type": "object", "additionalProperties": false, "properties": {"basis_set_description": {"description": "Brief description of the basis set", "type": "string"}, "basis_function_type": {"description": "Type of function for this basis", "type": "string", "enum": ["gto", "sto"]}, "basis_harmonic_type": {"description": "Harmonic type (spherical, cartesian)", "type": "string", "enum": ["spherical", "cartesian"]}, "basis_set_elements": {"description": "Per-element basis data", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}, "basis_set_atoms": {"description": "Basis set overrides for particular atoms or centers", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}}}}} \ No newline at end of file diff --git a/qcschema/data/v2/__init__.py b/qcschema/data/v2/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/qcschema/data/v2/qc_schema_input.schema b/qcschema/data/v2/qc_schema_input.schema deleted file mode 100644 index 4fe12d9..0000000 --- a/qcschema/data/v2/qc_schema_input.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_input", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": "2.dev", "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"schema_name": {"guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", "type": "string", "pattern": "^(qcschema_molecule)$"}, "schema_version": {"type": "integer"}, "symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "atomic_numbers": {"description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "mass_numbers": {"description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "atom_labels": {"description": "(nat, ) atom labels with any user tagging information.", "type": "array", "items": {"type": "string"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "guidance": "Bonds may be freely reordered and inverted.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": [{"description": "Atom number (0-indexed) at one end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Atom number (0-indexed) at other end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Bond order.", "type": "number", "minimum": 0, "maximum": 5}]}}, "fragments": {"description": "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", "type": "boolean", "default": false}, "fix_symmetry": {"description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", "type": "string"}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry", "schema_name", "schema_version"]}, "schema_name": {"type": "string", "pattern": "^(qc_?schema_input)$"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"anyOf": [{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_basis", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Basis Set Schema", "type": "object", "required": ["center_data", "atom_map", "name"], "additionalProperties": false, "properties": {"schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, "schema_version": {"type": "integer"}, "name": {"description": "Name of the basis set", "type": "string"}, "description": {"description": "Brief description of the basis set", "type": "string"}, "center_data": {"description": "Shared basis data for all atoms/centers in the molecule", "type": "object", "additionalProperties": {"$ref": "#/definitions/center_basis"}}, "atom_map": {"description": "Mapping of all atoms/centers in the molecule to data in center_data", "type": "array", "items": {"type": "string"}}}}, {"description": "Name of the basis set to apply to the whole molecule", "type": "string"}]}}, "required": ["method", "basis"], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise. Suggest that versions be interpretable by PEP 440 (https://www.python.org/dev/peps/pep-0440/).", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator", "version", "routine"], "description": "A short provenance of the object.", "additionalProperties": true}, "electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["angular_momentum", "harmonic_type", "exponents", "coefficients"], "properties": {"angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "harmonic_type": {"description": "Whether this shell is spherical or cartesian", "type": "string", "enum": ["spherical", "cartesian"]}, "exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["ecp_type", "angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"], "properties": {"ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this potential", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "center_basis": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/electron_shell"}}, "ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "ecp_potentials": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/ecp_potential"}}}}}} diff --git a/qcschema/data/v2/qc_schema_molecule.schema b/qcschema/data/v2/qc_schema_molecule.schema deleted file mode 100644 index 891b131..0000000 --- a/qcschema/data/v2/qc_schema_molecule.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": "2.dev", "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"schema_name": {"guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", "type": "string", "pattern": "^(qcschema_molecule)$"}, "schema_version": {"type": "integer"}, "symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "atomic_numbers": {"description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "mass_numbers": {"description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "atom_labels": {"description": "(nat, ) atom labels with any user tagging information.", "type": "array", "items": {"type": "string"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "guidance": "Bonds may be freely reordered and inverted.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": [{"description": "Atom number (0-indexed) at one end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Atom number (0-indexed) at other end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Bond order.", "type": "number", "minimum": 0, "maximum": 5}]}}, "fragments": {"description": "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", "type": "boolean", "default": false}, "fix_symmetry": {"description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", "type": "string"}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry", "schema_name", "schema_version"]} diff --git a/qcschema/data/v2/qc_schema_output.schema b/qcschema/data/v2/qc_schema_output.schema deleted file mode 100644 index a0ca2cc..0000000 --- a/qcschema/data/v2/qc_schema_output.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_output", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": "2.dev", "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"schema_name": {"guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", "type": "string", "pattern": "^(qcschema_molecule)$"}, "schema_version": {"type": "integer"}, "symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "atomic_numbers": {"description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "mass_numbers": {"description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "atom_labels": {"description": "(nat, ) atom labels with any user tagging information.", "type": "array", "items": {"type": "string"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "guidance": "Bonds may be freely reordered and inverted.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": [{"description": "Atom number (0-indexed) at one end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Atom number (0-indexed) at other end of bond.", "type": "number", "multipleOf": 1.0}, {"description": "Bond order.", "type": "number", "minimum": 0, "maximum": 5}]}}, "fragments": {"description": "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", "type": "boolean", "default": false}, "fix_symmetry": {"description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", "type": "string"}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry", "schema_name", "schema_version"]}, "schema_name": {"type": "string", "pattern": "^(qc_?schema_output)$"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"anyOf": [{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_basis", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Basis Set Schema", "type": "object", "required": ["center_data", "atom_map", "name"], "additionalProperties": false, "properties": {"schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, "schema_version": {"type": "integer"}, "name": {"description": "Name of the basis set", "type": "string"}, "description": {"description": "Brief description of the basis set", "type": "string"}, "center_data": {"description": "Shared basis data for all atoms/centers in the molecule", "type": "object", "additionalProperties": {"$ref": "#/definitions/center_basis"}}, "atom_map": {"description": "Mapping of all atoms/centers in the molecule to data in center_data", "type": "array", "items": {"type": "string"}}}}, {"description": "Name of the basis set to apply to the whole molecule", "type": "string"}]}}, "required": ["method", "basis"], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}, "properties": {"type": "object", "properties": {"scf_one_electron_energy": {"description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", "type": "number"}, "scf_two_electron_energy": {"type": "number", "description": "The two-electron energy contribution to the total SCF energy."}, "nuclear_repulsion_energy": {"type": "number", "description": "\nThe nuclear repulsion energy contribution to the total SCF energy.\n"}, "scf_vv10_energy": {"type": "number", "description": "The VV10 functional energy contribution to the total SCF energy."}, "scf_xc_energy": {"type": "number", "description": "The functional energy contribution to the total SCF energy."}, "scf_dispersion_correction_energy": {"type": "number", "description": "\nThe dispersion correction appended to an underlying functional\nwhen a DFT-D method is requested.\n"}, "scf_dipole_moment": {"type": "array", "description": "The X, Y, and Z dipole components.", "items": {"type": "number"}}, "scf_total_energy": {"type": "number", "description": "\nThe total electronic energy of the SCF stage of the calculation.\nThis is represented as the sum of the ... quantities.\n"}, "scf_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of SCF iterations taken before convergence."}, "mp2_same_spin_correlation_energy": {"type": "number", "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling."}, "mp2_opposite_spin_correlation_energy": {"type": "number", "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling."}, "mp2_singles_energy": {"type": "number", "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF."}, "mp2_doubles_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_correlation_energy": {"type": "number", "description": "The MP2 correlation energy."}, "mp2_total_energy": {"type": "number", "description": "The total MP2 energy (MP2 correlation energy + HF energy)."}, "mp2_dipole_moment": {"type": "array", "description": "The MP2 X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsd_same_spin_correlation_energy": {"type": "number", "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling."}, "ccsd_opposite_spin_correlation_energy": {"type": "number", "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling."}, "ccsd_singles_energy": {"type": "number", "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF."}, "ccsd_doubles_energy": {"type": "number", "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations."}, "ccsd_correlation_energy": {"type": "number", "description": "The CCSD correlation energy."}, "ccsd_total_energy": {"type": "number", "description": "The total CCSD energy (CCSD correlation energy + HF energy)."}, "ccsd_prt_pr_correlation_energy": {"type": "number", "description": "The CCSD(T) correlation energy."}, "ccsd_prt_pr_total_energy": {"type": "number", "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy)."}, "ccsdt_correlation_energy": {"type": "number", "description": "The CCSDT correlation energy."}, "ccsdt_total_energy": {"type": "number", "description": "The total CCSDT energy (CCSDT correlation energy + HF energy)."}, "ccsdtq_correlation_energy": {"type": "number", "description": "The CCSDTQ correlation energy."}, "ccsdtq_total_energy": {"type": "number", "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy)."}, "ccsd_dipole_moment": {"type": "array", "description": "The CCSD X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsd_prt_pr_dipole_moment": {"type": "array", "description": "The CCSD(T) X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsdt_dipole_moment": {"type": "array", "description": "The CCSDT X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsdtq_dipole_moment": {"type": "array", "description": "The CCSDTQ X, Y, and Z dipole components.", "items": {"type": "number"}}, "ccsd_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of CCSD iterations taken before convergence."}, "ccsdt_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of CCSDT iterations taken before convergence."}, "ccsdtq_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of CCSDTQ iterations taken before convergence."}, "calcinfo_nbasis": {"type": "number", "multipleOf": 1.0, "description": "The number of basis functions for the computation."}, "calcinfo_nmo": {"type": "number", "multipleOf": 1.0, "description": "The number of molecular orbitals for the computation."}, "calcinfo_nalpha": {"type": "number", "multipleOf": 1.0, "description": "The number of alpha electrons in the computation."}, "calcinfo_nbeta": {"type": "number", "multipleOf": 1.0, "description": "The number of beta electrons in the computation."}, "calcinfo_natom": {"type": "number", "multipleOf": 1.0, "description": "The number of atoms in the computation."}, "return_energy": {"type": "number", "description": "The energy of the requested method, identical to `return_value` for energy computations."}}, "description": "The resulting properties of a computation", "additionalProperties": false}, "success": {"type": "boolean"}, "error": {"definition": "The type and description of error raised.", "type": "object", "$ref": "#/definitions/error"}, "return_result": {"definition": "The primary specified return of the requested computation.", "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}]}, "wavefunction": {"type": "object", "properties": {"basis": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_basis", "version": "1.dev", "description": "The MolSSI Quantum Chemistry Basis Set Schema", "type": "object", "required": ["center_data", "atom_map", "name"], "additionalProperties": false, "properties": {"schema_name": {"type": "string", "pattern": "^(qcschema_basis)$"}, "schema_version": {"type": "integer"}, "name": {"description": "Name of the basis set", "type": "string"}, "description": {"description": "Brief description of the basis set", "type": "string"}, "center_data": {"description": "Shared basis data for all atoms/centers in the molecule", "type": "object", "additionalProperties": {"$ref": "#/definitions/center_basis"}}, "atom_map": {"description": "Mapping of all atoms/centers in the molecule to data in center_data", "type": "array", "items": {"type": "string"}}}}, "orbitals_a": {"type": "string", "description": "Alpha-spin orbitals in the AO basis of the primary return. "}, "orbitals_b": {"type": "string", "description": "Beta-spin orbitals in the AO basis of the primary return."}, "density_a": {"type": "string", "description": "Alpha-spin density in the AO basis of the primary return."}, "density_b": {"type": "string", "description": "Beta-spin density in the AO basis of the primary return."}, "fock_a": {"type": "string", "description": "Alpha-spin Fock matrix in the AO basis of the primary return."}, "fock_b": {"type": "string", "description": "Beta-spin Fock matrix in the AO basis of the primary return."}, "eigenvalues_a": {"type": "string", "description": "Alpha-spin orbital eigenvalues of the primary return."}, "eigenvalues_b": {"type": "string", "description": "Beta-spin orbital eigenvalues of the primary return."}, "occupations_a": {"type": "string", "description": "Alpha-spin orbital occupations of the primary return."}, "occupations_b": {"type": "string", "description": "Beta-spin orbital occupations of the primary return."}, "scf_orbitals_a": {"type": "array", "description": "SCF alpha-spin orbitals in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "scf_orbitals_b": {"type": "array", "description": "SCF beta-spin orbitals in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "scf_density_a": {"type": "array", "description": "SCF alpha-spin density in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_density_b": {"type": "array", "description": "SCF beta-spin density in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_fock_a": {"type": "array", "description": "SCF alpha-spin Fock matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_fock_b": {"type": "array", "description": "SCF beta-spin Fock matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_coulomb_a": {"type": "array", "description": "SCF alpha-spin Coulomb matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_coulomb_b": {"type": "array", "description": "SCF beta-spin Coulomb matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_exchange_a": {"type": "array", "description": "SCF alpha-spin exchange matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_exchange_b": {"type": "array", "description": "SCF beta-spin exchange matrix in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "scf_eigenvalues_a": {"type": "array", "description": "SCF alpha-spin orbital eigenvalues.", "items": {"type": "number"}, "shape": ["nmo"]}, "scf_eigenvalues_b": {"type": "array", "description": "SCF beta-spin orbital eigenvalues.", "items": {"type": "number"}, "shape": ["nmo"]}, "scf_occupations_a": {"type": "array", "description": "SCF alpha-spin orbital occupations.", "items": {"type": "number"}, "shape": ["nmo"]}, "scf_occupations_b": {"type": "array", "description": "SCF beta-spin orbital occupations.", "items": {"type": "number"}, "shape": ["nmo"]}, "localized_orbitals_a": {"type": "array", "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "localized_orbitals_b": {"type": "array", "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nao", "nmo"]}, "localized_fock_a": {"type": "array", "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nmo", "nmo"]}, "localized_fock_b": {"type": "array", "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", "items": {"type": "number"}, "shape": ["nmo", "nmo"]}, "h_core_a": {"type": "array", "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "h_core_b": {"type": "array", "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "h_effective_a": {"type": "array", "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}, "h_effective_b": {"type": "array", "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis.", "items": {"type": "number"}, "shape": ["nao", "nao"]}}, "description": "Wavefunction properties resulting from a computation.Matrix quantities are stored in column-major order.", "additionalProperties": false, "required": ["basis"]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model", "provenance", "properties", "success", "return_result"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise. Suggest that versions be interpretable by PEP 440 (https://www.python.org/dev/peps/pep-0440/).", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator", "version", "routine"], "description": "A short provenance of the object.", "additionalProperties": true}, "electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["angular_momentum", "harmonic_type", "exponents", "coefficients"], "properties": {"angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "harmonic_type": {"description": "Whether this shell is spherical or cartesian", "type": "string", "enum": ["spherical", "cartesian"]}, "exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["ecp_type", "angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"], "properties": {"ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "coefficients": {"description": "General contraction coefficients for this potential", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "center_basis": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/electron_shell"}}, "ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "ecp_potentials": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/ecp_potential"}}}}}} diff --git a/qcschema/dev/__init__.py b/qcschema/dev/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/qcschema/dev/basis.py b/qcschema/dev/basis.py deleted file mode 100644 index cb9b3f6..0000000 --- a/qcschema/dev/basis.py +++ /dev/null @@ -1,48 +0,0 @@ -""" -The json-schema for the Basis Set definition -""" - -basis = { - "$schema": "http://json-schema.org/draft-04/schema#", - "name": "qcschema_basis", - "version": "1.dev", - "description": "The MolSSI Quantum Chemistry Basis Set Schema", - "type": "object", - "required": [ - "center_data", - "atom_map", - "name" - ], - "additionalProperties": False, - "properties": { - "schema_name": { - "type": "string", - "pattern": "^(qcschema_basis)$" - }, - "schema_version": { - "type": "integer" - }, - "name": { - "description": "Name of the basis set", - "type": "string" - }, - "description": { - "description": "Brief description of the basis set", - "type": "string" - }, - "center_data": { - "description": "Shared basis data for all atoms/centers in the molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/center_basis" - } - }, - "atom_map": { - "description": "Mapping of all atoms/centers in the molecule to data in center_data", - "type": "array", - "items": { - "type": "string" - } - } - } -} diff --git a/qcschema/dev/definitions.py b/qcschema/dev/definitions.py deleted file mode 100644 index 25c69f2..0000000 --- a/qcschema/dev/definitions.py +++ /dev/null @@ -1,176 +0,0 @@ -""" -A list of definitions involved in the JSON schema. -""" - -definitions = {} - -definitions["error"] = { - "properties": { - "error_type": { - "description": "The type of error raised.", - "enum": ["convergence_error", "file_error", "memory_error"] - }, - "error_message": { - "description": "A description of the raised error.", - "type": "string" - } - }, - "required": ["error_type", "error_message"], - "description": "The type of error message raised.", - "additionalProperties": False -} - -definitions["provenance"] = { - "properties": { - "creator": { - "description": "The name of the person or program who created this object.", - "type": "string" - }, - "version": { - "description": "The version of the program which created this object, blank otherwise. Suggest that versions be interpretable by PEP 440 (https://www.python.org/dev/peps/pep-0440/).", - "type": "string" - }, - "routine": { - "description": "The routine of the program which created this object, blank otherwise.", - "type": "string" - } - }, - "required": ["creator", "version", "routine"], - "description": "A short provenance of the object.", - "additionalProperties": True -} - -definitions["electron_shell"] = { - "description": "Information for a single electronic shell", - "additionalProperties": False, - "required": [ - "angular_momentum", - "harmonic_type", - "exponents", - "coefficients" - ], - "properties": { - "angular_momentum": { - "description": "Angular momentum (as an array of integers)", - "type": "array", - "minItems": 1, - "uniqueItems": True, - "items": { - "type": "integer", - "minimum": 0 - } - }, - "harmonic_type": { - "description": "Whether this shell is spherical or cartesian", - "type": "string", - "enum": ["spherical", "cartesian"] - }, - "exponents": { - "description": "Exponents for this contracted shell", - "type": "array", - "minItems": 1, - "items": { - "type": "string" - } - }, - "coefficients": { - "description": "General contraction coefficients for this contracted shell", - "type": "array", - "minItems": 1, - "items": { - "description": "Segmented contraction coefficients", - "type": "array", - "minItems": 1, - "items": {"type": "string"} - } - } - } -} - -definitions["ecp_potential"] = { - "description": "ECP potential", - "additionalProperties": False, - "required": [ - "ecp_type", - "angular_momentum", - "r_exponents", - "gaussian_exponents", - "coefficients" - ], - "properties": { - "ecp_type": { - "description": "Type of the ECP Potential", - "type": "string", - "enum": [ "scalar", "spinorbit" ] - }, - "angular_momentum": { - "description": "Angular momentum (as an array of integers)", - "type": "array", - "minItems": 1, - "uniqueItems": True, - "items": { - "type": "integer", - "minimum": 0 - } - }, - "r_exponents": { - "description": "Exponents of the r term", - "type": "array", - "minItems": 1, - "items": { - "type": "integer" - } - }, - "gaussian_exponents": { - "description": "Exponents of the gaussian term", - "type": "array", - "minItems": 1, - "items": { - "type": "string" - } - }, - "coefficients": { - "description": "General contraction coefficients for this potential", - "type": "array", - "minItems": 1, - "items": { - "description": "Segmented contraction coefficients", - "type": "array", - "minItems": 1, - "items": { "type": "string" } - } - } - } -} - -definitions["center_basis"] = { - "description": "Data for a single atom/center in the basis set", - "type": "object", - "additionalProperties": False, - "properties": { - "electron_shells": { - "description": "(Electronic) shells for this element", - "type": "array", - "minItems": 1, - "uniqueItems": True, - "items": { - "$ref": "#/definitions/electron_shell" - } - }, - "ecp_electrons": - { - "description": "Number of electrons replaced by ECP", - "type": "integer", - "minimum": 1 - }, - "ecp_potentials": { - "description": "Effective Core Potential for this element", - "type": "array", - "minItems": 1, - "uniqueItems": True, - "items": { - "$ref": "#/definitions/ecp_potential" - } - } - } -} diff --git a/qcschema/dev/dev_schema.py b/qcschema/dev/dev_schema.py deleted file mode 100644 index 026912d..0000000 --- a/qcschema/dev/dev_schema.py +++ /dev/null @@ -1,112 +0,0 @@ -""" -Integrates all components of the QC Schema into a single one. -""" - -import copy - -from . import basis, definitions, molecule, properties, wavefunction - -# The base schema definition -base_schema = { - "$schema": "http://json-schema.org/draft-04/schema#", - "name": "qcschema_input", - "version": "1.dev", - "description": "The MolSSI Quantum Chemistry Schema", - "type": "object", - "properties": { - "molecule": molecule.molecule, - "schema_name": { - "type": "string", - "pattern": "^(qc_?schema)$" - }, - "schema_version": { - "type": "integer" - }, - "driver": { - "definition": "The type of computation requested", - "enum": ["energy", "gradient", "hessian"] - }, - "model": { - "definition": "The method and basis specification requested", - "properties": { - "method": { - "type": "string" - }, - "basis": { - "anyOf": [ - basis.basis, - { - "description": "Name of the basis set to apply to the whole molecule", - "type": "string" - }, - ] - } - }, - "required": [ "method", "basis" ], - "description": "The quantum chemistry model to be run." - }, - "keywords": { - "type": "object", - "description": "Program specific parameters to be used." - }, - "provenance": { - "anyOf": [{ - "type": "object", - "$ref": "#/definitions/provenance" - }, { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/provenance" - } - }] - } - }, - "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], - "definitions": definitions.definitions -} - -# Additional properties to contain in the output -output_properties = { - "properties": properties.properties, - "success": { - "type": "boolean" - }, - "error": { - "definition": "The type and description of error raised.", - "type": "object", - "$ref": "#/definitions/error" - }, - "return_result": { - "definition": "The primary specified return of the requested computation.", - "anyOf": [{ - "type": "number" - }, { - "type": "array", - "items": {"type": "number"} - }] - } -} - -# Snapshot the input dev schema -input_dev_schema = copy.deepcopy(base_schema) -input_dev_schema["name"] = "qcschema_input" -input_dev_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_input)$" - -# Snapshot the input dev schema -output_dev_schema = copy.deepcopy(base_schema) -output_dev_schema["name"] = "qcschema_output" -output_dev_schema["properties"].update(output_properties) -output_dev_schema["properties"]["wavefunction"] = wavefunction.output_wavefunction -output_dev_schema["required"].extend(["provenance", "properties", "success", "return_result"]) -output_dev_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_output)$" - -# Build out the molecule schema -molecule_dev_schema = copy.deepcopy(molecule.molecule) - -# Build out the basis schema -basis_dev_schema = copy.deepcopy(basis.basis) - -#import json -#print(json.dumps(input_dev_schema, indent=2)) -#print(json.dumps(output_dev_schema, indent=2)) diff --git a/qcschema/dev/molecule.py b/qcschema/dev/molecule.py deleted file mode 100644 index 30bca8f..0000000 --- a/qcschema/dev/molecule.py +++ /dev/null @@ -1,169 +0,0 @@ -""" -The json-schema for the Molecule definition -""" -molecule = { - "$schema": "http://json-schema.org/draft-04/schema#", - "name": "qcschema_molecule", - "version": "2.dev", - "description": "The MolSSI Quantum Chemistry Molecular Schema", - "type": "object", - "properties": { - "schema_name": { - "guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2", - "type": "string", - "pattern": "^(qcschema_molecule)$" - }, - "schema_version": { - "type": "integer" - }, - "symbols": { - "description": "(nat, ) atom symbols in title case.", - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.", - "guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).", - "type": "array", - "items": { - "type": "number" - } - }, - "masses": { - "description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", - "type": "array", - "items": { - "type": "number" - } - }, - "atomic_numbers": { - "description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.", - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "mass_numbers": { - "description": "(nat, ) mass numbers for atoms, if known isotope, else -1.", - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "atom_labels": { - "description": "(nat, ) atom labels with any user tagging information.", - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "description": "The name of the molecule.", - "type": "string" - }, - "comment": { - "description": "Any additional comment one would attach to the molecule.", - "type": "string" - }, - "molecular_charge": { - "description": "The overall charge of the molecule.", - "type": "number", - "default": 0.0 - }, - "molecular_multiplicity": { - "description": "The overall multiplicity of the molecule.", - "type": "number", - "multipleOf": 1.0, - "default": 1 - }, - "real": { - "description": "(nat, ) list describing if atoms are real (T) or ghost (F).", - "type": "array", - "items": { - "type": "boolean" - } - }, - "connectivity": { - "description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", - "guidance": "Bonds may be freely reordered and inverted.", - "type": "array", - "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "description": "Atom number (0-indexed) at one end of bond.", - "type": "number", - "multipleOf": 1.0 - }, - { - "description": "Atom number (0-indexed) at other end of bond.", - "type": "number", - "multipleOf": 1.0 - }, - { - "description": "Bond order.", - "type": "number", - "minimum": 0, - "maximum": 5, - } - ] - } - }, - "fragments": { - "description": - "(nfr, ) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", - "guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "description": "(nfr, ) list of charges associated with each fragment tuple.", - "type": "array", - "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "description": "(nfr, ) list of multiplicities associated with each fragment tuple.", - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "fix_com": { - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", - "guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "type": "boolean", - "default": False - }, - "fix_orientation": { - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", - "guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "type": "boolean", - "default": False - }, - "fix_symmetry":{ - "description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", - "type": "string" - }, - "provenance": { - "type": "object", - "$ref": "#/definitions/provenance" - } - }, - "required": ["symbols", "geometry", "schema_name", "schema_version"], - "description": "The physical cartesian representation of the molecular system" -} diff --git a/qcschema/dev/properties/__init__.py b/qcschema/dev/properties/__init__.py deleted file mode 100644 index a55f7c3..0000000 --- a/qcschema/dev/properties/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .properties_base import properties diff --git a/qcschema/dev/properties/calcinfo_properties.py b/qcschema/dev/properties/calcinfo_properties.py deleted file mode 100644 index f0fe5ab..0000000 --- a/qcschema/dev/properties/calcinfo_properties.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -The complete list of the general computation properties. -""" - -calcinfo_properties = {} - -calcinfo_properties["calcinfo_nbasis"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of basis functions for the computation." -} - -calcinfo_properties["calcinfo_nmo"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of molecular orbitals for the computation." -} - -calcinfo_properties["calcinfo_nalpha"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of alpha electrons in the computation." -} - -calcinfo_properties["calcinfo_nbeta"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of beta electrons in the computation." -} - -calcinfo_properties["calcinfo_natom"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of atoms in the computation." -} - -calcinfo_properties["return_energy"] = { - "type": "number", - "description": "The energy of the requested method, identical to `return_value` for energy computations." -} diff --git a/qcschema/dev/properties/cc_properties.py b/qcschema/dev/properties/cc_properties.py deleted file mode 100644 index f1e73a0..0000000 --- a/qcschema/dev/properties/cc_properties.py +++ /dev/null @@ -1,137 +0,0 @@ -""" -The complete list of Coupled-Cluster properties. -""" - -cc_properties = {} - -cc_properties["ccsd_same_spin_correlation_energy"] = { - "type": - "number", - "description": - "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling." -} - -cc_properties["ccsd_opposite_spin_correlation_energy"] = { - "type": - "number", - "description": - "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling." -} - -cc_properties["ccsd_singles_energy"] = { - "type": "number", - "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF." -} - -cc_properties["ccsd_doubles_energy"] = { - "type": - "number", - "description": - "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations." -} - -cc_properties['ccsd_correlation_energy'] = { - "type": - "number", - "description": - "The CCSD correlation energy." -} - -cc_properties['ccsd_total_energy'] = { - "type": - "number", - "description": - "The total CCSD energy (CCSD correlation energy + HF energy)." -} - -cc_properties['ccsd_prt_pr_correlation_energy'] = { - "type": - "number", - "description": - "The CCSD(T) correlation energy." -} - -cc_properties['ccsd_prt_pr_total_energy'] = { - "type": - "number", - "description": - "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy)." -} - -cc_properties['ccsdt_correlation_energy'] = { - "type": - "number", - "description": - "The CCSDT correlation energy." -} - -cc_properties['ccsdt_total_energy'] = { - "type": - "number", - "description": - "The total CCSDT energy (CCSDT correlation energy + HF energy)." -} - -cc_properties['ccsdtq_correlation_energy'] = { - "type": - "number", - "description": - "The CCSDTQ correlation energy." -} - -cc_properties['ccsdtq_total_energy'] = { - "type": - "number", - "description": - "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy)." -} - -cc_properties["ccsd_dipole_moment"] = { - "type": "array", - "description": "The CCSD X, Y, and Z dipole components.", - "items": { - "type": "number" - } -} - -cc_properties["ccsd_prt_pr_dipole_moment"] = { - "type": "array", - "description": "The CCSD(T) X, Y, and Z dipole components.", - "items": { - "type": "number" - } -} - -cc_properties["ccsdt_dipole_moment"] = { - "type": "array", - "description": "The CCSDT X, Y, and Z dipole components.", - "items": { - "type": "number" - } -} - -cc_properties["ccsdtq_dipole_moment"] = { - "type": "array", - "description": "The CCSDTQ X, Y, and Z dipole components.", - "items": { - "type": "number" - } -} - -cc_properties["ccsd_iterations"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of CCSD iterations taken before convergence." -} - -cc_properties["ccsdt_iterations"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of CCSDT iterations taken before convergence." -} - -cc_properties["ccsdtq_iterations"] = { - "type": "number", - "multipleOf": 1.0, - "description": "The number of CCSDTQ iterations taken before convergence." -} diff --git a/qcschema/dev/properties/mp_properties.py b/qcschema/dev/properties/mp_properties.py deleted file mode 100644 index 52abd41..0000000 --- a/qcschema/dev/properties/mp_properties.py +++ /dev/null @@ -1,53 +0,0 @@ -""" -The complete list of Moller-Plesset properties. -""" - -mp_properties = {} - -mp_properties["mp2_same_spin_correlation_energy"] = { - "type": - "number", - "description": - "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling." -} - -mp_properties["mp2_opposite_spin_correlation_energy"] = { - "type": - "number", - "description": - "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling." -} - -mp_properties["mp2_singles_energy"] = { - "type": "number", - "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF." -} - -mp_properties["mp2_doubles_energy"] = { - "type": - "number", - "description": - "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations." -} - -mp_properties['mp2_correlation_energy'] = { - "type": - "number", - "description": - "The MP2 correlation energy." -} - -mp_properties['mp2_total_energy'] = { - "type": - "number", - "description": - "The total MP2 energy (MP2 correlation energy + HF energy)." -} - -mp_properties["mp2_dipole_moment"] = { - "type": "array", - "description": "The MP2 X, Y, and Z dipole components.", - "items": { - "type": "number" - } -} diff --git a/qcschema/dev/properties/properties_base.py b/qcschema/dev/properties/properties_base.py deleted file mode 100644 index 43dda33..0000000 --- a/qcschema/dev/properties/properties_base.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -The base file for QC Schema properties. -""" - -from .calcinfo_properties import calcinfo_properties -from .cc_properties import cc_properties -from .mp_properties import mp_properties -from .scf_properties import scf_properties - -properties = { - "type": "object", - "properties": {}, - "description": "The resulting properties of a computation", - "additionalProperties": False -} - -# Update new keys -properties["properties"].update(scf_properties) -properties["properties"].update(mp_properties) -properties["properties"].update(cc_properties) -properties["properties"].update(calcinfo_properties) diff --git a/qcschema/dev/properties/scf_properties.py b/qcschema/dev/properties/scf_properties.py deleted file mode 100644 index b05891f..0000000 --- a/qcschema/dev/properties/scf_properties.py +++ /dev/null @@ -1,69 +0,0 @@ -""" -The complete list of SCF level properties. -""" - -scf_properties = {} - -scf_properties["scf_one_electron_energy"] = { - "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", - "type": "number" -} - -scf_properties["scf_two_electron_energy"] = { - "type": "number", - "description": "The two-electron energy contribution to the total SCF energy." -} - -scf_properties["nuclear_repulsion_energy"] = { - "type": - "number", - "description": - r""" -The nuclear repulsion energy contribution to the total SCF energy. -""" -# .. math:: E_{NN} = \sum_{i, j v1.5, 1_5 -> 1.5). + + Args: + dir_name: Directory name to parse + + Returns: + Normalized version string + """ + + # dots as underscores + return dir_name.replace("_", ".") + -try: - from pathlib import Path -except ImportError: - from pathlib2 import Path +def _scan_version_directories(): + """ + Scan qcschema/ directory for version directories with schemas/ subdirectory. + + Returns: + List of (version_string, version_dir_path) tuples, sorted by version + """ + base_path = Path(__file__).parent + versions = [] + for dir_entry in sorted(base_path.iterdir()): + if not dir_entry.is_dir(): + continue -_data_path = Path(__file__).parent.resolve() / "data" + schemas_dir = dir_entry / "schemas" + if not schemas_dir.exists(): + continue -_aliases = { - "input": ["input", "AtomicInput"], - "output": ["output", "AtomicResult"], - "molecule": ["molecule", "topology", "Molecule"], - "basis": ["basis", "BasisSet"], - "properties": ["properties", "AtomicResultProperties"], - "provenance": ["provenance", "Provenance"], -} -_laliases = {k: [v2.lower() for v2 in v] for k, v in _aliases.items()} + version = _normalize_version_name(dir_entry.name) + versions.append((version, dir_entry)) -_versions_list = { - "input": [1, 2, "dev"], - "output": [1, 2, "dev"], - "molecule": [1, 2, "dev"], - "basis": ["dev"], - "properties": ["dev"], - "provenance": ["dev"], -} -_sversions_list = {k: [str(v2) for v2 in v] for k, v in _versions_list.items()} + return versions def list_versions(schema_type): """ - Lists all current JSON schema versions. + List all available versions for a given schema type. + + Scans qcschema/*/ directories for available schemas matching the type. + Supports aliases: input/AtomicInput, output/AtomicResult, molecule/Molecule, etc. + + Args: + schema_type: Schema type (input, output, molecule, basis, properties, provenance) + or an alias (AtomicInput, AtomicResult, Molecule, etc.) + + Returns: + List of available versions (e.g., [1, '1.5']) + + Raises: + KeyError: If schema_type is not found or no versions support it """ - for sk, aliases in _laliases.items(): - if schema_type.lower() in aliases: - return _versions_list[sk] + aliases = { + "input": ["input", "AtomicInput"], + "output": ["output", "AtomicResult"], + "molecule": ["molecule", "Molecule", "topology"], + "basis": ["basis", "BasisSet"], + "properties": ["properties", "AtomicResultProperties"], + "provenance": ["provenance", "Provenance"], + } + + laliases = {k: [v2.lower() for v2 in v] for k, v in aliases.items()} + + # Find which schema type we're looking for + schema_key = None + for key, aliases_list in laliases.items(): + if schema_type.lower() in aliases_list: + schema_key = key + break + + if schema_key is None: + raise KeyError(f"Schema type should be among {list(aliases.keys())} (+aliases), not '{schema_type}'.") - raise KeyError(f"Schema type should be among {list(_aliases.keys())} (+aliases), not '{schema_type}'.") + # Scan for available versions + versions = [] + for version, version_dir in _scan_version_directories(): + schemas_dir = version_dir / "schemas" + # Check if this version has schemas for our type + for schema_file in schemas_dir.glob("*.schema"): + schema_data = json.loads(schema_file.read_text()) + # Match by internal schema name or filename patterns + schema_name = schema_data.get("name", "").lower() + filename = schema_file.stem.lower() -def get_schema(schema_type, version="dev"): + if schema_key in schema_name or schema_key in filename or filename.endswith(schema_key): + if version not in versions: + versions.append(version) + + if not versions: + raise KeyError( + f"No versions found for schema type '{schema_type}'. Available directories: " + + ", ".join(v for v, _ in _scan_version_directories()) + ) + + return versions + + +def get_schema(schema_type, version="1.5"): """ - Returns the requested schema (input or output) for a given version number. + Load a schema for a given type and version. + + Loads from qcschema/{version}/schemas/ directory. Supports aliases for + schema types. + + Args: + schema_type: Schema type (input, output, molecule, basis, properties, provenance) + or an alias + version: Version (int or str, e.g., 1, "1", "1.5"). Defaults to "1.5". + + Returns: + Schema dictionary (parsed from JSON) + + Raises: + KeyError: If schema_type or version is not found + FileNotFoundError: If schema file is missing """ - # temporary - if version == "dev": - version = 2 - - for sk, aliases in _laliases.items(): - if schema_type.lower() in aliases: - if str(version) in _sversions_list[sk]: - if version == "dev" or int(version) > 2: - fname = _aliases[sk][-1] - else: # v1, v2 - fname = "qc_schema_" + sk - break - else: - raise KeyError(f"Schema version should be among {_versions_list[sk]}, not '{version}'.") - else: + aliases = { + "input": ["input", "AtomicInput"], + "output": ["output", "AtomicResult"], + "molecule": ["molecule", "Molecule", "topology"], + "basis": ["basis", "BasisSet"], + "properties": ["properties", "AtomicResultProperties"], + "provenance": ["provenance", "Provenance"], + } + + laliases = {k: [v2.lower() for v2 in v] for k, v in aliases.items()} + + # Find schema key + schema_key = None + for key, aliases_list in laliases.items(): + if schema_type.lower() in aliases_list: + schema_key = key + break + + if schema_key is None: + raise KeyError(f"Schema type should be among {list(aliases.keys())} (+aliases), not '{schema_type}'.") + + # Normalize version string (underscores to dots) + version_str = str(version).replace("_", ".") + + # Find the version directory (exact match only) + version_dir = None + for v, d in _scan_version_directories(): + if v == version_str: + version_dir = d + break + + if version_dir is None: raise KeyError( - f"Schema type should be among {list(_aliases.keys())} (+aliases), not '{schema_type}'." + f"Schema version '{version}' not found. Available versions: " + ", ".join(list_versions(schema_type)) ) - fpath = _data_path / ("v" + str(version)) / (fname + ".schema") - ret = json.loads(fpath.read_text()) + schemas_dir = version_dir / "schemas" + + # Find the schema file for this type + # Filenames are qc_schema_* + schema_file = schemas_dir / f"qc_schema_{schema_key}.schema" + + if not schema_file.exists(): + raise FileNotFoundError( + f"Schema file not found: {schema_file}. " + f"Available schemas in {schemas_dir}: {list(schemas_dir.glob('*.schema'))}" + ) - return ret + return json.loads(schema_file.read_text()) diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..80e9a14 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,125 @@ +""" +Pytest configuration for QCSchema test suite. + +Provides: +- Auto-skip logic for tests that don't apply to certain versions +- Graceful handling for optional qcelemental dependency +- Management of external pytest plugins +- Test environment setup + +Note: If you see "ModuleNotFoundError: No module named 'qcelemental.models._v1v2'" +from a pytest plugin, it means an external package (e.g., qcarchivetesting from +a local QCFractal checkout) has a pytest11 entry point that fails on import. +""" + +import pytest + +# Version support matrix: which test data applies to which versions +_UNSUPPORTED_TESTS = { + "v1": { + "CCSD": "CCSD properties not supported in v1 schema", + "MP2_output": "MP2 output properties not supported in v1 schema", + "631G": "Basis set objects not supported in v1 schema (string names only)", + "STO3G_DEF2": "Basis set objects not supported in v1 schema (string names only)", + "wavefunction": "Wavefunction feature not supported in v1", + }, + "v1.5": {}, +} + + +def pytest_runtest_setup(item): + """ + Auto-skip tests that don't apply to the version being tested. + + This hook runs before each test. If the test has 'version' and 'testfile' + parameters, we check if the test should be skipped for that combination. + """ + # Only process parametrized tests with version/testfile + if not hasattr(item, "callspec"): + return + + if "version" not in item.callspec.params or "testfile" not in item.callspec.params: + return + + version = item.callspec.params["version"] + testfile = item.callspec.params["testfile"] + filename = testfile.split("/")[-1] + + # Check unsupported tests for this version + if version in _UNSUPPORTED_TESTS: + for key, reason in _UNSUPPORTED_TESTS[version].items(): + if key in filename: + pytest.skip(reason) + return + + # Skip schema v3 data for all versions (not supported anywhere) + if "water_output_v3" in filename: + pytest.skip(f"{version} schema does not support schema_version 3 data") + + +def pytest_configure(config): + """ + Configure pytest at session start. + + Registers custom markers for optional dependencies and sets up + the test environment. Runs after plugins are loaded. + """ + config.addinivalue_line( + "markers", "requires_qcelemental: mark test as requiring qcelemental (skipped if unavailable)" + ) + + +def pytest_sessionstart(session): + """ + Initialize session and check optional dependency availability. + + Runs after plugin loading. If qcelemental import failed during plugin + loading, the test process will have already errored with ModuleNotFoundError + from an external pytest plugin. See _handle_qcelemental_import_error below. + """ + _check_qcelemental_availability() + + +def _check_qcelemental_availability(): + """Check if qcelemental is available in the current environment.""" + try: + import qcelemental # noqa: F401 + + return True + except ImportError: + return False + + +@pytest.fixture +def requires_qcelemental(): + """ + Fixture that skips the test if qcelemental is not available. + + Use this in tests that import or depend on qcelemental: + def test_something(requires_qcelemental): + # qcelemental is available or test is skipped + ... + + If qcelemental is missing, the test is skipped with a clear message. + """ + if not _check_qcelemental_availability(): + pytest.skip("qcelemental not available") + import qcelemental + + return qcelemental + + +@pytest.fixture +def qcelemental_or_skip(): + """ + Fixture that returns qcelemental or skips the test if unavailable. + + Simpler alternative to requires_qcelemental for inline use: + def test_foo(qcelemental_or_skip): + qcelemental_or_skip.something() + """ + if not _check_qcelemental_availability(): + pytest.skip("qcelemental not available") + import qcelemental + + return qcelemental diff --git a/tests/test_failures.py b/tests/test_failures.py index b16bc8d..17387d4 100644 --- a/tests/test_failures.py +++ b/tests/test_failures.py @@ -11,26 +11,26 @@ ### Test input validation errors input_failures = test_helpers.list_tests("input_failures") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", input_failures[0], ids=input_failures[1]) @pytest.mark.parametrize("version", qcschema.list_versions("input")) def test_input_failures(version, testfile): - example = test_helpers.get_test(testfile) with pytest.raises(jsonschema.exceptions.ValidationError): - qcschema.validate(example, "input") + qcschema.validate(example, "input", version=version) + ### Test output validation errors output_failures = test_helpers.list_tests("output_failures") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", output_failures[0], ids=output_failures[1]) @pytest.mark.parametrize("version", qcschema.list_versions("output")) -def test_output_failures(version, testfile): - +def test_output_failures(version, testfile, request): example = test_helpers.get_test(testfile) with pytest.raises(jsonschema.exceptions.ValidationError): - qcschema.validate(example, "output") - + qcschema.validate(example, "output", version=version) diff --git a/tests/test_packaging.py b/tests/test_packaging.py index 4f795a9..7e55698 100644 --- a/tests/test_packaging.py +++ b/tests/test_packaging.py @@ -66,12 +66,12 @@ def test_schema_files_in_wheel(tmp_path): # Check wheel contents for schema files expected_schemas = { - "qcschema/data/v1/qc_schema_input.schema", - "qcschema/data/v1/qc_schema_molecule.schema", - "qcschema/data/v1/qc_schema_output.schema", - "qcschema/data/v2/qc_schema_input.schema", - "qcschema/data/v2/qc_schema_molecule.schema", - "qcschema/data/v2/qc_schema_output.schema", + "qcschema/v1/schemas/qc_schema_input.schema", + "qcschema/v1/schemas/qc_schema_molecule.schema", + "qcschema/v1/schemas/qc_schema_output.schema", + "qcschema/v1_5/schemas/qc_schema_input.schema", + "qcschema/v1_5/schemas/qc_schema_molecule.schema", + "qcschema/v1_5/schemas/qc_schema_output.schema", } with zipfile.ZipFile(whl_path, "r") as whl: diff --git a/tests/test_schema.py b/tests/test_schema.py index 5ee6135..d72a24a 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -2,7 +2,6 @@ Tests the JSON schema """ -import jsonschema import pytest import test_helpers @@ -11,80 +10,46 @@ ### Test input validation errors simple_input = test_helpers.list_tests("simple", matcher="input") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", simple_input[0], ids=simple_input[1]) @pytest.mark.parametrize("version", qcschema.list_versions("input")) -def test_simple_input(version, testfile): - +def test_simple_input(version, testfile, request): example = test_helpers.get_test(testfile) - if isinstance(version, int) and version < example["schema_version"]: - with pytest.raises(jsonschema.exceptions.ValidationError): - qcschema.validate(example, "input", version=version) - else: - qcschema.validate(example, "input", version=version) + qcschema.validate(example, "input", version=version) ### Test input validation errors simple_output = test_helpers.list_tests("simple", matcher="output") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", simple_output[0], ids=simple_output[1]) @pytest.mark.parametrize("version", qcschema.list_versions("output")) -def test_simple_output(version, testfile): - +def test_simple_output(version, testfile, request): example = test_helpers.get_test(testfile) - if isinstance(version, int) and version < example["schema_version"]: - with pytest.raises(jsonschema.exceptions.ValidationError): - qcschema.validate(example, "output", version=version) - else: - qcschema.validate(example, "output", version=version) + qcschema.validate(example, "output", version=version) ### Test basis inputs basis_input = test_helpers.list_tests("basis", matcher="input") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", basis_input[0], ids=basis_input[1]) @pytest.mark.parametrize("version", qcschema.list_versions("input")) -def test_simple_basis_input(version, testfile): - +def test_simple_basis_input(version, testfile, request): example = test_helpers.get_test(testfile) - if isinstance(version, int) and version < example["schema_version"]: - with pytest.raises(jsonschema.exceptions.ValidationError): - qcschema.validate(example, "input", version=version) - else: - qcschema.validate(example, "input", version=version) + qcschema.validate(example, "input", version=version) ### Test wavefunction outputs wavefunction_output = test_helpers.list_tests("wavefunction", matcher="output") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", wavefunction_output[0], ids=wavefunction_output[1]) @pytest.mark.parametrize("version", qcschema.list_versions("output")) def test_wavefunction_output(version, testfile, request): - example = test_helpers.get_test(testfile) - - # temporary - dev:=2 doesn't pass, but dev:=qcel will - if version == "dev" and ("water_output" in request.node.name): - pytest.skip() - - # by chance, this validates with v1 instead of triggering pytest.raises below, so skip - if version == 1 and ("water_output_v3" in request.node.name): - pytest.skip() - - # a proper failure, where schema is not back-compatible, so xfail - if version == "dev" and ("water_output]" in request.node.name): - with pytest.raises(jsonschema.exceptions.ValidationError) as e: - qcschema.validate(example, "output", version=version) - - assert "'restricted' is a required property" in str(e.value) - pytest.xfail() - - # ordinary operation - if isinstance(version, int) and version < example["schema_version"]: - with pytest.raises(jsonschema.exceptions.ValidationError): - qcschema.validate(example, "output", version=version) - else: - qcschema.validate(example, "output", version=version) + qcschema.validate(example, "output", version=version) From 49b24d4db2151b30be00e2cd5de08547de812618 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Fri, 31 Jul 2026 15:24:57 -0400 Subject: [PATCH 04/14] Add qcelemental v1 --- qcschema/qcelemental_v1/__init__.py | 1 + qcschema/qcelemental_v1/generate.py | 148 ++ .../schemas/AlignmentMill.schema | 39 + .../schemas/AutodocBaseSettings.schema | 7 + .../schemas/ComputeError.schema | 27 + .../schemas/FailedOperation.schema | 69 + .../schemas/OptimizationInput.schema | 803 ++++++++ .../schemas/OptimizationResult.schema | 1786 +++++++++++++++++ .../qcelemental_v1/schemas/ProtoModel.schema | 7 + qcschema/qcelemental_v1/schemas/Result.schema | 1570 +++++++++++++++ .../qcelemental_v1/schemas/ResultInput.schema | 810 ++++++++ .../schemas/ResultProperties.schema | 325 +++ .../schemas/qc_schema_basis.schema | 263 +++ .../schemas/qc_schema_input.schema | 810 ++++++++ .../schemas/qc_schema_molecule.schema | 337 ++++ .../schemas/qc_schema_output.schema | 1570 +++++++++++++++ .../schemas/qc_schema_properties.schema | 325 +++ .../schemas/qc_schema_provenance.schema | 28 + qcschema/qcelemental_v1/utils.py | 15 + 19 files changed, 8940 insertions(+) create mode 100644 qcschema/qcelemental_v1/__init__.py create mode 100644 qcschema/qcelemental_v1/generate.py create mode 100644 qcschema/qcelemental_v1/schemas/AlignmentMill.schema create mode 100644 qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema create mode 100644 qcschema/qcelemental_v1/schemas/ComputeError.schema create mode 100644 qcschema/qcelemental_v1/schemas/FailedOperation.schema create mode 100644 qcschema/qcelemental_v1/schemas/OptimizationInput.schema create mode 100644 qcschema/qcelemental_v1/schemas/OptimizationResult.schema create mode 100644 qcschema/qcelemental_v1/schemas/ProtoModel.schema create mode 100644 qcschema/qcelemental_v1/schemas/Result.schema create mode 100644 qcschema/qcelemental_v1/schemas/ResultInput.schema create mode 100644 qcschema/qcelemental_v1/schemas/ResultProperties.schema create mode 100644 qcschema/qcelemental_v1/schemas/qc_schema_basis.schema create mode 100644 qcschema/qcelemental_v1/schemas/qc_schema_input.schema create mode 100644 qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema create mode 100644 qcschema/qcelemental_v1/schemas/qc_schema_output.schema create mode 100644 qcschema/qcelemental_v1/schemas/qc_schema_properties.schema create mode 100644 qcschema/qcelemental_v1/schemas/qc_schema_provenance.schema create mode 100644 qcschema/qcelemental_v1/utils.py diff --git a/qcschema/qcelemental_v1/__init__.py b/qcschema/qcelemental_v1/__init__.py new file mode 100644 index 0000000..1fd119d --- /dev/null +++ b/qcschema/qcelemental_v1/__init__.py @@ -0,0 +1 @@ +"""Companion schemas for qcelemental v1 models (dev-only).""" diff --git a/qcschema/qcelemental_v1/generate.py b/qcschema/qcelemental_v1/generate.py new file mode 100644 index 0000000..228712c --- /dev/null +++ b/qcschema/qcelemental_v1/generate.py @@ -0,0 +1,148 @@ +#!/usr/bin/env python +""" +Generate JSON Schema documents from qcelemental pydantic models. + +**Dev-only script** — requires qcelemental package (not a runtime dependency). + +This script inspects qcelemental.models and generates JSON Schema files +for each pydantic model by calling .schema() (pydantic v1 API). + +Models with numpy fields may raise errors; these are logged and skipped. + +Usage: + cd qcschema/qcelemental_v1 + python generate.py + +Output: + - schemas/.schema (JSON Schema files for each model) + +Dependencies: + - qcelemental (manual install required, not shipped) +""" + +import inspect +import json +import sys +from pathlib import Path + +import qcelemental.models + + +def discover_pydantic_models(): + """Discover all pydantic BaseModel classes in qcelemental.models.""" + models = {} + + for name in dir(qcelemental.models): + if name.startswith("_"): + continue + + obj = getattr(qcelemental.models, name) + + # Check if it's a class with pydantic's schema() method + if inspect.isclass(obj) and hasattr(obj, "schema"): + try: + # Verify it actually has a valid schema + schema = obj.schema() + if isinstance(schema, dict) and ("properties" in schema or "title" in schema): + models[name] = obj + except Exception: + # Skip if schema() fails + pass + + return models + + +def _get_output_filename(model_name): + """Map pydantic model names to schema filenames. + + Maps model class names to schema type filenames, using qc_schema_* naming + for types that match the QCSchema canonical types. + """ + # Map qcelemental model names to canonical QCSchema types + type_mapping = { + "AtomicInput": "input", + "AtomicResult": "output", + "Molecule": "molecule", + "BasisSet": "basis", + "AtomicResultProperties": "properties", + "Provenance": "provenance", + } + + # Check if this is a canonical type + if model_name in type_mapping: + schema_type = type_mapping[model_name] + return f"qc_schema_{schema_type}.schema" + + # Otherwise use the model name as-is + return f"{model_name}.schema" + + +def generate_schemas(output_dir=None): + """Generate JSON Schema files for all discovered models.""" + + if output_dir is None: + output_dir = Path(__file__).parent / "schemas" + + output_dir = Path(output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + + models = discover_pydantic_models() + + if not models: + print("Warning: No pydantic models found in qcelemental.models") + return output_dir + + print(f"Found {len(models)} pydantic models") + + successful = [] + skipped = [] + + for model_name, model_class in sorted(models.items()): + try: + schema = model_class.schema() + + # Write schema to file + filename = _get_output_filename(model_name) + output_file = output_dir / filename + with open(output_file, "w") as f: + json.dump(schema, f, indent=2) + + successful.append(model_name) + print(f"✓ {model_name} → {output_file.name}") + + except KeyError as e: + # Handle numpy dtype errors + if "dtype" in str(e): + skipped.append(f"{model_name} (numpy field: {e})") + print(f"⊘ {model_name} (skipped: numpy field causing {e})") + else: + skipped.append(f"{model_name} ({e})") + print(f"⊘ {model_name} (skipped: {e})") + except Exception as e: + skipped.append(f"{model_name} ({type(e).__name__}: {e})") + print(f"⊘ {model_name} (skipped: {type(e).__name__}: {e})") + + print(f"\n✓ Generated {len(successful)} schemas") + if skipped: + print(f"⊘ Skipped {len(skipped)} models:") + for item in skipped: + print(f" - {item}") + + return output_dir + + +if __name__ == "__main__": + try: + schema_dir = generate_schemas() + print(f"\nSchemas written to: {schema_dir}") + sys.exit(0) + except ImportError as e: + print(f"Error: qcelemental is not installed or importable: {e}", file=sys.stderr) + print("Install with: pip install qcelemental", file=sys.stderr) + sys.exit(1) + except Exception as e: + print(f"Error during schema generation: {e}", file=sys.stderr) + import traceback + + traceback.print_exc() + sys.exit(1) diff --git a/qcschema/qcelemental_v1/schemas/AlignmentMill.schema b/qcschema/qcelemental_v1/schemas/AlignmentMill.schema new file mode 100644 index 0000000..d82201c --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/AlignmentMill.schema @@ -0,0 +1,39 @@ +{ + "title": "AlignmentMill", + "description": "Facilitates the application of the simple transformation operations\ndefined by ``shift``, ``rotation``, ``atommap`` arrays and ``mirror``\nboolean as recipe to the data structures\ndescribing Cartesian molecular coordinates. Attaches functions to\ntransform the geometry, element list, gradient, etc. to the\nAlignmentRecipe. When `mirror` attribute (defaults to False) active,\nthen molecular system can be substantively changed by procedure.", + "type": "object", + "properties": { + "shift": { + "title": "Shift", + "description": "Translation array (3,) for coordinates.", + "type": "array", + "items": { + "type": "number" + } + }, + "rotation": { + "title": "Rotation", + "description": "Rotation array (3, 3) for coordinates.", + "type": "array", + "items": { + "type": "number" + } + }, + "atommap": { + "title": "Atommap", + "description": "Atom exchange map (nat,) for coordinates.", + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mirror": { + "title": "Mirror", + "description": "Do mirror invert coordinates?", + "default": false, + "type": "boolean" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema b/qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema new file mode 100644 index 0000000..27fd5e2 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema @@ -0,0 +1,7 @@ +{ + "title": "AutodocBaseSettings", + "description": "Old class for pydantic docstring before autodoc-pydantic came about.", + "type": "object", + "properties": {}, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/ComputeError.schema b/qcschema/qcelemental_v1/schemas/ComputeError.schema new file mode 100644 index 0000000..b81ce14 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ComputeError.schema @@ -0,0 +1,27 @@ +{ + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/FailedOperation.schema b/qcschema/qcelemental_v1/schemas/FailedOperation.schema new file mode 100644 index 0000000..9d6f55b --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/FailedOperation.schema @@ -0,0 +1,69 @@ +{ + "title": "FailedOperation", + "description": "Record indicating that a given operation (program, procedure, etc.) has failed and containing the reason and input data which generated the failure.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "A unique identifier which links this FailedOperation, often of the same Id of the operation should it have been successful. This will often be set programmatically by a database such as Fractal.", + "type": "string" + }, + "input_data": { + "title": "Input Data", + "description": "The input data which was passed in that generated this failure. This should be the complete input which when attempted to be run, caused the operation to fail." + }, + "success": { + "title": "Success", + "description": "A boolean indicator that the operation failed consistent with the model of successful operations. Should always be False. Allows programmatic assessment of all operations regardless of if they failed or succeeded", + "default": false, + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "A container which has details of the error that failed this operation. See the :class:`ComputeError` for more details.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the failed operation. Details which pertain specifically to a thrown error should be contained in the `error` field. See :class:`ComputeError` for details.", + "type": "object" + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "definitions": { + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/OptimizationInput.schema b/qcschema/qcelemental_v1/schemas/OptimizationInput.schema new file mode 100644 index 0000000..e66c3b7 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/OptimizationInput.schema @@ -0,0 +1,803 @@ +{ + "title": "OptimizationInput", + "description": "QCSchema input directive for geometry optimization.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "hash_index": { + "title": "Hash Index", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_input", + "pattern": "qcschema_optimization_input", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Extra fields that are not part of the schema.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + }, + "input_specification": { + "title": "Input Specification", + "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", + "allOf": [ + { + "$ref": "#/definitions/QCInputSpecification" + } + ] + }, + "initial_molecule": { + "title": "Initial Molecule", + "description": "The starting molecule for the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "default": { + "creator": "QCElemental", + "version": "0.29.0", + "routine": "qcelemental.models.procedures" + }, + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + } + }, + "required": [ + "input_specification", + "initial_molecule" + ], + "additionalProperties": false, + "definitions": { + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + }, + "OptimizationProtocols": { + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "QCInputSpecification": { + "title": "QCInputSpecification", + "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_input", + "enum": [ + "qcschema_input" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "driver": { + "description": "Allowed computation driver values.", + "default": "gradient", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "model" + ], + "additionalProperties": false + }, + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/OptimizationResult.schema b/qcschema/qcelemental_v1/schemas/OptimizationResult.schema new file mode 100644 index 0000000..46bad99 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/OptimizationResult.schema @@ -0,0 +1,1786 @@ +{ + "title": "OptimizationResult", + "description": "QCSchema results model for geometry optimization.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "hash_index": { + "title": "Hash Index", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_output", + "pattern": "qcschema_optimization_output", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Extra fields that are not part of the schema.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + }, + "input_specification": { + "title": "Input Specification", + "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", + "allOf": [ + { + "$ref": "#/definitions/QCInputSpecification" + } + ] + }, + "initial_molecule": { + "title": "Initial Molecule", + "description": "The starting molecule for the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "final_molecule": { + "title": "Final Molecule", + "description": "The final molecule of the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "trajectory": { + "title": "Trajectory", + "description": "A list of ordered Result objects for each step in the optimization.", + "type": "array", + "items": { + "$ref": "#/definitions/AtomicResult" + } + }, + "energies": { + "title": "Energies", + "description": "A list of ordered energies for each step in the optimization.", + "type": "array", + "items": { + "type": "number" + } + }, + "stdout": { + "title": "Stdout", + "description": "The standard output of the program.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program.", + "type": "string" + }, + "success": { + "title": "Success", + "description": "The success of a given programs execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "input_specification", + "initial_molecule", + "provenance", + "final_molecule", + "trajectory", + "energies", + "success" + ], + "additionalProperties": false, + "definitions": { + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + }, + "OptimizationProtocols": { + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "QCInputSpecification": { + "title": "QCInputSpecification", + "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_input", + "enum": [ + "qcschema_input" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "driver": { + "description": "Allowed computation driver values.", + "default": "gradient", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "model" + ], + "additionalProperties": false + }, + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "AtomicResultProperties": { + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false + }, + "WavefunctionProperties": { + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false + }, + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + }, + "AtomicResult": { + "title": "AtomicResult", + "description": "Results from a CMS program execution.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", + "default": "qcschema_output", + "enum": [ + "qcschema_output" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "properties": { + "title": "Properties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProperties" + } + ] + }, + "wavefunction": { + "title": "Wavefunction", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProperties" + } + ] + }, + "return_result": { + "title": "Return Result", + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "object" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program execution.", + "type": "string" + }, + "native_files": { + "title": "Native Files", + "description": "DSL files.", + "default": {}, + "type": "object" + }, + "success": { + "title": "Success", + "description": "The success of program execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model", + "provenance", + "properties", + "return_result", + "success" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/ProtoModel.schema b/qcschema/qcelemental_v1/schemas/ProtoModel.schema new file mode 100644 index 0000000..251e685 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ProtoModel.schema @@ -0,0 +1,7 @@ +{ + "title": "ProtoModel", + "description": "QCSchema extension of pydantic.BaseModel.", + "type": "object", + "properties": {}, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/Result.schema b/qcschema/qcelemental_v1/schemas/Result.schema new file mode 100644 index 0000000..d49045a --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/Result.schema @@ -0,0 +1,1570 @@ +{ + "title": "Result", + "description": "QC Result Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicResult` instead.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", + "default": "qcschema_output", + "enum": [ + "qcschema_output" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "properties": { + "title": "Properties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProperties" + } + ] + }, + "wavefunction": { + "title": "Wavefunction", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProperties" + } + ] + }, + "return_result": { + "title": "Return Result", + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "object" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program execution.", + "type": "string" + }, + "native_files": { + "title": "Native Files", + "description": "DSL files.", + "default": {}, + "type": "object" + }, + "success": { + "title": "Success", + "description": "The success of program execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model", + "provenance", + "properties", + "return_result", + "success" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "AtomicResultProperties": { + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false + }, + "WavefunctionProperties": { + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false + }, + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/ResultInput.schema b/qcschema/qcelemental_v1/schemas/ResultInput.schema new file mode 100644 index 0000000..6e4611e --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ResultInput.schema @@ -0,0 +1,810 @@ +{ + "title": "ResultInput", + "description": "QC Input Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicInput` instead.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_input.", + "default": "qcschema_input", + "pattern": "^(qc\\_?schema_input)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/ResultProperties.schema b/qcschema/qcelemental_v1/schemas/ResultProperties.schema new file mode 100644 index 0000000..7c95bdb --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ResultProperties.schema @@ -0,0 +1,325 @@ +{ + "title": "ResultProperties", + "description": "QC Result Properties Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicResultProperties` instead.", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema b/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema new file mode 100644 index 0000000..0832427 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema @@ -0,0 +1,263 @@ +{ + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_input.schema b/qcschema/qcelemental_v1/schemas/qc_schema_input.schema new file mode 100644 index 0000000..269824f --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qc_schema_input.schema @@ -0,0 +1,810 @@ +{ + "title": "AtomicInput", + "description": "The MolSSI Quantum Chemistry Schema", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_input.", + "default": "qcschema_input", + "pattern": "^(qc\\_?schema_input)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema b/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema new file mode 100644 index 0000000..478ae00 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema @@ -0,0 +1,337 @@ +{ + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_output.schema b/qcschema/qcelemental_v1/schemas/qc_schema_output.schema new file mode 100644 index 0000000..af5bd32 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qc_schema_output.schema @@ -0,0 +1,1570 @@ +{ + "title": "AtomicResult", + "description": "Results from a CMS program execution.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", + "default": "qcschema_output", + "enum": [ + "qcschema_output" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "properties": { + "title": "Properties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProperties" + } + ] + }, + "wavefunction": { + "title": "Wavefunction", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProperties" + } + ] + }, + "return_result": { + "title": "Return Result", + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "object" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program execution.", + "type": "string" + }, + "native_files": { + "title": "Native Files", + "description": "DSL files.", + "default": {}, + "type": "object" + }, + "success": { + "title": "Success", + "description": "The success of program execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model", + "provenance", + "properties", + "return_result", + "success" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "AtomicResultProperties": { + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false + }, + "WavefunctionProperties": { + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false + }, + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_properties.schema b/qcschema/qcelemental_v1/schemas/qc_schema_properties.schema new file mode 100644 index 0000000..072d81e --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qc_schema_properties.schema @@ -0,0 +1,325 @@ +{ + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_provenance.schema b/qcschema/qcelemental_v1/schemas/qc_schema_provenance.schema new file mode 100644 index 0000000..5f55b88 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qc_schema_provenance.schema @@ -0,0 +1,28 @@ +{ + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/utils.py b/qcschema/qcelemental_v1/utils.py new file mode 100644 index 0000000..18f894a --- /dev/null +++ b/qcschema/qcelemental_v1/utils.py @@ -0,0 +1,15 @@ +""" +Utilities for qcelemental v1 schema validation. +""" + +from jsonschema import Draft4Validator + + +def get_validator(): + """ + Get the JSON Schema validator class for qcelemental v1 (draft-04). + + Returns: + jsonschema.Draft4Validator class + """ + return Draft4Validator From bb2afbf9e709e3707866c48dfb1361a97e5b31f5 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Fri, 31 Jul 2026 15:39:19 -0400 Subject: [PATCH 05/14] Add qcelemental_v2 schema --- qcschema/qcelemental_v2/__init__.py | 1 + qcschema/qcelemental_v2/generate.py | 196 ++ .../schemas/AlignmentMill.schema | 39 + .../schemas/AutodocBaseSettings.schema | 7 + .../schemas/ComputeError.schema | 27 + .../schemas/FailedOperation.schema | 69 + .../schemas/OptimizationInput.schema | 803 ++++++++ .../schemas/OptimizationResult.schema | 1786 +++++++++++++++++ .../qcelemental_v2/schemas/ProtoModel.schema | 7 + qcschema/qcelemental_v2/schemas/Result.schema | 1570 +++++++++++++++ .../qcelemental_v2/schemas/ResultInput.schema | 810 ++++++++ .../schemas/ResultProperties.schema | 325 +++ .../schemas/qc_schema_basis.schema | 263 +++ .../schemas/qc_schema_input.schema | 810 ++++++++ .../schemas/qc_schema_molecule.schema | 337 ++++ .../schemas/qc_schema_output.schema | 1570 +++++++++++++++ .../schemas/qc_schema_properties.schema | 325 +++ .../schemas/qc_schema_provenance.schema | 28 + qcschema/qcelemental_v2/utils.py | 18 + 19 files changed, 8991 insertions(+) create mode 100644 qcschema/qcelemental_v2/__init__.py create mode 100644 qcschema/qcelemental_v2/generate.py create mode 100644 qcschema/qcelemental_v2/schemas/AlignmentMill.schema create mode 100644 qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema create mode 100644 qcschema/qcelemental_v2/schemas/ComputeError.schema create mode 100644 qcschema/qcelemental_v2/schemas/FailedOperation.schema create mode 100644 qcschema/qcelemental_v2/schemas/OptimizationInput.schema create mode 100644 qcschema/qcelemental_v2/schemas/OptimizationResult.schema create mode 100644 qcschema/qcelemental_v2/schemas/ProtoModel.schema create mode 100644 qcschema/qcelemental_v2/schemas/Result.schema create mode 100644 qcschema/qcelemental_v2/schemas/ResultInput.schema create mode 100644 qcschema/qcelemental_v2/schemas/ResultProperties.schema create mode 100644 qcschema/qcelemental_v2/schemas/qc_schema_basis.schema create mode 100644 qcschema/qcelemental_v2/schemas/qc_schema_input.schema create mode 100644 qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema create mode 100644 qcschema/qcelemental_v2/schemas/qc_schema_output.schema create mode 100644 qcschema/qcelemental_v2/schemas/qc_schema_properties.schema create mode 100644 qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema create mode 100644 qcschema/qcelemental_v2/utils.py diff --git a/qcschema/qcelemental_v2/__init__.py b/qcschema/qcelemental_v2/__init__.py new file mode 100644 index 0000000..92925a8 --- /dev/null +++ b/qcschema/qcelemental_v2/__init__.py @@ -0,0 +1 @@ +"""Companion schemas for qcelemental v2 models (dev-only).""" diff --git a/qcschema/qcelemental_v2/generate.py b/qcschema/qcelemental_v2/generate.py new file mode 100644 index 0000000..8987362 --- /dev/null +++ b/qcschema/qcelemental_v2/generate.py @@ -0,0 +1,196 @@ +#!/usr/bin/env python +""" +Generate JSON Schema documents from qcelemental v2 pydantic models. + +**Dev-only script** — requires qcelemental package (not a runtime dependency). + +This script inspects qcelemental.models (with priority to v2 schemas) and +generates JSON Schema files for each pydantic model using either: +- model_json_schema() if available (pydantic v2) +- .schema() if available (pydantic v1 compatibility mode) + +Models with numpy fields may raise errors; these are logged and skipped. + +Usage: + cd qcschema/qcelemental_v2 + python generate.py + +Output: + - schemas/.schema (JSON Schema files for each model) + +Dependencies: + - qcelemental (manual install required, not shipped) +""" + +import inspect +import json +import sys +from pathlib import Path + +import qcelemental.models + + +def discover_pydantic_models(): + """Discover pydantic models in qcelemental.models, prioritizing v2. + + First tries qcelemental.models.v2 if it exists (future proofing). + Falls back to qcelemental.models and filters for v2-compatible schemas. + """ + models = {} + + # Try v2 submodule first (future-proofing for when qcelemental splits versions) + try: + import qcelemental.models.v2 as models_v2 + + for name in dir(models_v2): + if name.startswith("_"): + continue + + obj = getattr(models_v2, name) + if _is_pydantic_model(obj): + models[name] = obj + + if models: + return models + except (ImportError, AttributeError): + pass + + # Fall back to qcelemental.models (filtering if needed) + for name in dir(qcelemental.models): + if name.startswith("_"): + continue + + obj = getattr(qcelemental.models, name) + if _is_pydantic_model(obj): + models[name] = obj + + return models + + +def _is_pydantic_model(obj): + """Check if an object is a pydantic model class.""" + if not inspect.isclass(obj): + return False + + # Check for pydantic v2 API + if hasattr(obj, "model_json_schema"): + return True + + # Check for pydantic v1 API + if hasattr(obj, "schema"): + try: + schema = obj.schema() + return isinstance(schema, dict) and ("properties" in schema or "title" in schema) + except Exception: + return False + + return False + + +def _get_output_filename(model_name): + """Map pydantic model names to schema filenames. + + Maps model class names to schema type filenames, using qc_schema_* naming + for types that match the QCSchema canonical types. + """ + # Map qcelemental model names to canonical QCSchema types + type_mapping = { + "AtomicInput": "input", + "AtomicResult": "output", + "Molecule": "molecule", + "BasisSet": "basis", + "AtomicResultProperties": "properties", + "Provenance": "provenance", + } + + # Check if this is a canonical type + if model_name in type_mapping: + schema_type = type_mapping[model_name] + return f"qc_schema_{schema_type}.schema" + + # Otherwise use the model name as-is + return f"{model_name}.schema" + + +def _get_schema(model_class): + """Get JSON schema from a pydantic model using available API. + + Tries pydantic v2 API first (model_json_schema), then falls back to v1 (schema). + """ + if hasattr(model_class, "model_json_schema"): + return model_class.model_json_schema() + elif hasattr(model_class, "schema"): + return model_class.schema() + else: + raise ValueError(f"{model_class} has no schema generation method") + + +def generate_schemas(output_dir=None): + """Generate JSON Schema files for all discovered models.""" + + if output_dir is None: + output_dir = Path(__file__).parent / "schemas" + + output_dir = Path(output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + + models = discover_pydantic_models() + + if not models: + print("Warning: No pydantic models found in qcelemental.models") + return output_dir + + print(f"Found {len(models)} pydantic models") + + successful = [] + skipped = [] + + for model_name, model_class in sorted(models.items()): + try: + schema = _get_schema(model_class) + + # Write schema to file + filename = _get_output_filename(model_name) + output_file = output_dir / filename + with open(output_file, "w") as f: + json.dump(schema, f, indent=2) + + successful.append(model_name) + print(f"✓ {model_name} → {output_file.name}") + + except KeyError as e: + # Handle numpy dtype errors + if "dtype" in str(e): + skipped.append(f"{model_name} (numpy field: {e})") + print(f"⊘ {model_name} (skipped: numpy field causing {e})") + else: + skipped.append(f"{model_name} ({e})") + print(f"⊘ {model_name} (skipped: {e})") + except Exception as e: + skipped.append(f"{model_name} ({type(e).__name__}: {e})") + print(f"⊘ {model_name} (skipped: {type(e).__name__}: {e})") + + print(f"\n✓ Generated {len(successful)} schemas") + if skipped: + print(f"⊘ Skipped {len(skipped)} models:") + for item in skipped: + print(f" - {item}") + + return output_dir + + +if __name__ == "__main__": + try: + schema_dir = generate_schemas() + print(f"\nSchemas written to: {schema_dir}") + sys.exit(0) + except ImportError as e: + print(f"Error: qcelemental is not installed or importable: {e}", file=sys.stderr) + print("Install with: pip install qcelemental", file=sys.stderr) + sys.exit(1) + except Exception as e: + print(f"Error during schema generation: {e}", file=sys.stderr) + import traceback + + traceback.print_exc() + sys.exit(1) diff --git a/qcschema/qcelemental_v2/schemas/AlignmentMill.schema b/qcschema/qcelemental_v2/schemas/AlignmentMill.schema new file mode 100644 index 0000000..d82201c --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/AlignmentMill.schema @@ -0,0 +1,39 @@ +{ + "title": "AlignmentMill", + "description": "Facilitates the application of the simple transformation operations\ndefined by ``shift``, ``rotation``, ``atommap`` arrays and ``mirror``\nboolean as recipe to the data structures\ndescribing Cartesian molecular coordinates. Attaches functions to\ntransform the geometry, element list, gradient, etc. to the\nAlignmentRecipe. When `mirror` attribute (defaults to False) active,\nthen molecular system can be substantively changed by procedure.", + "type": "object", + "properties": { + "shift": { + "title": "Shift", + "description": "Translation array (3,) for coordinates.", + "type": "array", + "items": { + "type": "number" + } + }, + "rotation": { + "title": "Rotation", + "description": "Rotation array (3, 3) for coordinates.", + "type": "array", + "items": { + "type": "number" + } + }, + "atommap": { + "title": "Atommap", + "description": "Atom exchange map (nat,) for coordinates.", + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mirror": { + "title": "Mirror", + "description": "Do mirror invert coordinates?", + "default": false, + "type": "boolean" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema b/qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema new file mode 100644 index 0000000..27fd5e2 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema @@ -0,0 +1,7 @@ +{ + "title": "AutodocBaseSettings", + "description": "Old class for pydantic docstring before autodoc-pydantic came about.", + "type": "object", + "properties": {}, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ComputeError.schema b/qcschema/qcelemental_v2/schemas/ComputeError.schema new file mode 100644 index 0000000..b81ce14 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ComputeError.schema @@ -0,0 +1,27 @@ +{ + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/FailedOperation.schema b/qcschema/qcelemental_v2/schemas/FailedOperation.schema new file mode 100644 index 0000000..9d6f55b --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/FailedOperation.schema @@ -0,0 +1,69 @@ +{ + "title": "FailedOperation", + "description": "Record indicating that a given operation (program, procedure, etc.) has failed and containing the reason and input data which generated the failure.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "A unique identifier which links this FailedOperation, often of the same Id of the operation should it have been successful. This will often be set programmatically by a database such as Fractal.", + "type": "string" + }, + "input_data": { + "title": "Input Data", + "description": "The input data which was passed in that generated this failure. This should be the complete input which when attempted to be run, caused the operation to fail." + }, + "success": { + "title": "Success", + "description": "A boolean indicator that the operation failed consistent with the model of successful operations. Should always be False. Allows programmatic assessment of all operations regardless of if they failed or succeeded", + "default": false, + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "A container which has details of the error that failed this operation. See the :class:`ComputeError` for more details.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the failed operation. Details which pertain specifically to a thrown error should be contained in the `error` field. See :class:`ComputeError` for details.", + "type": "object" + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "definitions": { + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationInput.schema b/qcschema/qcelemental_v2/schemas/OptimizationInput.schema new file mode 100644 index 0000000..e66c3b7 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationInput.schema @@ -0,0 +1,803 @@ +{ + "title": "OptimizationInput", + "description": "QCSchema input directive for geometry optimization.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "hash_index": { + "title": "Hash Index", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_input", + "pattern": "qcschema_optimization_input", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Extra fields that are not part of the schema.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + }, + "input_specification": { + "title": "Input Specification", + "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", + "allOf": [ + { + "$ref": "#/definitions/QCInputSpecification" + } + ] + }, + "initial_molecule": { + "title": "Initial Molecule", + "description": "The starting molecule for the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "default": { + "creator": "QCElemental", + "version": "0.29.0", + "routine": "qcelemental.models.procedures" + }, + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + } + }, + "required": [ + "input_specification", + "initial_molecule" + ], + "additionalProperties": false, + "definitions": { + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + }, + "OptimizationProtocols": { + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "QCInputSpecification": { + "title": "QCInputSpecification", + "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_input", + "enum": [ + "qcschema_input" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "driver": { + "description": "Allowed computation driver values.", + "default": "gradient", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "model" + ], + "additionalProperties": false + }, + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationResult.schema b/qcschema/qcelemental_v2/schemas/OptimizationResult.schema new file mode 100644 index 0000000..46bad99 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationResult.schema @@ -0,0 +1,1786 @@ +{ + "title": "OptimizationResult", + "description": "QCSchema results model for geometry optimization.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "hash_index": { + "title": "Hash Index", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_output", + "pattern": "qcschema_optimization_output", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Extra fields that are not part of the schema.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + }, + "input_specification": { + "title": "Input Specification", + "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", + "allOf": [ + { + "$ref": "#/definitions/QCInputSpecification" + } + ] + }, + "initial_molecule": { + "title": "Initial Molecule", + "description": "The starting molecule for the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "final_molecule": { + "title": "Final Molecule", + "description": "The final molecule of the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "trajectory": { + "title": "Trajectory", + "description": "A list of ordered Result objects for each step in the optimization.", + "type": "array", + "items": { + "$ref": "#/definitions/AtomicResult" + } + }, + "energies": { + "title": "Energies", + "description": "A list of ordered energies for each step in the optimization.", + "type": "array", + "items": { + "type": "number" + } + }, + "stdout": { + "title": "Stdout", + "description": "The standard output of the program.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program.", + "type": "string" + }, + "success": { + "title": "Success", + "description": "The success of a given programs execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "input_specification", + "initial_molecule", + "provenance", + "final_molecule", + "trajectory", + "energies", + "success" + ], + "additionalProperties": false, + "definitions": { + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + }, + "OptimizationProtocols": { + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "QCInputSpecification": { + "title": "QCInputSpecification", + "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_input", + "enum": [ + "qcschema_input" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "type": "integer" + }, + "driver": { + "description": "Allowed computation driver values.", + "default": "gradient", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "model" + ], + "additionalProperties": false + }, + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "AtomicResultProperties": { + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false + }, + "WavefunctionProperties": { + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false + }, + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + }, + "AtomicResult": { + "title": "AtomicResult", + "description": "Results from a CMS program execution.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", + "default": "qcschema_output", + "enum": [ + "qcschema_output" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "properties": { + "title": "Properties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProperties" + } + ] + }, + "wavefunction": { + "title": "Wavefunction", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProperties" + } + ] + }, + "return_result": { + "title": "Return Result", + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "object" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program execution.", + "type": "string" + }, + "native_files": { + "title": "Native Files", + "description": "DSL files.", + "default": {}, + "type": "object" + }, + "success": { + "title": "Success", + "description": "The success of program execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model", + "provenance", + "properties", + "return_result", + "success" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ProtoModel.schema b/qcschema/qcelemental_v2/schemas/ProtoModel.schema new file mode 100644 index 0000000..251e685 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ProtoModel.schema @@ -0,0 +1,7 @@ +{ + "title": "ProtoModel", + "description": "QCSchema extension of pydantic.BaseModel.", + "type": "object", + "properties": {}, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/Result.schema b/qcschema/qcelemental_v2/schemas/Result.schema new file mode 100644 index 0000000..d49045a --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/Result.schema @@ -0,0 +1,1570 @@ +{ + "title": "Result", + "description": "QC Result Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicResult` instead.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", + "default": "qcschema_output", + "enum": [ + "qcschema_output" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "properties": { + "title": "Properties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProperties" + } + ] + }, + "wavefunction": { + "title": "Wavefunction", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProperties" + } + ] + }, + "return_result": { + "title": "Return Result", + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "object" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program execution.", + "type": "string" + }, + "native_files": { + "title": "Native Files", + "description": "DSL files.", + "default": {}, + "type": "object" + }, + "success": { + "title": "Success", + "description": "The success of program execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model", + "provenance", + "properties", + "return_result", + "success" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "AtomicResultProperties": { + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false + }, + "WavefunctionProperties": { + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false + }, + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ResultInput.schema b/qcschema/qcelemental_v2/schemas/ResultInput.schema new file mode 100644 index 0000000..6e4611e --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ResultInput.schema @@ -0,0 +1,810 @@ +{ + "title": "ResultInput", + "description": "QC Input Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicInput` instead.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_input.", + "default": "qcschema_input", + "pattern": "^(qc\\_?schema_input)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ResultProperties.schema b/qcschema/qcelemental_v2/schemas/ResultProperties.schema new file mode 100644 index 0000000..7c95bdb --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ResultProperties.schema @@ -0,0 +1,325 @@ +{ + "title": "ResultProperties", + "description": "QC Result Properties Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicResultProperties` instead.", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema b/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema new file mode 100644 index 0000000..0832427 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema @@ -0,0 +1,263 @@ +{ + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_input.schema b/qcschema/qcelemental_v2/schemas/qc_schema_input.schema new file mode 100644 index 0000000..269824f --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qc_schema_input.schema @@ -0,0 +1,810 @@ +{ + "title": "AtomicInput", + "description": "The MolSSI Quantum Chemistry Schema", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_input.", + "default": "qcschema_input", + "pattern": "^(qc\\_?schema_input)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema b/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema new file mode 100644 index 0000000..478ae00 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema @@ -0,0 +1,337 @@ +{ + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_output.schema b/qcschema/qcelemental_v2/schemas/qc_schema_output.schema new file mode 100644 index 0000000..af5bd32 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qc_schema_output.schema @@ -0,0 +1,1570 @@ +{ + "title": "AtomicResult", + "description": "Results from a CMS program execution.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", + "default": "qcschema_output", + "enum": [ + "qcschema_output" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "properties": { + "title": "Properties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProperties" + } + ] + }, + "wavefunction": { + "title": "Wavefunction", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProperties" + } + ] + }, + "return_result": { + "title": "Return Result", + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "object" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program execution.", + "type": "string" + }, + "native_files": { + "title": "Native Files", + "description": "DSL files.", + "default": {}, + "type": "object" + }, + "success": { + "title": "Success", + "description": "The success of program execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model", + "provenance", + "properties", + "return_result", + "success" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#", + "definitions": { + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "AtomicResultProperties": { + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false + }, + "WavefunctionProperties": { + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false + }, + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_properties.schema b/qcschema/qcelemental_v2/schemas/qc_schema_properties.schema new file mode 100644 index 0000000..072d81e --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qc_schema_properties.schema @@ -0,0 +1,325 @@ +{ + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema b/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema new file mode 100644 index 0000000..5f55b88 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema @@ -0,0 +1,28 @@ +{ + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/utils.py b/qcschema/qcelemental_v2/utils.py new file mode 100644 index 0000000..d80470f --- /dev/null +++ b/qcschema/qcelemental_v2/utils.py @@ -0,0 +1,18 @@ +""" +Utilities for qcelemental v2 schema validation. +""" + +from jsonschema import Draft4Validator + + +def get_validator(): + """ + Get the JSON Schema validator class for qcelemental v2. + + Returns Draft4Validator for current qcelemental (which generates draft-04). + Will be updated to Draft202012Validator when qcelemental v2 moves to 2020-12. + + Returns: + jsonschema.Draft4Validator class + """ + return Draft4Validator From 8fabebb525654b0a26b4785512d6eab6f89c779e Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Fri, 31 Jul 2026 15:43:14 -0400 Subject: [PATCH 06/14] Update tests --- tests/test_helpers.py | 20 ++++ tests/test_qcelemental_schemas.py | 164 ++++++++++++++++++++++++++++++ tests/test_schema.py | 22 +++- 3 files changed, 201 insertions(+), 5 deletions(-) create mode 100644 tests/test_qcelemental_schemas.py diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 626787c..41501c0 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -13,10 +13,12 @@ def _read_json_file(*filename): data = json.load(infile) return data + # Find a few required relative paths _test_path = os.path.dirname(os.path.abspath(__file__)) _base_path = os.path.dirname(_test_path) + def list_tests(folder, ext=".json", matcher=""): """ Lists all tests in a given folder. @@ -26,6 +28,24 @@ def list_tests(folder, ext=".json", matcher=""): return files, names + def get_test(name): return _read_json_file(name) + +def filter_versions(versions, exclude_pattern=None): + """ + Filter versions for testing. + + Args: + versions: List of version strings to filter + exclude_pattern: String pattern to exclude (e.g., "qcelemental" to exclude + versions starting with that) + + Returns: + Filtered list of versions + """ + if exclude_pattern is None: + return versions + + return [v for v in versions if not v.startswith(exclude_pattern)] diff --git a/tests/test_qcelemental_schemas.py b/tests/test_qcelemental_schemas.py new file mode 100644 index 0000000..4c381b3 --- /dev/null +++ b/tests/test_qcelemental_schemas.py @@ -0,0 +1,164 @@ +""" +Tests for qcelemental schema generation and validation. + +Tests that qcelemental-specific schemas can be loaded and used for validation. +Note: qcelemental uses different schema_name conventions than the original +qcschema (e.g., "qcschema_output" vs "qc_schema_output"), so this test file +uses qcelemental-appropriate data rather than the qcschema test fixtures. +""" + +import pytest +from jsonschema import Draft4Validator + +import qcschema + + +@pytest.mark.parametrize("version", ["qcelemental.v1", "qcelemental.v2"]) +class TestQCElementalSchemas: + """Test qcelemental schema versions.""" + + def test_schema_discovery(self, version): + """Verify qcelemental versions are discoverable.""" + for schema_type in ["molecule", "input", "output", "basis", "properties", "provenance"]: + try: + schema = qcschema.get_schema(schema_type, version) + assert isinstance(schema, dict) + assert "$schema" in schema or "properties" in schema or "title" in schema + except KeyError: + # Some types may not be in all versions, that's OK + pass + + def test_molecule_schema_loading(self, version): + """Test that Molecule schema can be loaded.""" + schema = qcschema.get_schema("molecule", version) + assert schema.get("title") == "Molecule" + assert "properties" in schema + # qcelemental Molecule has specific properties + assert "symbols" in schema["properties"] + + def test_atomic_input_schema_loading(self, version): + """Test that AtomicInput (input) schema can be loaded.""" + schema = qcschema.get_schema("input", version) + assert "properties" in schema + # qcelemental models expect specific field names + assert "molecule" in schema["properties"] + + def test_atomic_result_schema_loading(self, version): + """Test that AtomicResult (output) schema can be loaded.""" + schema = qcschema.get_schema("output", version) + assert "properties" in schema + # qcelemental output has specific fields + assert "return_result" in schema["properties"] + + def test_basis_schema_loading(self, version): + """Test that BasisSet (basis) schema can be loaded.""" + schema = qcschema.get_schema("basis", version) + assert "properties" in schema + + def test_properties_schema_loading(self, version): + """Test that AtomicResultProperties (properties) schema can be loaded.""" + schema = qcschema.get_schema("properties", version) + assert "properties" in schema + + def test_provenance_schema_loading(self, version): + """Test that Provenance schema can be loaded.""" + schema = qcschema.get_schema("provenance", version) + assert "properties" in schema + + def test_minimal_molecule_validation(self, version): + """Test validation of a minimal molecule using qcelemental schema.""" + schema = qcschema.get_schema("molecule", version) + + # Minimal valid molecule for qcelemental + molecule = { + "schema_name": "qcschema_molecule", + "schema_version": 2, + "symbols": ["H", "H"], + "geometry": [0.0, 0.0, 0.0, 0.0, 0.0, 1.0], + } + + # This should validate without error + validator = Draft4Validator(schema) + validator.validate(molecule) + + def test_minimal_atomic_input_validation(self, version): + """Test validation of minimal AtomicInput using qcelemental schema.""" + schema = qcschema.get_schema("input", version) + + atomic_input = { + "schema_name": "qcschema_input", + "schema_version": 1, + "molecule": { + "schema_name": "qcschema_molecule", + "schema_version": 2, + "symbols": ["H", "H"], + "geometry": [0.0, 0.0, 0.0, 0.0, 0.0, 1.0], + }, + "driver": "energy", + "model": {"method": "HF", "basis": "sto-3g"}, + "keywords": {}, + } + + validator = Draft4Validator(schema) + validator.validate(atomic_input) + + def test_schema_list_versions(self, version): + """Test that version appears in list_versions for supported types.""" + # All qcelemental versions should support molecule + versions = qcschema.list_versions("molecule") + assert version in versions + + +class TestQCElementalVersSupport: + """Test that qcelemental versions are properly integrated.""" + + def test_both_versions_discoverable(self): + """Test that both qcelemental.v1 and qcelemental.v2 are discoverable.""" + versions = qcschema.list_versions("molecule") + assert "qcelemental.v1" in versions + assert "qcelemental.v2" in versions + + def test_all_canonical_types_available(self): + """Test that all canonical schema types are available in qcelemental versions.""" + for schema_type in ["molecule", "input", "output", "basis", "properties", "provenance"]: + versions = qcschema.list_versions(schema_type) + assert any(v.startswith("qcelemental") for v in versions), f"No qcelemental version found for {schema_type}" + + def test_schema_validator_available(self): + """Test that validators can be obtained for qcelemental versions.""" + from qcschema.qcelemental_v1 import utils as v1_utils + from qcschema.qcelemental_v2 import utils as v2_utils + + v1_validator = v1_utils.get_validator() + v2_validator = v2_utils.get_validator() + + # Both should return Draft4Validator (for now) + assert v1_validator is Draft4Validator + assert v2_validator is Draft4Validator + + def test_no_runtime_imports(self): + """Test that importing qcschema doesn't import qcelemental. + + Note: This test verifies that qcschema doesn't pull in qcelemental + as a runtime dependency. The test runs in subprocess to avoid + noise from pytest's own imports (which may include numpy via IPython). + """ + import subprocess + import sys + + # Run in subprocess to get clean environment + result = subprocess.run( + [ + sys.executable, + "-c", + "import sys; import qcschema; " + "assert 'qcelemental' not in sys.modules, 'qcelemental should not be imported'; " + "print('OK')", + ], + env={"PYTHONPATH": "."}, + capture_output=True, + text=True, + ) + + assert result.returncode == 0, f"Failed: {result.stderr}" + assert "OK" in result.stdout diff --git a/tests/test_schema.py b/tests/test_schema.py index d72a24a..9264756 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -10,22 +10,28 @@ ### Test input validation errors simple_input = test_helpers.list_tests("simple", matcher="input") +# Filter out qcelemental versions (they have incompatible schema_name conventions) +# qcelemental-specific tests are in test_qcelemental_schemas.py +input_versions = test_helpers.filter_versions(qcschema.list_versions("input"), exclude_pattern="qcelemental") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", simple_input[0], ids=simple_input[1]) -@pytest.mark.parametrize("version", qcschema.list_versions("input")) +@pytest.mark.parametrize("version", input_versions) def test_simple_input(version, testfile, request): example = test_helpers.get_test(testfile) qcschema.validate(example, "input", version=version) -### Test input validation errors +### Test output validation simple_output = test_helpers.list_tests("simple", matcher="output") +output_versions = test_helpers.filter_versions(qcschema.list_versions("output"), exclude_pattern="qcelemental") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", simple_output[0], ids=simple_output[1]) -@pytest.mark.parametrize("version", qcschema.list_versions("output")) +@pytest.mark.parametrize("version", output_versions) def test_simple_output(version, testfile, request): example = test_helpers.get_test(testfile) qcschema.validate(example, "output", version=version) @@ -34,10 +40,12 @@ def test_simple_output(version, testfile, request): ### Test basis inputs basis_input = test_helpers.list_tests("basis", matcher="input") +basis_input_versions = test_helpers.filter_versions(qcschema.list_versions("input"), exclude_pattern="qcelemental") + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", basis_input[0], ids=basis_input[1]) -@pytest.mark.parametrize("version", qcschema.list_versions("input")) +@pytest.mark.parametrize("version", basis_input_versions) def test_simple_basis_input(version, testfile, request): example = test_helpers.get_test(testfile) qcschema.validate(example, "input", version=version) @@ -46,10 +54,14 @@ def test_simple_basis_input(version, testfile, request): ### Test wavefunction outputs wavefunction_output = test_helpers.list_tests("wavefunction", matcher="output") +wavefunction_output_versions = test_helpers.filter_versions( + qcschema.list_versions("output"), exclude_pattern="qcelemental" +) + # Loop over all tests that should pass the tests @pytest.mark.parametrize("testfile", wavefunction_output[0], ids=wavefunction_output[1]) -@pytest.mark.parametrize("version", qcschema.list_versions("output")) +@pytest.mark.parametrize("version", wavefunction_output_versions) def test_wavefunction_output(version, testfile, request): example = test_helpers.get_test(testfile) qcschema.validate(example, "output", version=version) From f08e899b22a5ea76f4975e16d1258f5753dbcd1f Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Thu, 6 Aug 2026 11:07:54 -0400 Subject: [PATCH 07/14] Remove silent fallbacks, resolve running in CLI --- pyproject.toml | 13 +-- qcschema/qcelemental_v1/__main__.py | 19 ++++ qcschema/qcelemental_v1/generate.py | 87 ++++++++++------ qcschema/qcelemental_v1/utils.py | 15 --- qcschema/qcelemental_v2/__main__.py | 22 ++++ qcschema/qcelemental_v2/generate.py | 149 ++++++++++++++++------------ qcschema/qcelemental_v2/utils.py | 18 ---- qcschema/v1/__init__.py | 0 qcschema/v1/__main__.py | 10 ++ qcschema/v1/generate.py | 142 +++++++++++++++++++++++--- qcschema/v1/generator/dev_schema.py | 4 - qcschema/v1/utils.py | 32 ------ qcschema/v1_5/__init__.py | 0 qcschema/v1_5/__main__.py | 10 ++ qcschema/v1_5/generate.py | 136 ++++++++++++++++++++++--- qcschema/v1_5/utils.py | 33 ------ qcschema/validate.py | 12 +-- 17 files changed, 459 insertions(+), 243 deletions(-) create mode 100644 qcschema/qcelemental_v1/__main__.py delete mode 100644 qcschema/qcelemental_v1/utils.py create mode 100644 qcschema/qcelemental_v2/__main__.py delete mode 100644 qcschema/qcelemental_v2/utils.py delete mode 100644 qcschema/v1/__init__.py create mode 100644 qcschema/v1/__main__.py delete mode 100644 qcschema/v1/utils.py delete mode 100644 qcschema/v1_5/__init__.py create mode 100644 qcschema/v1_5/__main__.py delete mode 100644 qcschema/v1_5/utils.py diff --git a/pyproject.toml b/pyproject.toml index 0565194..806a115 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,20 +28,11 @@ tests = [ Homepage = "https://github.com/MolSSI/QCSchema" [tool.setuptools] -packages = [ - "qcschema", - "qcschema.data", - "qcschema.data.v1", - "qcschema.data.v2", - "qcschema.dev", - "qcschema.dev.properties", - "qcschema.dev.wavefunction", -] +packages = ["qcschema"] zip-safe = true [tool.setuptools.package-data] -"qcschema.data.v1" = ["*.schema"] -"qcschema.data.v2" = ["*.schema"] +"qcschema" = ["**/*.schema"] [tool.ruff] line-length = 120 diff --git a/qcschema/qcelemental_v1/__main__.py b/qcschema/qcelemental_v1/__main__.py new file mode 100644 index 0000000..33de0d4 --- /dev/null +++ b/qcschema/qcelemental_v1/__main__.py @@ -0,0 +1,19 @@ +""" +Entry point for running the qcelemental v1 schema generator as a module. +Run as: python -m qcschema.qcelemental_v1 +""" + +import sys + +try: + from .generate import generate_schemas + + schema_dir = generate_schemas() + print(f"\nSchemas written to: {schema_dir}") +except ImportError as e: + print(f"Error: qcelemental is not installed or importable: {e}", file=sys.stderr) + print("Install with: pip install qcelemental", file=sys.stderr) + sys.exit(1) +except Exception as e: + print(f"Error during schema generation: {e}", file=sys.stderr) + sys.exit(1) diff --git a/qcschema/qcelemental_v1/generate.py b/qcschema/qcelemental_v1/generate.py index 228712c..c8dcb2b 100644 --- a/qcschema/qcelemental_v1/generate.py +++ b/qcschema/qcelemental_v1/generate.py @@ -7,7 +7,7 @@ This script inspects qcelemental.models and generates JSON Schema files for each pydantic model by calling .schema() (pydantic v1 API). -Models with numpy fields may raise errors; these are logged and skipped. +Errors on invalid or missing models — no silent skipping. Usage: cd qcschema/qcelemental_v1 @@ -18,6 +18,7 @@ Dependencies: - qcelemental (manual install required, not shipped) + - pydantic v1 """ import inspect @@ -26,6 +27,17 @@ from pathlib import Path import qcelemental.models +from jsonschema import Draft4Validator + + +def get_validator(): + """ + Get the JSON Schema validator class for qcelemental v1 (draft-04). + + Returns: + jsonschema.Draft4Validator class + """ + return Draft4Validator def discover_pydantic_models(): @@ -36,22 +48,41 @@ def discover_pydantic_models(): if name.startswith("_"): continue - obj = getattr(qcelemental.models, name) + try: + obj = getattr(qcelemental.models, name) + except AttributeError as e: + raise RuntimeError(f"Failed to get attribute '{name}' from qcelemental.models: {e}") from e # Check if it's a class with pydantic's schema() method if inspect.isclass(obj) and hasattr(obj, "schema"): - try: - # Verify it actually has a valid schema - schema = obj.schema() - if isinstance(schema, dict) and ("properties" in schema or "title" in schema): - models[name] = obj - except Exception: - # Skip if schema() fails - pass + # Verify it actually has a valid schema + schema = obj.schema() + if not isinstance(schema, dict): + raise TypeError(f"Model {name}: schema() returned non-dict {type(schema).__name__}") + if not ("properties" in schema or "title" in schema): + raise ValueError(f"Model {name}: schema missing both 'properties' and 'title'") + models[name] = obj return models +def _validate_schema(schema, model_name): + """Validate that a schema is a valid JSON Schema dictionary. + + Raises TypeError or ValueError if schema is invalid. + """ + if not isinstance(schema, dict): + raise TypeError(f"{model_name}: schema is not a dict, got {type(schema).__name__}") + + # JSON Schema should have at least $schema or properties or title + if not any(key in schema for key in ["$schema", "properties", "title", "type"]): + raise ValueError( + f"{model_name}: schema missing standard JSON Schema fields ($schema, properties, title, or type)" + ) + + return schema + + def _get_output_filename(model_name): """Map pydantic model names to schema filenames. @@ -89,17 +120,15 @@ def generate_schemas(output_dir=None): models = discover_pydantic_models() if not models: - print("Warning: No pydantic models found in qcelemental.models") - return output_dir + raise RuntimeError("No pydantic models found in qcelemental.models") print(f"Found {len(models)} pydantic models") - successful = [] - skipped = [] - + schema_failures = {} for model_name, model_class in sorted(models.items()): try: schema = model_class.schema() + schema = _validate_schema(schema, model_name) # Write schema to file filename = _get_output_filename(model_name) @@ -107,26 +136,18 @@ def generate_schemas(output_dir=None): with open(output_file, "w") as f: json.dump(schema, f, indent=2) - successful.append(model_name) print(f"✓ {model_name} → {output_file.name}") - - except KeyError as e: - # Handle numpy dtype errors - if "dtype" in str(e): - skipped.append(f"{model_name} (numpy field: {e})") - print(f"⊘ {model_name} (skipped: numpy field causing {e})") - else: - skipped.append(f"{model_name} ({e})") - print(f"⊘ {model_name} (skipped: {e})") except Exception as e: - skipped.append(f"{model_name} ({type(e).__name__}: {e})") - print(f"⊘ {model_name} (skipped: {type(e).__name__}: {e})") - - print(f"\n✓ Generated {len(successful)} schemas") - if skipped: - print(f"⊘ Skipped {len(skipped)} models:") - for item in skipped: - print(f" - {item}") + schema_failures[model_name] = str(e) + print(f"⚠ {model_name} → Error: {e}") + + print(f"\n✓ Generated {len(models) - len(schema_failures)} schemas") + + # Report models that failed to generate + if schema_failures: + print(f"\n⚠ {len(schema_failures)} model(s) failed to generate:") + for model_name, error in sorted(schema_failures.items()): + print(f" - {model_name}: {error}") return output_dir diff --git a/qcschema/qcelemental_v1/utils.py b/qcschema/qcelemental_v1/utils.py deleted file mode 100644 index 18f894a..0000000 --- a/qcschema/qcelemental_v1/utils.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Utilities for qcelemental v1 schema validation. -""" - -from jsonschema import Draft4Validator - - -def get_validator(): - """ - Get the JSON Schema validator class for qcelemental v1 (draft-04). - - Returns: - jsonschema.Draft4Validator class - """ - return Draft4Validator diff --git a/qcschema/qcelemental_v2/__main__.py b/qcschema/qcelemental_v2/__main__.py new file mode 100644 index 0000000..a963783 --- /dev/null +++ b/qcschema/qcelemental_v2/__main__.py @@ -0,0 +1,22 @@ +""" +Entry point for running the qcelemental v2 schema generator as a module. +Run as: python -m qcschema.qcelemental_v2 +""" + +import sys + +try: + from .generate import generate_schemas + + schema_dir = generate_schemas() + print(f"\nSchemas written to: {schema_dir}") +except ImportError as e: + print(f"Error: qcelemental is not installed or importable: {e}", file=sys.stderr) + print("Install with: pip install qcelemental", file=sys.stderr) + sys.exit(1) +except Exception as e: + print(f"Error during schema generation: {e}", file=sys.stderr) + import traceback + + traceback.print_exc() + sys.exit(1) diff --git a/qcschema/qcelemental_v2/generate.py b/qcschema/qcelemental_v2/generate.py index 8987362..83647a5 100644 --- a/qcschema/qcelemental_v2/generate.py +++ b/qcschema/qcelemental_v2/generate.py @@ -4,12 +4,14 @@ **Dev-only script** — requires qcelemental package (not a runtime dependency). -This script inspects qcelemental.models (with priority to v2 schemas) and -generates JSON Schema files for each pydantic model using either: -- model_json_schema() if available (pydantic v2) -- .schema() if available (pydantic v1 compatibility mode) +This script inspects qcelemental.models.v2 and generates JSON Schema files +for each pydantic v2 model by calling model_json_schema() (pydantic v2 API). -Models with numpy fields may raise errors; these are logged and skipped. +Requires: +- qcelemental with v2 models (qcelemental.models.v2 submodule) +- Pydantic v2 with model_json_schema() method + +Errors on invalid or missing models — no silent skipping. Usage: cd qcschema/qcelemental_v2 @@ -20,6 +22,7 @@ Dependencies: - qcelemental (manual install required, not shipped) + - pydantic v2 """ import inspect @@ -27,40 +30,43 @@ import sys from pathlib import Path -import qcelemental.models +from jsonschema import Draft4Validator -def discover_pydantic_models(): - """Discover pydantic models in qcelemental.models, prioritizing v2. +def get_validator(): + """ + Get the JSON Schema validator class for qcelemental v2. + + Returns Draft4Validator for current qcelemental (which generates draft-04). + Will be updated to Draft202012Validator when qcelemental v2 moves to 2020-12. - First tries qcelemental.models.v2 if it exists (future proofing). - Falls back to qcelemental.models and filters for v2-compatible schemas. + Returns: + jsonschema.Draft4Validator class """ - models = {} + return Draft4Validator - # Try v2 submodule first (future-proofing for when qcelemental splits versions) - try: - import qcelemental.models.v2 as models_v2 - for name in dir(models_v2): - if name.startswith("_"): - continue +def discover_pydantic_models(): + """Discover pydantic v2 models in qcelemental.models.v2. - obj = getattr(models_v2, name) - if _is_pydantic_model(obj): - models[name] = obj + Requires qcelemental.models.v2 to exist. Does not fall back to v1 models. + """ + try: + import qcelemental.models.v2 as models_v2 + except ImportError as e: + raise ImportError("qcelemental.models.v2 not found. This is a v2-specific generator.") from e - if models: - return models - except (ImportError, AttributeError): - pass + models = {} - # Fall back to qcelemental.models (filtering if needed) - for name in dir(qcelemental.models): + for name in dir(models_v2): if name.startswith("_"): continue - obj = getattr(qcelemental.models, name) + try: + obj = getattr(models_v2, name) + except AttributeError as e: + raise RuntimeError(f"Failed to get attribute '{name}' from qcelemental.models.v2: {e}") from e + if _is_pydantic_model(obj): models[name] = obj @@ -68,25 +74,42 @@ def discover_pydantic_models(): def _is_pydantic_model(obj): - """Check if an object is a pydantic model class.""" + """Check if an object is a pydantic v2 model class. + + Only accepts pydantic v2 models with model_json_schema() method. + Rejects pydantic v1 models. + """ if not inspect.isclass(obj): return False - # Check for pydantic v2 API + # Only accept pydantic v2 API if hasattr(obj, "model_json_schema"): return True - # Check for pydantic v1 API - if hasattr(obj, "schema"): - try: - schema = obj.schema() - return isinstance(schema, dict) and ("properties" in schema or "title" in schema) - except Exception: - return False + # Reject pydantic v1 models explicitly + if hasattr(obj, "schema") and not hasattr(obj, "model_json_schema"): + return False return False +def _validate_schema(schema, model_name): + """Validate that a schema is a valid JSON Schema dictionary. + + Raises TypeError or ValueError if schema is invalid. + """ + if not isinstance(schema, dict): + raise TypeError(f"{model_name}: schema is not a dict, got {type(schema).__name__}") + + # JSON Schema should have at least $schema or properties or title + if not any(key in schema for key in ["$schema", "properties", "title", "type"]): + raise ValueError( + f"{model_name}: schema missing standard JSON Schema fields ($schema, properties, title, or type)" + ) + + return schema + + def _get_output_filename(model_name): """Map pydantic model names to schema filenames. @@ -113,16 +136,14 @@ def _get_output_filename(model_name): def _get_schema(model_class): - """Get JSON schema from a pydantic model using available API. + """Get JSON schema from a pydantic v2 model using model_json_schema(). - Tries pydantic v2 API first (model_json_schema), then falls back to v1 (schema). + Requires pydantic v2 API. Does not fall back to pydantic v1 schema(). + Uses mode="serialization" to respect custom serializers from qcelemental. """ - if hasattr(model_class, "model_json_schema"): - return model_class.model_json_schema() - elif hasattr(model_class, "schema"): - return model_class.schema() - else: - raise ValueError(f"{model_class} has no schema generation method") + if not hasattr(model_class, "model_json_schema"): + raise AttributeError(f"{model_class.__name__} does not have model_json_schema() method (pydantic v2 required)") + return model_class.model_json_schema(mode="serialization") def generate_schemas(output_dir=None): @@ -137,17 +158,22 @@ def generate_schemas(output_dir=None): models = discover_pydantic_models() if not models: - print("Warning: No pydantic models found in qcelemental.models") - return output_dir + raise RuntimeError("No pydantic models found in qcelemental.models") print(f"Found {len(models)} pydantic models") - successful = [] - skipped = [] + # Rebuild all models to resolve forward references + rebuild_failures = {} + for model_name, model_class in models.items(): + try: + model_class.model_rebuild() + except Exception as e: + rebuild_failures[model_name] = str(e) for model_name, model_class in sorted(models.items()): try: schema = _get_schema(model_class) + schema = _validate_schema(schema, model_name) # Write schema to file filename = _get_output_filename(model_name) @@ -155,26 +181,17 @@ def generate_schemas(output_dir=None): with open(output_file, "w") as f: json.dump(schema, f, indent=2) - successful.append(model_name) print(f"✓ {model_name} → {output_file.name}") - - except KeyError as e: - # Handle numpy dtype errors - if "dtype" in str(e): - skipped.append(f"{model_name} (numpy field: {e})") - print(f"⊘ {model_name} (skipped: numpy field causing {e})") - else: - skipped.append(f"{model_name} ({e})") - print(f"⊘ {model_name} (skipped: {e})") except Exception as e: - skipped.append(f"{model_name} ({type(e).__name__}: {e})") - print(f"⊘ {model_name} (skipped: {type(e).__name__}: {e})") - - print(f"\n✓ Generated {len(successful)} schemas") - if skipped: - print(f"⊘ Skipped {len(skipped)} models:") - for item in skipped: - print(f" - {item}") + print(f"⚠ {model_name} → Error: {e}") + + print(f"\n✓ Generated {len(models)} schemas") + + # Report models that failed to rebuild + if rebuild_failures: + print(f"\n⚠ {len(rebuild_failures)} model(s) failed to rebuild (have unresolved forward references):") + for model_name, error in sorted(rebuild_failures.items()): + print(f" - {model_name}: {error}") return output_dir diff --git a/qcschema/qcelemental_v2/utils.py b/qcschema/qcelemental_v2/utils.py deleted file mode 100644 index d80470f..0000000 --- a/qcschema/qcelemental_v2/utils.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Utilities for qcelemental v2 schema validation. -""" - -from jsonschema import Draft4Validator - - -def get_validator(): - """ - Get the JSON Schema validator class for qcelemental v2. - - Returns Draft4Validator for current qcelemental (which generates draft-04). - Will be updated to Draft202012Validator when qcelemental v2 moves to 2020-12. - - Returns: - jsonschema.Draft4Validator class - """ - return Draft4Validator diff --git a/qcschema/v1/__init__.py b/qcschema/v1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/qcschema/v1/__main__.py b/qcschema/v1/__main__.py new file mode 100644 index 0000000..064e037 --- /dev/null +++ b/qcschema/v1/__main__.py @@ -0,0 +1,10 @@ +""" +Entry point for running the v1 schema generator as a module. +Run as: python -m qcschema.v1 +""" + +from .generate import build_v1_schemas, write_schemas + +schemas = build_v1_schemas() +schema_dir = write_schemas(schemas) +print(f"✓ v1 schemas generated in {schema_dir}/") diff --git a/qcschema/v1/generate.py b/qcschema/v1/generate.py index 1ec8e34..cd1cd82 100644 --- a/qcschema/v1/generate.py +++ b/qcschema/v1/generate.py @@ -9,14 +9,96 @@ """ import copy +import json +import sys from pathlib import Path -from . import utils +from jsonschema import Draft4Validator + +# Add generator/properties to Python path +sys.path.insert(0, str(Path(__file__).parent / "generator" / "properties")) from .generator.properties.calcinfo_properties import calcinfo_properties from .generator.properties.mp_properties import mp_properties from .generator.properties.scf_properties import scf_properties +def write_schema(schema, filepath): + """ + Write a v1 schema to a JSON file (minified, single line, with spacing). + v1 schemas have no trailing newline. + + Args: + schema: Schema dictionary + filepath: Path to write to + """ + Path(filepath).parent.mkdir(parents=True, exist_ok=True) + with open(filepath, "w") as f: + json.dump(schema, f, separators=(", ", ": ")) + + +def get_validator(): + """ + Get the JSON Schema validator class for v1 (draft-04). + + Returns: + jsonschema.Draft4Validator class + """ + return Draft4Validator + + +def _validate_property_imports(): + """Validate that property imports are valid dictionaries. + + Raises TypeError if any property module is not a dict. + """ + if not isinstance(scf_properties, dict): + raise TypeError(f"scf_properties is not a dict, got {type(scf_properties).__name__}") + if not isinstance(mp_properties, dict): + raise TypeError(f"mp_properties is not a dict, got {type(mp_properties).__name__}") + if not isinstance(calcinfo_properties, dict): + raise TypeError(f"calcinfo_properties is not a dict, got {type(calcinfo_properties).__name__}") + + +def _validate_schema_return(schema, schema_name): + """Validate that a schema return value is a valid dictionary. + + Raises TypeError or ValueError if schema is invalid. + """ + if not isinstance(schema, dict): + raise TypeError(f"{schema_name}: returned value is not a dict, got {type(schema).__name__}") + + # JSON Schema should have at least $schema or properties or title + if not any(key in schema for key in ["$schema", "properties", "title", "type"]): + raise ValueError(f"{schema_name}: schema missing standard JSON Schema fields") + + return schema + + +def _validate_definitions(definitions, def_name): + """Validate that a definitions object is a valid dictionary of schema fragments. + + Raises TypeError or ValueError if definitions is invalid. + """ + if not isinstance(definitions, dict): + raise TypeError(f"{def_name}: not a dict, got {type(definitions).__name__}") + + if not definitions: + raise ValueError(f"{def_name}: definitions dict is empty") + + # Validate each component is a dict with schema-like structure + for component_name, component in definitions.items(): + if not isinstance(component, dict): + raise TypeError(f"{def_name}['{component_name}']: not a dict, got {type(component).__name__}") + + # Each definition should have at least some schema keywords + if not any(key in component for key in ["type", "properties", "enum", "description", "$ref"]): + raise ValueError( + f"{def_name}['{component_name}']: missing schema keywords (type, properties, enum, description, or $ref)" + ) + + return definitions + + def _build_v1_molecule(): """Build the frozen v1 molecule schema (original format without schema_name/version).""" return { @@ -127,8 +209,9 @@ def _build_v1_properties(): "mp2_total_energy", ] for key in mp_order: - if key in mp_properties: - v1_props[key] = mp_properties[key] + if key not in mp_properties: + raise KeyError(f"Required MP2 property '{key}' not found in mp_properties") + v1_props[key] = mp_properties[key] # Fix mp2 property descriptions to match reference exactly v1_props["mp2_opposite_spin_correlation_energy"]["description"] = ( @@ -337,10 +420,16 @@ def _build_v1_definitions(): def build_v1_schemas(): - """Build and return v1 schemas (input, output, molecule) in frozen v1 format.""" + """Build and return v1 schemas (input, output, molecule) in frozen v1 format. + + Validates all property imports and schema return values. + """ + # Validate property imports first + _validate_property_imports() - molecule_schema = _build_v1_molecule() - definitions = _build_v1_definitions() + # Build schemas with validation + molecule_schema = _validate_schema_return(_build_v1_molecule(), "v1 molecule schema") + definitions = _validate_definitions(_build_v1_definitions(), "v1 definitions") base_schema = { "$schema": "http://json-schema.org/draft-04/schema#", @@ -384,7 +473,7 @@ def build_v1_schemas(): output_schema["name"] = "qc_schema_output" output_schema["properties"]["schema_name"]["pattern"] = "\\W*(qc_schema_output)\\W*" output_schema["required"].extend(["provenance", "properties", "success", "return_result"]) - v1_properties = _build_v1_properties() + v1_properties = _validate_schema_return(_build_v1_properties(), "v1 properties schema") output_schema["properties"].update( { "properties": v1_properties, @@ -401,24 +490,53 @@ def build_v1_schemas(): } ) - return { + # Validate all schemas before returning + schemas = { "input": input_schema, "output": output_schema, "molecule": molecule_schema, } + for schema_name, schema in schemas.items(): + _validate_schema_return(schema, f"v1 {schema_name} schema") + + return schemas + def write_schemas(schemas, schema_dir=None): - """Write schemas to disk.""" + """Write schemas to disk. + + Validates schemas exist and writes them to disk. + Raises KeyError if required schema keys missing. + Raises RuntimeError if write operations fail. + """ if schema_dir is None: schema_dir = Path(__file__).parent / "schemas" schema_dir = Path(schema_dir) schema_dir.mkdir(parents=True, exist_ok=True) - utils.write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") - utils.write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") - utils.write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + # Validate that all required schema keys exist + required_keys = {"input", "output", "molecule"} + missing_keys = required_keys - set(schemas.keys()) + if missing_keys: + raise KeyError(f"Schemas missing required keys: {missing_keys}") + + # Write each schema with error handling + try: + write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") + except Exception as e: + raise RuntimeError(f"Failed to write input schema: {e}") from e + + try: + write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") + except Exception as e: + raise RuntimeError(f"Failed to write output schema: {e}") from e + + try: + write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + except Exception as e: + raise RuntimeError(f"Failed to write molecule schema: {e}") from e return schema_dir diff --git a/qcschema/v1/generator/dev_schema.py b/qcschema/v1/generator/dev_schema.py index 53c3f4b..31ac46b 100644 --- a/qcschema/v1/generator/dev_schema.py +++ b/qcschema/v1/generator/dev_schema.py @@ -77,7 +77,3 @@ # Build out the basis schema basis_dev_schema = copy.deepcopy(basis.basis) - -# import json -# print(json.dumps(input_dev_schema, indent=2)) -# print(json.dumps(output_dev_schema, indent=2)) diff --git a/qcschema/v1/utils.py b/qcschema/v1/utils.py deleted file mode 100644 index 1770d3e..0000000 --- a/qcschema/v1/utils.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Utilities for v1 schema generation and validation. -""" - -import json -from pathlib import Path - -from jsonschema import Draft4Validator - - -def write_schema(schema, filepath): - """ - Write a v1 schema to a JSON file (minified, single line, with spacing). - v1 schemas have no trailing newline. - - Args: - schema: Schema dictionary - filepath: Path to write to - """ - Path(filepath).parent.mkdir(parents=True, exist_ok=True) - with open(filepath, "w") as f: - json.dump(schema, f, separators=(", ", ": ")) - - -def get_validator(): - """ - Get the JSON Schema validator class for v1 (draft-04). - - Returns: - jsonschema.Draft4Validator class - """ - return Draft4Validator diff --git a/qcschema/v1_5/__init__.py b/qcschema/v1_5/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/qcschema/v1_5/__main__.py b/qcschema/v1_5/__main__.py new file mode 100644 index 0000000..abdb283 --- /dev/null +++ b/qcschema/v1_5/__main__.py @@ -0,0 +1,10 @@ +""" +Entry point for running the v1.5 schema generator as a module. +Run as: python -m qcschema.v1_5 +""" + +from .generate import build_v1p5_schemas, write_schemas + +schemas = build_v1p5_schemas() +schema_dir = write_schemas(schemas) +print(f"✓ v1.5 schemas generated in {schema_dir}/") diff --git a/qcschema/v1_5/generate.py b/qcschema/v1_5/generate.py index 57d2bfe..4989f79 100644 --- a/qcschema/v1_5/generate.py +++ b/qcschema/v1_5/generate.py @@ -17,14 +17,96 @@ """ import copy +import json +import sys from pathlib import Path -from . import utils +from jsonschema import Draft4Validator + +sys.path.insert(0, str(Path(__file__).parent / "generator" / "properties")) from .generator import basis, definitions, molecule, properties, wavefunction +def write_schema(schema, filepath): + """ + Write a v1.5 schema to a JSON file (minified, single line, with spacing). + v1.5 schemas have a trailing newline. + + Args: + schema: Schema dictionary + filepath: Path to write to + """ + Path(filepath).parent.mkdir(parents=True, exist_ok=True) + with open(filepath, "w") as f: + json.dump(schema, f, separators=(", ", ": ")) + f.write("\n") + + +def get_validator(): + """ + Get the JSON Schema validator class for v1.5 (draft-04). + + Returns: + jsonschema.Draft4Validator class + """ + return Draft4Validator + + +def _validate_schema_component(component, name): + """Validate that a schema component is a valid dictionary with schema structure. + + For definition components, validates that each sub-component has schema keywords. + Raises TypeError or ValueError if component is invalid. + """ + if not isinstance(component, dict): + raise TypeError(f"Schema component '{name}' is not a dict, got {type(component).__name__}") + + if not component: + raise ValueError(f"Schema component '{name}' is empty") + + # If this looks like a definitions object (contains multiple schema fragments), + # validate that each fragment has schema keywords + if "definitions" in name or name.endswith("definitions"): + for component_name, fragment in component.items(): + if not isinstance(fragment, dict): + raise TypeError(f"Component '{name}[{component_name}]' is not a dict, got {type(fragment).__name__}") + + if not any(key in fragment for key in ["type", "properties", "enum", "description", "$ref"]): + raise ValueError(f"Component '{name}[{component_name}]' missing schema keywords") + + return component + + +def _validate_full_schema(schema, schema_name): + """Validate that a schema is a valid JSON Schema dictionary. + + Raises TypeError or ValueError if schema is invalid. + """ + if not isinstance(schema, dict): + raise TypeError(f"{schema_name}: schema is not a dict, got {type(schema).__name__}") + + # JSON Schema should have at least $schema or properties or title + if not any(key in schema for key in ["$schema", "properties", "title", "type"]): + raise ValueError( + f"{schema_name}: schema missing standard JSON Schema fields ($schema, properties, title, or type)" + ) + + return schema + + def build_v1p5_schemas(): - """Build v1.5 schemas (v1 base + wavefunction support).""" + """Build v1.5 schemas (v1 base + wavefunction support). + + Validates all imported schema components and returned schemas. + """ + # Validate imported components + molecule_component = _validate_schema_component(molecule.molecule, "molecule.molecule") + basis_component = _validate_schema_component(basis.basis, "basis.basis") + definitions_component = _validate_schema_component(definitions.definitions, "definitions.definitions") + properties_component = _validate_schema_component(properties.properties, "properties.properties") + wavefunction_component = _validate_schema_component( + wavefunction.output_wavefunction, "wavefunction.output_wavefunction" + ) base_schema = { "$schema": "http://json-schema.org/draft-04/schema#", @@ -33,7 +115,7 @@ def build_v1p5_schemas(): "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": { - "molecule": molecule.molecule, + "molecule": molecule_component, "schema_name": {"type": "string", "pattern": "^(qc_?schema)$"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, @@ -43,7 +125,7 @@ def build_v1p5_schemas(): "method": {"type": "string"}, "basis": { "anyOf": [ - basis.basis, + basis_component, {"description": "Name of the basis set to apply to the whole molecule", "type": "string"}, ] }, @@ -60,11 +142,11 @@ def build_v1p5_schemas(): }, }, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], - "definitions": definitions.definitions, + "definitions": definitions_component, } output_properties = { - "properties": properties.properties, + "properties": properties_component, "success": {"type": "boolean"}, "error": { "definition": "The type and description of error raised.", @@ -85,30 +167,58 @@ def build_v1p5_schemas(): output_schema["name"] = "qcschema_output" output_schema["version"] = "1.dev" output_schema["properties"].update(output_properties) - output_schema["properties"]["wavefunction"] = wavefunction.output_wavefunction + output_schema["properties"]["wavefunction"] = wavefunction_component output_schema["required"].extend(["provenance", "properties", "success", "return_result"]) output_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_output)$" - molecule_schema = copy.deepcopy(molecule.molecule) + molecule_schema = copy.deepcopy(molecule_component) - return { + # Validate all schemas before returning + schemas = { "input": input_schema, "output": output_schema, "molecule": molecule_schema, } + for schema_name, schema in schemas.items(): + _validate_full_schema(schema, f"v1.5 {schema_name} schema") + + return schemas + def write_schemas(schemas, schema_dir=None): - """Write schemas to disk.""" + """Write schemas to disk. + + Validates schemas exist and writes them to disk. + Raises KeyError if required schema keys missing. + """ if schema_dir is None: schema_dir = Path(__file__).parent / "schemas" schema_dir = Path(schema_dir) schema_dir.mkdir(parents=True, exist_ok=True) - utils.write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") - utils.write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") - utils.write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + # Validate that all required schema keys exist + required_keys = {"input", "output", "molecule"} + missing_keys = required_keys - set(schemas.keys()) + if missing_keys: + raise KeyError(f"Schemas missing required keys: {missing_keys}") + + # Write each schema + try: + write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") + except Exception as e: + raise RuntimeError(f"Failed to write input schema: {e}") from e + + try: + write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") + except Exception as e: + raise RuntimeError(f"Failed to write output schema: {e}") from e + + try: + write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + except Exception as e: + raise RuntimeError(f"Failed to write molecule schema: {e}") from e return schema_dir diff --git a/qcschema/v1_5/utils.py b/qcschema/v1_5/utils.py deleted file mode 100644 index 4fb27f1..0000000 --- a/qcschema/v1_5/utils.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Utilities for v1.5 schema generation and validation. -""" - -import json -from pathlib import Path - -from jsonschema import Draft4Validator - - -def write_schema(schema, filepath): - """ - Write a v1.5 schema to a JSON file (minified, single line, with spacing). - v1.5 schemas have a trailing newline. - - Args: - schema: Schema dictionary - filepath: Path to write to - """ - Path(filepath).parent.mkdir(parents=True, exist_ok=True) - with open(filepath, "w") as f: - json.dump(schema, f, separators=(", ", ": ")) - f.write("\n") - - -def get_validator(): - """ - Get the JSON Schema validator class for v1.5 (draft-04). - - Returns: - jsonschema.Draft4Validator class - """ - return Draft4Validator diff --git a/qcschema/validate.py b/qcschema/validate.py index 51d678a..c292b32 100644 --- a/qcschema/validate.py +++ b/qcschema/validate.py @@ -16,7 +16,7 @@ def validate(data, schema_type, version): Loads the schema and validator class for the specified version, then validates. The validator class (Draft4, Draft202012, etc.) is determined - by the version's implementation in qcschema/{version}/utils.py. + by the version's implementation in qcschema/{version}/generate.py. Args: data: Instance to validate (dict-like) @@ -48,20 +48,20 @@ def validate(data, schema_type, version): f"Cannot find directory for version '{version}'. Available versions: {versions.list_versions(schema_type)}" ) - # Import validator class from version-specific utils + # Import validator class from version-specific generate module version_module_name = version_dir_name.replace(".", "_") try: - utils_module = importlib.import_module(f"qcschema.{version_module_name}.utils") - validator_class = utils_module.get_validator() + generate_module = importlib.import_module(f"qcschema.{version_module_name}.generate") + validator_class = generate_module.get_validator() except ImportError as e: raise ImportError( f"Cannot import validator for version '{version}'. " - f"qcschema/{version_module_name}/utils.py must define get_validator(). " + f"qcschema/{version_module_name}/generate.py must define get_validator(). " f"Error: {e}" ) from e except AttributeError as e: raise ImportError( - f"qcschema/{version_module_name}/utils.py must define get_validator() function. " f"Error: {e}" + f"qcschema/{version_module_name}/generate.py must define get_validator() function. " f"Error: {e}" ) from e # Validate using version-appropriate validator From 73077a37822adb398335858d2041c6f9ba38e671 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Thu, 6 Aug 2026 11:11:36 -0400 Subject: [PATCH 08/14] Update qcselemental v1 schema --- .../schemas/AtomicResultProtocols.schema | 87 + .../schemas/AutodocBaseSettings.schema | 7 - .../qcelemental_v1/schemas/BasisCenter.schema | 205 ++ .../schemas/ECPPotential.schema | 90 + .../schemas/ElectronShell.schema | 80 + .../schemas/ErrorCorrectionProtocol.schema | 22 + .../schemas/FailedOperation.schema | 1 + .../qcelemental_v1/schemas/Identifiers.schema | 63 + qcschema/qcelemental_v1/schemas/Model.schema | 293 +++ .../schemas/OptimizationInput.schema | 17 +- .../schemas/OptimizationProtocols.schema | 30 + .../schemas/OptimizationResult.schema | 18 +- .../schemas/OptimizationSpecification.schema | 76 + .../schemas/QCInputSpecification.schema | 361 +++ qcschema/qcelemental_v1/schemas/Result.schema | 12 +- .../qcelemental_v1/schemas/ResultInput.schema | 10 + .../qcelemental_v1/schemas/TDKeywords.schema | 72 + .../schemas/TorsionDriveInput.schema | 930 ++++++++ .../schemas/TorsionDriveResult.schema | 2055 +++++++++++++++++ .../schemas/WavefunctionProperties.schema | 602 +++++ .../schemas/qc_schema_basis.schema | 3 + .../schemas/qc_schema_input.schema | 10 + .../schemas/qc_schema_molecule.schema | 4 + .../schemas/qc_schema_output.schema | 12 +- 24 files changed, 5048 insertions(+), 12 deletions(-) create mode 100644 qcschema/qcelemental_v1/schemas/AtomicResultProtocols.schema delete mode 100644 qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema create mode 100644 qcschema/qcelemental_v1/schemas/BasisCenter.schema create mode 100644 qcschema/qcelemental_v1/schemas/ECPPotential.schema create mode 100644 qcschema/qcelemental_v1/schemas/ElectronShell.schema create mode 100644 qcschema/qcelemental_v1/schemas/ErrorCorrectionProtocol.schema create mode 100644 qcschema/qcelemental_v1/schemas/Identifiers.schema create mode 100644 qcschema/qcelemental_v1/schemas/Model.schema create mode 100644 qcschema/qcelemental_v1/schemas/OptimizationProtocols.schema create mode 100644 qcschema/qcelemental_v1/schemas/OptimizationSpecification.schema create mode 100644 qcschema/qcelemental_v1/schemas/QCInputSpecification.schema create mode 100644 qcschema/qcelemental_v1/schemas/TDKeywords.schema create mode 100644 qcschema/qcelemental_v1/schemas/TorsionDriveInput.schema create mode 100644 qcschema/qcelemental_v1/schemas/TorsionDriveResult.schema create mode 100644 qcschema/qcelemental_v1/schemas/WavefunctionProperties.schema diff --git a/qcschema/qcelemental_v1/schemas/AtomicResultProtocols.schema b/qcschema/qcelemental_v1/schemas/AtomicResultProtocols.schema new file mode 100644 index 0000000..848516e --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/AtomicResultProtocols.schema @@ -0,0 +1,87 @@ +{ + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema b/qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema deleted file mode 100644 index 27fd5e2..0000000 --- a/qcschema/qcelemental_v1/schemas/AutodocBaseSettings.schema +++ /dev/null @@ -1,7 +0,0 @@ -{ - "title": "AutodocBaseSettings", - "description": "Old class for pydantic docstring before autodoc-pydantic came about.", - "type": "object", - "properties": {}, - "additionalProperties": false -} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/BasisCenter.schema b/qcschema/qcelemental_v1/schemas/BasisCenter.schema new file mode 100644 index 0000000..9cd4c5e --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/BasisCenter.schema @@ -0,0 +1,205 @@ +{ + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false, + "definitions": { + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/ECPPotential.schema b/qcschema/qcelemental_v1/schemas/ECPPotential.schema new file mode 100644 index 0000000..2e77723 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ECPPotential.schema @@ -0,0 +1,90 @@ +{ + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false, + "definitions": { + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/ElectronShell.schema b/qcschema/qcelemental_v1/schemas/ElectronShell.schema new file mode 100644 index 0000000..2c8a210 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ElectronShell.schema @@ -0,0 +1,80 @@ +{ + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false, + "definitions": { + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/ErrorCorrectionProtocol.schema b/qcschema/qcelemental_v1/schemas/ErrorCorrectionProtocol.schema new file mode 100644 index 0000000..63fbd14 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ErrorCorrectionProtocol.schema @@ -0,0 +1,22 @@ +{ + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/FailedOperation.schema b/qcschema/qcelemental_v1/schemas/FailedOperation.schema index 9d6f55b..fb71508 100644 --- a/qcschema/qcelemental_v1/schemas/FailedOperation.schema +++ b/qcschema/qcelemental_v1/schemas/FailedOperation.schema @@ -30,6 +30,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the failed operation. Details which pertain specifically to a thrown error should be contained in the `error` field. See :class:`ComputeError` for details.", + "default": {}, "type": "object" } }, diff --git a/qcschema/qcelemental_v1/schemas/Identifiers.schema b/qcschema/qcelemental_v1/schemas/Identifiers.schema new file mode 100644 index 0000000..d004e62 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/Identifiers.schema @@ -0,0 +1,63 @@ +{ + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/Model.schema b/qcschema/qcelemental_v1/schemas/Model.schema new file mode 100644 index 0000000..90e7316 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/Model.schema @@ -0,0 +1,293 @@ +{ + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ], + "definitions": { + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/OptimizationInput.schema b/qcschema/qcelemental_v1/schemas/OptimizationInput.schema index e66c3b7..79cd7d1 100644 --- a/qcschema/qcelemental_v1/schemas/OptimizationInput.schema +++ b/qcschema/qcelemental_v1/schemas/OptimizationInput.schema @@ -20,6 +20,9 @@ "schema_version": { "title": "Schema Version", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "keywords": { @@ -67,8 +70,8 @@ "description": "Provenance information.", "default": { "creator": "QCElemental", - "version": "0.29.0", - "routine": "qcelemental.models.procedures" + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v1.procedures" }, "allOf": [ { @@ -341,6 +344,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "name": { @@ -426,6 +432,9 @@ "schema_version": { "title": "Schema Version", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "driver": { @@ -571,6 +580,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", "default": 2, + "enum": [ + 2 + ], "type": "integer" }, "validated": { @@ -789,6 +801,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, "type": "object" } }, diff --git a/qcschema/qcelemental_v1/schemas/OptimizationProtocols.schema b/qcschema/qcelemental_v1/schemas/OptimizationProtocols.schema new file mode 100644 index 0000000..848eadc --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/OptimizationProtocols.schema @@ -0,0 +1,30 @@ +{ + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/OptimizationResult.schema b/qcschema/qcelemental_v1/schemas/OptimizationResult.schema index 46bad99..6d9e741 100644 --- a/qcschema/qcelemental_v1/schemas/OptimizationResult.schema +++ b/qcschema/qcelemental_v1/schemas/OptimizationResult.schema @@ -20,6 +20,9 @@ "schema_version": { "title": "Schema Version", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "keywords": { @@ -390,6 +393,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "name": { @@ -475,6 +481,9 @@ "schema_version": { "title": "Schema Version", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "driver": { @@ -620,6 +629,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", "default": 2, + "enum": [ + 2 + ], "type": "integer" }, "validated": { @@ -838,6 +850,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, "type": "object" } }, @@ -1642,8 +1655,11 @@ }, "schema_version": { "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "description": "The version number of :attr:`~qcelemental.models.AtomicResult.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "molecule": { diff --git a/qcschema/qcelemental_v1/schemas/OptimizationSpecification.schema b/qcschema/qcelemental_v1/schemas/OptimizationSpecification.schema new file mode 100644 index 0000000..286f2d0 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/OptimizationSpecification.schema @@ -0,0 +1,76 @@ +{ + "title": "OptimizationSpecification", + "description": "A specification for how a geometry optimization should be performed **inside** of\nanother procedure.\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_specification", + "pattern": "qcschema_optimization_specification", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "procedure": { + "title": "Procedure", + "description": "Optimization procedure to run the optimization with.", + "type": "string" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + } + }, + "required": [ + "procedure" + ], + "additionalProperties": false, + "definitions": { + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + }, + "OptimizationProtocols": { + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/QCInputSpecification.schema b/qcschema/qcelemental_v1/schemas/QCInputSpecification.schema new file mode 100644 index 0000000..4689f3a --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/QCInputSpecification.schema @@ -0,0 +1,361 @@ +{ + "title": "QCInputSpecification", + "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_input", + "enum": [ + "qcschema_input" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "driver": { + "description": "Allowed computation driver values.", + "default": "gradient", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "model" + ], + "additionalProperties": false, + "definitions": { + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/Result.schema b/qcschema/qcelemental_v1/schemas/Result.schema index d49045a..f177984 100644 --- a/qcschema/qcelemental_v1/schemas/Result.schema +++ b/qcschema/qcelemental_v1/schemas/Result.schema @@ -19,8 +19,11 @@ }, "schema_version": { "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "description": "The version number of :attr:`~qcelemental.models.AtomicResult.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "molecule": { @@ -266,6 +269,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", "default": 2, + "enum": [ + 2 + ], "type": "integer" }, "validated": { @@ -484,6 +490,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, "type": "object" } }, @@ -724,6 +731,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "name": { diff --git a/qcschema/qcelemental_v1/schemas/ResultInput.schema b/qcschema/qcelemental_v1/schemas/ResultInput.schema index 6e4611e..0859c7d 100644 --- a/qcschema/qcelemental_v1/schemas/ResultInput.schema +++ b/qcschema/qcelemental_v1/schemas/ResultInput.schema @@ -19,6 +19,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "molecule": { @@ -194,6 +197,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", "default": 2, + "enum": [ + 2 + ], "type": "integer" }, "validated": { @@ -412,6 +418,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, "type": "object" } }, @@ -652,6 +659,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "name": { diff --git a/qcschema/qcelemental_v1/schemas/TDKeywords.schema b/qcschema/qcelemental_v1/schemas/TDKeywords.schema new file mode 100644 index 0000000..9f1739e --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/TDKeywords.schema @@ -0,0 +1,72 @@ +{ + "title": "TDKeywords", + "description": "TorsionDriveRecord options\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "dihedrals": { + "title": "Dihedrals", + "description": "The list of dihedrals to select for the TorsionDrive operation. Each entry is a tuple of integers of for particle indices.", + "type": "array", + "items": { + "type": "array", + "minItems": 4, + "maxItems": 4, + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ] + } + }, + "grid_spacing": { + "title": "Grid Spacing", + "description": "List of grid spacing for dihedral scan in degrees. Multiple values will be mapped to each dihedral angle.", + "type": "array", + "items": { + "type": "integer" + } + }, + "dihedral_ranges": { + "title": "Dihedral Ranges", + "description": "A list of dihedral range limits as a pair (lower, upper). Each range corresponds to the dihedrals in input.", + "type": "array", + "items": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ] + } + }, + "energy_decrease_thresh": { + "title": "Energy Decrease Thresh", + "description": "The threshold of the smallest energy decrease amount to trigger activating optimizations from grid point.", + "type": "number" + }, + "energy_upper_limit": { + "title": "Energy Upper Limit", + "description": "The threshold if the energy of a grid point that is higher than the current global minimum, to start new optimizations, in unit of a.u. I.e. if energy_upper_limit = 0.05, current global minimum energy is -9.9 , then a new task starting with energy -9.8 will be skipped.", + "type": "number" + } + }, + "required": [ + "dihedrals", + "grid_spacing" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/TorsionDriveInput.schema b/qcschema/qcelemental_v1/schemas/TorsionDriveInput.schema new file mode 100644 index 0000000..868ccba --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/TorsionDriveInput.schema @@ -0,0 +1,930 @@ +{ + "title": "TorsionDriveInput", + "description": "Inputs for running a torsion drive.\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_torsion_drive_input", + "pattern": "qcschema_torsion_drive_input", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "keywords": { + "title": "Keywords", + "description": "The torsion drive specific keywords to be used.", + "allOf": [ + { + "$ref": "#/definitions/TDKeywords" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Extra fields that are not part of the schema.", + "default": {}, + "type": "object" + }, + "input_specification": { + "title": "Input Specification", + "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", + "allOf": [ + { + "$ref": "#/definitions/QCInputSpecification" + } + ] + }, + "initial_molecule": { + "title": "Initial Molecule", + "description": "The starting molecule(s) for the torsion drive.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/Molecule" + } + }, + "optimization_spec": { + "title": "Optimization Spec", + "description": "Settings to use for optimizations at each grid angle.", + "allOf": [ + { + "$ref": "#/definitions/OptimizationSpecification" + } + ] + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "default": { + "creator": "QCElemental", + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v1.procedures" + }, + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + } + }, + "required": [ + "keywords", + "input_specification", + "initial_molecule", + "optimization_spec" + ], + "additionalProperties": false, + "definitions": { + "TDKeywords": { + "title": "TDKeywords", + "description": "TorsionDriveRecord options\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "dihedrals": { + "title": "Dihedrals", + "description": "The list of dihedrals to select for the TorsionDrive operation. Each entry is a tuple of integers of for particle indices.", + "type": "array", + "items": { + "type": "array", + "minItems": 4, + "maxItems": 4, + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ] + } + }, + "grid_spacing": { + "title": "Grid Spacing", + "description": "List of grid spacing for dihedral scan in degrees. Multiple values will be mapped to each dihedral angle.", + "type": "array", + "items": { + "type": "integer" + } + }, + "dihedral_ranges": { + "title": "Dihedral Ranges", + "description": "A list of dihedral range limits as a pair (lower, upper). Each range corresponds to the dihedrals in input.", + "type": "array", + "items": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ] + } + }, + "energy_decrease_thresh": { + "title": "Energy Decrease Thresh", + "description": "The threshold of the smallest energy decrease amount to trigger activating optimizations from grid point.", + "type": "number" + }, + "energy_upper_limit": { + "title": "Energy Upper Limit", + "description": "The threshold if the energy of a grid point that is higher than the current global minimum, to start new optimizations, in unit of a.u. I.e. if energy_upper_limit = 0.05, current global minimum energy is -9.9 , then a new task starting with energy -9.8 will be skipped.", + "type": "number" + } + }, + "required": [ + "dihedrals", + "grid_spacing" + ], + "additionalProperties": false + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "QCInputSpecification": { + "title": "QCInputSpecification", + "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_input", + "enum": [ + "qcschema_input" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "driver": { + "description": "Allowed computation driver values.", + "default": "gradient", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "model" + ], + "additionalProperties": false + }, + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "enum": [ + 2 + ], + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + }, + "OptimizationProtocols": { + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "OptimizationSpecification": { + "title": "OptimizationSpecification", + "description": "A specification for how a geometry optimization should be performed **inside** of\nanother procedure.\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_specification", + "pattern": "qcschema_optimization_specification", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "procedure": { + "title": "Procedure", + "description": "Optimization procedure to run the optimization with.", + "type": "string" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + } + }, + "required": [ + "procedure" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/TorsionDriveResult.schema b/qcschema/qcelemental_v1/schemas/TorsionDriveResult.schema new file mode 100644 index 0000000..4abc6e3 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/TorsionDriveResult.schema @@ -0,0 +1,2055 @@ +{ + "title": "TorsionDriveResult", + "description": "Results from running a torsion drive.\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_torsion_drive_output", + "pattern": "qcschema_torsion_drive_output", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "keywords": { + "title": "Keywords", + "description": "The torsion drive specific keywords to be used.", + "allOf": [ + { + "$ref": "#/definitions/TDKeywords" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Extra fields that are not part of the schema.", + "default": {}, + "type": "object" + }, + "input_specification": { + "title": "Input Specification", + "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", + "allOf": [ + { + "$ref": "#/definitions/QCInputSpecification" + } + ] + }, + "initial_molecule": { + "title": "Initial Molecule", + "description": "The starting molecule(s) for the torsion drive.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/Molecule" + } + }, + "optimization_spec": { + "title": "Optimization Spec", + "description": "Settings to use for optimizations at each grid angle.", + "allOf": [ + { + "$ref": "#/definitions/OptimizationSpecification" + } + ] + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "final_energies": { + "title": "Final Energies", + "description": "The final energy at each angle of the TorsionDrive scan.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "final_molecules": { + "title": "Final Molecules", + "description": "The final molecule at each angle of the TorsionDrive scan.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Molecule" + } + }, + "optimization_history": { + "title": "Optimization History", + "description": "The map of each angle of the TorsionDrive scan to each optimization computations.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/OptimizationResult" + } + } + }, + "stdout": { + "title": "Stdout", + "description": "The standard output of the program.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program.", + "type": "string" + }, + "success": { + "title": "Success", + "description": "The success of a given programs execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "keywords", + "input_specification", + "initial_molecule", + "optimization_spec", + "provenance", + "final_energies", + "final_molecules", + "optimization_history", + "success" + ], + "additionalProperties": false, + "definitions": { + "TDKeywords": { + "title": "TDKeywords", + "description": "TorsionDriveRecord options\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "dihedrals": { + "title": "Dihedrals", + "description": "The list of dihedrals to select for the TorsionDrive operation. Each entry is a tuple of integers of for particle indices.", + "type": "array", + "items": { + "type": "array", + "minItems": 4, + "maxItems": 4, + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ] + } + }, + "grid_spacing": { + "title": "Grid Spacing", + "description": "List of grid spacing for dihedral scan in degrees. Multiple values will be mapped to each dihedral angle.", + "type": "array", + "items": { + "type": "integer" + } + }, + "dihedral_ranges": { + "title": "Dihedral Ranges", + "description": "A list of dihedral range limits as a pair (lower, upper). Each range corresponds to the dihedrals in input.", + "type": "array", + "items": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ] + } + }, + "energy_decrease_thresh": { + "title": "Energy Decrease Thresh", + "description": "The threshold of the smallest energy decrease amount to trigger activating optimizations from grid point.", + "type": "number" + }, + "energy_upper_limit": { + "title": "Energy Upper Limit", + "description": "The threshold if the energy of a grid point that is higher than the current global minimum, to start new optimizations, in unit of a.u. I.e. if energy_upper_limit = 0.05, current global minimum energy is -9.9 , then a new task starting with energy -9.8 will be skipped.", + "type": "number" + } + }, + "required": [ + "dihedrals", + "grid_spacing" + ], + "additionalProperties": false + }, + "DriverEnum": { + "title": "DriverEnum", + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "type": "string" + }, + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "type": "object", + "properties": { + "method": { + "title": "Method", + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "type": "string" + }, + "basis": { + "title": "Basis", + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/BasisSet" + } + ] + } + }, + "required": [ + "method" + ] + }, + "QCInputSpecification": { + "title": "QCInputSpecification", + "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_input", + "enum": [ + "qcschema_input" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "driver": { + "description": "Allowed computation driver values.", + "default": "gradient", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "model" + ], + "additionalProperties": false + }, + "Identifiers": { + "title": "Identifiers", + "description": "Canonical chemical identifiers", + "type": "object", + "properties": { + "molecule_hash": { + "title": "Molecule Hash", + "type": "string" + }, + "molecular_formula": { + "title": "Molecular Formula", + "type": "string" + }, + "smiles": { + "title": "Smiles", + "type": "string" + }, + "inchi": { + "title": "Inchi", + "type": "string" + }, + "inchikey": { + "title": "Inchikey", + "type": "string" + }, + "canonical_explicit_hydrogen_smiles": { + "title": "Canonical Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_mapped_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "type": "string" + }, + "canonical_isomeric_explicit_hydrogen_smiles": { + "title": "Canonical Isomeric Explicit Hydrogen Smiles", + "type": "string" + }, + "canonical_isomeric_smiles": { + "title": "Canonical Isomeric Smiles", + "type": "string" + }, + "canonical_smiles": { + "title": "Canonical Smiles", + "type": "string" + }, + "pubchem_cid": { + "title": "Pubchem Cid", + "description": "PubChem Compound ID", + "type": "string" + }, + "pubchem_sid": { + "title": "Pubchem Sid", + "description": "PubChem Substance ID", + "type": "string" + }, + "pubchem_conformerid": { + "title": "Pubchem Conformerid", + "description": "PubChem Conformer ID", + "type": "string" + } + }, + "additionalProperties": false + }, + "Provenance": { + "title": "Provenance", + "description": "Provenance information.", + "type": "object", + "properties": { + "creator": { + "title": "Creator", + "description": "The name of the program, library, or person who created the object.", + "type": "string" + }, + "version": { + "title": "Version", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "default": "", + "type": "string" + }, + "routine": { + "title": "Routine", + "description": "The name of the routine or function within the creator, blank otherwise.", + "default": "", + "type": "string" + } + }, + "required": [ + "creator" + ], + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "Molecule": { + "title": "Molecule", + "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", + "default": "qcschema_molecule", + "pattern": "^(qcschema_molecule)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "default": 2, + "enum": [ + 2 + ], + "type": "integer" + }, + "validated": { + "title": "Validated", + "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", + "default": false, + "type": "boolean" + }, + "symbols": { + "title": "Symbols", + "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "geometry": { + "title": "Geometry", + "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", + "shape": [ + "nat", + 3 + ], + "units": "a0", + "type": "array", + "items": { + "type": "number" + } + }, + "name": { + "title": "Name", + "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", + "type": "string" + }, + "identifiers": { + "title": "Identifiers", + "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", + "allOf": [ + { + "$ref": "#/definitions/Identifiers" + } + ] + }, + "comment": { + "title": "Comment", + "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", + "type": "string" + }, + "molecular_charge": { + "title": "Molecular Charge", + "description": "The net electrostatic charge of the molecule.", + "default": 0.0, + "type": "number" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity", + "description": "The total multiplicity of the molecule.", + "default": 1, + "type": "number" + }, + "masses": { + "title": "Masses", + "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", + "shape": [ + "nat" + ], + "units": "u", + "type": "array", + "items": { + "type": "number" + } + }, + "real": { + "title": "Real", + "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "boolean" + } + }, + "atom_labels": { + "title": "Atom Labels", + "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "atomic_numbers": { + "title": "Atomic Numbers", + "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "mass_numbers": { + "title": "Mass Numbers", + "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", + "shape": [ + "nat" + ], + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + }, + "connectivity": { + "title": "Connectivity", + "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "minItems": 3, + "maxItems": 3, + "items": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0, + "maximum": 5 + } + ] + } + }, + "fragments": { + "title": "Fragments", + "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", + "shape": [ + "nfr", + "" + ], + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "multipleOf": 1.0 + } + } + }, + "fragment_charges": { + "title": "Fragment Charges", + "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fragment_multiplicities": { + "title": "Fragment Multiplicities", + "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", + "shape": [ + "nfr" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "fix_com": { + "title": "Fix Com", + "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", + "default": false, + "type": "boolean" + }, + "fix_orientation": { + "title": "Fix Orientation", + "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", + "default": false, + "type": "boolean" + }, + "fix_symmetry": { + "title": "Fix Symmetry", + "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "type": "string" + }, + "provenance": { + "title": "Provenance", + "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "id": { + "title": "Id", + "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, + "type": "object" + } + }, + "required": [ + "symbols", + "geometry" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "TrajectoryProtocolEnum": { + "title": "TrajectoryProtocolEnum", + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "type": "string" + }, + "OptimizationProtocols": { + "title": "OptimizationProtocols", + "description": "Protocols regarding the manipulation of a Optimization output data.", + "type": "object", + "properties": { + "trajectory": { + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", + "default": "all", + "allOf": [ + { + "$ref": "#/definitions/TrajectoryProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "OptimizationSpecification": { + "title": "OptimizationSpecification", + "description": "A specification for how a geometry optimization should be performed **inside** of\nanother procedure.\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_specification", + "pattern": "qcschema_optimization_specification", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "procedure": { + "title": "Procedure", + "description": "Optimization procedure to run the optimization with.", + "type": "string" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + } + }, + "required": [ + "procedure" + ], + "additionalProperties": false + }, + "WavefunctionProtocolEnum": { + "title": "WavefunctionProtocolEnum", + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "type": "string" + }, + "ErrorCorrectionProtocol": { + "title": "ErrorCorrectionProtocol", + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "type": "object", + "properties": { + "default_policy": { + "title": "Default Policy", + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "default": true, + "type": "boolean" + }, + "policies": { + "title": "Policies", + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "additionalProperties": false + }, + "NativeFilesProtocolEnum": { + "title": "NativeFilesProtocolEnum", + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "type": "string" + }, + "AtomicResultProtocols": { + "title": "AtomicResultProtocols", + "description": "Protocols regarding the manipulation of computational result data.", + "type": "object", + "properties": { + "wavefunction": { + "description": "Wavefunction to keep from a computation.", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProtocolEnum" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "Primary output file to keep from the computation", + "default": true, + "type": "boolean" + }, + "error_correction": { + "title": "Error Correction", + "description": "Policies for error correction", + "allOf": [ + { + "$ref": "#/definitions/ErrorCorrectionProtocol" + } + ] + }, + "native_files": { + "description": "Policies for keeping processed files from the computation", + "default": "none", + "allOf": [ + { + "$ref": "#/definitions/NativeFilesProtocolEnum" + } + ] + } + }, + "additionalProperties": false + }, + "AtomicResultProperties": { + "title": "AtomicResultProperties", + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", + "type": "object", + "properties": { + "calcinfo_nbasis": { + "title": "Calcinfo Nbasis", + "description": "The number of basis functions for the computation.", + "type": "integer" + }, + "calcinfo_nmo": { + "title": "Calcinfo Nmo", + "description": "The number of molecular orbitals for the computation.", + "type": "integer" + }, + "calcinfo_nalpha": { + "title": "Calcinfo Nalpha", + "description": "The number of alpha electrons in the computation.", + "type": "integer" + }, + "calcinfo_nbeta": { + "title": "Calcinfo Nbeta", + "description": "The number of beta electrons in the computation.", + "type": "integer" + }, + "calcinfo_natom": { + "title": "Calcinfo Natom", + "description": "The number of atoms in the computation.", + "type": "integer" + }, + "nuclear_repulsion_energy": { + "title": "Nuclear Repulsion Energy", + "description": "The nuclear repulsion energy.", + "type": "number" + }, + "return_energy": { + "title": "Return Energy", + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "type": "number" + }, + "return_gradient": { + "title": "Return Gradient", + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "return_hessian": { + "title": "Return Hessian", + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_one_electron_energy": { + "title": "Scf One Electron Energy", + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_two_electron_energy": { + "title": "Scf Two Electron Energy", + "description": "The two-electron energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_vv10_energy": { + "title": "Scf Vv10 Energy", + "description": "The VV10 functional energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_xc_energy": { + "title": "Scf Xc Energy", + "description": "The functional (XC) energy contribution to the total SCF energy.", + "units": "E_h", + "type": "number" + }, + "scf_dispersion_correction_energy": { + "title": "Scf Dispersion Correction Energy", + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "units": "E_h", + "type": "number" + }, + "scf_dipole_moment": { + "title": "Scf Dipole Moment", + "description": "The SCF X, Y, and Z dipole components", + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_quadrupole_moment": { + "title": "Scf Quadrupole Moment", + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "units": "e a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_energy": { + "title": "Scf Total Energy", + "description": "The total electronic energy of the SCF stage of the calculation.", + "units": "E_h", + "type": "number" + }, + "scf_total_gradient": { + "title": "Scf Total Gradient", + "description": "The total electronic gradient of the SCF stage of the calculation.", + "units": "E_h/a0", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_total_hessian": { + "title": "Scf Total Hessian", + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "units": "E_h/a0^2", + "type": "array", + "items": { + "type": "number" + } + }, + "scf_iterations": { + "title": "Scf Iterations", + "description": "The number of SCF iterations taken before convergence.", + "type": "integer" + }, + "mp2_same_spin_correlation_energy": { + "title": "Mp2 Same Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_opposite_spin_correlation_energy": { + "title": "Mp2 Opposite Spin Correlation Energy", + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "mp2_singles_energy": { + "title": "Mp2 Singles Energy", + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "mp2_doubles_energy": { + "title": "Mp2 Doubles Energy", + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "mp2_correlation_energy": { + "title": "Mp2 Correlation Energy", + "description": "The MP2 correlation energy.", + "units": "E_h", + "type": "number" + }, + "mp2_total_energy": { + "title": "Mp2 Total Energy", + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "mp2_dipole_moment": { + "title": "Mp2 Dipole Moment", + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_same_spin_correlation_energy": { + "title": "Ccsd Same Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_opposite_spin_correlation_energy": { + "title": "Ccsd Opposite Spin Correlation Energy", + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "units": "E_h", + "type": "number" + }, + "ccsd_singles_energy": { + "title": "Ccsd Singles Energy", + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "units": "E_h", + "type": "number" + }, + "ccsd_doubles_energy": { + "title": "Ccsd Doubles Energy", + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "units": "E_h", + "type": "number" + }, + "ccsd_correlation_energy": { + "title": "Ccsd Correlation Energy", + "description": "The CCSD correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_total_energy": { + "title": "Ccsd Total Energy", + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_dipole_moment": { + "title": "Ccsd Dipole Moment", + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsd_iterations": { + "title": "Ccsd Iterations", + "description": "The number of CCSD iterations taken before convergence.", + "type": "integer" + }, + "ccsd_prt_pr_correlation_energy": { + "title": "Ccsd Prt Pr Correlation Energy", + "description": "The CCSD(T) correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_total_energy": { + "title": "Ccsd Prt Pr Total Energy", + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsd_prt_pr_dipole_moment": { + "title": "Ccsd Prt Pr Dipole Moment", + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_correlation_energy": { + "title": "Ccsdt Correlation Energy", + "description": "The CCSDT correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdt_total_energy": { + "title": "Ccsdt Total Energy", + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdt_dipole_moment": { + "title": "Ccsdt Dipole Moment", + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdt_iterations": { + "title": "Ccsdt Iterations", + "description": "The number of CCSDT iterations taken before convergence.", + "type": "integer" + }, + "ccsdtq_correlation_energy": { + "title": "Ccsdtq Correlation Energy", + "description": "The CCSDTQ correlation energy.", + "units": "E_h", + "type": "number" + }, + "ccsdtq_total_energy": { + "title": "Ccsdtq Total Energy", + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "units": "E_h", + "type": "number" + }, + "ccsdtq_dipole_moment": { + "title": "Ccsdtq Dipole Moment", + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "units": "e a0", + "type": "array", + "items": { + "type": "number" + } + }, + "ccsdtq_iterations": { + "title": "Ccsdtq Iterations", + "description": "The number of CCSDTQ iterations taken before convergence.", + "type": "integer" + } + }, + "additionalProperties": false + }, + "WavefunctionProperties": { + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false + }, + "ComputeError": { + "title": "ComputeError", + "description": "Complete description of the error from an unsuccessful program execution.", + "type": "object", + "properties": { + "error_type": { + "title": "Error Type", + "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "type": "string" + }, + "error_message": { + "title": "Error Message", + "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "type": "string" + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the error.", + "type": "object" + } + }, + "required": [ + "error_type", + "error_message" + ], + "additionalProperties": false + }, + "AtomicResult": { + "title": "AtomicResult", + "description": "Results from a CMS program execution.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "description": "The optional ID for the computation.", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", + "default": "qcschema_output", + "enum": [ + "qcschema_output" + ], + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.AtomicResult.schema_name` to which this model conforms.", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "molecule": { + "title": "Molecule", + "description": "The molecule to use in the computation.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "driver": { + "description": "Allowed computation driver values.", + "allOf": [ + { + "$ref": "#/definitions/DriverEnum" + } + ] + }, + "model": { + "title": "Model", + "description": "The computational molecular sciences model to run.", + "allOf": [ + { + "$ref": "#/definitions/Model" + } + ] + }, + "keywords": { + "title": "Keywords", + "description": "The program-specific keywords to be used.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "Protocols regarding the manipulation of computational result data.", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProtocols" + } + ] + }, + "extras": { + "title": "Extras", + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "default": {}, + "type": "object" + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "properties": { + "title": "Properties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", + "allOf": [ + { + "$ref": "#/definitions/AtomicResultProperties" + } + ] + }, + "wavefunction": { + "title": "Wavefunction", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "allOf": [ + { + "$ref": "#/definitions/WavefunctionProperties" + } + ] + }, + "return_result": { + "title": "Return Result", + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "object" + } + ] + }, + "stdout": { + "title": "Stdout", + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program execution.", + "type": "string" + }, + "native_files": { + "title": "Native Files", + "description": "DSL files.", + "default": {}, + "type": "object" + }, + "success": { + "title": "Success", + "description": "The success of program execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "molecule", + "driver", + "model", + "provenance", + "properties", + "return_result", + "success" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + }, + "OptimizationResult": { + "title": "OptimizationResult", + "description": "QCSchema results model for geometry optimization.", + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "hash_index": { + "title": "Hash Index", + "type": "string" + }, + "schema_name": { + "title": "Schema Name", + "default": "qcschema_optimization_output", + "pattern": "qcschema_optimization_output", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "keywords": { + "title": "Keywords", + "description": "The optimization specific keywords to be used.", + "default": {}, + "type": "object" + }, + "extras": { + "title": "Extras", + "description": "Extra fields that are not part of the schema.", + "default": {}, + "type": "object" + }, + "protocols": { + "title": "Protocols", + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/OptimizationProtocols" + } + ] + }, + "input_specification": { + "title": "Input Specification", + "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", + "allOf": [ + { + "$ref": "#/definitions/QCInputSpecification" + } + ] + }, + "initial_molecule": { + "title": "Initial Molecule", + "description": "The starting molecule for the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "provenance": { + "title": "Provenance", + "description": "Provenance information.", + "allOf": [ + { + "$ref": "#/definitions/Provenance" + } + ] + }, + "final_molecule": { + "title": "Final Molecule", + "description": "The final molecule of the geometry optimization.", + "allOf": [ + { + "$ref": "#/definitions/Molecule" + } + ] + }, + "trajectory": { + "title": "Trajectory", + "description": "A list of ordered Result objects for each step in the optimization.", + "type": "array", + "items": { + "$ref": "#/definitions/AtomicResult" + } + }, + "energies": { + "title": "Energies", + "description": "A list of ordered energies for each step in the optimization.", + "type": "array", + "items": { + "type": "number" + } + }, + "stdout": { + "title": "Stdout", + "description": "The standard output of the program.", + "type": "string" + }, + "stderr": { + "title": "Stderr", + "description": "The standard error of the program.", + "type": "string" + }, + "success": { + "title": "Success", + "description": "The success of a given programs execution. If False, other fields may be blank.", + "type": "boolean" + }, + "error": { + "title": "Error", + "description": "Complete description of the error from an unsuccessful program execution.", + "allOf": [ + { + "$ref": "#/definitions/ComputeError" + } + ] + } + }, + "required": [ + "input_specification", + "initial_molecule", + "provenance", + "final_molecule", + "trajectory", + "energies", + "success" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/WavefunctionProperties.schema b/qcschema/qcelemental_v1/schemas/WavefunctionProperties.schema new file mode 100644 index 0000000..4c449a9 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/WavefunctionProperties.schema @@ -0,0 +1,602 @@ +{ + "title": "WavefunctionProperties", + "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "type": "object", + "properties": { + "basis": { + "title": "Basis", + "description": "\n A quantum chemistry basis description.\n ", + "allOf": [ + { + "$ref": "#/definitions/BasisSet" + } + ] + }, + "restricted": { + "title": "Restricted", + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "type": "boolean" + }, + "h_core_a": { + "title": "H Core A", + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_core_b": { + "title": "H Core B", + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_a": { + "title": "H Effective A", + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "h_effective_b": { + "title": "H Effective B", + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_a": { + "title": "Scf Orbitals A", + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_orbitals_b": { + "title": "Scf Orbitals B", + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_a": { + "title": "Scf Density A", + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_density_b": { + "title": "Scf Density B", + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_a": { + "title": "Scf Fock A", + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_fock_b": { + "title": "Scf Fock B", + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_a": { + "title": "Scf Eigenvalues A", + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_eigenvalues_b": { + "title": "Scf Eigenvalues B", + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_a": { + "title": "Scf Occupations A", + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_occupations_b": { + "title": "Scf Occupations B", + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_a": { + "title": "Scf Coulomb A", + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_coulomb_b": { + "title": "Scf Coulomb B", + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_a": { + "title": "Scf Exchange A", + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "scf_exchange_b": { + "title": "Scf Exchange B", + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_a": { + "title": "Localized Orbitals A", + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_orbitals_b": { + "title": "Localized Orbitals B", + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_a": { + "title": "Localized Fock A", + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "localized_fock_b": { + "title": "Localized Fock B", + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "type": "array", + "items": { + "type": "number" + } + }, + "orbitals_a": { + "title": "Orbitals A", + "description": "Index to the alpha-spin orbitals of the primary return.", + "type": "string" + }, + "orbitals_b": { + "title": "Orbitals B", + "description": "Index to the beta-spin orbitals of the primary return.", + "type": "string" + }, + "density_a": { + "title": "Density A", + "description": "Index to the alpha-spin density of the primary return.", + "type": "string" + }, + "density_b": { + "title": "Density B", + "description": "Index to the beta-spin density of the primary return.", + "type": "string" + }, + "fock_a": { + "title": "Fock A", + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "type": "string" + }, + "fock_b": { + "title": "Fock B", + "description": "Index to the beta-spin Fock matrix of the primary return.", + "type": "string" + }, + "eigenvalues_a": { + "title": "Eigenvalues A", + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "eigenvalues_b": { + "title": "Eigenvalues B", + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "type": "string" + }, + "occupations_a": { + "title": "Occupations A", + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "type": "string" + }, + "occupations_b": { + "title": "Occupations B", + "description": "Index to the beta-spin orbital occupations of the primary return.", + "type": "string" + } + }, + "required": [ + "basis", + "restricted" + ], + "additionalProperties": false, + "definitions": { + "HarmonicType": { + "title": "HarmonicType", + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "type": "string" + }, + "ElectronShell": { + "title": "ElectronShell", + "description": "Information for a single electronic shell.", + "type": "object", + "properties": { + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the shell as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "harmonic_type": { + "description": "The angular momentum representation of a shell.", + "allOf": [ + { + "$ref": "#/definitions/HarmonicType" + } + ] + }, + "exponents": { + "title": "Exponents", + "description": "Exponents for the contracted shell.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "additionalProperties": false + }, + "ECPType": { + "title": "ECPType", + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "type": "string" + }, + "ECPPotential": { + "title": "ECPPotential", + "description": "Information for a single ECP potential.", + "type": "object", + "properties": { + "ecp_type": { + "description": "The type of the ECP potential.", + "allOf": [ + { + "$ref": "#/definitions/ECPType" + } + ] + }, + "angular_momentum": { + "title": "Angular Momentum", + "description": "Angular momentum for the potential as an array of integers.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "uniqueItems": true + }, + "r_exponents": { + "title": "R Exponents", + "description": "Exponents of the 'r' term.", + "minItems": 1, + "type": "array", + "items": { + "type": "integer" + } + }, + "gaussian_exponents": { + "title": "Gaussian Exponents", + "description": "Exponents of the 'gaussian' term.", + "minItems": 1, + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "coefficients": { + "title": "Coefficients", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "minItems": 1, + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1 + } + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "additionalProperties": false + }, + "BasisCenter": { + "title": "BasisCenter", + "description": "Data for a single atom/center in a basis set.", + "type": "object", + "properties": { + "electron_shells": { + "title": "Electron Shells", + "description": "Electronic shells for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ElectronShell" + }, + "uniqueItems": true + }, + "ecp_electrons": { + "title": "Ecp Electrons", + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "default": 0, + "type": "integer" + }, + "ecp_potentials": { + "title": "Ecp Potentials", + "description": "ECPs, MCPs, or other field potentials for this center.", + "minItems": 1, + "type": "array", + "items": { + "$ref": "#/definitions/ECPPotential" + }, + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "additionalProperties": false + }, + "BasisSet": { + "title": "BasisSet", + "description": "A quantum chemistry basis description.", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name", + "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", + "default": "qcschema_basis", + "pattern": "^(qcschema_basis)$", + "type": "string" + }, + "schema_version": { + "title": "Schema Version", + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "default": 1, + "enum": [ + 1 + ], + "type": "integer" + }, + "name": { + "title": "Name", + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "type": "string" + }, + "description": { + "title": "Description", + "description": "Brief description of the basis set.", + "type": "string" + }, + "center_data": { + "title": "Center Data", + "description": "Shared basis data for all atoms/centers in the parent molecule", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BasisCenter" + } + }, + "atom_map": { + "title": "Atom Map", + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "type": "array", + "items": { + "type": "string" + } + }, + "nbf": { + "title": "Nbf", + "description": "The number of basis functions. Use for convenience or as checksum", + "type": "integer" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-04/schema#" + } + } +} \ No newline at end of file diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema b/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema index 0832427..ec9b8b2 100644 --- a/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema +++ b/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema @@ -14,6 +14,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "name": { diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_input.schema b/qcschema/qcelemental_v1/schemas/qc_schema_input.schema index 269824f..e9576b9 100644 --- a/qcschema/qcelemental_v1/schemas/qc_schema_input.schema +++ b/qcschema/qcelemental_v1/schemas/qc_schema_input.schema @@ -19,6 +19,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "molecule": { @@ -194,6 +197,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", "default": 2, + "enum": [ + 2 + ], "type": "integer" }, "validated": { @@ -412,6 +418,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, "type": "object" } }, @@ -652,6 +659,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "name": { diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema b/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema index 478ae00..10c5f70 100644 --- a/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema +++ b/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema @@ -14,6 +14,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", "default": 2, + "enum": [ + 2 + ], "type": "integer" }, "validated": { @@ -232,6 +235,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, "type": "object" } }, diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_output.schema b/qcschema/qcelemental_v1/schemas/qc_schema_output.schema index af5bd32..8812576 100644 --- a/qcschema/qcelemental_v1/schemas/qc_schema_output.schema +++ b/qcschema/qcelemental_v1/schemas/qc_schema_output.schema @@ -19,8 +19,11 @@ }, "schema_version": { "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", + "description": "The version number of :attr:`~qcelemental.models.AtomicResult.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "molecule": { @@ -266,6 +269,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", "default": 2, + "enum": [ + 2 + ], "type": "integer" }, "validated": { @@ -484,6 +490,7 @@ "extras": { "title": "Extras", "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", + "default": {}, "type": "object" } }, @@ -724,6 +731,9 @@ "title": "Schema Version", "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", "default": 1, + "enum": [ + 1 + ], "type": "integer" }, "name": { From 74154817e51ef90bbe3fde4503d45e7cdd6dfbd9 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Thu, 6 Aug 2026 11:32:01 -0400 Subject: [PATCH 09/14] Resolve v2 issues --- qcschema/qcelemental_v2/generate.py | 21 + .../schemas/AlignmentMill.schema | 66 +- .../schemas/AtomicProperties.schema | 4 + .../schemas/AtomicProtocols.schema | 87 + .../schemas/AtomicSpecification.schema | 457 +++ .../schemas/AutodocBaseSettings.schema | 7 - .../qcelemental_v2/schemas/BasisCenter.schema | 201 ++ .../schemas/ComputeError.schema | 20 +- .../schemas/ECPPotential.schema | 84 + .../schemas/ElectronShell.schema | 74 + .../schemas/FailedOperation.schema | 125 +- qcschema/qcelemental_v2/schemas/Model.schema | 308 ++ .../schemas/OptimizationInput.schema | 1240 ++++---- .../schemas/OptimizationProperties.schema | 4 + .../schemas/OptimizationProtocols.schema | 32 + .../schemas/OptimizationResult.schema | 2682 +++++++---------- .../schemas/OptimizationSpecification.schema | 738 +++++ .../qcelemental_v2/schemas/ProtoModel.schema | 6 +- qcschema/qcelemental_v2/schemas/Result.schema | 1570 ---------- .../qcelemental_v2/schemas/ResultInput.schema | 810 ----- .../schemas/ResultProperties.schema | 325 -- .../schemas/TorsionDriveInput.schema | 1007 +++++++ .../schemas/TorsionDriveKeywords.schema | 103 + .../schemas/TorsionDriveProperties.schema | 28 + .../schemas/TorsionDriveProtocols.schema | 31 + .../schemas/TorsionDriveResult.schema | 1744 +++++++++++ .../schemas/TorsionDriveSpecification.schema | 917 ++++++ .../schemas/WavefunctionProperties.schema | 4 + .../schemas/qc_schema_basis.schema | 357 +-- .../schemas/qc_schema_input.schema | 979 +++--- .../schemas/qc_schema_molecule.schema | 337 +-- .../schemas/qc_schema_output.schema | 1824 +++-------- .../schemas/qc_schema_properties.schema | 325 -- .../schemas/qc_schema_provenance.schema | 17 +- 34 files changed, 8755 insertions(+), 7779 deletions(-) create mode 100644 qcschema/qcelemental_v2/schemas/AtomicProperties.schema create mode 100644 qcschema/qcelemental_v2/schemas/AtomicProtocols.schema create mode 100644 qcschema/qcelemental_v2/schemas/AtomicSpecification.schema delete mode 100644 qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema create mode 100644 qcschema/qcelemental_v2/schemas/BasisCenter.schema create mode 100644 qcschema/qcelemental_v2/schemas/ECPPotential.schema create mode 100644 qcschema/qcelemental_v2/schemas/ElectronShell.schema create mode 100644 qcschema/qcelemental_v2/schemas/Model.schema create mode 100644 qcschema/qcelemental_v2/schemas/OptimizationProperties.schema create mode 100644 qcschema/qcelemental_v2/schemas/OptimizationProtocols.schema create mode 100644 qcschema/qcelemental_v2/schemas/OptimizationSpecification.schema delete mode 100644 qcschema/qcelemental_v2/schemas/Result.schema delete mode 100644 qcschema/qcelemental_v2/schemas/ResultInput.schema delete mode 100644 qcschema/qcelemental_v2/schemas/ResultProperties.schema create mode 100644 qcschema/qcelemental_v2/schemas/TorsionDriveInput.schema create mode 100644 qcschema/qcelemental_v2/schemas/TorsionDriveKeywords.schema create mode 100644 qcschema/qcelemental_v2/schemas/TorsionDriveProperties.schema create mode 100644 qcschema/qcelemental_v2/schemas/TorsionDriveProtocols.schema create mode 100644 qcschema/qcelemental_v2/schemas/TorsionDriveResult.schema create mode 100644 qcschema/qcelemental_v2/schemas/TorsionDriveSpecification.schema create mode 100644 qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema delete mode 100644 qcschema/qcelemental_v2/schemas/qc_schema_properties.schema diff --git a/qcschema/qcelemental_v2/generate.py b/qcschema/qcelemental_v2/generate.py index 83647a5..ea0250b 100644 --- a/qcschema/qcelemental_v2/generate.py +++ b/qcschema/qcelemental_v2/generate.py @@ -23,6 +23,18 @@ Dependencies: - qcelemental (manual install required, not shipped) - pydantic v2 + +Optional Dependencies: + - qcmanybody: If installed and compatible, the script will import + qcelemental.models.v2 and qcmanybody.models.v2 before rebuilding models. + This resolves forward references for 6 models (Optimization* and TorsionDrive*) + that reference ManyBodySpecification/ManyBodyResult from qcmanybody. + Without qcmanybody, these 6 models will fail to rebuild and their schemas + will be empty or incomplete. + + Current status: Compatibility issue between qcelemental dev version + and qcmanybody 0.5.1 (ExtendedConfigDict not available). Once compatible, + this will resolve 6 model rebuild failures. """ import inspect @@ -162,6 +174,15 @@ def generate_schemas(output_dir=None): print(f"Found {len(models)} pydantic models") + # Try to import qcmanybody to resolve forward references + # (6 models reference ManyBodySpecification and ManyBodyResult from qcmanybody.models.v2) + try: + import qcmanybody.models.v2 # noqa: F401 - imported for side effects (type registration) + + print("✓ qcmanybody.models.v2 imported (Optimization/TorsionDrive models will be complete)") + except ImportError as e: + print(f"ℹ qcmanybody not available: {e} (some models may fail to rebuild)") + # Rebuild all models to resolve forward references rebuild_failures = {} for model_name, model_class in models.items(): diff --git a/qcschema/qcelemental_v2/schemas/AlignmentMill.schema b/qcschema/qcelemental_v2/schemas/AlignmentMill.schema index d82201c..028b37d 100644 --- a/qcschema/qcelemental_v2/schemas/AlignmentMill.schema +++ b/qcschema/qcelemental_v2/schemas/AlignmentMill.schema @@ -1,39 +1,63 @@ { - "title": "AlignmentMill", + "additionalProperties": false, "description": "Facilitates the application of the simple transformation operations\ndefined by ``shift``, ``rotation``, ``atommap`` arrays and ``mirror``\nboolean as recipe to the data structures\ndescribing Cartesian molecular coordinates. Attaches functions to\ntransform the geometry, element list, gradient, etc. to the\nAlignmentRecipe. When `mirror` attribute (defaults to False) active,\nthen molecular system can be substantively changed by procedure.", - "type": "object", "properties": { "shift": { - "title": "Shift", + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, "description": "Translation array (3,) for coordinates.", - "type": "array", - "items": { - "type": "number" - } + "title": "Shift" }, "rotation": { - "title": "Rotation", + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, "description": "Rotation array (3, 3) for coordinates.", - "type": "array", - "items": { - "type": "number" - } + "title": "Rotation" }, "atommap": { - "title": "Atommap", + "anyOf": [ + { + "items": { + "multipleOf": 1.0, + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, "description": "Atom exchange map (nat,) for coordinates.", - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } + "title": "Atommap" }, "mirror": { - "title": "Mirror", - "description": "Do mirror invert coordinates?", "default": false, + "description": "Do mirror invert coordinates?", + "title": "Mirror", "type": "boolean" } }, - "additionalProperties": false + "title": "AlignmentMill", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/AtomicProperties.schema b/qcschema/qcelemental_v2/schemas/AtomicProperties.schema new file mode 100644 index 0000000..ca11ede --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/AtomicProperties.schema @@ -0,0 +1,4 @@ +{ + "additionalProperties": true, + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/AtomicProtocols.schema b/qcschema/qcelemental_v2/schemas/AtomicProtocols.schema new file mode 100644 index 0000000..62f932b --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/AtomicProtocols.schema @@ -0,0 +1,87 @@ +{ + "$defs": { + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "properties": { + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" + }, + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" + } + }, + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" + }, + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" + }, + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/AtomicSpecification.schema b/qcschema/qcelemental_v2/schemas/AtomicSpecification.schema new file mode 100644 index 0000000..f10015a --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/AtomicSpecification.schema @@ -0,0 +1,457 @@ +{ + "$defs": { + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" + }, + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" + }, + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" + }, + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "DriverEnum": { + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "title": "DriverEnum", + "type": "string" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "properties": { + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" + }, + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" + } + }, + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + }, + "Model": { + "additionalProperties": true, + "description": "The computational molecular sciences model to run.", + "properties": { + "method": { + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", + "type": "string" + }, + "basis": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" + } + }, + "required": [ + "method" + ], + "title": "Model", + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" + }, + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", + "type": "string" + }, + "driver": { + "$ref": "#/$defs/DriverEnum" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema b/qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema deleted file mode 100644 index 27fd5e2..0000000 --- a/qcschema/qcelemental_v2/schemas/AutodocBaseSettings.schema +++ /dev/null @@ -1,7 +0,0 @@ -{ - "title": "AutodocBaseSettings", - "description": "Old class for pydantic docstring before autodoc-pydantic came about.", - "type": "object", - "properties": {}, - "additionalProperties": false -} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/BasisCenter.schema b/qcschema/qcelemental_v2/schemas/BasisCenter.schema new file mode 100644 index 0000000..85ec1b7 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/BasisCenter.schema @@ -0,0 +1,201 @@ +{ + "$defs": { + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ComputeError.schema b/qcschema/qcelemental_v2/schemas/ComputeError.schema index b81ce14..842949e 100644 --- a/qcschema/qcelemental_v2/schemas/ComputeError.schema +++ b/qcschema/qcelemental_v2/schemas/ComputeError.schema @@ -1,27 +1,33 @@ { - "title": "ComputeError", + "additionalProperties": false, "description": "Complete description of the error from an unsuccessful program execution.", - "type": "object", "properties": { "error_type": { - "title": "Error Type", "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "title": "Error Type", "type": "string" }, "error_message": { - "title": "Error Message", "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "title": "Error Message", "type": "string" }, "extras": { - "title": "Extras", + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, "description": "Additional information to bundle with the error.", - "type": "object" + "title": "Extras" } }, "required": [ "error_type", "error_message" ], - "additionalProperties": false + "title": "ComputeError", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ECPPotential.schema b/qcschema/qcelemental_v2/schemas/ECPPotential.schema new file mode 100644 index 0000000..d994659 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ECPPotential.schema @@ -0,0 +1,84 @@ +{ + "$defs": { + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ElectronShell.schema b/qcschema/qcelemental_v2/schemas/ElectronShell.schema new file mode 100644 index 0000000..a43b456 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ElectronShell.schema @@ -0,0 +1,74 @@ +{ + "$defs": { + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/FailedOperation.schema b/qcschema/qcelemental_v2/schemas/FailedOperation.schema index 9d6f55b..e2aa3bc 100644 --- a/qcschema/qcelemental_v2/schemas/FailedOperation.schema +++ b/qcschema/qcelemental_v2/schemas/FailedOperation.schema @@ -1,69 +1,100 @@ { - "title": "FailedOperation", - "description": "Record indicating that a given operation (program, procedure, etc.) has failed and containing the reason and input data which generated the failure.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "A unique identifier which links this FailedOperation, often of the same Id of the operation should it have been successful. This will often be set programmatically by a database such as Fractal.", - "type": "string" - }, - "input_data": { - "title": "Input Data", - "description": "The input data which was passed in that generated this failure. This should be the complete input which when attempted to be run, caused the operation to fail." - }, - "success": { - "title": "Success", - "description": "A boolean indicator that the operation failed consistent with the model of successful operations. Should always be False. Allows programmatic assessment of all operations regardless of if they failed or succeeded", - "default": false, - "type": "boolean" - }, - "error": { - "title": "Error", - "description": "A container which has details of the error that failed this operation. See the :class:`ComputeError` for more details.", - "allOf": [ - { - "$ref": "#/definitions/ComputeError" - } - ] - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the failed operation. Details which pertain specifically to a thrown error should be contained in the `error` field. See :class:`ComputeError` for details.", - "type": "object" - } - }, - "required": [ - "error" - ], - "additionalProperties": false, - "definitions": { + "$defs": { "ComputeError": { - "title": "ComputeError", + "additionalProperties": false, "description": "Complete description of the error from an unsuccessful program execution.", - "type": "object", "properties": { "error_type": { - "title": "Error Type", "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", + "title": "Error Type", "type": "string" }, "error_message": { - "title": "Error Message", "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "title": "Error Message", "type": "string" }, "extras": { - "title": "Extras", + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, "description": "Additional information to bundle with the error.", - "type": "object" + "title": "Extras" } }, "required": [ "error_type", "error_message" ], - "additionalProperties": false + "title": "ComputeError", + "type": "object" + } + }, + "additionalProperties": false, + "description": "Record indicating that a given operation (program, procedure, etc.) has failed\nand containing the reason and input data which generated the failure.", + "properties": { + "schema_name": { + "const": "qcschema_failed_operation", + "default": "qcschema_failed_operation", + "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_failed_operation.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.FailedOperation.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A unique identifier which links this FailedOperation, often of the same Id of the operation should it have been successful. This will often be set programmatically by a database such as Fractal.", + "title": "Id" + }, + "input_data": { + "default": null, + "description": "The input data which was passed in that generated this failure. This should be the complete input which when attempted to be run, caused the operation to fail.", + "title": "Input Data" + }, + "success": { + "const": false, + "default": false, + "description": "A boolean indicator that the operation failed consistent with the model of successful operations. Should always be False. Allows programmatic assessment of all operations regardless of if they failed or succeeded", + "title": "Success", + "type": "boolean" + }, + "error": { + "$ref": "#/$defs/ComputeError", + "description": "A container which has details of the error that failed this operation. See the :class:`ComputeError` for more details." + }, + "extras": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": {}, + "description": "Additional information to bundle with the failed operation. Details which pertain specifically to a thrown error should be contained in the `error` field. See :class:`ComputeError` for details.", + "title": "Extras" } - } + }, + "required": [ + "error" + ], + "title": "FailedOperation", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/Model.schema b/qcschema/qcelemental_v2/schemas/Model.schema new file mode 100644 index 0000000..01e130f --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/Model.schema @@ -0,0 +1,308 @@ +{ + "$defs": { + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + } + }, + "additionalProperties": true, + "description": "The computational molecular sciences model to run.", + "properties": { + "method": { + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", + "type": "string" + }, + "basis": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" + } + }, + "required": [ + "method" + ], + "title": "Model", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationInput.schema b/qcschema/qcelemental_v2/schemas/OptimizationInput.schema index e66c3b7..bb271b8 100644 --- a/qcschema/qcelemental_v2/schemas/OptimizationInput.schema +++ b/qcschema/qcelemental_v2/schemas/OptimizationInput.schema @@ -1,118 +1,234 @@ { - "title": "OptimizationInput", - "description": "QCSchema input directive for geometry optimization.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "hash_index": { - "title": "Hash Index", - "type": "string" - }, - "schema_name": { - "title": "Schema Name", - "default": "qcschema_optimization_input", - "pattern": "qcschema_optimization_input", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "default": 1, - "type": "integer" - }, - "keywords": { - "title": "Keywords", - "description": "The optimization specific keywords to be used.", - "default": {}, + "$defs": { + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" + }, + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" + }, + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", "type": "object" }, - "extras": { - "title": "Extras", - "description": "Extra fields that are not part of the schema.", - "default": {}, + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" + }, + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", + "type": "string" + }, + "driver": { + "$ref": "#/$defs/DriverEnum" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", "type": "object" }, - "protocols": { - "title": "Protocols", - "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/OptimizationProtocols" + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true } - ] + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" }, - "input_specification": { - "title": "Input Specification", - "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", - "allOf": [ - { - "$ref": "#/definitions/QCInputSpecification" + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" } - ] + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" }, - "initial_molecule": { - "title": "Initial Molecule", - "description": "The starting molecule for the geometry optimization.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] + "BsseEnum": { + "description": "Available basis-set superposition error (BSSE) treatments.", + "enum": [ + "nocp", + "cp", + "vmfc", + "cp", + "nocp", + "nocp" + ], + "title": "BsseEnum", + "type": "string" }, - "provenance": { - "title": "Provenance", - "description": "Provenance information.", - "default": { - "creator": "QCElemental", - "version": "0.29.0", - "routine": "qcelemental.models.procedures" - }, - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - } - }, - "required": [ - "input_specification", - "initial_molecule" - ], - "additionalProperties": false, - "definitions": { - "TrajectoryProtocolEnum": { - "title": "TrajectoryProtocolEnum", - "description": "Which gradient evaluations to keep in an optimization trajectory.", + "ClusterResultsProtocolEnum": { + "description": "Which component results to preserve in a many body result; usually AtomicResults.", "enum": [ "all", - "initial_and_final", - "final", "none" ], + "title": "ClusterResultsProtocolEnum", "type": "string" }, - "OptimizationProtocols": { - "title": "OptimizationProtocols", - "description": "Protocols regarding the manipulation of a Optimization output data.", - "type": "object", - "properties": { - "trajectory": { - "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", - "default": "all", - "allOf": [ - { - "$ref": "#/definitions/TrajectoryProtocolEnum" - } - ] - } - }, - "additionalProperties": false - }, "DriverEnum": { - "title": "DriverEnum", "description": "Allowed computation driver values.", "enum": [ "energy", @@ -120,46 +236,38 @@ "hessian", "properties" ], + "title": "DriverEnum", "type": "string" }, - "HarmonicType": { - "title": "HarmonicType", - "description": "The angular momentum representation of a shell.", - "enum": [ - "spherical", - "cartesian" - ], - "type": "string" - }, - "ElectronShell": { - "title": "ElectronShell", - "description": "Information for a single electronic shell.", - "type": "object", + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the shell as an array of integers.", - "minItems": 1, - "type": "array", + "description": "Angular momentum for the potential as an array of integers.", "items": { - "type": "integer", - "minimum": 0 + "minimum": 0, + "type": "integer" }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", "uniqueItems": true }, - "harmonic_type": { - "description": "The angular momentum representation of a shell.", - "allOf": [ - { - "$ref": "#/definitions/HarmonicType" - } - ] - }, - "exponents": { - "title": "Exponents", - "description": "Exponents for the contracted shell.", + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, "minItems": 1, - "type": "array", + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", "items": { "anyOf": [ { @@ -169,15 +277,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -188,65 +295,52 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ + "ecp_type", "angular_momentum", - "harmonic_type", - "exponents", + "r_exponents", + "gaussian_exponents", "coefficients" ], - "additionalProperties": false + "title": "ECPPotential", + "type": "object" }, "ECPType": { - "title": "ECPType", "description": "The type of the ECP potential.", "enum": [ "scalar", "spinorbit" ], + "title": "ECPType", "type": "string" }, - "ECPPotential": { - "title": "ECPPotential", - "description": "Information for a single ECP potential.", - "type": "object", + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", "properties": { - "ecp_type": { - "description": "The type of the ECP potential.", - "allOf": [ - { - "$ref": "#/definitions/ECPType" - } - ] - }, "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the potential as an array of integers.", - "minItems": 1, - "type": "array", + "description": "Angular momentum for the shell as an array of integers.", "items": { - "type": "integer", - "minimum": 0 + "minimum": 0, + "type": "integer" }, - "uniqueItems": true - }, - "r_exponents": { - "title": "R Exponents", - "description": "Exponents of the 'r' term.", "minItems": 1, + "title": "Angular Momentum", "type": "array", - "items": { - "type": "integer" - } + "uniqueItems": true }, - "gaussian_exponents": { - "title": "Gaussian Exponents", - "description": "Exponents of the 'gaussian' term.", - "minItems": 1, - "type": "array", + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", "items": { "anyOf": [ { @@ -256,15 +350,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -275,529 +368,456 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ - "ecp_type", "angular_momentum", - "r_exponents", - "gaussian_exponents", + "harmonic_type", + "exponents", "coefficients" ], - "additionalProperties": false + "title": "ElectronShell", + "type": "object" }, - "BasisCenter": { - "title": "BasisCenter", - "description": "Data for a single atom/center in a basis set.", - "type": "object", + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", "properties": { - "electron_shells": { - "title": "Electron Shells", - "description": "Electronic shells for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ElectronShell" - }, - "uniqueItems": true + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" }, - "ecp_electrons": { - "title": "Ecp Electrons", - "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", - "default": 0, - "type": "integer" + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" + } + }, + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + }, + "ManyBodyKeywords": { + "additionalProperties": false, + "description": "The many-body-specific keywords for user control.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_keywords", + "default": "qcschema_many_body_keywords", + "title": "Schema Name", + "type": "string" }, - "ecp_potentials": { - "title": "Ecp Potentials", - "description": "ECPs, MCPs, or other field potentials for this center.", - "minItems": 1, - "type": "array", + "bsse_type": { + "default": [ + "cp" + ], + "description": "Requested BSSE treatments. First in list determines which interaction or total energy/gradient/Hessian returned.", "items": { - "$ref": "#/definitions/ECPPotential" + "$ref": "#/$defs/BsseEnum" }, - "uniqueItems": true + "title": "Bsse Type", + "type": "array" + }, + "embedding_charges": { + "anyOf": [ + { + "additionalProperties": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Atom-centered point charges to be used on molecule fragments whose basis sets are not included in the computation. Keys: 1-based index of fragment. Values: list of atom charges for that fragment. At present, QCManyBody will only accept non-None values of this keyword if environment variable QCMANYBODY_EMBEDDING_CHARGES is set.", + "shape": [ + "nfr", + "" + ], + "title": "Embedding Charges" + }, + "return_total_data": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "When True, returns the total data (energy/gradient/Hessian) of the system, otherwise returns interaction data. Default is False for energies, True for gradients and Hessians. Note that the calculation of counterpoise corrected total energies implies the calculation of the energies of monomers in the monomer basis, hence specifying ``return_total_data = True`` may carry out more computations than ``return_total_data = False``. For gradients and Hessians, ``return_total_data = False`` is rarely useful.", + "title": "Return Total Data" + }, + "levels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Dictionary of different levels of theory for different levels of expansion. Note that the primary method_string is not used when this keyword is given. ``supersystem`` computes all higher order n-body effects up to the number of fragments; this higher-order correction uses the nocp basis, regardless of bsse_type. A method fills in for any lower unlisted nbody levels. Note that if both this and max_nbody are provided, they must be consistent. Examples: SUPERSYSTEM definition suspect* {1: 'ccsd(t)', 2: 'mp2', 'supersystem': 'scf'} * {2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} * Now invalid: {1: 2, 2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} ", + "title": "Levels" + }, + "max_nbody": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum number of bodies to include in the many-body treatment. Possible: max_nbody <= nfragments. Default: max_nbody = nfragments.", + "title": "Max Nbody" + }, + "supersystem_ie_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Target the supersystem total/interaction energy (IE) data over the many-body expansion (MBE) analysis, thereby omitting intermediate-body calculations. When False (default), compute each n-body level in the MBE up through ``max_nbody``. When True (only allowed for ``max_nbody = nfragments`` ), only compute enough for the overall interaction/total energy: max_nbody-body and 1-body. When True, properties ``INTERACTION {driver} THROUGH {max_nbody}-BODY`` will always be available; ``TOTAL {driver} THROUGH {max_nbody}-BODY`` will be available depending on ``return_total_data`` ; and ``{max_nbody}-BODY CONTRIBUTION TO {driver}`` won't be available (except for dimers). This keyword produces no savings for a two-fragment molecule. But for the interaction energy of a three-fragment molecule, for example, 2-body subsystems can be skipped with ``supersystem_ie_only=True``. Do not use with ``vmfc`` in ``bsse_type`` as it cannot produce savings.", + "title": "Supersystem Ie Only" } }, - "required": [ - "electron_shells" - ], - "additionalProperties": false + "title": "ManyBodyKeywords", + "type": "object" }, - "BasisSet": { - "title": "BasisSet", - "description": "A quantum chemistry basis description.", - "type": "object", + "ManyBodyProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a ManyBody output data.", "properties": { "schema_name": { + "const": "qcschema_many_body_protocols", + "default": "qcschema_many_body_protocols", "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", - "default": "qcschema_basis", - "pattern": "^(qcschema_basis)$", "type": "string" }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "name": { - "title": "Name", - "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "cluster_results": { + "$ref": "#/$defs/ClusterResultsProtocolEnum", + "default": "none" + } + }, + "title": "ManyBodyProtocols", + "type": "object" + }, + "ManyBodySpecification": { + "additionalProperties": false, + "description": "Combining the what (ManyBodyKeywords) with the how (AtomicSpecification).", + "properties": { + "schema_name": { + "const": "qcschema_many_body_specification", + "default": "qcschema_many_body_specification", + "title": "Schema Name", "type": "string" }, - "description": { - "title": "Description", - "description": "Brief description of the basis set.", + "keywords": { + "$ref": "#/$defs/ManyBodyKeywords" + }, + "program": { + "default": "", + "description": "Many Body Expansion CMS code / QCEngine procedure with which to run the MB decomposition.", + "title": "Program", "type": "string" }, - "center_data": { - "title": "Center Data", - "description": "Shared basis data for all atoms/centers in the parent molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/BasisCenter" - } + "protocols": { + "$ref": "#/$defs/ManyBodyProtocols", + "default": { + "schema_name": "qcschema_many_body_protocols", + "cluster_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a ManyBody output data.\n " }, - "atom_map": { - "title": "Atom Map", - "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", - "type": "array", - "items": { - "type": "string" - } + "driver": { + "$ref": "#/$defs/DriverEnum", + "description": "The computation driver; i.e., energy, gradient, hessian." }, - "nbf": { - "title": "Nbf", - "description": "The number of basis functions. Use for convenience or as checksum", - "type": "integer" + "specification": { + "additionalProperties": { + "$ref": "#/$defs/AtomicSpecification" + }, + "description": "??? TODO expand to cbs, fd", + "title": "Specification", + "type": "object" + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" } }, "required": [ - "name", - "center_data", - "atom_map" + "keywords", + "driver", + "specification" ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "ManyBodySpecification", + "type": "object" }, "Model": { - "title": "Model", + "additionalProperties": true, "description": "The computational molecular sciences model to run.", - "type": "object", "properties": { "method": { - "title": "Method", "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", "type": "string" }, "basis": { - "title": "Basis", - "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", "anyOf": [ { "type": "string" }, { - "$ref": "#/definitions/BasisSet" + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" } }, "required": [ "method" - ] + ], + "title": "Model", + "type": "object" + }, + "Molecule": { + "additionalProperties": true, + "type": "object" }, - "QCInputSpecification": { - "title": "QCInputSpecification", - "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", - "type": "object", + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "OptimizationProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Optimization output data.", "properties": { "schema_name": { + "const": "qcschema_optimization_protocols", + "default": "qcschema_optimization_protocols", "title": "Schema Name", - "default": "qcschema_input", - "enum": [ - "qcschema_input" - ], "type": "string" }, - "schema_version": { - "title": "Schema Version", - "default": 1, - "type": "integer" - }, - "driver": { - "description": "Allowed computation driver values.", - "default": "gradient", - "allOf": [ - { - "$ref": "#/definitions/DriverEnum" - } - ] - }, - "model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "allOf": [ - { - "$ref": "#/definitions/Model" - } - ] - }, - "keywords": { - "title": "Keywords", - "description": "The program specific keywords to be used.", - "default": {}, - "type": "object" - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", - "default": {}, - "type": "object" + "trajectory_results": { + "$ref": "#/$defs/TrajectoryProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " } }, - "required": [ - "model" - ], - "additionalProperties": false + "title": "OptimizationProtocols", + "type": "object" }, - "Identifiers": { - "title": "Identifiers", - "description": "Canonical chemical identifiers", - "type": "object", + "OptimizationSpecification": { + "additionalProperties": false, + "description": "Specification for how to run a geometry optimization.", "properties": { - "molecule_hash": { - "title": "Molecule Hash", - "type": "string" - }, - "molecular_formula": { - "title": "Molecular Formula", - "type": "string" - }, - "smiles": { - "title": "Smiles", - "type": "string" - }, - "inchi": { - "title": "Inchi", - "type": "string" - }, - "inchikey": { - "title": "Inchikey", - "type": "string" - }, - "canonical_explicit_hydrogen_smiles": { - "title": "Canonical Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_mapped_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_smiles": { - "title": "Canonical Isomeric Smiles", + "schema_name": { + "const": "qcschema_optimization_specification", + "default": "qcschema_optimization_specification", + "title": "Schema Name", "type": "string" }, - "canonical_smiles": { - "title": "Canonical Smiles", + "program": { + "default": "", + "description": "Optimizer CMS code / QCEngine procedure to run the geometry optimization with.", + "title": "Program", "type": "string" }, - "pubchem_cid": { - "title": "Pubchem Cid", - "description": "PubChem Compound ID", - "type": "string" + "keywords": { + "default": {}, + "description": "The optimization specific keywords to be used.", + "title": "Keywords" + }, + "protocols": { + "$ref": "#/$defs/OptimizationProtocols", + "default": { + "schema_name": "qcschema_optimization_protocols", + "trajectory_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n " }, - "pubchem_sid": { - "title": "Pubchem Sid", - "description": "PubChem Substance ID", - "type": "string" + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" }, - "pubchem_conformerid": { - "title": "Pubchem Conformerid", - "description": "PubChem Conformer ID", - "type": "string" + "specification": { + "description": "A directive for how to compute a gradient for the optimization. Either an ordinary atomic/single-point or a many-body spec.", + "oneOf": [ + { + "$ref": "#/$defs/AtomicSpecification" + }, + { + "$ref": "#/$defs/ManyBodySpecification" + } + ], + "title": "Specification" } }, - "additionalProperties": false + "required": [ + "specification" + ], + "title": "OptimizationSpecification", + "type": "object" }, "Provenance": { - "title": "Provenance", + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": true, "description": "Provenance information.", - "type": "object", "properties": { "creator": { - "title": "Creator", "description": "The name of the program, library, or person who created the object.", + "title": "Creator", "type": "string" }, "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", "default": "", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "title": "Version", "type": "string" }, "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", "default": "", + "description": "The name of the routine or function within the creator, blank otherwise.", + "title": "Routine", "type": "string" } }, "required": [ "creator" ], - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "Provenance", + "type": "object" }, - "Molecule": { - "title": "Molecule", - "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", - "default": "qcschema_molecule", - "pattern": "^(qcschema_molecule)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", - "default": 2, - "type": "integer" - }, - "validated": { - "title": "Validated", - "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", - "default": false, - "type": "boolean" - }, - "symbols": { - "title": "Symbols", - "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "title": "Geometry", - "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", - "shape": [ - "nat", - 3 - ], - "units": "a0", - "type": "array", - "items": { - "type": "number" - } - }, - "name": { - "title": "Name", - "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", - "type": "string" - }, - "identifiers": { - "title": "Identifiers", - "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", - "allOf": [ - { - "$ref": "#/definitions/Identifiers" - } - ] - }, - "comment": { - "title": "Comment", - "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", - "type": "string" - }, - "molecular_charge": { - "title": "Molecular Charge", - "description": "The net electrostatic charge of the molecule.", - "default": 0.0, - "type": "number" - }, - "molecular_multiplicity": { - "title": "Molecular Multiplicity", - "description": "The total multiplicity of the molecule.", - "default": 1, - "type": "number" - }, - "masses": { - "title": "Masses", - "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", - "shape": [ - "nat" - ], - "units": "u", - "type": "array", - "items": { - "type": "number" - } - }, - "real": { - "title": "Real", - "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "boolean" - } - }, - "atom_labels": { - "title": "Atom Labels", - "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "atomic_numbers": { - "title": "Atomic Numbers", - "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "mass_numbers": { - "title": "Mass Numbers", - "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "connectivity": { - "title": "Connectivity", - "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "integer", - "minimum": 0 - }, - { - "type": "number", - "minimum": 0, - "maximum": 5 - } - ] - } - }, - "fragments": { - "title": "Fragments", - "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "shape": [ - "nfr", - "" - ], - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "title": "Fragment Charges", - "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "title": "Fragment Multiplicities", - "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fix_com": { - "title": "Fix Com", - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "default": false, - "type": "boolean" - }, - "fix_orientation": { - "title": "Fix Orientation", - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "default": false, - "type": "boolean" - }, - "fix_symmetry": { - "title": "Fix Symmetry", - "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", + "TrajectoryProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "title": "TrajectoryProtocolEnum", + "type": "string" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "QCSchema input directive for geometry optimization.", + "properties": { + "id": { + "anyOf": [ + { "type": "string" }, - "provenance": { - "title": "Provenance", - "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "id": { - "title": "Id", - "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", - "type": "object" + { + "type": "null" } - }, - "required": [ - "symbols", - "geometry" ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" + "default": null, + "title": "Id" + }, + "schema_name": { + "const": "qcschema_optimization_input", + "default": "qcschema_optimization_input", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "specification": { + "$ref": "#/$defs/OptimizationSpecification" + }, + "initial_molecule": { + "$ref": "#/$defs/Molecule", + "description": "The starting molecule for the geometry optimization." + }, + "provenance": { + "$ref": "#/$defs/Provenance", + "default": { + "creator": "QCElemental", + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v2.optimization" + } } - } + }, + "required": [ + "specification", + "initial_molecule" + ], + "title": "OptimizationInput", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema b/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema new file mode 100644 index 0000000..ca11ede --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema @@ -0,0 +1,4 @@ +{ + "additionalProperties": true, + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationProtocols.schema b/qcschema/qcelemental_v2/schemas/OptimizationProtocols.schema new file mode 100644 index 0000000..31b2f14 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationProtocols.schema @@ -0,0 +1,32 @@ +{ + "$defs": { + "TrajectoryProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "title": "TrajectoryProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Optimization output data.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_protocols", + "default": "qcschema_optimization_protocols", + "title": "Schema Name", + "type": "string" + }, + "trajectory_results": { + "$ref": "#/$defs/TrajectoryProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "OptimizationProtocols", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationResult.schema b/qcschema/qcelemental_v2/schemas/OptimizationResult.schema index 46bad99..964321d 100644 --- a/qcschema/qcelemental_v2/schemas/OptimizationResult.schema +++ b/qcschema/qcelemental_v2/schemas/OptimizationResult.schema @@ -1,1786 +1,1354 @@ { - "title": "OptimizationResult", - "description": "QCSchema results model for geometry optimization.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "hash_index": { - "title": "Hash Index", - "type": "string" - }, - "schema_name": { - "title": "Schema Name", - "default": "qcschema_optimization_output", - "pattern": "qcschema_optimization_output", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "default": 1, - "type": "integer" - }, - "keywords": { - "title": "Keywords", - "description": "The optimization specific keywords to be used.", - "default": {}, - "type": "object" - }, - "extras": { - "title": "Extras", - "description": "Extra fields that are not part of the schema.", - "default": {}, - "type": "object" - }, - "protocols": { - "title": "Protocols", - "description": "\n Protocols regarding the manipulation of a Optimization output data.\n ", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/OptimizationProtocols" - } - ] - }, - "input_specification": { - "title": "Input Specification", - "description": "\n A compute description for energy, gradient, and Hessian computations used in a geometry optimization.\n ", - "allOf": [ - { - "$ref": "#/definitions/QCInputSpecification" - } - ] - }, - "initial_molecule": { - "title": "Initial Molecule", - "description": "The starting molecule for the geometry optimization.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] - }, - "provenance": { - "title": "Provenance", - "description": "Provenance information.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "final_molecule": { - "title": "Final Molecule", - "description": "The final molecule of the geometry optimization.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] - }, - "trajectory": { - "title": "Trajectory", - "description": "A list of ordered Result objects for each step in the optimization.", - "type": "array", - "items": { - "$ref": "#/definitions/AtomicResult" - } - }, - "energies": { - "title": "Energies", - "description": "A list of ordered energies for each step in the optimization.", - "type": "array", - "items": { - "type": "number" - } - }, - "stdout": { - "title": "Stdout", - "description": "The standard output of the program.", - "type": "string" - }, - "stderr": { - "title": "Stderr", - "description": "The standard error of the program.", - "type": "string" - }, - "success": { - "title": "Success", - "description": "The success of a given programs execution. If False, other fields may be blank.", - "type": "boolean" - }, - "error": { - "title": "Error", - "description": "Complete description of the error from an unsuccessful program execution.", - "allOf": [ - { - "$ref": "#/definitions/ComputeError" - } - ] - } - }, - "required": [ - "input_specification", - "initial_molecule", - "provenance", - "final_molecule", - "trajectory", - "energies", - "success" - ], - "additionalProperties": false, - "definitions": { - "TrajectoryProtocolEnum": { - "title": "TrajectoryProtocolEnum", - "description": "Which gradient evaluations to keep in an optimization trajectory.", - "enum": [ - "all", - "initial_and_final", - "final", - "none" - ], - "type": "string" - }, - "OptimizationProtocols": { - "title": "OptimizationProtocols", - "description": "Protocols regarding the manipulation of a Optimization output data.", - "type": "object", - "properties": { - "trajectory": { - "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n ", - "default": "all", - "allOf": [ - { - "$ref": "#/definitions/TrajectoryProtocolEnum" - } - ] - } - }, - "additionalProperties": false - }, - "DriverEnum": { - "title": "DriverEnum", - "description": "Allowed computation driver values.", - "enum": [ - "energy", - "gradient", - "hessian", - "properties" - ], - "type": "string" - }, - "HarmonicType": { - "title": "HarmonicType", - "description": "The angular momentum representation of a shell.", - "enum": [ - "spherical", - "cartesian" - ], - "type": "string" - }, - "ElectronShell": { - "title": "ElectronShell", - "description": "Information for a single electronic shell.", - "type": "object", + "$defs": { + "AtomicInput": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "The MolSSI Quantum Chemistry Schema", "properties": { - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the shell as an array of integers.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "uniqueItems": true - }, - "harmonic_type": { - "description": "The angular momentum representation of a shell.", - "allOf": [ + "id": { + "anyOf": [ { - "$ref": "#/definitions/HarmonicType" - } - ] - }, - "exponents": { - "title": "Exponents", - "description": "Exponents for the contracted shell.", - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "type": "string" }, - "minItems": 1 - } - } - }, - "required": [ - "angular_momentum", - "harmonic_type", - "exponents", - "coefficients" - ], - "additionalProperties": false - }, - "ECPType": { - "title": "ECPType", - "description": "The type of the ECP potential.", - "enum": [ - "scalar", - "spinorbit" - ], - "type": "string" - }, - "ECPPotential": { - "title": "ECPPotential", - "description": "Information for a single ECP potential.", - "type": "object", - "properties": { - "ecp_type": { - "description": "The type of the ECP potential.", - "allOf": [ { - "$ref": "#/definitions/ECPType" + "type": "null" } - ] + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" }, - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the potential as an array of integers.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "uniqueItems": true + "schema_name": { + "const": "qcschema_atomic_input", + "default": "qcschema_atomic_input", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" }, - "r_exponents": { - "title": "R Exponents", - "description": "Exponents of the 'r' term.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer" - } + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" }, - "gaussian_exponents": { - "title": "Gaussian Exponents", - "description": "Exponents of the 'gaussian' term.", - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule to use in the computation." }, - "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1 - } + "specification": { + "$ref": "#/$defs/AtomicSpecification", + "description": "Additional fields specifying how to run the single-point computation." + }, + "provenance": { + "$ref": "#/$defs/Provenance" } }, "required": [ - "ecp_type", - "angular_momentum", - "r_exponents", - "gaussian_exponents", - "coefficients" + "molecule", + "specification" ], - "additionalProperties": false + "title": "AtomicInput", + "type": "object" }, - "BasisCenter": { - "title": "BasisCenter", - "description": "Data for a single atom/center in a basis set.", - "type": "object", + "AtomicProperties": { + "additionalProperties": true, + "type": "object" + }, + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", "properties": { - "electron_shells": { - "title": "Electron Shells", - "description": "Electronic shells for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ElectronShell" - }, - "uniqueItems": true + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" }, - "ecp_electrons": { - "title": "Ecp Electrons", - "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", - "default": 0, - "type": "integer" + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" }, - "ecp_potentials": { - "title": "Ecp Potentials", - "description": "ECPs, MCPs, or other field potentials for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ECPPotential" - }, - "uniqueItems": true + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" } }, - "required": [ - "electron_shells" - ], - "additionalProperties": false + "title": "AtomicProtocols", + "type": "object" }, - "BasisSet": { - "title": "BasisSet", - "description": "A quantum chemistry basis description.", - "type": "object", + "AtomicResult": { + "additionalProperties": false, + "description": "Results from a CMS program execution.", "properties": { "schema_name": { + "const": "qcschema_atomic_result", + "default": "qcschema_atomic_result", + "description": "The QCSchema specification to which this model conforms.", "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", - "default": "qcschema_basis", - "pattern": "^(qcschema_basis)$", "type": "string" }, "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.AtomicResult.schema_name` to which this model conforms.", "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", - "default": 1, "type": "integer" }, - "name": { - "title": "Name", - "description": "The standard basis name if available (e.g., 'cc-pVDZ').", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Brief description of the basis set.", - "type": "string" + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" }, - "center_data": { - "title": "Center Data", - "description": "Shared basis data for all atoms/centers in the parent molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/BasisCenter" - } + "input_data": { + "$ref": "#/$defs/AtomicInput" }, - "atom_map": { - "title": "Atom Map", - "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", - "type": "array", - "items": { - "type": "string" - } + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule with frame and orientation of the results." }, - "nbf": { - "title": "Nbf", - "description": "The number of basis functions. Use for convenience or as checksum", - "type": "integer" - } - }, - "required": [ - "name", - "center_data", - "atom_map" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "Model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "type": "object", - "properties": { - "method": { - "title": "Method", - "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", - "type": "string" + "properties": { + "$ref": "#/$defs/AtomicProperties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nmo`\n " }, - "basis": { - "title": "Basis", - "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "wavefunction": { "anyOf": [ { - "type": "string" + "$ref": "#/$defs/WavefunctionProperties" }, { - "$ref": "#/definitions/BasisSet" + "type": "null" } - ] - } - }, - "required": [ - "method" - ] - }, - "QCInputSpecification": { - "title": "QCInputSpecification", - "description": "A compute description for energy, gradient, and Hessian computations used in a geometry optimization.", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "default": "qcschema_input", - "enum": [ - "qcschema_input" ], - "type": "string" + "default": null, + "description": "Wavefunction properties resulting from a computation.\n Matrix quantities are stored in column-major order. Presence and contents configurable by protocol." }, - "schema_version": { - "title": "Schema Version", - "default": 1, - "type": "integer" + "return_result": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + {} + ], + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "title": "Return Result" }, - "driver": { - "description": "Allowed computation driver values.", - "default": "gradient", - "allOf": [ + "stdout": { + "anyOf": [ { - "$ref": "#/definitions/DriverEnum" + "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "title": "Stdout" }, - "model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "allOf": [ + "stderr": { + "anyOf": [ { - "$ref": "#/definitions/Model" + "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "The standard error of the program execution.", + "title": "Stderr" }, - "keywords": { - "title": "Keywords", - "description": "The program specific keywords to be used.", + "native_files": { + "additionalProperties": true, "default": {}, + "description": "DSL files.", + "title": "Native Files", "type": "object" }, + "success": { + "const": true, + "default": true, + "description": "The success of program execution. If False, other fields may be blank.", + "title": "Success", + "type": "boolean" + }, + "provenance": { + "$ref": "#/$defs/Provenance" + }, "extras": { - "title": "Extras", - "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", "default": {}, - "type": "object" + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" } }, "required": [ - "model" + "input_data", + "molecule", + "properties", + "return_result", + "provenance" ], - "additionalProperties": false + "title": "AtomicResult", + "type": "object" }, - "Identifiers": { - "title": "Identifiers", - "description": "Canonical chemical identifiers", - "type": "object", + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", "properties": { - "molecule_hash": { - "title": "Molecule Hash", - "type": "string" - }, - "molecular_formula": { - "title": "Molecular Formula", - "type": "string" - }, - "smiles": { - "title": "Smiles", - "type": "string" - }, - "inchi": { - "title": "Inchi", - "type": "string" - }, - "inchikey": { - "title": "Inchikey", - "type": "string" - }, - "canonical_explicit_hydrogen_smiles": { - "title": "Canonical Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_mapped_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", "type": "string" }, - "canonical_isomeric_explicit_hydrogen_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Smiles", - "type": "string" + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" }, - "canonical_isomeric_smiles": { - "title": "Canonical Isomeric Smiles", + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", "type": "string" }, - "canonical_smiles": { - "title": "Canonical Smiles", - "type": "string" + "driver": { + "$ref": "#/$defs/DriverEnum" }, - "pubchem_cid": { - "title": "Pubchem Cid", - "description": "PubChem Compound ID", - "type": "string" + "model": { + "$ref": "#/$defs/Model" }, - "pubchem_sid": { - "title": "Pubchem Sid", - "description": "PubChem Substance ID", - "type": "string" + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } }, - "pubchem_conformerid": { - "title": "Pubchem Conformerid", - "description": "PubChem Conformer ID", - "type": "string" + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" } }, - "additionalProperties": false + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" }, - "Provenance": { - "title": "Provenance", - "description": "Provenance information.", - "type": "object", + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", "properties": { - "creator": { - "title": "Creator", - "description": "The name of the program, library, or person who created the object.", - "type": "string" + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true }, - "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", - "default": "", - "type": "string" + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" }, - "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", - "default": "", - "type": "string" + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true } }, "required": [ - "creator" + "electron_shells" ], - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "BasisCenter", + "type": "object" }, - "Molecule": { - "title": "Molecule", - "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", - "type": "object", + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", "properties": { "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", - "default": "qcschema_molecule", - "pattern": "^(qcschema_molecule)$", "type": "string" }, "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "const": 2, "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", "type": "integer" }, - "validated": { - "title": "Validated", - "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", - "default": false, - "type": "boolean" - }, - "symbols": { - "title": "Symbols", - "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "title": "Geometry", - "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", - "shape": [ - "nat", - 3 - ], - "units": "a0", - "type": "array", - "items": { - "type": "number" - } - }, "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", "title": "Name", - "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", "type": "string" }, - "identifiers": { - "title": "Identifiers", - "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", - "allOf": [ + "description": { + "anyOf": [ + { + "type": "string" + }, { - "$ref": "#/definitions/Identifiers" + "type": "null" } - ] - }, - "comment": { - "title": "Comment", - "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", - "type": "string" - }, - "molecular_charge": { - "title": "Molecular Charge", - "description": "The net electrostatic charge of the molecule.", - "default": 0.0, - "type": "number" - }, - "molecular_multiplicity": { - "title": "Molecular Multiplicity", - "description": "The total multiplicity of the molecule.", - "default": 1, - "type": "number" - }, - "masses": { - "title": "Masses", - "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", - "shape": [ - "nat" ], - "units": "u", - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" }, - "real": { - "title": "Real", - "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "boolean" - } + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" }, - "atom_labels": { - "title": "Atom Labels", - "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", - "shape": [ - "nat" - ], - "type": "array", + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", "items": { "type": "string" - } + }, + "title": "Atom Map", + "type": "array" }, - "atomic_numbers": { - "title": "Atomic Numbers", - "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", - "shape": [ - "nat" + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "BsseEnum": { + "description": "Available basis-set superposition error (BSSE) treatments.", + "enum": [ + "nocp", + "cp", + "vmfc", + "cp", + "nocp", + "nocp" + ], + "title": "BsseEnum", + "type": "string" + }, + "ClusterResultsProtocolEnum": { + "description": "Which component results to preserve in a many body result; usually AtomicResults.", + "enum": [ + "all", + "none" + ], + "title": "ClusterResultsProtocolEnum", + "type": "string" + }, + "DriverEnum": { + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "title": "DriverEnum", + "type": "string" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" }, - "mass_numbers": { - "title": "Mass Numbers", - "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", - "shape": [ - "nat" - ], - "type": "array", + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "connectivity": { - "title": "Connectivity", - "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", + "minimum": 0, + "type": "integer" + }, "minItems": 1, + "title": "Angular Momentum", "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "type": "integer", - "minimum": 0 - }, + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ { - "type": "integer", - "minimum": 0 + "type": "number" }, { - "type": "number", - "minimum": 0, - "maximum": 5 + "type": "string" } ] - } + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" }, - "fragments": { - "title": "Fragments", - "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "shape": [ - "nfr", - "" - ], - "type": "array", + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "title": "Fragment Charges", - "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "title": "Fragment Multiplicities", - "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", "type": "array", - "items": { - "type": "number" - } - }, - "fix_com": { - "title": "Fix Com", - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "default": false, - "type": "boolean" - }, - "fix_orientation": { - "title": "Fix Orientation", - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "default": false, - "type": "boolean" - }, - "fix_symmetry": { - "title": "Fix Symmetry", - "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", - "type": "string" + "uniqueItems": true }, - "provenance": { - "title": "Provenance", - "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" }, - "id": { - "title": "Id", - "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", - "type": "object" + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ - "symbols", - "geometry" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "WavefunctionProtocolEnum": { - "title": "WavefunctionProtocolEnum", - "description": "Wavefunction to keep from a computation.", - "enum": [ - "all", - "orbitals_and_eigenvalues", - "occupations_and_eigenvalues", - "return_results", - "none" + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" ], - "type": "string" + "title": "ElectronShell", + "type": "object" }, "ErrorCorrectionProtocol": { - "title": "ErrorCorrectionProtocol", + "additionalProperties": false, "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", - "type": "object", "properties": { "default_policy": { - "title": "Default Policy", - "description": "Whether to allow error corrections to be used if not directly specified in `policies`", "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", "type": "boolean" }, "policies": { - "title": "Policies", + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", - "type": "object", - "additionalProperties": { - "type": "boolean" - } + "title": "Policies" } }, - "additionalProperties": false + "title": "ErrorCorrectionProtocol", + "type": "object" }, - "NativeFilesProtocolEnum": { - "title": "NativeFilesProtocolEnum", - "description": "CMS program files to keep from a computation.", + "HarmonicType": { + "description": "The angular momentum representation of a shell.", "enum": [ - "all", - "input", - "none" + "spherical", + "cartesian" ], + "title": "HarmonicType", "type": "string" }, - "AtomicResultProtocols": { - "title": "AtomicResultProtocols", - "description": "Protocols regarding the manipulation of computational result data.", - "type": "object", - "properties": { - "wavefunction": { - "description": "Wavefunction to keep from a computation.", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProtocolEnum" - } - ] - }, - "stdout": { - "title": "Stdout", - "description": "Primary output file to keep from the computation", - "default": true, - "type": "boolean" - }, - "error_correction": { - "title": "Error Correction", - "description": "Policies for error correction", - "allOf": [ - { - "$ref": "#/definitions/ErrorCorrectionProtocol" - } - ] - }, - "native_files": { - "description": "Policies for keeping processed files from the computation", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/NativeFilesProtocolEnum" - } - ] - } - }, - "additionalProperties": false - }, - "AtomicResultProperties": { - "title": "AtomicResultProperties", - "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", - "type": "object", + "ManyBodyInput": { + "additionalProperties": false, + "description": "Combining the what and how (ManyBodySpecification) with the who (Molecule).", "properties": { - "calcinfo_nbasis": { - "title": "Calcinfo Nbasis", - "description": "The number of basis functions for the computation.", - "type": "integer" - }, - "calcinfo_nmo": { - "title": "Calcinfo Nmo", - "description": "The number of molecular orbitals for the computation.", - "type": "integer" - }, - "calcinfo_nalpha": { - "title": "Calcinfo Nalpha", - "description": "The number of alpha electrons in the computation.", - "type": "integer" - }, - "calcinfo_nbeta": { - "title": "Calcinfo Nbeta", - "description": "The number of beta electrons in the computation.", - "type": "integer" - }, - "calcinfo_natom": { - "title": "Calcinfo Natom", - "description": "The number of atoms in the computation.", - "type": "integer" - }, - "nuclear_repulsion_energy": { - "title": "Nuclear Repulsion Energy", - "description": "The nuclear repulsion energy.", - "type": "number" - }, - "return_energy": { - "title": "Return Energy", - "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", - "type": "number" - }, - "return_gradient": { - "title": "Return Gradient", - "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "return_hessian": { - "title": "Return Hessian", - "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_one_electron_energy": { - "title": "Scf One Electron Energy", - "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_two_electron_energy": { - "title": "Scf Two Electron Energy", - "description": "The two-electron energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_vv10_energy": { - "title": "Scf Vv10 Energy", - "description": "The VV10 functional energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_xc_energy": { - "title": "Scf Xc Energy", - "description": "The functional (XC) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_dispersion_correction_energy": { - "title": "Scf Dispersion Correction Energy", - "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", - "units": "E_h", - "type": "number" - }, - "scf_dipole_moment": { - "title": "Scf Dipole Moment", - "description": "The SCF X, Y, and Z dipole components", - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_quadrupole_moment": { - "title": "Scf Quadrupole Moment", - "description": "The quadrupole components (redundant; 6 unique).", - "shape": [ - 3, - 3 - ], - "units": "e a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_energy": { - "title": "Scf Total Energy", - "description": "The total electronic energy of the SCF stage of the calculation.", - "units": "E_h", - "type": "number" - }, - "scf_total_gradient": { - "title": "Scf Total Gradient", - "description": "The total electronic gradient of the SCF stage of the calculation.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_hessian": { - "title": "Scf Total Hessian", - "description": "The total electronic Hessian of the SCF stage of the calculation.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_iterations": { - "title": "Scf Iterations", - "description": "The number of SCF iterations taken before convergence.", - "type": "integer" - }, - "mp2_same_spin_correlation_energy": { - "title": "Mp2 Same Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_opposite_spin_correlation_energy": { - "title": "Mp2 Opposite Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_singles_energy": { - "title": "Mp2 Singles Energy", - "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "mp2_doubles_energy": { - "title": "Mp2 Doubles Energy", - "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "mp2_correlation_energy": { - "title": "Mp2 Correlation Energy", - "description": "The MP2 correlation energy.", - "units": "E_h", - "type": "number" - }, - "mp2_total_energy": { - "title": "Mp2 Total Energy", - "description": "The total MP2 energy (MP2 correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "mp2_dipole_moment": { - "title": "Mp2 Dipole Moment", - "description": "The MP2 X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_same_spin_correlation_energy": { - "title": "Ccsd Same Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_opposite_spin_correlation_energy": { - "title": "Ccsd Opposite Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_singles_energy": { - "title": "Ccsd Singles Energy", - "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "ccsd_doubles_energy": { - "title": "Ccsd Doubles Energy", - "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "ccsd_correlation_energy": { - "title": "Ccsd Correlation Energy", - "description": "The CCSD correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_total_energy": { - "title": "Ccsd Total Energy", - "description": "The total CCSD energy (CCSD correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_dipole_moment": { - "title": "Ccsd Dipole Moment", - "description": "The CCSD X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } + "schema_name": { + "const": "qcschema_many_body_input", + "default": "qcschema_many_body_input", + "title": "Schema Name", + "type": "string" }, - "ccsd_iterations": { - "title": "Ccsd Iterations", - "description": "The number of CCSD iterations taken before convergence.", + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", "type": "integer" }, - "ccsd_prt_pr_correlation_energy": { - "title": "Ccsd Prt Pr Correlation Energy", - "description": "The CCSD(T) correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_total_energy": { - "title": "Ccsd Prt Pr Total Energy", - "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_dipole_moment": { - "title": "Ccsd Prt Pr Dipole Moment", - "description": "The CCSD(T) X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" + "provenance": { + "$ref": "#/$defs/Provenance", + "default": { + "creator": "QCManyBody", + "version": "0.7.2.dev1+gd763e0c18", + "routine": "qcmanybody.models.v2.many_body" } }, - "ccsdt_correlation_energy": { - "title": "Ccsdt Correlation Energy", - "description": "The CCSDT correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdt_total_energy": { - "title": "Ccsdt Total Energy", - "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdt_dipole_moment": { - "title": "Ccsdt Dipole Moment", - "description": "The CCSDT X, Y, and Z dipole components.", - "shape": [ - 3 + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } + "default": null, + "title": "Id" }, - "ccsdt_iterations": { - "title": "Ccsdt Iterations", - "description": "The number of CCSDT iterations taken before convergence.", - "type": "integer" - }, - "ccsdtq_correlation_energy": { - "title": "Ccsdtq Correlation Energy", - "description": "The CCSDTQ correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdtq_total_energy": { - "title": "Ccsdtq Total Energy", - "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdtq_dipole_moment": { - "title": "Ccsdtq Dipole Moment", - "description": "The CCSDTQ X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } + "specification": { + "$ref": "#/$defs/ManyBodySpecification", + "description": "???" }, - "ccsdtq_iterations": { - "title": "Ccsdtq Iterations", - "description": "The number of CCSDTQ iterations taken before convergence.", - "type": "integer" + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "Target molecule for many-body expansion (MBE) or interaction energy (IE) analysis." } }, - "additionalProperties": false + "required": [ + "specification", + "molecule" + ], + "title": "ManyBodyInput", + "type": "object" }, - "WavefunctionProperties": { - "title": "WavefunctionProperties", - "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", - "type": "object", + "ManyBodyKeywords": { + "additionalProperties": false, + "description": "The many-body-specific keywords for user control.", "properties": { - "basis": { - "title": "Basis", - "description": "\n A quantum chemistry basis description.\n ", - "allOf": [ - { - "$ref": "#/definitions/BasisSet" - } - ] - }, - "restricted": { - "title": "Restricted", - "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", - "type": "boolean" - }, - "h_core_a": { - "title": "H Core A", - "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_core_b": { - "title": "H Core B", - "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_effective_a": { - "title": "H Effective A", - "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_effective_b": { - "title": "H Effective B", - "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_orbitals_a": { - "title": "Scf Orbitals A", - "description": "SCF alpha-spin orbitals in the AO basis.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_orbitals_b": { - "title": "Scf Orbitals B", - "description": "SCF beta-spin orbitals in the AO basis.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_density_a": { - "title": "Scf Density A", - "description": "SCF alpha-spin density matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_density_b": { - "title": "Scf Density B", - "description": "SCF beta-spin density matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_fock_a": { - "title": "Scf Fock A", - "description": "SCF alpha-spin Fock matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_fock_b": { - "title": "Scf Fock B", - "description": "SCF beta-spin Fock matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } + "schema_name": { + "const": "qcschema_many_body_keywords", + "default": "qcschema_many_body_keywords", + "title": "Schema Name", + "type": "string" }, - "scf_eigenvalues_a": { - "title": "Scf Eigenvalues A", - "description": "SCF alpha-spin orbital eigenvalues.", - "shape": [ - "nmo" + "bsse_type": { + "default": [ + "cp" ], - "type": "array", + "description": "Requested BSSE treatments. First in list determines which interaction or total energy/gradient/Hessian returned.", "items": { - "type": "number" - } + "$ref": "#/$defs/BsseEnum" + }, + "title": "Bsse Type", + "type": "array" }, - "scf_eigenvalues_b": { - "title": "Scf Eigenvalues B", - "description": "SCF beta-spin orbital eigenvalues.", - "shape": [ - "nmo" + "embedding_charges": { + "anyOf": [ + { + "additionalProperties": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "object" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_occupations_a": { - "title": "Scf Occupations A", - "description": "SCF alpha-spin orbital occupations.", + "default": null, + "description": "Atom-centered point charges to be used on molecule fragments whose basis sets are not included in the computation. Keys: 1-based index of fragment. Values: list of atom charges for that fragment. At present, QCManyBody will only accept non-None values of this keyword if environment variable QCMANYBODY_EMBEDDING_CHARGES is set.", "shape": [ - "nmo" + "nfr", + "" ], - "type": "array", - "items": { - "type": "number" - } + "title": "Embedding Charges" }, - "scf_occupations_b": { - "title": "Scf Occupations B", - "description": "SCF beta-spin orbital occupations.", - "shape": [ - "nmo" + "return_total_data": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "When True, returns the total data (energy/gradient/Hessian) of the system, otherwise returns interaction data. Default is False for energies, True for gradients and Hessians. Note that the calculation of counterpoise corrected total energies implies the calculation of the energies of monomers in the monomer basis, hence specifying ``return_total_data = True`` may carry out more computations than ``return_total_data = False``. For gradients and Hessians, ``return_total_data = False`` is rarely useful.", + "title": "Return Total Data" }, - "scf_coulomb_a": { - "title": "Scf Coulomb A", - "description": "SCF alpha-spin Coulomb matrix in the AO basis.", - "shape": [ - "nao", - "nao" + "levels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "Dictionary of different levels of theory for different levels of expansion. Note that the primary method_string is not used when this keyword is given. ``supersystem`` computes all higher order n-body effects up to the number of fragments; this higher-order correction uses the nocp basis, regardless of bsse_type. A method fills in for any lower unlisted nbody levels. Note that if both this and max_nbody are provided, they must be consistent. Examples: SUPERSYSTEM definition suspect* {1: 'ccsd(t)', 2: 'mp2', 'supersystem': 'scf'} * {2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} * Now invalid: {1: 2, 2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} ", + "title": "Levels" }, - "scf_coulomb_b": { - "title": "Scf Coulomb B", - "description": "SCF beta-spin Coulomb matrix in the AO basis.", - "shape": [ - "nao", - "nao" + "max_nbody": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "Maximum number of bodies to include in the many-body treatment. Possible: max_nbody <= nfragments. Default: max_nbody = nfragments.", + "title": "Max Nbody" }, - "scf_exchange_a": { - "title": "Scf Exchange A", - "description": "SCF alpha-spin exchange matrix in the AO basis.", - "shape": [ - "nao", - "nao" + "supersystem_ie_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } + "default": false, + "description": "Target the supersystem total/interaction energy (IE) data over the many-body expansion (MBE) analysis, thereby omitting intermediate-body calculations. When False (default), compute each n-body level in the MBE up through ``max_nbody``. When True (only allowed for ``max_nbody = nfragments`` ), only compute enough for the overall interaction/total energy: max_nbody-body and 1-body. When True, properties ``INTERACTION {driver} THROUGH {max_nbody}-BODY`` will always be available; ``TOTAL {driver} THROUGH {max_nbody}-BODY`` will be available depending on ``return_total_data`` ; and ``{max_nbody}-BODY CONTRIBUTION TO {driver}`` won't be available (except for dimers). This keyword produces no savings for a two-fragment molecule. But for the interaction energy of a three-fragment molecule, for example, 2-body subsystems can be skipped with ``supersystem_ie_only=True``. Do not use with ``vmfc`` in ``bsse_type`` as it cannot produce savings.", + "title": "Supersystem Ie Only" + } + }, + "title": "ManyBodyKeywords", + "type": "object" + }, + "ManyBodyProperties": { + "additionalProperties": true, + "type": "object" + }, + "ManyBodyProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a ManyBody output data.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_protocols", + "default": "qcschema_many_body_protocols", + "title": "Schema Name", + "type": "string" }, - "scf_exchange_b": { - "title": "Scf Exchange B", - "description": "SCF beta-spin exchange matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } + "cluster_results": { + "$ref": "#/$defs/ClusterResultsProtocolEnum", + "default": "none" + } + }, + "title": "ManyBodyProtocols", + "type": "object" + }, + "ManyBodyResult": { + "additionalProperties": false, + "properties": { + "input_data": { + "$ref": "#/$defs/ManyBodyInput" }, - "localized_orbitals_a": { - "title": "Localized Orbitals A", - "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } + "success": { + "const": true, + "default": true, + "description": "A boolean indicator that the operation succeeded or failed. Allows programmatic assessment of all results regardless of if they failed or succeeded by checking `result.success`.", + "title": "Success", + "type": "boolean" }, - "localized_orbitals_b": { - "title": "Localized Orbitals B", - "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nao", - "nmo" + "stdout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "title": "Stdout" }, - "localized_fock_a": { - "title": "Localized Fock A", - "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nmo", - "nmo" + "stderr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "The standard error of the program execution.", + "title": "Stderr" }, - "localized_fock_b": { - "title": "Localized Fock B", - "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nmo", - "nmo" + "schema_name": { + "const": "qcschema_many_body_result", + "default": "qcschema_many_body_result", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } ], - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "The optional ID for the object.", + "title": "Id" }, - "orbitals_a": { - "title": "Orbitals A", - "description": "Index to the alpha-spin orbitals of the primary return.", - "type": "string" + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the object. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" }, - "orbitals_b": { - "title": "Orbitals B", - "description": "Index to the beta-spin orbitals of the primary return.", - "type": "string" + "provenance": { + "$ref": "#/$defs/Provenance" + }, + "native_files": { + "additionalProperties": true, + "default": {}, + "description": "DSL files.", + "title": "Native Files", + "type": "object" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule in results fragmentation and frame. Since QCManyBody doesn't disrupt the mol, should be identical to input_data.molecule." + }, + "properties": { + "$ref": "#/$defs/ManyBodyProperties", + "description": "None" + }, + "cluster_properties": { + "additionalProperties": { + "$ref": "#/$defs/AtomicProperties" + }, + "description": "The key results for each subsystem species computed. Keys contain modelchem, real and ghost information (e.g., `'[\"(auto)\", [2], [1, 2, 3]]'`). Values are total e/g/H/property results. Array values, if present, are sized and shaped for the full supersystem.", + "title": "Cluster Properties", + "type": "object" }, - "density_a": { - "title": "Density A", - "description": "Index to the alpha-spin density of the primary return.", + "cluster_results": { + "additionalProperties": { + "$ref": "#/$defs/AtomicResult" + }, + "description": "Detailed results", + "title": "Cluster Results", + "type": "object" + }, + "return_result": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "additionalProperties": true, + "type": "object" + } + ], + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "title": "Return Result" + } + }, + "required": [ + "input_data", + "provenance", + "molecule", + "properties", + "cluster_properties", + "cluster_results", + "return_result" + ], + "title": "ManyBodyResult", + "type": "object" + }, + "ManyBodySpecification": { + "additionalProperties": false, + "description": "Combining the what (ManyBodyKeywords) with the how (AtomicSpecification).", + "properties": { + "schema_name": { + "const": "qcschema_many_body_specification", + "default": "qcschema_many_body_specification", + "title": "Schema Name", "type": "string" }, - "density_b": { - "title": "Density B", - "description": "Index to the beta-spin density of the primary return.", + "keywords": { + "$ref": "#/$defs/ManyBodyKeywords" + }, + "program": { + "default": "", + "description": "Many Body Expansion CMS code / QCEngine procedure with which to run the MB decomposition.", + "title": "Program", "type": "string" }, - "fock_a": { - "title": "Fock A", - "description": "Index to the alpha-spin Fock matrix of the primary return.", + "protocols": { + "$ref": "#/$defs/ManyBodyProtocols", + "default": { + "schema_name": "qcschema_many_body_protocols", + "cluster_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a ManyBody output data.\n " + }, + "driver": { + "$ref": "#/$defs/DriverEnum", + "description": "The computation driver; i.e., energy, gradient, hessian." + }, + "specification": { + "additionalProperties": { + "$ref": "#/$defs/AtomicSpecification" + }, + "description": "??? TODO expand to cbs, fd", + "title": "Specification", + "type": "object" + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + } + }, + "required": [ + "keywords", + "driver", + "specification" + ], + "title": "ManyBodySpecification", + "type": "object" + }, + "Model": { + "additionalProperties": true, + "description": "The computational molecular sciences model to run.", + "properties": { + "method": { + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", "type": "string" }, - "fock_b": { - "title": "Fock B", - "description": "Index to the beta-spin Fock matrix of the primary return.", + "basis": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" + } + }, + "required": [ + "method" + ], + "title": "Model", + "type": "object" + }, + "Molecule": { + "additionalProperties": true, + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "OptimizationInput": { + "additionalProperties": false, + "description": "QCSchema input directive for geometry optimization.", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Id" + }, + "schema_name": { + "const": "qcschema_optimization_input", + "default": "qcschema_optimization_input", + "title": "Schema Name", "type": "string" }, - "eigenvalues_a": { - "title": "Eigenvalues A", - "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", - "type": "string" + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" }, - "eigenvalues_b": { - "title": "Eigenvalues B", - "description": "Index to the beta-spin orbital eigenvalues of the primary return.", - "type": "string" + "specification": { + "$ref": "#/$defs/OptimizationSpecification" }, - "occupations_a": { - "title": "Occupations A", - "description": "Index to the alpha-spin orbital occupations of the primary return.", - "type": "string" + "initial_molecule": { + "$ref": "#/$defs/Molecule", + "description": "The starting molecule for the geometry optimization." }, - "occupations_b": { - "title": "Occupations B", - "description": "Index to the beta-spin orbital occupations of the primary return.", - "type": "string" + "provenance": { + "$ref": "#/$defs/Provenance", + "default": { + "creator": "QCElemental", + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v2.optimization" + } } }, "required": [ - "basis", - "restricted" + "specification", + "initial_molecule" ], - "additionalProperties": false + "title": "OptimizationInput", + "type": "object" + }, + "OptimizationProperties": { + "additionalProperties": true, + "type": "object" }, - "ComputeError": { - "title": "ComputeError", - "description": "Complete description of the error from an unsuccessful program execution.", - "type": "object", + "OptimizationProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Optimization output data.", "properties": { - "error_type": { - "title": "Error Type", - "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", - "type": "string" - }, - "error_message": { - "title": "Error Message", - "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "schema_name": { + "const": "qcschema_optimization_protocols", + "default": "qcschema_optimization_protocols", + "title": "Schema Name", "type": "string" }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the error.", - "type": "object" + "trajectory_results": { + "$ref": "#/$defs/TrajectoryProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " } }, - "required": [ - "error_type", - "error_message" - ], - "additionalProperties": false + "title": "OptimizationProtocols", + "type": "object" }, - "AtomicResult": { - "title": "AtomicResult", - "description": "Results from a CMS program execution.", - "type": "object", + "OptimizationSpecification": { + "additionalProperties": false, + "description": "Specification for how to run a geometry optimization.", "properties": { - "id": { - "title": "Id", - "description": "The optional ID for the computation.", - "type": "string" - }, "schema_name": { + "const": "qcschema_optimization_specification", + "default": "qcschema_optimization_specification", "title": "Schema Name", - "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", - "default": "qcschema_output", - "enum": [ - "qcschema_output" - ], "type": "string" }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "molecule": { - "title": "Molecule", - "description": "The molecule to use in the computation.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] - }, - "driver": { - "description": "Allowed computation driver values.", - "allOf": [ - { - "$ref": "#/definitions/DriverEnum" - } - ] - }, - "model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "allOf": [ - { - "$ref": "#/definitions/Model" - } - ] + "program": { + "default": "", + "description": "Optimizer CMS code / QCEngine procedure to run the geometry optimization with.", + "title": "Program", + "type": "string" }, "keywords": { - "title": "Keywords", - "description": "The program-specific keywords to be used.", "default": {}, - "type": "object" + "description": "The optimization specific keywords to be used.", + "title": "Keywords" }, "protocols": { - "title": "Protocols", - "description": "Protocols regarding the manipulation of computational result data.", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProtocols" - } - ] + "$ref": "#/$defs/OptimizationProtocols", + "default": { + "schema_name": "qcschema_optimization_protocols", + "trajectory_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n " }, "extras": { - "title": "Extras", - "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", "default": {}, - "type": "object" - }, - "provenance": { - "title": "Provenance", - "description": "Provenance information.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "properties": { - "title": "Properties", - "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProperties" - } - ] - }, - "wavefunction": { - "title": "Wavefunction", - "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProperties" - } - ] + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" }, - "return_result": { - "title": "Return Result", - "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", - "anyOf": [ - { - "type": "number" - }, + "specification": { + "description": "A directive for how to compute a gradient for the optimization. Either an ordinary atomic/single-point or a many-body spec.", + "oneOf": [ { - "type": "array", - "items": { - "type": "number" - } + "$ref": "#/$defs/AtomicSpecification" }, { - "type": "object" + "$ref": "#/$defs/ManyBodySpecification" } - ] + ], + "title": "Specification" + } + }, + "required": [ + "specification" + ], + "title": "OptimizationSpecification", + "type": "object" + }, + "Provenance": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": true, + "description": "Provenance information.", + "properties": { + "creator": { + "description": "The name of the program, library, or person who created the object.", + "title": "Creator", + "type": "string" }, - "stdout": { - "title": "Stdout", - "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "version": { + "default": "", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "title": "Version", "type": "string" }, - "stderr": { - "title": "Stderr", - "description": "The standard error of the program execution.", + "routine": { + "default": "", + "description": "The name of the routine or function within the creator, blank otherwise.", + "title": "Routine", + "type": "string" + } + }, + "required": [ + "creator" + ], + "title": "Provenance", + "type": "object" + }, + "TrajectoryProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "title": "TrajectoryProtocolEnum", + "type": "string" + }, + "WavefunctionProperties": { + "additionalProperties": true, + "type": "object" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "QCSchema results model for geometry optimization.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_result", + "default": "qcschema_optimization_result", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { "type": "string" }, - "native_files": { - "title": "Native Files", - "description": "DSL files.", - "default": {}, - "type": "object" + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" + }, + "input_data": { + "$ref": "#/$defs/OptimizationInput" + }, + "final_molecule": { + "anyOf": [ + { + "$ref": "#/$defs/Molecule" }, - "success": { - "title": "Success", - "description": "The success of program execution. If False, other fields may be blank.", - "type": "boolean" + { + "type": "null" + } + ], + "description": "The final molecule of the geometry optimization." + }, + "trajectory_results": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/AtomicResult" + }, + "type": "array" }, - "error": { - "title": "Error", - "description": "Complete description of the error from an unsuccessful program execution.", - "allOf": [ - { - "$ref": "#/definitions/ComputeError" - } - ] + { + "items": { + "$ref": "#/$defs/ManyBodyResult" + }, + "type": "array" } - }, - "required": [ - "molecule", - "driver", - "model", - "provenance", - "properties", - "return_result", - "success" ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" + "description": "An ordered list of single-geometry result objects for each step in the optimization. Either an ordinary atomic/single-point or a many-body result.", + "title": "Trajectory Results" + }, + "trajectory_properties": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/AtomicProperties" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/$defs/ManyBodyProperties" + }, + "type": "array" + } + ], + "description": "An ordered list of abridged single-geometry property sets (energy and other properties) for each step in the optimization. Either an ordinary atomic/single-point or a many-body properties.", + "title": "Trajectory Properties" + }, + "stdout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard output of the program.", + "title": "Stdout" + }, + "stderr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard error of the program.", + "title": "Stderr" + }, + "success": { + "const": true, + "default": true, + "description": "The success of a given programs execution. If False, other fields may be blank.", + "title": "Success", + "type": "boolean" + }, + "provenance": { + "$ref": "#/$defs/Provenance" + }, + "native_files": { + "additionalProperties": true, + "default": {}, + "description": "DSL files.", + "title": "Native Files", + "type": "object" + }, + "properties": { + "$ref": "#/$defs/OptimizationProperties", + "description": "\n Named properties of geometry optimization computations following the MolSSI QCSchema.\n " + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" } - } + }, + "required": [ + "input_data", + "final_molecule", + "trajectory_results", + "trajectory_properties", + "provenance", + "properties" + ], + "title": "OptimizationResult", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationSpecification.schema b/qcschema/qcelemental_v2/schemas/OptimizationSpecification.schema new file mode 100644 index 0000000..0e46f6b --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationSpecification.schema @@ -0,0 +1,738 @@ +{ + "$defs": { + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" + }, + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" + }, + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" + }, + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" + }, + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", + "type": "string" + }, + "driver": { + "$ref": "#/$defs/DriverEnum" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" + }, + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "BsseEnum": { + "description": "Available basis-set superposition error (BSSE) treatments.", + "enum": [ + "nocp", + "cp", + "vmfc", + "cp", + "nocp", + "nocp" + ], + "title": "BsseEnum", + "type": "string" + }, + "ClusterResultsProtocolEnum": { + "description": "Which component results to preserve in a many body result; usually AtomicResults.", + "enum": [ + "all", + "none" + ], + "title": "ClusterResultsProtocolEnum", + "type": "string" + }, + "DriverEnum": { + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "title": "DriverEnum", + "type": "string" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "properties": { + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" + }, + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" + } + }, + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + }, + "ManyBodyKeywords": { + "additionalProperties": false, + "description": "The many-body-specific keywords for user control.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_keywords", + "default": "qcschema_many_body_keywords", + "title": "Schema Name", + "type": "string" + }, + "bsse_type": { + "default": [ + "cp" + ], + "description": "Requested BSSE treatments. First in list determines which interaction or total energy/gradient/Hessian returned.", + "items": { + "$ref": "#/$defs/BsseEnum" + }, + "title": "Bsse Type", + "type": "array" + }, + "embedding_charges": { + "anyOf": [ + { + "additionalProperties": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Atom-centered point charges to be used on molecule fragments whose basis sets are not included in the computation. Keys: 1-based index of fragment. Values: list of atom charges for that fragment. At present, QCManyBody will only accept non-None values of this keyword if environment variable QCMANYBODY_EMBEDDING_CHARGES is set.", + "shape": [ + "nfr", + "" + ], + "title": "Embedding Charges" + }, + "return_total_data": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "When True, returns the total data (energy/gradient/Hessian) of the system, otherwise returns interaction data. Default is False for energies, True for gradients and Hessians. Note that the calculation of counterpoise corrected total energies implies the calculation of the energies of monomers in the monomer basis, hence specifying ``return_total_data = True`` may carry out more computations than ``return_total_data = False``. For gradients and Hessians, ``return_total_data = False`` is rarely useful.", + "title": "Return Total Data" + }, + "levels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Dictionary of different levels of theory for different levels of expansion. Note that the primary method_string is not used when this keyword is given. ``supersystem`` computes all higher order n-body effects up to the number of fragments; this higher-order correction uses the nocp basis, regardless of bsse_type. A method fills in for any lower unlisted nbody levels. Note that if both this and max_nbody are provided, they must be consistent. Examples: SUPERSYSTEM definition suspect* {1: 'ccsd(t)', 2: 'mp2', 'supersystem': 'scf'} * {2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} * Now invalid: {1: 2, 2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} ", + "title": "Levels" + }, + "max_nbody": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum number of bodies to include in the many-body treatment. Possible: max_nbody <= nfragments. Default: max_nbody = nfragments.", + "title": "Max Nbody" + }, + "supersystem_ie_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Target the supersystem total/interaction energy (IE) data over the many-body expansion (MBE) analysis, thereby omitting intermediate-body calculations. When False (default), compute each n-body level in the MBE up through ``max_nbody``. When True (only allowed for ``max_nbody = nfragments`` ), only compute enough for the overall interaction/total energy: max_nbody-body and 1-body. When True, properties ``INTERACTION {driver} THROUGH {max_nbody}-BODY`` will always be available; ``TOTAL {driver} THROUGH {max_nbody}-BODY`` will be available depending on ``return_total_data`` ; and ``{max_nbody}-BODY CONTRIBUTION TO {driver}`` won't be available (except for dimers). This keyword produces no savings for a two-fragment molecule. But for the interaction energy of a three-fragment molecule, for example, 2-body subsystems can be skipped with ``supersystem_ie_only=True``. Do not use with ``vmfc`` in ``bsse_type`` as it cannot produce savings.", + "title": "Supersystem Ie Only" + } + }, + "title": "ManyBodyKeywords", + "type": "object" + }, + "ManyBodyProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a ManyBody output data.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_protocols", + "default": "qcschema_many_body_protocols", + "title": "Schema Name", + "type": "string" + }, + "cluster_results": { + "$ref": "#/$defs/ClusterResultsProtocolEnum", + "default": "none" + } + }, + "title": "ManyBodyProtocols", + "type": "object" + }, + "ManyBodySpecification": { + "additionalProperties": false, + "description": "Combining the what (ManyBodyKeywords) with the how (AtomicSpecification).", + "properties": { + "schema_name": { + "const": "qcschema_many_body_specification", + "default": "qcschema_many_body_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "$ref": "#/$defs/ManyBodyKeywords" + }, + "program": { + "default": "", + "description": "Many Body Expansion CMS code / QCEngine procedure with which to run the MB decomposition.", + "title": "Program", + "type": "string" + }, + "protocols": { + "$ref": "#/$defs/ManyBodyProtocols", + "default": { + "schema_name": "qcschema_many_body_protocols", + "cluster_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a ManyBody output data.\n " + }, + "driver": { + "$ref": "#/$defs/DriverEnum", + "description": "The computation driver; i.e., energy, gradient, hessian." + }, + "specification": { + "additionalProperties": { + "$ref": "#/$defs/AtomicSpecification" + }, + "description": "??? TODO expand to cbs, fd", + "title": "Specification", + "type": "object" + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + } + }, + "required": [ + "keywords", + "driver", + "specification" + ], + "title": "ManyBodySpecification", + "type": "object" + }, + "Model": { + "additionalProperties": true, + "description": "The computational molecular sciences model to run.", + "properties": { + "method": { + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", + "type": "string" + }, + "basis": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" + } + }, + "required": [ + "method" + ], + "title": "Model", + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "OptimizationProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Optimization output data.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_protocols", + "default": "qcschema_optimization_protocols", + "title": "Schema Name", + "type": "string" + }, + "trajectory_results": { + "$ref": "#/$defs/TrajectoryProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "OptimizationProtocols", + "type": "object" + }, + "TrajectoryProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "title": "TrajectoryProtocolEnum", + "type": "string" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Specification for how to run a geometry optimization.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_specification", + "default": "qcschema_optimization_specification", + "title": "Schema Name", + "type": "string" + }, + "program": { + "default": "", + "description": "Optimizer CMS code / QCEngine procedure to run the geometry optimization with.", + "title": "Program", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The optimization specific keywords to be used.", + "title": "Keywords" + }, + "protocols": { + "$ref": "#/$defs/OptimizationProtocols", + "default": { + "schema_name": "qcschema_optimization_protocols", + "trajectory_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n " + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + }, + "specification": { + "description": "A directive for how to compute a gradient for the optimization. Either an ordinary atomic/single-point or a many-body spec.", + "oneOf": [ + { + "$ref": "#/$defs/AtomicSpecification" + }, + { + "$ref": "#/$defs/ManyBodySpecification" + } + ], + "title": "Specification" + } + }, + "required": [ + "specification" + ], + "title": "OptimizationSpecification", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ProtoModel.schema b/qcschema/qcelemental_v2/schemas/ProtoModel.schema index 251e685..6ff2f4d 100644 --- a/qcschema/qcelemental_v2/schemas/ProtoModel.schema +++ b/qcschema/qcelemental_v2/schemas/ProtoModel.schema @@ -1,7 +1,7 @@ { - "title": "ProtoModel", + "additionalProperties": false, "description": "QCSchema extension of pydantic.BaseModel.", - "type": "object", "properties": {}, - "additionalProperties": false + "title": "ProtoModel", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/Result.schema b/qcschema/qcelemental_v2/schemas/Result.schema deleted file mode 100644 index d49045a..0000000 --- a/qcschema/qcelemental_v2/schemas/Result.schema +++ /dev/null @@ -1,1570 +0,0 @@ -{ - "title": "Result", - "description": "QC Result Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicResult` instead.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "The optional ID for the computation.", - "type": "string" - }, - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", - "default": "qcschema_output", - "enum": [ - "qcschema_output" - ], - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "molecule": { - "title": "Molecule", - "description": "The molecule to use in the computation.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] - }, - "driver": { - "description": "Allowed computation driver values.", - "allOf": [ - { - "$ref": "#/definitions/DriverEnum" - } - ] - }, - "model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "allOf": [ - { - "$ref": "#/definitions/Model" - } - ] - }, - "keywords": { - "title": "Keywords", - "description": "The program-specific keywords to be used.", - "default": {}, - "type": "object" - }, - "protocols": { - "title": "Protocols", - "description": "Protocols regarding the manipulation of computational result data.", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProtocols" - } - ] - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", - "default": {}, - "type": "object" - }, - "provenance": { - "title": "Provenance", - "description": "Provenance information.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "properties": { - "title": "Properties", - "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProperties" - } - ] - }, - "wavefunction": { - "title": "Wavefunction", - "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProperties" - } - ] - }, - "return_result": { - "title": "Return Result", - "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "array", - "items": { - "type": "number" - } - }, - { - "type": "object" - } - ] - }, - "stdout": { - "title": "Stdout", - "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", - "type": "string" - }, - "stderr": { - "title": "Stderr", - "description": "The standard error of the program execution.", - "type": "string" - }, - "native_files": { - "title": "Native Files", - "description": "DSL files.", - "default": {}, - "type": "object" - }, - "success": { - "title": "Success", - "description": "The success of program execution. If False, other fields may be blank.", - "type": "boolean" - }, - "error": { - "title": "Error", - "description": "Complete description of the error from an unsuccessful program execution.", - "allOf": [ - { - "$ref": "#/definitions/ComputeError" - } - ] - } - }, - "required": [ - "molecule", - "driver", - "model", - "provenance", - "properties", - "return_result", - "success" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "Identifiers": { - "title": "Identifiers", - "description": "Canonical chemical identifiers", - "type": "object", - "properties": { - "molecule_hash": { - "title": "Molecule Hash", - "type": "string" - }, - "molecular_formula": { - "title": "Molecular Formula", - "type": "string" - }, - "smiles": { - "title": "Smiles", - "type": "string" - }, - "inchi": { - "title": "Inchi", - "type": "string" - }, - "inchikey": { - "title": "Inchikey", - "type": "string" - }, - "canonical_explicit_hydrogen_smiles": { - "title": "Canonical Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_mapped_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_smiles": { - "title": "Canonical Isomeric Smiles", - "type": "string" - }, - "canonical_smiles": { - "title": "Canonical Smiles", - "type": "string" - }, - "pubchem_cid": { - "title": "Pubchem Cid", - "description": "PubChem Compound ID", - "type": "string" - }, - "pubchem_sid": { - "title": "Pubchem Sid", - "description": "PubChem Substance ID", - "type": "string" - }, - "pubchem_conformerid": { - "title": "Pubchem Conformerid", - "description": "PubChem Conformer ID", - "type": "string" - } - }, - "additionalProperties": false - }, - "Provenance": { - "title": "Provenance", - "description": "Provenance information.", - "type": "object", - "properties": { - "creator": { - "title": "Creator", - "description": "The name of the program, library, or person who created the object.", - "type": "string" - }, - "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", - "default": "", - "type": "string" - }, - "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", - "default": "", - "type": "string" - } - }, - "required": [ - "creator" - ], - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "Molecule": { - "title": "Molecule", - "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", - "default": "qcschema_molecule", - "pattern": "^(qcschema_molecule)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", - "default": 2, - "type": "integer" - }, - "validated": { - "title": "Validated", - "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", - "default": false, - "type": "boolean" - }, - "symbols": { - "title": "Symbols", - "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "title": "Geometry", - "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", - "shape": [ - "nat", - 3 - ], - "units": "a0", - "type": "array", - "items": { - "type": "number" - } - }, - "name": { - "title": "Name", - "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", - "type": "string" - }, - "identifiers": { - "title": "Identifiers", - "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", - "allOf": [ - { - "$ref": "#/definitions/Identifiers" - } - ] - }, - "comment": { - "title": "Comment", - "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", - "type": "string" - }, - "molecular_charge": { - "title": "Molecular Charge", - "description": "The net electrostatic charge of the molecule.", - "default": 0.0, - "type": "number" - }, - "molecular_multiplicity": { - "title": "Molecular Multiplicity", - "description": "The total multiplicity of the molecule.", - "default": 1, - "type": "number" - }, - "masses": { - "title": "Masses", - "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", - "shape": [ - "nat" - ], - "units": "u", - "type": "array", - "items": { - "type": "number" - } - }, - "real": { - "title": "Real", - "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "boolean" - } - }, - "atom_labels": { - "title": "Atom Labels", - "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "atomic_numbers": { - "title": "Atomic Numbers", - "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "mass_numbers": { - "title": "Mass Numbers", - "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "connectivity": { - "title": "Connectivity", - "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "integer", - "minimum": 0 - }, - { - "type": "number", - "minimum": 0, - "maximum": 5 - } - ] - } - }, - "fragments": { - "title": "Fragments", - "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "shape": [ - "nfr", - "" - ], - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "title": "Fragment Charges", - "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "title": "Fragment Multiplicities", - "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fix_com": { - "title": "Fix Com", - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "default": false, - "type": "boolean" - }, - "fix_orientation": { - "title": "Fix Orientation", - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "default": false, - "type": "boolean" - }, - "fix_symmetry": { - "title": "Fix Symmetry", - "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", - "type": "string" - }, - "provenance": { - "title": "Provenance", - "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "id": { - "title": "Id", - "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", - "type": "object" - } - }, - "required": [ - "symbols", - "geometry" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "DriverEnum": { - "title": "DriverEnum", - "description": "Allowed computation driver values.", - "enum": [ - "energy", - "gradient", - "hessian", - "properties" - ], - "type": "string" - }, - "HarmonicType": { - "title": "HarmonicType", - "description": "The angular momentum representation of a shell.", - "enum": [ - "spherical", - "cartesian" - ], - "type": "string" - }, - "ElectronShell": { - "title": "ElectronShell", - "description": "Information for a single electronic shell.", - "type": "object", - "properties": { - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the shell as an array of integers.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "uniqueItems": true - }, - "harmonic_type": { - "description": "The angular momentum representation of a shell.", - "allOf": [ - { - "$ref": "#/definitions/HarmonicType" - } - ] - }, - "exponents": { - "title": "Exponents", - "description": "Exponents for the contracted shell.", - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1 - } - } - }, - "required": [ - "angular_momentum", - "harmonic_type", - "exponents", - "coefficients" - ], - "additionalProperties": false - }, - "ECPType": { - "title": "ECPType", - "description": "The type of the ECP potential.", - "enum": [ - "scalar", - "spinorbit" - ], - "type": "string" - }, - "ECPPotential": { - "title": "ECPPotential", - "description": "Information for a single ECP potential.", - "type": "object", - "properties": { - "ecp_type": { - "description": "The type of the ECP potential.", - "allOf": [ - { - "$ref": "#/definitions/ECPType" - } - ] - }, - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the potential as an array of integers.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "uniqueItems": true - }, - "r_exponents": { - "title": "R Exponents", - "description": "Exponents of the 'r' term.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer" - } - }, - "gaussian_exponents": { - "title": "Gaussian Exponents", - "description": "Exponents of the 'gaussian' term.", - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1 - } - } - }, - "required": [ - "ecp_type", - "angular_momentum", - "r_exponents", - "gaussian_exponents", - "coefficients" - ], - "additionalProperties": false - }, - "BasisCenter": { - "title": "BasisCenter", - "description": "Data for a single atom/center in a basis set.", - "type": "object", - "properties": { - "electron_shells": { - "title": "Electron Shells", - "description": "Electronic shells for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ElectronShell" - }, - "uniqueItems": true - }, - "ecp_electrons": { - "title": "Ecp Electrons", - "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", - "default": 0, - "type": "integer" - }, - "ecp_potentials": { - "title": "Ecp Potentials", - "description": "ECPs, MCPs, or other field potentials for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ECPPotential" - }, - "uniqueItems": true - } - }, - "required": [ - "electron_shells" - ], - "additionalProperties": false - }, - "BasisSet": { - "title": "BasisSet", - "description": "A quantum chemistry basis description.", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", - "default": "qcschema_basis", - "pattern": "^(qcschema_basis)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "name": { - "title": "Name", - "description": "The standard basis name if available (e.g., 'cc-pVDZ').", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Brief description of the basis set.", - "type": "string" - }, - "center_data": { - "title": "Center Data", - "description": "Shared basis data for all atoms/centers in the parent molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/BasisCenter" - } - }, - "atom_map": { - "title": "Atom Map", - "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", - "type": "array", - "items": { - "type": "string" - } - }, - "nbf": { - "title": "Nbf", - "description": "The number of basis functions. Use for convenience or as checksum", - "type": "integer" - } - }, - "required": [ - "name", - "center_data", - "atom_map" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "Model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "type": "object", - "properties": { - "method": { - "title": "Method", - "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", - "type": "string" - }, - "basis": { - "title": "Basis", - "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/BasisSet" - } - ] - } - }, - "required": [ - "method" - ] - }, - "WavefunctionProtocolEnum": { - "title": "WavefunctionProtocolEnum", - "description": "Wavefunction to keep from a computation.", - "enum": [ - "all", - "orbitals_and_eigenvalues", - "occupations_and_eigenvalues", - "return_results", - "none" - ], - "type": "string" - }, - "ErrorCorrectionProtocol": { - "title": "ErrorCorrectionProtocol", - "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", - "type": "object", - "properties": { - "default_policy": { - "title": "Default Policy", - "description": "Whether to allow error corrections to be used if not directly specified in `policies`", - "default": true, - "type": "boolean" - }, - "policies": { - "title": "Policies", - "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", - "type": "object", - "additionalProperties": { - "type": "boolean" - } - } - }, - "additionalProperties": false - }, - "NativeFilesProtocolEnum": { - "title": "NativeFilesProtocolEnum", - "description": "CMS program files to keep from a computation.", - "enum": [ - "all", - "input", - "none" - ], - "type": "string" - }, - "AtomicResultProtocols": { - "title": "AtomicResultProtocols", - "description": "Protocols regarding the manipulation of computational result data.", - "type": "object", - "properties": { - "wavefunction": { - "description": "Wavefunction to keep from a computation.", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProtocolEnum" - } - ] - }, - "stdout": { - "title": "Stdout", - "description": "Primary output file to keep from the computation", - "default": true, - "type": "boolean" - }, - "error_correction": { - "title": "Error Correction", - "description": "Policies for error correction", - "allOf": [ - { - "$ref": "#/definitions/ErrorCorrectionProtocol" - } - ] - }, - "native_files": { - "description": "Policies for keeping processed files from the computation", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/NativeFilesProtocolEnum" - } - ] - } - }, - "additionalProperties": false - }, - "AtomicResultProperties": { - "title": "AtomicResultProperties", - "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", - "type": "object", - "properties": { - "calcinfo_nbasis": { - "title": "Calcinfo Nbasis", - "description": "The number of basis functions for the computation.", - "type": "integer" - }, - "calcinfo_nmo": { - "title": "Calcinfo Nmo", - "description": "The number of molecular orbitals for the computation.", - "type": "integer" - }, - "calcinfo_nalpha": { - "title": "Calcinfo Nalpha", - "description": "The number of alpha electrons in the computation.", - "type": "integer" - }, - "calcinfo_nbeta": { - "title": "Calcinfo Nbeta", - "description": "The number of beta electrons in the computation.", - "type": "integer" - }, - "calcinfo_natom": { - "title": "Calcinfo Natom", - "description": "The number of atoms in the computation.", - "type": "integer" - }, - "nuclear_repulsion_energy": { - "title": "Nuclear Repulsion Energy", - "description": "The nuclear repulsion energy.", - "type": "number" - }, - "return_energy": { - "title": "Return Energy", - "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", - "type": "number" - }, - "return_gradient": { - "title": "Return Gradient", - "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "return_hessian": { - "title": "Return Hessian", - "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_one_electron_energy": { - "title": "Scf One Electron Energy", - "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_two_electron_energy": { - "title": "Scf Two Electron Energy", - "description": "The two-electron energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_vv10_energy": { - "title": "Scf Vv10 Energy", - "description": "The VV10 functional energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_xc_energy": { - "title": "Scf Xc Energy", - "description": "The functional (XC) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_dispersion_correction_energy": { - "title": "Scf Dispersion Correction Energy", - "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", - "units": "E_h", - "type": "number" - }, - "scf_dipole_moment": { - "title": "Scf Dipole Moment", - "description": "The SCF X, Y, and Z dipole components", - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_quadrupole_moment": { - "title": "Scf Quadrupole Moment", - "description": "The quadrupole components (redundant; 6 unique).", - "shape": [ - 3, - 3 - ], - "units": "e a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_energy": { - "title": "Scf Total Energy", - "description": "The total electronic energy of the SCF stage of the calculation.", - "units": "E_h", - "type": "number" - }, - "scf_total_gradient": { - "title": "Scf Total Gradient", - "description": "The total electronic gradient of the SCF stage of the calculation.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_hessian": { - "title": "Scf Total Hessian", - "description": "The total electronic Hessian of the SCF stage of the calculation.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_iterations": { - "title": "Scf Iterations", - "description": "The number of SCF iterations taken before convergence.", - "type": "integer" - }, - "mp2_same_spin_correlation_energy": { - "title": "Mp2 Same Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_opposite_spin_correlation_energy": { - "title": "Mp2 Opposite Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_singles_energy": { - "title": "Mp2 Singles Energy", - "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "mp2_doubles_energy": { - "title": "Mp2 Doubles Energy", - "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "mp2_correlation_energy": { - "title": "Mp2 Correlation Energy", - "description": "The MP2 correlation energy.", - "units": "E_h", - "type": "number" - }, - "mp2_total_energy": { - "title": "Mp2 Total Energy", - "description": "The total MP2 energy (MP2 correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "mp2_dipole_moment": { - "title": "Mp2 Dipole Moment", - "description": "The MP2 X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_same_spin_correlation_energy": { - "title": "Ccsd Same Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_opposite_spin_correlation_energy": { - "title": "Ccsd Opposite Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_singles_energy": { - "title": "Ccsd Singles Energy", - "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "ccsd_doubles_energy": { - "title": "Ccsd Doubles Energy", - "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "ccsd_correlation_energy": { - "title": "Ccsd Correlation Energy", - "description": "The CCSD correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_total_energy": { - "title": "Ccsd Total Energy", - "description": "The total CCSD energy (CCSD correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_dipole_moment": { - "title": "Ccsd Dipole Moment", - "description": "The CCSD X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_iterations": { - "title": "Ccsd Iterations", - "description": "The number of CCSD iterations taken before convergence.", - "type": "integer" - }, - "ccsd_prt_pr_correlation_energy": { - "title": "Ccsd Prt Pr Correlation Energy", - "description": "The CCSD(T) correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_total_energy": { - "title": "Ccsd Prt Pr Total Energy", - "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_dipole_moment": { - "title": "Ccsd Prt Pr Dipole Moment", - "description": "The CCSD(T) X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_correlation_energy": { - "title": "Ccsdt Correlation Energy", - "description": "The CCSDT correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdt_total_energy": { - "title": "Ccsdt Total Energy", - "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdt_dipole_moment": { - "title": "Ccsdt Dipole Moment", - "description": "The CCSDT X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_iterations": { - "title": "Ccsdt Iterations", - "description": "The number of CCSDT iterations taken before convergence.", - "type": "integer" - }, - "ccsdtq_correlation_energy": { - "title": "Ccsdtq Correlation Energy", - "description": "The CCSDTQ correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdtq_total_energy": { - "title": "Ccsdtq Total Energy", - "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdtq_dipole_moment": { - "title": "Ccsdtq Dipole Moment", - "description": "The CCSDTQ X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdtq_iterations": { - "title": "Ccsdtq Iterations", - "description": "The number of CCSDTQ iterations taken before convergence.", - "type": "integer" - } - }, - "additionalProperties": false - }, - "WavefunctionProperties": { - "title": "WavefunctionProperties", - "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", - "type": "object", - "properties": { - "basis": { - "title": "Basis", - "description": "\n A quantum chemistry basis description.\n ", - "allOf": [ - { - "$ref": "#/definitions/BasisSet" - } - ] - }, - "restricted": { - "title": "Restricted", - "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", - "type": "boolean" - }, - "h_core_a": { - "title": "H Core A", - "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_core_b": { - "title": "H Core B", - "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_effective_a": { - "title": "H Effective A", - "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_effective_b": { - "title": "H Effective B", - "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_orbitals_a": { - "title": "Scf Orbitals A", - "description": "SCF alpha-spin orbitals in the AO basis.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_orbitals_b": { - "title": "Scf Orbitals B", - "description": "SCF beta-spin orbitals in the AO basis.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_density_a": { - "title": "Scf Density A", - "description": "SCF alpha-spin density matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_density_b": { - "title": "Scf Density B", - "description": "SCF beta-spin density matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_fock_a": { - "title": "Scf Fock A", - "description": "SCF alpha-spin Fock matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_fock_b": { - "title": "Scf Fock B", - "description": "SCF beta-spin Fock matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_eigenvalues_a": { - "title": "Scf Eigenvalues A", - "description": "SCF alpha-spin orbital eigenvalues.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_eigenvalues_b": { - "title": "Scf Eigenvalues B", - "description": "SCF beta-spin orbital eigenvalues.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_occupations_a": { - "title": "Scf Occupations A", - "description": "SCF alpha-spin orbital occupations.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_occupations_b": { - "title": "Scf Occupations B", - "description": "SCF beta-spin orbital occupations.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_coulomb_a": { - "title": "Scf Coulomb A", - "description": "SCF alpha-spin Coulomb matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_coulomb_b": { - "title": "Scf Coulomb B", - "description": "SCF beta-spin Coulomb matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_exchange_a": { - "title": "Scf Exchange A", - "description": "SCF alpha-spin exchange matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_exchange_b": { - "title": "Scf Exchange B", - "description": "SCF beta-spin exchange matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "localized_orbitals_a": { - "title": "Localized Orbitals A", - "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "localized_orbitals_b": { - "title": "Localized Orbitals B", - "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "localized_fock_a": { - "title": "Localized Fock A", - "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nmo", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "localized_fock_b": { - "title": "Localized Fock B", - "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nmo", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "orbitals_a": { - "title": "Orbitals A", - "description": "Index to the alpha-spin orbitals of the primary return.", - "type": "string" - }, - "orbitals_b": { - "title": "Orbitals B", - "description": "Index to the beta-spin orbitals of the primary return.", - "type": "string" - }, - "density_a": { - "title": "Density A", - "description": "Index to the alpha-spin density of the primary return.", - "type": "string" - }, - "density_b": { - "title": "Density B", - "description": "Index to the beta-spin density of the primary return.", - "type": "string" - }, - "fock_a": { - "title": "Fock A", - "description": "Index to the alpha-spin Fock matrix of the primary return.", - "type": "string" - }, - "fock_b": { - "title": "Fock B", - "description": "Index to the beta-spin Fock matrix of the primary return.", - "type": "string" - }, - "eigenvalues_a": { - "title": "Eigenvalues A", - "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", - "type": "string" - }, - "eigenvalues_b": { - "title": "Eigenvalues B", - "description": "Index to the beta-spin orbital eigenvalues of the primary return.", - "type": "string" - }, - "occupations_a": { - "title": "Occupations A", - "description": "Index to the alpha-spin orbital occupations of the primary return.", - "type": "string" - }, - "occupations_b": { - "title": "Occupations B", - "description": "Index to the beta-spin orbital occupations of the primary return.", - "type": "string" - } - }, - "required": [ - "basis", - "restricted" - ], - "additionalProperties": false - }, - "ComputeError": { - "title": "ComputeError", - "description": "Complete description of the error from an unsuccessful program execution.", - "type": "object", - "properties": { - "error_type": { - "title": "Error Type", - "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", - "type": "string" - }, - "error_message": { - "title": "Error Message", - "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", - "type": "string" - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the error.", - "type": "object" - } - }, - "required": [ - "error_type", - "error_message" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ResultInput.schema b/qcschema/qcelemental_v2/schemas/ResultInput.schema deleted file mode 100644 index 6e4611e..0000000 --- a/qcschema/qcelemental_v2/schemas/ResultInput.schema +++ /dev/null @@ -1,810 +0,0 @@ -{ - "title": "ResultInput", - "description": "QC Input Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicInput` instead.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "The optional ID for the computation.", - "type": "string" - }, - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_input.", - "default": "qcschema_input", - "pattern": "^(qc\\_?schema_input)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "molecule": { - "title": "Molecule", - "description": "The molecule to use in the computation.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] - }, - "driver": { - "description": "Allowed computation driver values.", - "allOf": [ - { - "$ref": "#/definitions/DriverEnum" - } - ] - }, - "model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "allOf": [ - { - "$ref": "#/definitions/Model" - } - ] - }, - "keywords": { - "title": "Keywords", - "description": "The program-specific keywords to be used.", - "default": {}, - "type": "object" - }, - "protocols": { - "title": "Protocols", - "description": "Protocols regarding the manipulation of computational result data.", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProtocols" - } - ] - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", - "default": {}, - "type": "object" - }, - "provenance": { - "title": "Provenance", - "description": "Provenance information.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - } - }, - "required": [ - "molecule", - "driver", - "model" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "Identifiers": { - "title": "Identifiers", - "description": "Canonical chemical identifiers", - "type": "object", - "properties": { - "molecule_hash": { - "title": "Molecule Hash", - "type": "string" - }, - "molecular_formula": { - "title": "Molecular Formula", - "type": "string" - }, - "smiles": { - "title": "Smiles", - "type": "string" - }, - "inchi": { - "title": "Inchi", - "type": "string" - }, - "inchikey": { - "title": "Inchikey", - "type": "string" - }, - "canonical_explicit_hydrogen_smiles": { - "title": "Canonical Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_mapped_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_smiles": { - "title": "Canonical Isomeric Smiles", - "type": "string" - }, - "canonical_smiles": { - "title": "Canonical Smiles", - "type": "string" - }, - "pubchem_cid": { - "title": "Pubchem Cid", - "description": "PubChem Compound ID", - "type": "string" - }, - "pubchem_sid": { - "title": "Pubchem Sid", - "description": "PubChem Substance ID", - "type": "string" - }, - "pubchem_conformerid": { - "title": "Pubchem Conformerid", - "description": "PubChem Conformer ID", - "type": "string" - } - }, - "additionalProperties": false - }, - "Provenance": { - "title": "Provenance", - "description": "Provenance information.", - "type": "object", - "properties": { - "creator": { - "title": "Creator", - "description": "The name of the program, library, or person who created the object.", - "type": "string" - }, - "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", - "default": "", - "type": "string" - }, - "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", - "default": "", - "type": "string" - } - }, - "required": [ - "creator" - ], - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "Molecule": { - "title": "Molecule", - "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", - "default": "qcschema_molecule", - "pattern": "^(qcschema_molecule)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", - "default": 2, - "type": "integer" - }, - "validated": { - "title": "Validated", - "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", - "default": false, - "type": "boolean" - }, - "symbols": { - "title": "Symbols", - "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "title": "Geometry", - "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", - "shape": [ - "nat", - 3 - ], - "units": "a0", - "type": "array", - "items": { - "type": "number" - } - }, - "name": { - "title": "Name", - "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", - "type": "string" - }, - "identifiers": { - "title": "Identifiers", - "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", - "allOf": [ - { - "$ref": "#/definitions/Identifiers" - } - ] - }, - "comment": { - "title": "Comment", - "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", - "type": "string" - }, - "molecular_charge": { - "title": "Molecular Charge", - "description": "The net electrostatic charge of the molecule.", - "default": 0.0, - "type": "number" - }, - "molecular_multiplicity": { - "title": "Molecular Multiplicity", - "description": "The total multiplicity of the molecule.", - "default": 1, - "type": "number" - }, - "masses": { - "title": "Masses", - "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", - "shape": [ - "nat" - ], - "units": "u", - "type": "array", - "items": { - "type": "number" - } - }, - "real": { - "title": "Real", - "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "boolean" - } - }, - "atom_labels": { - "title": "Atom Labels", - "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "atomic_numbers": { - "title": "Atomic Numbers", - "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "mass_numbers": { - "title": "Mass Numbers", - "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "connectivity": { - "title": "Connectivity", - "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "integer", - "minimum": 0 - }, - { - "type": "number", - "minimum": 0, - "maximum": 5 - } - ] - } - }, - "fragments": { - "title": "Fragments", - "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "shape": [ - "nfr", - "" - ], - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "title": "Fragment Charges", - "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "title": "Fragment Multiplicities", - "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fix_com": { - "title": "Fix Com", - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "default": false, - "type": "boolean" - }, - "fix_orientation": { - "title": "Fix Orientation", - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "default": false, - "type": "boolean" - }, - "fix_symmetry": { - "title": "Fix Symmetry", - "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", - "type": "string" - }, - "provenance": { - "title": "Provenance", - "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "id": { - "title": "Id", - "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", - "type": "object" - } - }, - "required": [ - "symbols", - "geometry" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "DriverEnum": { - "title": "DriverEnum", - "description": "Allowed computation driver values.", - "enum": [ - "energy", - "gradient", - "hessian", - "properties" - ], - "type": "string" - }, - "HarmonicType": { - "title": "HarmonicType", - "description": "The angular momentum representation of a shell.", - "enum": [ - "spherical", - "cartesian" - ], - "type": "string" - }, - "ElectronShell": { - "title": "ElectronShell", - "description": "Information for a single electronic shell.", - "type": "object", - "properties": { - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the shell as an array of integers.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "uniqueItems": true - }, - "harmonic_type": { - "description": "The angular momentum representation of a shell.", - "allOf": [ - { - "$ref": "#/definitions/HarmonicType" - } - ] - }, - "exponents": { - "title": "Exponents", - "description": "Exponents for the contracted shell.", - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1 - } - } - }, - "required": [ - "angular_momentum", - "harmonic_type", - "exponents", - "coefficients" - ], - "additionalProperties": false - }, - "ECPType": { - "title": "ECPType", - "description": "The type of the ECP potential.", - "enum": [ - "scalar", - "spinorbit" - ], - "type": "string" - }, - "ECPPotential": { - "title": "ECPPotential", - "description": "Information for a single ECP potential.", - "type": "object", - "properties": { - "ecp_type": { - "description": "The type of the ECP potential.", - "allOf": [ - { - "$ref": "#/definitions/ECPType" - } - ] - }, - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the potential as an array of integers.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "uniqueItems": true - }, - "r_exponents": { - "title": "R Exponents", - "description": "Exponents of the 'r' term.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer" - } - }, - "gaussian_exponents": { - "title": "Gaussian Exponents", - "description": "Exponents of the 'gaussian' term.", - "minItems": 1, - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1 - } - } - }, - "required": [ - "ecp_type", - "angular_momentum", - "r_exponents", - "gaussian_exponents", - "coefficients" - ], - "additionalProperties": false - }, - "BasisCenter": { - "title": "BasisCenter", - "description": "Data for a single atom/center in a basis set.", - "type": "object", - "properties": { - "electron_shells": { - "title": "Electron Shells", - "description": "Electronic shells for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ElectronShell" - }, - "uniqueItems": true - }, - "ecp_electrons": { - "title": "Ecp Electrons", - "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", - "default": 0, - "type": "integer" - }, - "ecp_potentials": { - "title": "Ecp Potentials", - "description": "ECPs, MCPs, or other field potentials for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ECPPotential" - }, - "uniqueItems": true - } - }, - "required": [ - "electron_shells" - ], - "additionalProperties": false - }, - "BasisSet": { - "title": "BasisSet", - "description": "A quantum chemistry basis description.", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", - "default": "qcschema_basis", - "pattern": "^(qcschema_basis)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "name": { - "title": "Name", - "description": "The standard basis name if available (e.g., 'cc-pVDZ').", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Brief description of the basis set.", - "type": "string" - }, - "center_data": { - "title": "Center Data", - "description": "Shared basis data for all atoms/centers in the parent molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/BasisCenter" - } - }, - "atom_map": { - "title": "Atom Map", - "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", - "type": "array", - "items": { - "type": "string" - } - }, - "nbf": { - "title": "Nbf", - "description": "The number of basis functions. Use for convenience or as checksum", - "type": "integer" - } - }, - "required": [ - "name", - "center_data", - "atom_map" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" - }, - "Model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "type": "object", - "properties": { - "method": { - "title": "Method", - "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", - "type": "string" - }, - "basis": { - "title": "Basis", - "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/BasisSet" - } - ] - } - }, - "required": [ - "method" - ] - }, - "WavefunctionProtocolEnum": { - "title": "WavefunctionProtocolEnum", - "description": "Wavefunction to keep from a computation.", - "enum": [ - "all", - "orbitals_and_eigenvalues", - "occupations_and_eigenvalues", - "return_results", - "none" - ], - "type": "string" - }, - "ErrorCorrectionProtocol": { - "title": "ErrorCorrectionProtocol", - "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", - "type": "object", - "properties": { - "default_policy": { - "title": "Default Policy", - "description": "Whether to allow error corrections to be used if not directly specified in `policies`", - "default": true, - "type": "boolean" - }, - "policies": { - "title": "Policies", - "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", - "type": "object", - "additionalProperties": { - "type": "boolean" - } - } - }, - "additionalProperties": false - }, - "NativeFilesProtocolEnum": { - "title": "NativeFilesProtocolEnum", - "description": "CMS program files to keep from a computation.", - "enum": [ - "all", - "input", - "none" - ], - "type": "string" - }, - "AtomicResultProtocols": { - "title": "AtomicResultProtocols", - "description": "Protocols regarding the manipulation of computational result data.", - "type": "object", - "properties": { - "wavefunction": { - "description": "Wavefunction to keep from a computation.", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProtocolEnum" - } - ] - }, - "stdout": { - "title": "Stdout", - "description": "Primary output file to keep from the computation", - "default": true, - "type": "boolean" - }, - "error_correction": { - "title": "Error Correction", - "description": "Policies for error correction", - "allOf": [ - { - "$ref": "#/definitions/ErrorCorrectionProtocol" - } - ] - }, - "native_files": { - "description": "Policies for keeping processed files from the computation", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/NativeFilesProtocolEnum" - } - ] - } - }, - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/ResultProperties.schema b/qcschema/qcelemental_v2/schemas/ResultProperties.schema deleted file mode 100644 index 7c95bdb..0000000 --- a/qcschema/qcelemental_v2/schemas/ResultProperties.schema +++ /dev/null @@ -1,325 +0,0 @@ -{ - "title": "ResultProperties", - "description": "QC Result Properties Schema.\n\n.. deprecated:: 0.12\n Use :py:func:`qcelemental.models.AtomicResultProperties` instead.", - "type": "object", - "properties": { - "calcinfo_nbasis": { - "title": "Calcinfo Nbasis", - "description": "The number of basis functions for the computation.", - "type": "integer" - }, - "calcinfo_nmo": { - "title": "Calcinfo Nmo", - "description": "The number of molecular orbitals for the computation.", - "type": "integer" - }, - "calcinfo_nalpha": { - "title": "Calcinfo Nalpha", - "description": "The number of alpha electrons in the computation.", - "type": "integer" - }, - "calcinfo_nbeta": { - "title": "Calcinfo Nbeta", - "description": "The number of beta electrons in the computation.", - "type": "integer" - }, - "calcinfo_natom": { - "title": "Calcinfo Natom", - "description": "The number of atoms in the computation.", - "type": "integer" - }, - "nuclear_repulsion_energy": { - "title": "Nuclear Repulsion Energy", - "description": "The nuclear repulsion energy.", - "type": "number" - }, - "return_energy": { - "title": "Return Energy", - "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", - "type": "number" - }, - "return_gradient": { - "title": "Return Gradient", - "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "return_hessian": { - "title": "Return Hessian", - "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_one_electron_energy": { - "title": "Scf One Electron Energy", - "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_two_electron_energy": { - "title": "Scf Two Electron Energy", - "description": "The two-electron energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_vv10_energy": { - "title": "Scf Vv10 Energy", - "description": "The VV10 functional energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_xc_energy": { - "title": "Scf Xc Energy", - "description": "The functional (XC) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_dispersion_correction_energy": { - "title": "Scf Dispersion Correction Energy", - "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", - "units": "E_h", - "type": "number" - }, - "scf_dipole_moment": { - "title": "Scf Dipole Moment", - "description": "The SCF X, Y, and Z dipole components", - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_quadrupole_moment": { - "title": "Scf Quadrupole Moment", - "description": "The quadrupole components (redundant; 6 unique).", - "shape": [ - 3, - 3 - ], - "units": "e a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_energy": { - "title": "Scf Total Energy", - "description": "The total electronic energy of the SCF stage of the calculation.", - "units": "E_h", - "type": "number" - }, - "scf_total_gradient": { - "title": "Scf Total Gradient", - "description": "The total electronic gradient of the SCF stage of the calculation.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_hessian": { - "title": "Scf Total Hessian", - "description": "The total electronic Hessian of the SCF stage of the calculation.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_iterations": { - "title": "Scf Iterations", - "description": "The number of SCF iterations taken before convergence.", - "type": "integer" - }, - "mp2_same_spin_correlation_energy": { - "title": "Mp2 Same Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_opposite_spin_correlation_energy": { - "title": "Mp2 Opposite Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_singles_energy": { - "title": "Mp2 Singles Energy", - "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "mp2_doubles_energy": { - "title": "Mp2 Doubles Energy", - "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "mp2_correlation_energy": { - "title": "Mp2 Correlation Energy", - "description": "The MP2 correlation energy.", - "units": "E_h", - "type": "number" - }, - "mp2_total_energy": { - "title": "Mp2 Total Energy", - "description": "The total MP2 energy (MP2 correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "mp2_dipole_moment": { - "title": "Mp2 Dipole Moment", - "description": "The MP2 X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_same_spin_correlation_energy": { - "title": "Ccsd Same Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_opposite_spin_correlation_energy": { - "title": "Ccsd Opposite Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_singles_energy": { - "title": "Ccsd Singles Energy", - "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "ccsd_doubles_energy": { - "title": "Ccsd Doubles Energy", - "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "ccsd_correlation_energy": { - "title": "Ccsd Correlation Energy", - "description": "The CCSD correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_total_energy": { - "title": "Ccsd Total Energy", - "description": "The total CCSD energy (CCSD correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_dipole_moment": { - "title": "Ccsd Dipole Moment", - "description": "The CCSD X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_iterations": { - "title": "Ccsd Iterations", - "description": "The number of CCSD iterations taken before convergence.", - "type": "integer" - }, - "ccsd_prt_pr_correlation_energy": { - "title": "Ccsd Prt Pr Correlation Energy", - "description": "The CCSD(T) correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_total_energy": { - "title": "Ccsd Prt Pr Total Energy", - "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_dipole_moment": { - "title": "Ccsd Prt Pr Dipole Moment", - "description": "The CCSD(T) X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_correlation_energy": { - "title": "Ccsdt Correlation Energy", - "description": "The CCSDT correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdt_total_energy": { - "title": "Ccsdt Total Energy", - "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdt_dipole_moment": { - "title": "Ccsdt Dipole Moment", - "description": "The CCSDT X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_iterations": { - "title": "Ccsdt Iterations", - "description": "The number of CCSDT iterations taken before convergence.", - "type": "integer" - }, - "ccsdtq_correlation_energy": { - "title": "Ccsdtq Correlation Energy", - "description": "The CCSDTQ correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdtq_total_energy": { - "title": "Ccsdtq Total Energy", - "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdtq_dipole_moment": { - "title": "Ccsdtq Dipole Moment", - "description": "The CCSDTQ X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdtq_iterations": { - "title": "Ccsdtq Iterations", - "description": "The number of CCSDTQ iterations taken before convergence.", - "type": "integer" - } - }, - "additionalProperties": false -} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/TorsionDriveInput.schema b/qcschema/qcelemental_v2/schemas/TorsionDriveInput.schema new file mode 100644 index 0000000..b2580de --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/TorsionDriveInput.schema @@ -0,0 +1,1007 @@ +{ + "$defs": { + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" + }, + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" + }, + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" + }, + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" + }, + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", + "type": "string" + }, + "driver": { + "$ref": "#/$defs/DriverEnum" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" + }, + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "BsseEnum": { + "description": "Available basis-set superposition error (BSSE) treatments.", + "enum": [ + "nocp", + "cp", + "vmfc", + "cp", + "nocp", + "nocp" + ], + "title": "BsseEnum", + "type": "string" + }, + "ClusterResultsProtocolEnum": { + "description": "Which component results to preserve in a many body result; usually AtomicResults.", + "enum": [ + "all", + "none" + ], + "title": "ClusterResultsProtocolEnum", + "type": "string" + }, + "DriverEnum": { + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "title": "DriverEnum", + "type": "string" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "properties": { + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" + }, + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" + } + }, + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + }, + "ManyBodyKeywords": { + "additionalProperties": false, + "description": "The many-body-specific keywords for user control.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_keywords", + "default": "qcschema_many_body_keywords", + "title": "Schema Name", + "type": "string" + }, + "bsse_type": { + "default": [ + "cp" + ], + "description": "Requested BSSE treatments. First in list determines which interaction or total energy/gradient/Hessian returned.", + "items": { + "$ref": "#/$defs/BsseEnum" + }, + "title": "Bsse Type", + "type": "array" + }, + "embedding_charges": { + "anyOf": [ + { + "additionalProperties": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Atom-centered point charges to be used on molecule fragments whose basis sets are not included in the computation. Keys: 1-based index of fragment. Values: list of atom charges for that fragment. At present, QCManyBody will only accept non-None values of this keyword if environment variable QCMANYBODY_EMBEDDING_CHARGES is set.", + "shape": [ + "nfr", + "" + ], + "title": "Embedding Charges" + }, + "return_total_data": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "When True, returns the total data (energy/gradient/Hessian) of the system, otherwise returns interaction data. Default is False for energies, True for gradients and Hessians. Note that the calculation of counterpoise corrected total energies implies the calculation of the energies of monomers in the monomer basis, hence specifying ``return_total_data = True`` may carry out more computations than ``return_total_data = False``. For gradients and Hessians, ``return_total_data = False`` is rarely useful.", + "title": "Return Total Data" + }, + "levels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Dictionary of different levels of theory for different levels of expansion. Note that the primary method_string is not used when this keyword is given. ``supersystem`` computes all higher order n-body effects up to the number of fragments; this higher-order correction uses the nocp basis, regardless of bsse_type. A method fills in for any lower unlisted nbody levels. Note that if both this and max_nbody are provided, they must be consistent. Examples: SUPERSYSTEM definition suspect* {1: 'ccsd(t)', 2: 'mp2', 'supersystem': 'scf'} * {2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} * Now invalid: {1: 2, 2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} ", + "title": "Levels" + }, + "max_nbody": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum number of bodies to include in the many-body treatment. Possible: max_nbody <= nfragments. Default: max_nbody = nfragments.", + "title": "Max Nbody" + }, + "supersystem_ie_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Target the supersystem total/interaction energy (IE) data over the many-body expansion (MBE) analysis, thereby omitting intermediate-body calculations. When False (default), compute each n-body level in the MBE up through ``max_nbody``. When True (only allowed for ``max_nbody = nfragments`` ), only compute enough for the overall interaction/total energy: max_nbody-body and 1-body. When True, properties ``INTERACTION {driver} THROUGH {max_nbody}-BODY`` will always be available; ``TOTAL {driver} THROUGH {max_nbody}-BODY`` will be available depending on ``return_total_data`` ; and ``{max_nbody}-BODY CONTRIBUTION TO {driver}`` won't be available (except for dimers). This keyword produces no savings for a two-fragment molecule. But for the interaction energy of a three-fragment molecule, for example, 2-body subsystems can be skipped with ``supersystem_ie_only=True``. Do not use with ``vmfc`` in ``bsse_type`` as it cannot produce savings.", + "title": "Supersystem Ie Only" + } + }, + "title": "ManyBodyKeywords", + "type": "object" + }, + "ManyBodyProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a ManyBody output data.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_protocols", + "default": "qcschema_many_body_protocols", + "title": "Schema Name", + "type": "string" + }, + "cluster_results": { + "$ref": "#/$defs/ClusterResultsProtocolEnum", + "default": "none" + } + }, + "title": "ManyBodyProtocols", + "type": "object" + }, + "ManyBodySpecification": { + "additionalProperties": false, + "description": "Combining the what (ManyBodyKeywords) with the how (AtomicSpecification).", + "properties": { + "schema_name": { + "const": "qcschema_many_body_specification", + "default": "qcschema_many_body_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "$ref": "#/$defs/ManyBodyKeywords" + }, + "program": { + "default": "", + "description": "Many Body Expansion CMS code / QCEngine procedure with which to run the MB decomposition.", + "title": "Program", + "type": "string" + }, + "protocols": { + "$ref": "#/$defs/ManyBodyProtocols", + "default": { + "schema_name": "qcschema_many_body_protocols", + "cluster_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a ManyBody output data.\n " + }, + "driver": { + "$ref": "#/$defs/DriverEnum", + "description": "The computation driver; i.e., energy, gradient, hessian." + }, + "specification": { + "additionalProperties": { + "$ref": "#/$defs/AtomicSpecification" + }, + "description": "??? TODO expand to cbs, fd", + "title": "Specification", + "type": "object" + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + } + }, + "required": [ + "keywords", + "driver", + "specification" + ], + "title": "ManyBodySpecification", + "type": "object" + }, + "Model": { + "additionalProperties": true, + "description": "The computational molecular sciences model to run.", + "properties": { + "method": { + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", + "type": "string" + }, + "basis": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" + } + }, + "required": [ + "method" + ], + "title": "Model", + "type": "object" + }, + "Molecule": { + "additionalProperties": true, + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "OptimizationProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Optimization output data.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_protocols", + "default": "qcschema_optimization_protocols", + "title": "Schema Name", + "type": "string" + }, + "trajectory_results": { + "$ref": "#/$defs/TrajectoryProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "OptimizationProtocols", + "type": "object" + }, + "OptimizationSpecification": { + "additionalProperties": false, + "description": "Specification for how to run a geometry optimization.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_specification", + "default": "qcschema_optimization_specification", + "title": "Schema Name", + "type": "string" + }, + "program": { + "default": "", + "description": "Optimizer CMS code / QCEngine procedure to run the geometry optimization with.", + "title": "Program", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The optimization specific keywords to be used.", + "title": "Keywords" + }, + "protocols": { + "$ref": "#/$defs/OptimizationProtocols", + "default": { + "schema_name": "qcschema_optimization_protocols", + "trajectory_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n " + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + }, + "specification": { + "description": "A directive for how to compute a gradient for the optimization. Either an ordinary atomic/single-point or a many-body spec.", + "oneOf": [ + { + "$ref": "#/$defs/AtomicSpecification" + }, + { + "$ref": "#/$defs/ManyBodySpecification" + } + ], + "title": "Specification" + } + }, + "required": [ + "specification" + ], + "title": "OptimizationSpecification", + "type": "object" + }, + "Provenance": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": true, + "description": "Provenance information.", + "properties": { + "creator": { + "description": "The name of the program, library, or person who created the object.", + "title": "Creator", + "type": "string" + }, + "version": { + "default": "", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "title": "Version", + "type": "string" + }, + "routine": { + "default": "", + "description": "The name of the routine or function within the creator, blank otherwise.", + "title": "Routine", + "type": "string" + } + }, + "required": [ + "creator" + ], + "title": "Provenance", + "type": "object" + }, + "ScanResultsProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "lowest", + "none" + ], + "title": "ScanResultsProtocolEnum", + "type": "string" + }, + "TorsionDriveKeywords": { + "additionalProperties": false, + "description": "TorsionDriveRecord options\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_keywords", + "default": "qcschema_torsion_drive_keywords", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "dihedrals": { + "description": "The list of dihedrals to select for the TorsionDrive operation. Each entry is a tuple of integers of for particle indices.", + "items": { + "maxItems": 4, + "minItems": 4, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "title": "Dihedrals", + "type": "array" + }, + "grid_spacing": { + "description": "List of grid spacing for dihedral scan in degrees. Multiple values will be mapped to each dihedral angle.", + "items": { + "type": "integer" + }, + "title": "Grid Spacing", + "type": "array" + }, + "dihedral_ranges": { + "anyOf": [ + { + "items": { + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of dihedral range limits as a pair (lower, upper). Each range corresponds to the dihedrals in input.", + "title": "Dihedral Ranges" + }, + "energy_decrease_thresh": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold of the smallest energy decrease amount to trigger activating optimizations from grid point.", + "title": "Energy Decrease Thresh" + }, + "energy_upper_limit": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold if the energy of a grid point that is higher than the current global minimum, to start new optimizations, in unit of a.u. I.e. if energy_upper_limit = 0.05, current global minimum energy is -9.9 , then a new task starting with energy -9.8 will be skipped.", + "title": "Energy Upper Limit" + } + }, + "required": [ + "dihedrals", + "grid_spacing" + ], + "title": "TorsionDriveKeywords", + "type": "object" + }, + "TorsionDriveProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Torsion Drive subcalculation history.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_protocols", + "default": "qcschema_torsion_drive_protocols", + "title": "Schema Name", + "type": "string" + }, + "scan_results": { + "$ref": "#/$defs/ScanResultsProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "TorsionDriveProtocols", + "type": "object" + }, + "TorsionDriveSpecification": { + "additionalProperties": false, + "description": "Specification for how to run a torsion drive scan.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_specification", + "default": "qcschema_torsion_drive_specification", + "title": "Schema Name", + "type": "string" + }, + "program": { + "default": "", + "description": "Torsion Drive CMS code / QCEngine procedure with which to run the torsion scan.", + "title": "Program", + "type": "string" + }, + "keywords": { + "$ref": "#/$defs/TorsionDriveKeywords", + "description": "The torsion drive specific keywords to be used." + }, + "protocols": { + "$ref": "#/$defs/TorsionDriveProtocols", + "default": { + "schema_name": "qcschema_torsion_drive_protocols", + "scan_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Torsion Drive subcalculation history.\n " + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + }, + "specification": { + "$ref": "#/$defs/OptimizationSpecification", + "description": "The specification for how to run optimizations for the torsion scan (within this is spec for gradients for the optimization." + } + }, + "required": [ + "keywords", + "specification" + ], + "title": "TorsionDriveSpecification", + "type": "object" + }, + "TrajectoryProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "title": "TrajectoryProtocolEnum", + "type": "string" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Inputs for running a torsion drive.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_input", + "default": "qcschema_torsion_drive_input", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Id" + }, + "initial_molecule": { + "description": "The starting molecule(s) for the torsion drive.", + "items": { + "$ref": "#/$defs/Molecule" + }, + "minItems": 1, + "title": "Initial Molecule", + "type": "array" + }, + "specification": { + "$ref": "#/$defs/TorsionDriveSpecification" + }, + "provenance": { + "$ref": "#/$defs/Provenance", + "default": { + "creator": "QCElemental", + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v2.torsion_drive" + } + } + }, + "required": [ + "initial_molecule", + "specification" + ], + "title": "TorsionDriveInput", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/TorsionDriveKeywords.schema b/qcschema/qcelemental_v2/schemas/TorsionDriveKeywords.schema new file mode 100644 index 0000000..899b169 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/TorsionDriveKeywords.schema @@ -0,0 +1,103 @@ +{ + "additionalProperties": false, + "description": "TorsionDriveRecord options\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_keywords", + "default": "qcschema_torsion_drive_keywords", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "dihedrals": { + "description": "The list of dihedrals to select for the TorsionDrive operation. Each entry is a tuple of integers of for particle indices.", + "items": { + "maxItems": 4, + "minItems": 4, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "title": "Dihedrals", + "type": "array" + }, + "grid_spacing": { + "description": "List of grid spacing for dihedral scan in degrees. Multiple values will be mapped to each dihedral angle.", + "items": { + "type": "integer" + }, + "title": "Grid Spacing", + "type": "array" + }, + "dihedral_ranges": { + "anyOf": [ + { + "items": { + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of dihedral range limits as a pair (lower, upper). Each range corresponds to the dihedrals in input.", + "title": "Dihedral Ranges" + }, + "energy_decrease_thresh": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold of the smallest energy decrease amount to trigger activating optimizations from grid point.", + "title": "Energy Decrease Thresh" + }, + "energy_upper_limit": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold if the energy of a grid point that is higher than the current global minimum, to start new optimizations, in unit of a.u. I.e. if energy_upper_limit = 0.05, current global minimum energy is -9.9 , then a new task starting with energy -9.8 will be skipped.", + "title": "Energy Upper Limit" + } + }, + "required": [ + "dihedrals", + "grid_spacing" + ], + "title": "TorsionDriveKeywords", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/TorsionDriveProperties.schema b/qcschema/qcelemental_v2/schemas/TorsionDriveProperties.schema new file mode 100644 index 0000000..7da7225 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/TorsionDriveProperties.schema @@ -0,0 +1,28 @@ +{ + "additionalProperties": false, + "description": "Named properties of torsion drive computations following the MolSSI QCSchema.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_properties", + "default": "qcschema_torsion_drive_properties", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "calcinfo_ngrid": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of dihedral constraints optimized.", + "title": "Calcinfo Ngrid" + } + }, + "title": "TorsionDriveProperties", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/TorsionDriveProtocols.schema b/qcschema/qcelemental_v2/schemas/TorsionDriveProtocols.schema new file mode 100644 index 0000000..0b36b1e --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/TorsionDriveProtocols.schema @@ -0,0 +1,31 @@ +{ + "$defs": { + "ScanResultsProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "lowest", + "none" + ], + "title": "ScanResultsProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Torsion Drive subcalculation history.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_protocols", + "default": "qcschema_torsion_drive_protocols", + "title": "Schema Name", + "type": "string" + }, + "scan_results": { + "$ref": "#/$defs/ScanResultsProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "TorsionDriveProtocols", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/TorsionDriveResult.schema b/qcschema/qcelemental_v2/schemas/TorsionDriveResult.schema new file mode 100644 index 0000000..7d222a1 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/TorsionDriveResult.schema @@ -0,0 +1,1744 @@ +{ + "$defs": { + "AtomicInput": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "The MolSSI Quantum Chemistry Schema", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" + }, + "schema_name": { + "const": "qcschema_atomic_input", + "default": "qcschema_atomic_input", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule to use in the computation." + }, + "specification": { + "$ref": "#/$defs/AtomicSpecification", + "description": "Additional fields specifying how to run the single-point computation." + }, + "provenance": { + "$ref": "#/$defs/Provenance" + } + }, + "required": [ + "molecule", + "specification" + ], + "title": "AtomicInput", + "type": "object" + }, + "AtomicProperties": { + "additionalProperties": true, + "type": "object" + }, + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" + }, + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" + }, + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" + }, + "AtomicResult": { + "additionalProperties": false, + "description": "Results from a CMS program execution.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_result", + "default": "qcschema_atomic_result", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.AtomicResult.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" + }, + "input_data": { + "$ref": "#/$defs/AtomicInput" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule with frame and orientation of the results." + }, + "properties": { + "$ref": "#/$defs/AtomicProperties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nmo`\n " + }, + "wavefunction": { + "anyOf": [ + { + "$ref": "#/$defs/WavefunctionProperties" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Wavefunction properties resulting from a computation.\n Matrix quantities are stored in column-major order. Presence and contents configurable by protocol." + }, + "return_result": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + {} + ], + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "title": "Return Result" + }, + "stdout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "title": "Stdout" + }, + "stderr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard error of the program execution.", + "title": "Stderr" + }, + "native_files": { + "additionalProperties": true, + "default": {}, + "description": "DSL files.", + "title": "Native Files", + "type": "object" + }, + "success": { + "const": true, + "default": true, + "description": "The success of program execution. If False, other fields may be blank.", + "title": "Success", + "type": "boolean" + }, + "provenance": { + "$ref": "#/$defs/Provenance" + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "input_data", + "molecule", + "properties", + "return_result", + "provenance" + ], + "title": "AtomicResult", + "type": "object" + }, + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" + }, + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", + "type": "string" + }, + "driver": { + "$ref": "#/$defs/DriverEnum" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" + }, + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "BsseEnum": { + "description": "Available basis-set superposition error (BSSE) treatments.", + "enum": [ + "nocp", + "cp", + "vmfc", + "cp", + "nocp", + "nocp" + ], + "title": "BsseEnum", + "type": "string" + }, + "ClusterResultsProtocolEnum": { + "description": "Which component results to preserve in a many body result; usually AtomicResults.", + "enum": [ + "all", + "none" + ], + "title": "ClusterResultsProtocolEnum", + "type": "string" + }, + "DriverEnum": { + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "title": "DriverEnum", + "type": "string" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "properties": { + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" + }, + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" + } + }, + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + }, + "ManyBodyInput": { + "additionalProperties": false, + "description": "Combining the what and how (ManyBodySpecification) with the who (Molecule).", + "properties": { + "schema_name": { + "const": "qcschema_many_body_input", + "default": "qcschema_many_body_input", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "provenance": { + "$ref": "#/$defs/Provenance", + "default": { + "creator": "QCManyBody", + "version": "0.7.2.dev1+gd763e0c18", + "routine": "qcmanybody.models.v2.many_body" + } + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Id" + }, + "specification": { + "$ref": "#/$defs/ManyBodySpecification", + "description": "???" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "Target molecule for many-body expansion (MBE) or interaction energy (IE) analysis." + } + }, + "required": [ + "specification", + "molecule" + ], + "title": "ManyBodyInput", + "type": "object" + }, + "ManyBodyKeywords": { + "additionalProperties": false, + "description": "The many-body-specific keywords for user control.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_keywords", + "default": "qcschema_many_body_keywords", + "title": "Schema Name", + "type": "string" + }, + "bsse_type": { + "default": [ + "cp" + ], + "description": "Requested BSSE treatments. First in list determines which interaction or total energy/gradient/Hessian returned.", + "items": { + "$ref": "#/$defs/BsseEnum" + }, + "title": "Bsse Type", + "type": "array" + }, + "embedding_charges": { + "anyOf": [ + { + "additionalProperties": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Atom-centered point charges to be used on molecule fragments whose basis sets are not included in the computation. Keys: 1-based index of fragment. Values: list of atom charges for that fragment. At present, QCManyBody will only accept non-None values of this keyword if environment variable QCMANYBODY_EMBEDDING_CHARGES is set.", + "shape": [ + "nfr", + "" + ], + "title": "Embedding Charges" + }, + "return_total_data": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "When True, returns the total data (energy/gradient/Hessian) of the system, otherwise returns interaction data. Default is False for energies, True for gradients and Hessians. Note that the calculation of counterpoise corrected total energies implies the calculation of the energies of monomers in the monomer basis, hence specifying ``return_total_data = True`` may carry out more computations than ``return_total_data = False``. For gradients and Hessians, ``return_total_data = False`` is rarely useful.", + "title": "Return Total Data" + }, + "levels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Dictionary of different levels of theory for different levels of expansion. Note that the primary method_string is not used when this keyword is given. ``supersystem`` computes all higher order n-body effects up to the number of fragments; this higher-order correction uses the nocp basis, regardless of bsse_type. A method fills in for any lower unlisted nbody levels. Note that if both this and max_nbody are provided, they must be consistent. Examples: SUPERSYSTEM definition suspect* {1: 'ccsd(t)', 2: 'mp2', 'supersystem': 'scf'} * {2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} * Now invalid: {1: 2, 2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} ", + "title": "Levels" + }, + "max_nbody": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum number of bodies to include in the many-body treatment. Possible: max_nbody <= nfragments. Default: max_nbody = nfragments.", + "title": "Max Nbody" + }, + "supersystem_ie_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Target the supersystem total/interaction energy (IE) data over the many-body expansion (MBE) analysis, thereby omitting intermediate-body calculations. When False (default), compute each n-body level in the MBE up through ``max_nbody``. When True (only allowed for ``max_nbody = nfragments`` ), only compute enough for the overall interaction/total energy: max_nbody-body and 1-body. When True, properties ``INTERACTION {driver} THROUGH {max_nbody}-BODY`` will always be available; ``TOTAL {driver} THROUGH {max_nbody}-BODY`` will be available depending on ``return_total_data`` ; and ``{max_nbody}-BODY CONTRIBUTION TO {driver}`` won't be available (except for dimers). This keyword produces no savings for a two-fragment molecule. But for the interaction energy of a three-fragment molecule, for example, 2-body subsystems can be skipped with ``supersystem_ie_only=True``. Do not use with ``vmfc`` in ``bsse_type`` as it cannot produce savings.", + "title": "Supersystem Ie Only" + } + }, + "title": "ManyBodyKeywords", + "type": "object" + }, + "ManyBodyProperties": { + "additionalProperties": true, + "type": "object" + }, + "ManyBodyProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a ManyBody output data.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_protocols", + "default": "qcschema_many_body_protocols", + "title": "Schema Name", + "type": "string" + }, + "cluster_results": { + "$ref": "#/$defs/ClusterResultsProtocolEnum", + "default": "none" + } + }, + "title": "ManyBodyProtocols", + "type": "object" + }, + "ManyBodyResult": { + "additionalProperties": false, + "properties": { + "input_data": { + "$ref": "#/$defs/ManyBodyInput" + }, + "success": { + "const": true, + "default": true, + "description": "A boolean indicator that the operation succeeded or failed. Allows programmatic assessment of all results regardless of if they failed or succeeded by checking `result.success`.", + "title": "Success", + "type": "boolean" + }, + "stdout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "title": "Stdout" + }, + "stderr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard error of the program execution.", + "title": "Stderr" + }, + "schema_name": { + "const": "qcschema_many_body_result", + "default": "qcschema_many_body_result", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the object.", + "title": "Id" + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the object. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + }, + "provenance": { + "$ref": "#/$defs/Provenance" + }, + "native_files": { + "additionalProperties": true, + "default": {}, + "description": "DSL files.", + "title": "Native Files", + "type": "object" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule in results fragmentation and frame. Since QCManyBody doesn't disrupt the mol, should be identical to input_data.molecule." + }, + "properties": { + "$ref": "#/$defs/ManyBodyProperties", + "description": "None" + }, + "cluster_properties": { + "additionalProperties": { + "$ref": "#/$defs/AtomicProperties" + }, + "description": "The key results for each subsystem species computed. Keys contain modelchem, real and ghost information (e.g., `'[\"(auto)\", [2], [1, 2, 3]]'`). Values are total e/g/H/property results. Array values, if present, are sized and shaped for the full supersystem.", + "title": "Cluster Properties", + "type": "object" + }, + "cluster_results": { + "additionalProperties": { + "$ref": "#/$defs/AtomicResult" + }, + "description": "Detailed results", + "title": "Cluster Results", + "type": "object" + }, + "return_result": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "additionalProperties": true, + "type": "object" + } + ], + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "title": "Return Result" + } + }, + "required": [ + "input_data", + "provenance", + "molecule", + "properties", + "cluster_properties", + "cluster_results", + "return_result" + ], + "title": "ManyBodyResult", + "type": "object" + }, + "ManyBodySpecification": { + "additionalProperties": false, + "description": "Combining the what (ManyBodyKeywords) with the how (AtomicSpecification).", + "properties": { + "schema_name": { + "const": "qcschema_many_body_specification", + "default": "qcschema_many_body_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "$ref": "#/$defs/ManyBodyKeywords" + }, + "program": { + "default": "", + "description": "Many Body Expansion CMS code / QCEngine procedure with which to run the MB decomposition.", + "title": "Program", + "type": "string" + }, + "protocols": { + "$ref": "#/$defs/ManyBodyProtocols", + "default": { + "schema_name": "qcschema_many_body_protocols", + "cluster_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a ManyBody output data.\n " + }, + "driver": { + "$ref": "#/$defs/DriverEnum", + "description": "The computation driver; i.e., energy, gradient, hessian." + }, + "specification": { + "additionalProperties": { + "$ref": "#/$defs/AtomicSpecification" + }, + "description": "??? TODO expand to cbs, fd", + "title": "Specification", + "type": "object" + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + } + }, + "required": [ + "keywords", + "driver", + "specification" + ], + "title": "ManyBodySpecification", + "type": "object" + }, + "Model": { + "additionalProperties": true, + "description": "The computational molecular sciences model to run.", + "properties": { + "method": { + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", + "type": "string" + }, + "basis": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" + } + }, + "required": [ + "method" + ], + "title": "Model", + "type": "object" + }, + "Molecule": { + "additionalProperties": true, + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "OptimizationInput": { + "additionalProperties": false, + "description": "QCSchema input directive for geometry optimization.", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Id" + }, + "schema_name": { + "const": "qcschema_optimization_input", + "default": "qcschema_optimization_input", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "specification": { + "$ref": "#/$defs/OptimizationSpecification" + }, + "initial_molecule": { + "$ref": "#/$defs/Molecule", + "description": "The starting molecule for the geometry optimization." + }, + "provenance": { + "$ref": "#/$defs/Provenance", + "default": { + "creator": "QCElemental", + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v2.optimization" + } + } + }, + "required": [ + "specification", + "initial_molecule" + ], + "title": "OptimizationInput", + "type": "object" + }, + "OptimizationProperties": { + "additionalProperties": true, + "type": "object" + }, + "OptimizationProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Optimization output data.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_protocols", + "default": "qcschema_optimization_protocols", + "title": "Schema Name", + "type": "string" + }, + "trajectory_results": { + "$ref": "#/$defs/TrajectoryProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "OptimizationProtocols", + "type": "object" + }, + "OptimizationResult": { + "additionalProperties": false, + "description": "QCSchema results model for geometry optimization.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_result", + "default": "qcschema_optimization_result", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" + }, + "input_data": { + "$ref": "#/$defs/OptimizationInput" + }, + "final_molecule": { + "anyOf": [ + { + "$ref": "#/$defs/Molecule" + }, + { + "type": "null" + } + ], + "description": "The final molecule of the geometry optimization." + }, + "trajectory_results": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/AtomicResult" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/$defs/ManyBodyResult" + }, + "type": "array" + } + ], + "description": "An ordered list of single-geometry result objects for each step in the optimization. Either an ordinary atomic/single-point or a many-body result.", + "title": "Trajectory Results" + }, + "trajectory_properties": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/AtomicProperties" + }, + "type": "array" + }, + { + "items": { + "$ref": "#/$defs/ManyBodyProperties" + }, + "type": "array" + } + ], + "description": "An ordered list of abridged single-geometry property sets (energy and other properties) for each step in the optimization. Either an ordinary atomic/single-point or a many-body properties.", + "title": "Trajectory Properties" + }, + "stdout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard output of the program.", + "title": "Stdout" + }, + "stderr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard error of the program.", + "title": "Stderr" + }, + "success": { + "const": true, + "default": true, + "description": "The success of a given programs execution. If False, other fields may be blank.", + "title": "Success", + "type": "boolean" + }, + "provenance": { + "$ref": "#/$defs/Provenance" + }, + "native_files": { + "additionalProperties": true, + "default": {}, + "description": "DSL files.", + "title": "Native Files", + "type": "object" + }, + "properties": { + "$ref": "#/$defs/OptimizationProperties", + "description": "\n Named properties of geometry optimization computations following the MolSSI QCSchema.\n " + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "input_data", + "final_molecule", + "trajectory_results", + "trajectory_properties", + "provenance", + "properties" + ], + "title": "OptimizationResult", + "type": "object" + }, + "OptimizationSpecification": { + "additionalProperties": false, + "description": "Specification for how to run a geometry optimization.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_specification", + "default": "qcschema_optimization_specification", + "title": "Schema Name", + "type": "string" + }, + "program": { + "default": "", + "description": "Optimizer CMS code / QCEngine procedure to run the geometry optimization with.", + "title": "Program", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The optimization specific keywords to be used.", + "title": "Keywords" + }, + "protocols": { + "$ref": "#/$defs/OptimizationProtocols", + "default": { + "schema_name": "qcschema_optimization_protocols", + "trajectory_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n " + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + }, + "specification": { + "description": "A directive for how to compute a gradient for the optimization. Either an ordinary atomic/single-point or a many-body spec.", + "oneOf": [ + { + "$ref": "#/$defs/AtomicSpecification" + }, + { + "$ref": "#/$defs/ManyBodySpecification" + } + ], + "title": "Specification" + } + }, + "required": [ + "specification" + ], + "title": "OptimizationSpecification", + "type": "object" + }, + "Provenance": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": true, + "description": "Provenance information.", + "properties": { + "creator": { + "description": "The name of the program, library, or person who created the object.", + "title": "Creator", + "type": "string" + }, + "version": { + "default": "", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "title": "Version", + "type": "string" + }, + "routine": { + "default": "", + "description": "The name of the routine or function within the creator, blank otherwise.", + "title": "Routine", + "type": "string" + } + }, + "required": [ + "creator" + ], + "title": "Provenance", + "type": "object" + }, + "ScanResultsProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "lowest", + "none" + ], + "title": "ScanResultsProtocolEnum", + "type": "string" + }, + "TorsionDriveInput": { + "additionalProperties": false, + "description": "Inputs for running a torsion drive.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_input", + "default": "qcschema_torsion_drive_input", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Id" + }, + "initial_molecule": { + "description": "The starting molecule(s) for the torsion drive.", + "items": { + "$ref": "#/$defs/Molecule" + }, + "minItems": 1, + "title": "Initial Molecule", + "type": "array" + }, + "specification": { + "$ref": "#/$defs/TorsionDriveSpecification" + }, + "provenance": { + "$ref": "#/$defs/Provenance", + "default": { + "creator": "QCElemental", + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v2.torsion_drive" + } + } + }, + "required": [ + "initial_molecule", + "specification" + ], + "title": "TorsionDriveInput", + "type": "object" + }, + "TorsionDriveKeywords": { + "additionalProperties": false, + "description": "TorsionDriveRecord options\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_keywords", + "default": "qcschema_torsion_drive_keywords", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "dihedrals": { + "description": "The list of dihedrals to select for the TorsionDrive operation. Each entry is a tuple of integers of for particle indices.", + "items": { + "maxItems": 4, + "minItems": 4, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "title": "Dihedrals", + "type": "array" + }, + "grid_spacing": { + "description": "List of grid spacing for dihedral scan in degrees. Multiple values will be mapped to each dihedral angle.", + "items": { + "type": "integer" + }, + "title": "Grid Spacing", + "type": "array" + }, + "dihedral_ranges": { + "anyOf": [ + { + "items": { + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of dihedral range limits as a pair (lower, upper). Each range corresponds to the dihedrals in input.", + "title": "Dihedral Ranges" + }, + "energy_decrease_thresh": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold of the smallest energy decrease amount to trigger activating optimizations from grid point.", + "title": "Energy Decrease Thresh" + }, + "energy_upper_limit": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold if the energy of a grid point that is higher than the current global minimum, to start new optimizations, in unit of a.u. I.e. if energy_upper_limit = 0.05, current global minimum energy is -9.9 , then a new task starting with energy -9.8 will be skipped.", + "title": "Energy Upper Limit" + } + }, + "required": [ + "dihedrals", + "grid_spacing" + ], + "title": "TorsionDriveKeywords", + "type": "object" + }, + "TorsionDriveProperties": { + "additionalProperties": false, + "description": "Named properties of torsion drive computations following the MolSSI QCSchema.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_properties", + "default": "qcschema_torsion_drive_properties", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "calcinfo_ngrid": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of dihedral constraints optimized.", + "title": "Calcinfo Ngrid" + } + }, + "title": "TorsionDriveProperties", + "type": "object" + }, + "TorsionDriveProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Torsion Drive subcalculation history.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_protocols", + "default": "qcschema_torsion_drive_protocols", + "title": "Schema Name", + "type": "string" + }, + "scan_results": { + "$ref": "#/$defs/ScanResultsProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "TorsionDriveProtocols", + "type": "object" + }, + "TorsionDriveSpecification": { + "additionalProperties": false, + "description": "Specification for how to run a torsion drive scan.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_specification", + "default": "qcschema_torsion_drive_specification", + "title": "Schema Name", + "type": "string" + }, + "program": { + "default": "", + "description": "Torsion Drive CMS code / QCEngine procedure with which to run the torsion scan.", + "title": "Program", + "type": "string" + }, + "keywords": { + "$ref": "#/$defs/TorsionDriveKeywords", + "description": "The torsion drive specific keywords to be used." + }, + "protocols": { + "$ref": "#/$defs/TorsionDriveProtocols", + "default": { + "schema_name": "qcschema_torsion_drive_protocols", + "scan_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Torsion Drive subcalculation history.\n " + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + }, + "specification": { + "$ref": "#/$defs/OptimizationSpecification", + "description": "The specification for how to run optimizations for the torsion scan (within this is spec for gradients for the optimization." + } + }, + "required": [ + "keywords", + "specification" + ], + "title": "TorsionDriveSpecification", + "type": "object" + }, + "TrajectoryProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "title": "TrajectoryProtocolEnum", + "type": "string" + }, + "WavefunctionProperties": { + "additionalProperties": true, + "type": "object" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Results from running a torsion drive.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_result", + "default": "qcschema_torsion_drive_result", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" + }, + "input_data": { + "$ref": "#/$defs/TorsionDriveInput" + }, + "final_molecules": { + "additionalProperties": { + "$ref": "#/$defs/Molecule" + }, + "description": "The final molecule at each angle of the TorsionDrive scan.", + "title": "Final Molecules", + "type": "object" + }, + "scan_properties": { + "additionalProperties": { + "$ref": "#/$defs/OptimizationProperties" + }, + "description": "The map of energies and other properties for each angle of the TorsionDrive scan.", + "title": "Scan Properties", + "type": "object" + }, + "scan_results": { + "additionalProperties": { + "items": { + "$ref": "#/$defs/OptimizationResult" + }, + "type": "array" + }, + "description": "The map of each angle of the TorsionDrive scan to each optimization computations.", + "title": "Scan Results", + "type": "object" + }, + "stdout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard output of the program.", + "title": "Stdout" + }, + "stderr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The standard error of the program.", + "title": "Stderr" + }, + "native_files": { + "additionalProperties": true, + "default": {}, + "description": "DSL files.", + "title": "Native Files", + "type": "object" + }, + "properties": { + "$ref": "#/$defs/TorsionDriveProperties", + "description": "\n Named properties of torsion drive computations following the MolSSI QCSchema.\n " + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + }, + "success": { + "const": true, + "default": true, + "description": "The success of a given programs execution. If False, other fields may be blank.", + "title": "Success", + "type": "boolean" + }, + "provenance": { + "$ref": "#/$defs/Provenance" + } + }, + "required": [ + "input_data", + "final_molecules", + "scan_properties", + "scan_results", + "properties", + "provenance" + ], + "title": "TorsionDriveResult", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/TorsionDriveSpecification.schema b/qcschema/qcelemental_v2/schemas/TorsionDriveSpecification.schema new file mode 100644 index 0000000..0c43ec9 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/TorsionDriveSpecification.schema @@ -0,0 +1,917 @@ +{ + "$defs": { + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", + "type": "string" + }, + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" + }, + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" + }, + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" + }, + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" + }, + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" + }, + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", + "type": "string" + }, + "driver": { + "$ref": "#/$defs/DriverEnum" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + } + }, + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" + }, + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "BsseEnum": { + "description": "Available basis-set superposition error (BSSE) treatments.", + "enum": [ + "nocp", + "cp", + "vmfc", + "cp", + "nocp", + "nocp" + ], + "title": "BsseEnum", + "type": "string" + }, + "ClusterResultsProtocolEnum": { + "description": "Which component results to preserve in a many body result; usually AtomicResults.", + "enum": [ + "all", + "none" + ], + "title": "ClusterResultsProtocolEnum", + "type": "string" + }, + "DriverEnum": { + "description": "Allowed computation driver values.", + "enum": [ + "energy", + "gradient", + "hessian", + "properties" + ], + "title": "DriverEnum", + "type": "string" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", + "properties": { + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" + }, + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" + } + }, + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + }, + "ManyBodyKeywords": { + "additionalProperties": false, + "description": "The many-body-specific keywords for user control.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_keywords", + "default": "qcschema_many_body_keywords", + "title": "Schema Name", + "type": "string" + }, + "bsse_type": { + "default": [ + "cp" + ], + "description": "Requested BSSE treatments. First in list determines which interaction or total energy/gradient/Hessian returned.", + "items": { + "$ref": "#/$defs/BsseEnum" + }, + "title": "Bsse Type", + "type": "array" + }, + "embedding_charges": { + "anyOf": [ + { + "additionalProperties": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Atom-centered point charges to be used on molecule fragments whose basis sets are not included in the computation. Keys: 1-based index of fragment. Values: list of atom charges for that fragment. At present, QCManyBody will only accept non-None values of this keyword if environment variable QCMANYBODY_EMBEDDING_CHARGES is set.", + "shape": [ + "nfr", + "" + ], + "title": "Embedding Charges" + }, + "return_total_data": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "When True, returns the total data (energy/gradient/Hessian) of the system, otherwise returns interaction data. Default is False for energies, True for gradients and Hessians. Note that the calculation of counterpoise corrected total energies implies the calculation of the energies of monomers in the monomer basis, hence specifying ``return_total_data = True`` may carry out more computations than ``return_total_data = False``. For gradients and Hessians, ``return_total_data = False`` is rarely useful.", + "title": "Return Total Data" + }, + "levels": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Dictionary of different levels of theory for different levels of expansion. Note that the primary method_string is not used when this keyword is given. ``supersystem`` computes all higher order n-body effects up to the number of fragments; this higher-order correction uses the nocp basis, regardless of bsse_type. A method fills in for any lower unlisted nbody levels. Note that if both this and max_nbody are provided, they must be consistent. Examples: SUPERSYSTEM definition suspect* {1: 'ccsd(t)', 2: 'mp2', 'supersystem': 'scf'} * {2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} * Now invalid: {1: 2, 2: 'ccsd(t)/cc-pvdz', 3: 'mp2'} ", + "title": "Levels" + }, + "max_nbody": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum number of bodies to include in the many-body treatment. Possible: max_nbody <= nfragments. Default: max_nbody = nfragments.", + "title": "Max Nbody" + }, + "supersystem_ie_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Target the supersystem total/interaction energy (IE) data over the many-body expansion (MBE) analysis, thereby omitting intermediate-body calculations. When False (default), compute each n-body level in the MBE up through ``max_nbody``. When True (only allowed for ``max_nbody = nfragments`` ), only compute enough for the overall interaction/total energy: max_nbody-body and 1-body. When True, properties ``INTERACTION {driver} THROUGH {max_nbody}-BODY`` will always be available; ``TOTAL {driver} THROUGH {max_nbody}-BODY`` will be available depending on ``return_total_data`` ; and ``{max_nbody}-BODY CONTRIBUTION TO {driver}`` won't be available (except for dimers). This keyword produces no savings for a two-fragment molecule. But for the interaction energy of a three-fragment molecule, for example, 2-body subsystems can be skipped with ``supersystem_ie_only=True``. Do not use with ``vmfc`` in ``bsse_type`` as it cannot produce savings.", + "title": "Supersystem Ie Only" + } + }, + "title": "ManyBodyKeywords", + "type": "object" + }, + "ManyBodyProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a ManyBody output data.", + "properties": { + "schema_name": { + "const": "qcschema_many_body_protocols", + "default": "qcschema_many_body_protocols", + "title": "Schema Name", + "type": "string" + }, + "cluster_results": { + "$ref": "#/$defs/ClusterResultsProtocolEnum", + "default": "none" + } + }, + "title": "ManyBodyProtocols", + "type": "object" + }, + "ManyBodySpecification": { + "additionalProperties": false, + "description": "Combining the what (ManyBodyKeywords) with the how (AtomicSpecification).", + "properties": { + "schema_name": { + "const": "qcschema_many_body_specification", + "default": "qcschema_many_body_specification", + "title": "Schema Name", + "type": "string" + }, + "keywords": { + "$ref": "#/$defs/ManyBodyKeywords" + }, + "program": { + "default": "", + "description": "Many Body Expansion CMS code / QCEngine procedure with which to run the MB decomposition.", + "title": "Program", + "type": "string" + }, + "protocols": { + "$ref": "#/$defs/ManyBodyProtocols", + "default": { + "schema_name": "qcschema_many_body_protocols", + "cluster_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a ManyBody output data.\n " + }, + "driver": { + "$ref": "#/$defs/DriverEnum", + "description": "The computation driver; i.e., energy, gradient, hessian." + }, + "specification": { + "additionalProperties": { + "$ref": "#/$defs/AtomicSpecification" + }, + "description": "??? TODO expand to cbs, fd", + "title": "Specification", + "type": "object" + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + } + }, + "required": [ + "keywords", + "driver", + "specification" + ], + "title": "ManyBodySpecification", + "type": "object" + }, + "Model": { + "additionalProperties": true, + "description": "The computational molecular sciences model to run.", + "properties": { + "method": { + "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", + "type": "string" + }, + "basis": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" + } + }, + "required": [ + "method" + ], + "title": "Model", + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "OptimizationProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Optimization output data.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_protocols", + "default": "qcschema_optimization_protocols", + "title": "Schema Name", + "type": "string" + }, + "trajectory_results": { + "$ref": "#/$defs/TrajectoryProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "OptimizationProtocols", + "type": "object" + }, + "OptimizationSpecification": { + "additionalProperties": false, + "description": "Specification for how to run a geometry optimization.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_specification", + "default": "qcschema_optimization_specification", + "title": "Schema Name", + "type": "string" + }, + "program": { + "default": "", + "description": "Optimizer CMS code / QCEngine procedure to run the geometry optimization with.", + "title": "Program", + "type": "string" + }, + "keywords": { + "default": {}, + "description": "The optimization specific keywords to be used.", + "title": "Keywords" + }, + "protocols": { + "$ref": "#/$defs/OptimizationProtocols", + "default": { + "schema_name": "qcschema_optimization_protocols", + "trajectory_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Optimization output data.\n " + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" + }, + "specification": { + "description": "A directive for how to compute a gradient for the optimization. Either an ordinary atomic/single-point or a many-body spec.", + "oneOf": [ + { + "$ref": "#/$defs/AtomicSpecification" + }, + { + "$ref": "#/$defs/ManyBodySpecification" + } + ], + "title": "Specification" + } + }, + "required": [ + "specification" + ], + "title": "OptimizationSpecification", + "type": "object" + }, + "ScanResultsProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "lowest", + "none" + ], + "title": "ScanResultsProtocolEnum", + "type": "string" + }, + "TorsionDriveKeywords": { + "additionalProperties": false, + "description": "TorsionDriveRecord options\n\nNotes\n-----\n* This class is still provisional and may be subject to removal and re-design.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_keywords", + "default": "qcschema_torsion_drive_keywords", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "dihedrals": { + "description": "The list of dihedrals to select for the TorsionDrive operation. Each entry is a tuple of integers of for particle indices.", + "items": { + "maxItems": 4, + "minItems": 4, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "title": "Dihedrals", + "type": "array" + }, + "grid_spacing": { + "description": "List of grid spacing for dihedral scan in degrees. Multiple values will be mapped to each dihedral angle.", + "items": { + "type": "integer" + }, + "title": "Grid Spacing", + "type": "array" + }, + "dihedral_ranges": { + "anyOf": [ + { + "items": { + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A list of dihedral range limits as a pair (lower, upper). Each range corresponds to the dihedrals in input.", + "title": "Dihedral Ranges" + }, + "energy_decrease_thresh": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold of the smallest energy decrease amount to trigger activating optimizations from grid point.", + "title": "Energy Decrease Thresh" + }, + "energy_upper_limit": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The threshold if the energy of a grid point that is higher than the current global minimum, to start new optimizations, in unit of a.u. I.e. if energy_upper_limit = 0.05, current global minimum energy is -9.9 , then a new task starting with energy -9.8 will be skipped.", + "title": "Energy Upper Limit" + } + }, + "required": [ + "dihedrals", + "grid_spacing" + ], + "title": "TorsionDriveKeywords", + "type": "object" + }, + "TorsionDriveProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of a Torsion Drive subcalculation history.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_protocols", + "default": "qcschema_torsion_drive_protocols", + "title": "Schema Name", + "type": "string" + }, + "scan_results": { + "$ref": "#/$defs/ScanResultsProtocolEnum", + "default": "none", + "description": "\n Which gradient evaluations to keep in an optimization trajectory.\n " + } + }, + "title": "TorsionDriveProtocols", + "type": "object" + }, + "TrajectoryProtocolEnum": { + "description": "Which gradient evaluations to keep in an optimization trajectory.", + "enum": [ + "all", + "initial_and_final", + "final", + "none" + ], + "title": "TrajectoryProtocolEnum", + "type": "string" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Specification for how to run a torsion drive scan.", + "properties": { + "schema_name": { + "const": "qcschema_torsion_drive_specification", + "default": "qcschema_torsion_drive_specification", + "title": "Schema Name", + "type": "string" + }, + "program": { + "default": "", + "description": "Torsion Drive CMS code / QCEngine procedure with which to run the torsion scan.", + "title": "Program", + "type": "string" + }, + "keywords": { + "$ref": "#/$defs/TorsionDriveKeywords", + "description": "The torsion drive specific keywords to be used." + }, + "protocols": { + "$ref": "#/$defs/TorsionDriveProtocols", + "default": { + "schema_name": "qcschema_torsion_drive_protocols", + "scan_results": "none" + }, + "description": "\n Protocols regarding the manipulation of a Torsion Drive subcalculation history.\n " + }, + "extras": { + "additionalProperties": true, + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras", + "type": "object" + }, + "specification": { + "$ref": "#/$defs/OptimizationSpecification", + "description": "The specification for how to run optimizations for the torsion scan (within this is spec for gradients for the optimization." + } + }, + "required": [ + "keywords", + "specification" + ], + "title": "TorsionDriveSpecification", + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema b/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema new file mode 100644 index 0000000..ca11ede --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema @@ -0,0 +1,4 @@ +{ + "additionalProperties": true, + "type": "object" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema b/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema index 0832427..73eba9b 100644 --- a/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema +++ b/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema @@ -1,99 +1,79 @@ { - "title": "BasisSet", - "description": "A quantum chemistry basis description.", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", - "default": "qcschema_basis", - "pattern": "^(qcschema_basis)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "name": { - "title": "Name", - "description": "The standard basis name if available (e.g., 'cc-pVDZ').", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Brief description of the basis set.", - "type": "string" - }, - "center_data": { - "title": "Center Data", - "description": "Shared basis data for all atoms/centers in the parent molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/BasisCenter" - } - }, - "atom_map": { - "title": "Atom Map", - "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", - "type": "array", - "items": { - "type": "string" - } - }, - "nbf": { - "title": "Nbf", - "description": "The number of basis functions. Use for convenience or as checksum", - "type": "integer" - } - }, - "required": [ - "name", - "center_data", - "atom_map" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "HarmonicType": { - "title": "HarmonicType", - "description": "The angular momentum representation of a shell.", - "enum": [ - "spherical", - "cartesian" - ], - "type": "string" - }, - "ElectronShell": { - "title": "ElectronShell", - "description": "Information for a single electronic shell.", - "type": "object", + "$defs": { + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", "properties": { - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the shell as an array of integers.", - "minItems": 1, - "type": "array", + "electron_shells": { + "description": "Electronic shells for this center.", "items": { - "type": "integer", - "minimum": 0 + "$ref": "#/$defs/ElectronShell" }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", "uniqueItems": true }, - "harmonic_type": { - "description": "The angular momentum representation of a shell.", - "allOf": [ + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ { - "$ref": "#/definitions/HarmonicType" + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" }, - "exponents": { - "title": "Exponents", - "description": "Exponents for the contracted shell.", + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, "minItems": 1, + "title": "Angular Momentum", "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", "items": { "anyOf": [ { @@ -103,15 +83,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -122,65 +101,52 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ + "ecp_type", "angular_momentum", - "harmonic_type", - "exponents", + "r_exponents", + "gaussian_exponents", "coefficients" ], - "additionalProperties": false + "title": "ECPPotential", + "type": "object" }, "ECPType": { - "title": "ECPType", "description": "The type of the ECP potential.", "enum": [ "scalar", "spinorbit" ], + "title": "ECPType", "type": "string" }, - "ECPPotential": { - "title": "ECPPotential", - "description": "Information for a single ECP potential.", - "type": "object", + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", "properties": { - "ecp_type": { - "description": "The type of the ECP potential.", - "allOf": [ - { - "$ref": "#/definitions/ECPType" - } - ] - }, "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the potential as an array of integers.", - "minItems": 1, - "type": "array", + "description": "Angular momentum for the shell as an array of integers.", "items": { - "type": "integer", - "minimum": 0 + "minimum": 0, + "type": "integer" }, - "uniqueItems": true - }, - "r_exponents": { - "title": "R Exponents", - "description": "Exponents of the 'r' term.", "minItems": 1, + "title": "Angular Momentum", "type": "array", - "items": { - "type": "integer" - } + "uniqueItems": true }, - "gaussian_exponents": { - "title": "Gaussian Exponents", - "description": "Exponents of the 'gaussian' term.", - "minItems": 1, - "type": "array", + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", "items": { "anyOf": [ { @@ -190,15 +156,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -209,55 +174,103 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ - "ecp_type", "angular_momentum", - "r_exponents", - "gaussian_exponents", + "harmonic_type", + "exponents", "coefficients" ], - "additionalProperties": false + "title": "ElectronShell", + "type": "object" }, - "BasisCenter": { - "title": "BasisCenter", - "description": "Data for a single atom/center in a basis set.", - "type": "object", - "properties": { - "electron_shells": { - "title": "Electron Shells", - "description": "Electronic shells for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ElectronShell" - }, - "uniqueItems": true + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" }, - "ecp_electrons": { - "title": "Ecp Electrons", - "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", - "default": 0, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { "type": "integer" }, - "ecp_potentials": { - "title": "Ecp Potentials", - "description": "ECPs, MCPs, or other field potentials for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ECPPotential" - }, - "uniqueItems": true + { + "type": "null" } - }, - "required": [ - "electron_shells" ], - "additionalProperties": false + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" } - } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_input.schema b/qcschema/qcelemental_v2/schemas/qc_schema_input.schema index 269824f..fe61c06 100644 --- a/qcschema/qcelemental_v2/schemas/qc_schema_input.schema +++ b/qcschema/qcelemental_v2/schemas/qc_schema_input.schema @@ -1,429 +1,212 @@ { - "title": "AtomicInput", - "description": "The MolSSI Quantum Chemistry Schema", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "The optional ID for the computation.", - "type": "string" - }, - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_input.", - "default": "qcschema_input", - "pattern": "^(qc\\_?schema_input)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "molecule": { - "title": "Molecule", - "description": "The molecule to use in the computation.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] - }, - "driver": { - "description": "Allowed computation driver values.", - "allOf": [ - { - "$ref": "#/definitions/DriverEnum" - } - ] - }, - "model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "allOf": [ - { - "$ref": "#/definitions/Model" - } - ] - }, - "keywords": { - "title": "Keywords", - "description": "The program-specific keywords to be used.", - "default": {}, - "type": "object" - }, - "protocols": { - "title": "Protocols", + "$defs": { + "AtomicProtocols": { + "additionalProperties": false, "description": "Protocols regarding the manipulation of computational result data.", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProtocols" - } - ] - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", - "default": {}, - "type": "object" - }, - "provenance": { - "title": "Provenance", - "description": "Provenance information.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - } - }, - "required": [ - "molecule", - "driver", - "model" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "Identifiers": { - "title": "Identifiers", - "description": "Canonical chemical identifiers", - "type": "object", "properties": { - "molecule_hash": { - "title": "Molecule Hash", - "type": "string" - }, - "molecular_formula": { - "title": "Molecular Formula", - "type": "string" - }, - "smiles": { - "title": "Smiles", - "type": "string" - }, - "inchi": { - "title": "Inchi", - "type": "string" - }, - "inchikey": { - "title": "Inchikey", + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", "type": "string" }, - "canonical_explicit_hydrogen_smiles": { - "title": "Canonical Explicit Hydrogen Smiles", - "type": "string" + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" }, - "canonical_isomeric_explicit_hydrogen_mapped_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", - "type": "string" + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" }, - "canonical_isomeric_explicit_hydrogen_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Smiles", - "type": "string" + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" }, - "canonical_isomeric_smiles": { - "title": "Canonical Isomeric Smiles", + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" + }, + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", "type": "string" }, - "canonical_smiles": { - "title": "Canonical Smiles", - "type": "string" + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" }, - "pubchem_cid": { - "title": "Pubchem Cid", - "description": "PubChem Compound ID", + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", "type": "string" }, - "pubchem_sid": { - "title": "Pubchem Sid", - "description": "PubChem Substance ID", - "type": "string" + "driver": { + "$ref": "#/$defs/DriverEnum" + }, + "model": { + "$ref": "#/$defs/Model" + }, + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } }, - "pubchem_conformerid": { - "title": "Pubchem Conformerid", - "description": "PubChem Conformer ID", - "type": "string" + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" } }, - "additionalProperties": false + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" }, - "Provenance": { - "title": "Provenance", - "description": "Provenance information.", - "type": "object", + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", "properties": { - "creator": { - "title": "Creator", - "description": "The name of the program, library, or person who created the object.", - "type": "string" + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true }, - "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", - "default": "", - "type": "string" + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" }, - "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", - "default": "", - "type": "string" + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true } }, "required": [ - "creator" + "electron_shells" ], - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "BasisCenter", + "type": "object" }, - "Molecule": { - "title": "Molecule", - "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", - "type": "object", + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", "properties": { "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", - "default": "qcschema_molecule", - "pattern": "^(qcschema_molecule)$", "type": "string" }, "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "const": 2, "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", "type": "integer" }, - "validated": { - "title": "Validated", - "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", - "default": false, - "type": "boolean" - }, - "symbols": { - "title": "Symbols", - "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "title": "Geometry", - "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", - "shape": [ - "nat", - 3 - ], - "units": "a0", - "type": "array", - "items": { - "type": "number" - } - }, "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", "title": "Name", - "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", "type": "string" }, - "identifiers": { - "title": "Identifiers", - "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", - "allOf": [ + "description": { + "anyOf": [ { - "$ref": "#/definitions/Identifiers" + "type": "string" + }, + { + "type": "null" } - ] - }, - "comment": { - "title": "Comment", - "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", - "type": "string" - }, - "molecular_charge": { - "title": "Molecular Charge", - "description": "The net electrostatic charge of the molecule.", - "default": 0.0, - "type": "number" - }, - "molecular_multiplicity": { - "title": "Molecular Multiplicity", - "description": "The total multiplicity of the molecule.", - "default": 1, - "type": "number" - }, - "masses": { - "title": "Masses", - "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", - "shape": [ - "nat" ], - "units": "u", - "type": "array", - "items": { - "type": "number" - } + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" }, - "real": { - "title": "Real", - "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "boolean" - } + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" }, - "atom_labels": { - "title": "Atom Labels", - "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", - "shape": [ - "nat" - ], - "type": "array", + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", "items": { "type": "string" - } - }, - "atomic_numbers": { - "title": "Atomic Numbers", - "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "mass_numbers": { - "title": "Mass Numbers", - "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "connectivity": { - "title": "Connectivity", - "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "integer", - "minimum": 0 - }, - { - "type": "number", - "minimum": 0, - "maximum": 5 - } - ] - } - }, - "fragments": { - "title": "Fragments", - "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "shape": [ - "nfr", - "" - ], - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "title": "Fragment Charges", - "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "title": "Fragment Multiplicities", - "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fix_com": { - "title": "Fix Com", - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "default": false, - "type": "boolean" - }, - "fix_orientation": { - "title": "Fix Orientation", - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "default": false, - "type": "boolean" - }, - "fix_symmetry": { - "title": "Fix Symmetry", - "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", - "type": "string" + }, + "title": "Atom Map", + "type": "array" }, - "provenance": { - "title": "Provenance", - "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", - "allOf": [ + "nbf": { + "anyOf": [ { - "$ref": "#/definitions/Provenance" + "type": "integer" + }, + { + "type": "null" } - ] - }, - "id": { - "title": "Id", - "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", - "type": "object" + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" } }, "required": [ - "symbols", - "geometry" + "name", + "center_data", + "atom_map" ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "BasisSet", + "type": "object" }, "DriverEnum": { - "title": "DriverEnum", "description": "Allowed computation driver values.", "enum": [ "energy", @@ -431,46 +214,38 @@ "hessian", "properties" ], + "title": "DriverEnum", "type": "string" }, - "HarmonicType": { - "title": "HarmonicType", - "description": "The angular momentum representation of a shell.", - "enum": [ - "spherical", - "cartesian" - ], - "type": "string" - }, - "ElectronShell": { - "title": "ElectronShell", - "description": "Information for a single electronic shell.", - "type": "object", + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the shell as an array of integers.", - "minItems": 1, - "type": "array", + "description": "Angular momentum for the potential as an array of integers.", "items": { - "type": "integer", - "minimum": 0 + "minimum": 0, + "type": "integer" }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", "uniqueItems": true }, - "harmonic_type": { - "description": "The angular momentum representation of a shell.", - "allOf": [ - { - "$ref": "#/definitions/HarmonicType" - } - ] - }, - "exponents": { - "title": "Exponents", - "description": "Exponents for the contracted shell.", + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, "minItems": 1, - "type": "array", + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", "items": { "anyOf": [ { @@ -480,15 +255,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -499,65 +273,52 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ + "ecp_type", "angular_momentum", - "harmonic_type", - "exponents", + "r_exponents", + "gaussian_exponents", "coefficients" ], - "additionalProperties": false + "title": "ECPPotential", + "type": "object" }, "ECPType": { - "title": "ECPType", "description": "The type of the ECP potential.", "enum": [ "scalar", "spinorbit" ], + "title": "ECPType", "type": "string" }, - "ECPPotential": { - "title": "ECPPotential", - "description": "Information for a single ECP potential.", - "type": "object", - "properties": { - "ecp_type": { - "description": "The type of the ECP potential.", - "allOf": [ - { - "$ref": "#/definitions/ECPType" - } - ] - }, - "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the potential as an array of integers.", - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "minimum": 0 - }, - "uniqueItems": true - }, - "r_exponents": { - "title": "R Exponents", - "description": "Exponents of the 'r' term.", - "minItems": 1, - "type": "array", + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", "items": { + "minimum": 0, "type": "integer" - } - }, - "gaussian_exponents": { - "title": "Gaussian Exponents", - "description": "Exponents of the 'gaussian' term.", + }, "minItems": 1, + "title": "Angular Momentum", "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", "items": { "anyOf": [ { @@ -567,15 +328,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -586,225 +346,196 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ - "ecp_type", "angular_momentum", - "r_exponents", - "gaussian_exponents", + "harmonic_type", + "exponents", "coefficients" ], - "additionalProperties": false + "title": "ElectronShell", + "type": "object" }, - "BasisCenter": { - "title": "BasisCenter", - "description": "Data for a single atom/center in a basis set.", - "type": "object", + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", "properties": { - "electron_shells": { - "title": "Electron Shells", - "description": "Electronic shells for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ElectronShell" - }, - "uniqueItems": true - }, - "ecp_electrons": { - "title": "Ecp Electrons", - "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", - "default": 0, - "type": "integer" + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" }, - "ecp_potentials": { - "title": "Ecp Potentials", - "description": "ECPs, MCPs, or other field potentials for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ECPPotential" - }, - "uniqueItems": true + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" } }, - "required": [ - "electron_shells" - ], - "additionalProperties": false + "title": "ErrorCorrectionProtocol", + "type": "object" }, - "BasisSet": { - "title": "BasisSet", - "description": "A quantum chemistry basis description.", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", - "default": "qcschema_basis", - "pattern": "^(qcschema_basis)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "name": { - "title": "Name", - "description": "The standard basis name if available (e.g., 'cc-pVDZ').", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Brief description of the basis set.", - "type": "string" - }, - "center_data": { - "title": "Center Data", - "description": "Shared basis data for all atoms/centers in the parent molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/BasisCenter" - } - }, - "atom_map": { - "title": "Atom Map", - "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", - "type": "array", - "items": { - "type": "string" - } - }, - "nbf": { - "title": "Nbf", - "description": "The number of basis functions. Use for convenience or as checksum", - "type": "integer" - } - }, - "required": [ - "name", - "center_data", - "atom_map" + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "HarmonicType", + "type": "string" }, "Model": { - "title": "Model", + "additionalProperties": true, "description": "The computational molecular sciences model to run.", - "type": "object", "properties": { "method": { - "title": "Method", "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", "type": "string" }, "basis": { - "title": "Basis", - "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", "anyOf": [ { "type": "string" }, { - "$ref": "#/definitions/BasisSet" + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" } }, "required": [ "method" - ] + ], + "title": "Model", + "type": "object" }, - "WavefunctionProtocolEnum": { - "title": "WavefunctionProtocolEnum", - "description": "Wavefunction to keep from a computation.", + "Molecule": { + "additionalProperties": true, + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", "enum": [ "all", - "orbitals_and_eigenvalues", - "occupations_and_eigenvalues", - "return_results", + "input", "none" ], + "title": "NativeFilesProtocolEnum", "type": "string" }, - "ErrorCorrectionProtocol": { - "title": "ErrorCorrectionProtocol", - "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", - "type": "object", + "Provenance": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": true, + "description": "Provenance information.", "properties": { - "default_policy": { - "title": "Default Policy", - "description": "Whether to allow error corrections to be used if not directly specified in `policies`", - "default": true, - "type": "boolean" + "creator": { + "description": "The name of the program, library, or person who created the object.", + "title": "Creator", + "type": "string" }, - "policies": { - "title": "Policies", - "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", - "type": "object", - "additionalProperties": { - "type": "boolean" - } + "version": { + "default": "", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "title": "Version", + "type": "string" + }, + "routine": { + "default": "", + "description": "The name of the routine or function within the creator, blank otherwise.", + "title": "Routine", + "type": "string" } }, - "additionalProperties": false + "required": [ + "creator" + ], + "title": "Provenance", + "type": "object" }, - "NativeFilesProtocolEnum": { - "title": "NativeFilesProtocolEnum", - "description": "CMS program files to keep from a computation.", + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", "enum": [ "all", - "input", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", "none" ], + "title": "WavefunctionProtocolEnum", "type": "string" - }, - "AtomicResultProtocols": { - "title": "AtomicResultProtocols", - "description": "Protocols regarding the manipulation of computational result data.", - "type": "object", - "properties": { - "wavefunction": { - "description": "Wavefunction to keep from a computation.", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProtocolEnum" - } - ] - }, - "stdout": { - "title": "Stdout", - "description": "Primary output file to keep from the computation", - "default": true, - "type": "boolean" - }, - "error_correction": { - "title": "Error Correction", - "description": "Policies for error correction", - "allOf": [ - { - "$ref": "#/definitions/ErrorCorrectionProtocol" - } - ] + } + }, + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "The MolSSI Quantum Chemistry Schema", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" }, - "native_files": { - "description": "Policies for keeping processed files from the computation", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/NativeFilesProtocolEnum" - } - ] + { + "type": "null" } - }, - "additionalProperties": false + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" + }, + "schema_name": { + "const": "qcschema_atomic_input", + "default": "qcschema_atomic_input", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule to use in the computation." + }, + "specification": { + "$ref": "#/$defs/AtomicSpecification", + "description": "Additional fields specifying how to run the single-point computation." + }, + "provenance": { + "$ref": "#/$defs/Provenance" } - } + }, + "required": [ + "molecule", + "specification" + ], + "title": "AtomicInput", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema b/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema index 478ae00..ca11ede 100644 --- a/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema +++ b/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema @@ -1,337 +1,4 @@ { - "title": "Molecule", - "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", - "default": "qcschema_molecule", - "pattern": "^(qcschema_molecule)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", - "default": 2, - "type": "integer" - }, - "validated": { - "title": "Validated", - "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", - "default": false, - "type": "boolean" - }, - "symbols": { - "title": "Symbols", - "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "title": "Geometry", - "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", - "shape": [ - "nat", - 3 - ], - "units": "a0", - "type": "array", - "items": { - "type": "number" - } - }, - "name": { - "title": "Name", - "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", - "type": "string" - }, - "identifiers": { - "title": "Identifiers", - "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", - "allOf": [ - { - "$ref": "#/definitions/Identifiers" - } - ] - }, - "comment": { - "title": "Comment", - "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", - "type": "string" - }, - "molecular_charge": { - "title": "Molecular Charge", - "description": "The net electrostatic charge of the molecule.", - "default": 0.0, - "type": "number" - }, - "molecular_multiplicity": { - "title": "Molecular Multiplicity", - "description": "The total multiplicity of the molecule.", - "default": 1, - "type": "number" - }, - "masses": { - "title": "Masses", - "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", - "shape": [ - "nat" - ], - "units": "u", - "type": "array", - "items": { - "type": "number" - } - }, - "real": { - "title": "Real", - "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "boolean" - } - }, - "atom_labels": { - "title": "Atom Labels", - "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "atomic_numbers": { - "title": "Atomic Numbers", - "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "mass_numbers": { - "title": "Mass Numbers", - "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "connectivity": { - "title": "Connectivity", - "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "integer", - "minimum": 0 - }, - { - "type": "number", - "minimum": 0, - "maximum": 5 - } - ] - } - }, - "fragments": { - "title": "Fragments", - "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "shape": [ - "nfr", - "" - ], - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "title": "Fragment Charges", - "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "title": "Fragment Multiplicities", - "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fix_com": { - "title": "Fix Com", - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "default": false, - "type": "boolean" - }, - "fix_orientation": { - "title": "Fix Orientation", - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "default": false, - "type": "boolean" - }, - "fix_symmetry": { - "title": "Fix Symmetry", - "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", - "type": "string" - }, - "provenance": { - "title": "Provenance", - "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "id": { - "title": "Id", - "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", - "type": "object" - } - }, - "required": [ - "symbols", - "geometry" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "Identifiers": { - "title": "Identifiers", - "description": "Canonical chemical identifiers", - "type": "object", - "properties": { - "molecule_hash": { - "title": "Molecule Hash", - "type": "string" - }, - "molecular_formula": { - "title": "Molecular Formula", - "type": "string" - }, - "smiles": { - "title": "Smiles", - "type": "string" - }, - "inchi": { - "title": "Inchi", - "type": "string" - }, - "inchikey": { - "title": "Inchikey", - "type": "string" - }, - "canonical_explicit_hydrogen_smiles": { - "title": "Canonical Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_mapped_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", - "type": "string" - }, - "canonical_isomeric_explicit_hydrogen_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Smiles", - "type": "string" - }, - "canonical_isomeric_smiles": { - "title": "Canonical Isomeric Smiles", - "type": "string" - }, - "canonical_smiles": { - "title": "Canonical Smiles", - "type": "string" - }, - "pubchem_cid": { - "title": "Pubchem Cid", - "description": "PubChem Compound ID", - "type": "string" - }, - "pubchem_sid": { - "title": "Pubchem Sid", - "description": "PubChem Substance ID", - "type": "string" - }, - "pubchem_conformerid": { - "title": "Pubchem Conformerid", - "description": "PubChem Conformer ID", - "type": "string" - } - }, - "additionalProperties": false - }, - "Provenance": { - "title": "Provenance", - "description": "Provenance information.", - "type": "object", - "properties": { - "creator": { - "title": "Creator", - "description": "The name of the program, library, or person who created the object.", - "type": "string" - }, - "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", - "default": "", - "type": "string" - }, - "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", - "default": "", - "type": "string" - } - }, - "required": [ - "creator" - ], - "$schema": "http://json-schema.org/draft-04/schema#" - } - } + "additionalProperties": true, + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_output.schema b/qcschema/qcelemental_v2/schemas/qc_schema_output.schema index af5bd32..58eeb7f 100644 --- a/qcschema/qcelemental_v2/schemas/qc_schema_output.schema +++ b/qcschema/qcelemental_v2/schemas/qc_schema_output.schema @@ -1,501 +1,267 @@ { - "title": "AtomicResult", - "description": "Results from a CMS program execution.", - "type": "object", - "properties": { - "id": { - "title": "Id", - "description": "The optional ID for the computation.", - "type": "string" - }, - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification this model conforms to. Explicitly fixed as qcschema_output.", - "default": "qcschema_output", - "enum": [ - "qcschema_output" - ], - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.AtomicInput.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "molecule": { - "title": "Molecule", - "description": "The molecule to use in the computation.", - "allOf": [ - { - "$ref": "#/definitions/Molecule" - } - ] - }, - "driver": { - "description": "Allowed computation driver values.", - "allOf": [ - { - "$ref": "#/definitions/DriverEnum" - } - ] - }, - "model": { - "title": "Model", - "description": "The computational molecular sciences model to run.", - "allOf": [ - { - "$ref": "#/definitions/Model" - } - ] - }, - "keywords": { - "title": "Keywords", - "description": "The program-specific keywords to be used.", - "default": {}, - "type": "object" - }, - "protocols": { - "title": "Protocols", - "description": "Protocols regarding the manipulation of computational result data.", - "default": {}, - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProtocols" - } - ] - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", - "default": {}, - "type": "object" - }, - "provenance": { - "title": "Provenance", - "description": "Provenance information.", - "allOf": [ - { - "$ref": "#/definitions/Provenance" - } - ] - }, - "properties": { - "title": "Properties", - "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`\n ", - "allOf": [ - { - "$ref": "#/definitions/AtomicResultProperties" - } - ] - }, - "wavefunction": { - "title": "Wavefunction", - "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProperties" - } - ] - }, - "return_result": { - "title": "Return Result", - "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", - "anyOf": [ - { - "type": "number" + "$defs": { + "AtomicInput": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "The MolSSI Quantum Chemistry Schema", + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" }, - { - "type": "array", - "items": { - "type": "number" - } + "schema_name": { + "const": "qcschema_atomic_input", + "default": "qcschema_atomic_input", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" }, - { - "type": "object" + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of ``schema_name`` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule to use in the computation." + }, + "specification": { + "$ref": "#/$defs/AtomicSpecification", + "description": "Additional fields specifying how to run the single-point computation." + }, + "provenance": { + "$ref": "#/$defs/Provenance" } - ] - }, - "stdout": { - "title": "Stdout", - "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", - "type": "string" - }, - "stderr": { - "title": "Stderr", - "description": "The standard error of the program execution.", - "type": "string" - }, - "native_files": { - "title": "Native Files", - "description": "DSL files.", - "default": {}, + }, + "required": [ + "molecule", + "specification" + ], + "title": "AtomicInput", "type": "object" }, - "success": { - "title": "Success", - "description": "The success of program execution. If False, other fields may be blank.", - "type": "boolean" + "AtomicProperties": { + "additionalProperties": true, + "type": "object" }, - "error": { - "title": "Error", - "description": "Complete description of the error from an unsuccessful program execution.", - "allOf": [ - { - "$ref": "#/definitions/ComputeError" - } - ] - } - }, - "required": [ - "molecule", - "driver", - "model", - "provenance", - "properties", - "return_result", - "success" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "Identifiers": { - "title": "Identifiers", - "description": "Canonical chemical identifiers", - "type": "object", + "AtomicProtocols": { + "additionalProperties": false, + "description": "Protocols regarding the manipulation of computational result data.", "properties": { - "molecule_hash": { - "title": "Molecule Hash", - "type": "string" - }, - "molecular_formula": { - "title": "Molecular Formula", - "type": "string" - }, - "smiles": { - "title": "Smiles", + "schema_name": { + "const": "qcschema_atomic_protocols", + "default": "qcschema_atomic_protocols", + "title": "Schema Name", "type": "string" }, - "inchi": { - "title": "Inchi", - "type": "string" + "wavefunction": { + "$ref": "#/$defs/WavefunctionProtocolEnum", + "default": "none" }, - "inchikey": { - "title": "Inchikey", - "type": "string" + "stdout": { + "default": true, + "description": "Primary output file to keep from the computation", + "title": "Stdout", + "type": "boolean" }, - "canonical_explicit_hydrogen_smiles": { - "title": "Canonical Explicit Hydrogen Smiles", - "type": "string" + "error_correction": { + "$ref": "#/$defs/ErrorCorrectionProtocol", + "description": "Policies for error correction" }, - "canonical_isomeric_explicit_hydrogen_mapped_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Mapped Smiles", + "native_files": { + "$ref": "#/$defs/NativeFilesProtocolEnum", + "default": "none", + "description": "Policies for keeping processed files from the computation" + } + }, + "title": "AtomicProtocols", + "type": "object" + }, + "AtomicSpecification": { + "additionalProperties": false, + "description": "Specification for a single point QC calculation", + "properties": { + "schema_name": { + "const": "qcschema_atomic_specification", + "default": "qcschema_atomic_specification", + "title": "Schema Name", "type": "string" }, - "canonical_isomeric_explicit_hydrogen_smiles": { - "title": "Canonical Isomeric Explicit Hydrogen Smiles", - "type": "string" + "keywords": { + "default": {}, + "description": "The program specific keywords to be used.", + "title": "Keywords" }, - "canonical_isomeric_smiles": { - "title": "Canonical Isomeric Smiles", + "program": { + "default": "", + "description": "The program for which the Specification is intended.", + "title": "Program", "type": "string" }, - "canonical_smiles": { - "title": "Canonical Smiles", - "type": "string" + "driver": { + "$ref": "#/$defs/DriverEnum" }, - "pubchem_cid": { - "title": "Pubchem Cid", - "description": "PubChem Compound ID", - "type": "string" + "model": { + "$ref": "#/$defs/Model" }, - "pubchem_sid": { - "title": "Pubchem Sid", - "description": "PubChem Substance ID", - "type": "string" + "protocols": { + "$ref": "#/$defs/AtomicProtocols", + "default": { + "schema_name": "qcschema_atomic_protocols", + "wavefunction": "none", + "stdout": true, + "error_correction": { + "default_policy": true, + "policies": null + }, + "native_files": "none" + } }, - "pubchem_conformerid": { - "title": "Pubchem Conformerid", - "description": "PubChem Conformer ID", - "type": "string" + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" } }, - "additionalProperties": false + "required": [ + "driver", + "model" + ], + "title": "AtomicSpecification", + "type": "object" }, - "Provenance": { - "title": "Provenance", - "description": "Provenance information.", - "type": "object", + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", "properties": { - "creator": { - "title": "Creator", - "description": "The name of the program, library, or person who created the object.", - "type": "string" + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true }, - "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", - "default": "", - "type": "string" + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" }, - "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", - "default": "", - "type": "string" + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true } }, "required": [ - "creator" + "electron_shells" ], - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "BasisCenter", + "type": "object" }, - "Molecule": { - "title": "Molecule", - "description": "The physical Cartesian representation of the molecular system.\n\nA QCSchema representation of a Molecule. This model contains\ndata for symbols, geometry, connectivity, charges, fragmentation, etc while also supporting a wide array of I/O and manipulation capabilities.\n\nMolecule objects geometry, masses, and charges are truncated to 8, 6, and 4 decimal places respectively to assist with duplicate detection.\n\nNotes\n-----\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nat: number of atomic = calcinfo_natom\n * nfr: number of fragments\n * : irregular dimension not systematically reshapable", - "type": "object", + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", "properties": { "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_molecule.", - "default": "qcschema_molecule", - "pattern": "^(qcschema_molecule)$", "type": "string" }, "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.Molecule.schema_name` to which this model conforms.", + "const": 2, "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", "type": "integer" }, - "validated": { - "title": "Validated", - "description": "A boolean indicator (for speed purposes) that the input Molecule data has been previously checked for schema (data layout and type) and physics (e.g., non-overlapping atoms, feasible multiplicity) compliance. This should be False in most cases. A ``True`` setting should only ever be set by the constructor for this class itself or other trusted sources such as a Fractal Server or previously serialized Molecules.", - "default": false, - "type": "boolean" - }, - "symbols": { - "title": "Symbols", - "description": "The ordered array of atomic elemental symbols in title case. This field's index sets atomic order for all other per-atom fields like :attr:`~qcelemental.models.Molecule.real` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. Ghost/virtual atoms must have an entry here in :attr:`~qcelemental.models.Molecule.symbols`; ghostedness is indicated through the :attr:`~qcelemental.models.Molecule.real` field.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "geometry": { - "title": "Geometry", - "description": "The ordered array for Cartesian XYZ atomic coordinates [a0]. Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient). Index of the first dimension matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`.\nSerialized storage is always flat, (3*nat,), but QCSchema implementations will want to reshape it. QCElemental can also accept array-likes which can be mapped to (nat,3) such as a 1-D list of length 3*nat, or the serialized version of the array in (3*nat,) shape; all forms will be reshaped to (nat,3) for this attribute.", - "shape": [ - "nat", - 3 - ], - "units": "a0", - "type": "array", - "items": { - "type": "number" - } - }, "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", "title": "Name", - "description": "Common or human-readable name to assign to this molecule. This field can be arbitrary; see :attr:`~qcelemental.models.Molecule.identifiers` for well-defined labels.", "type": "string" }, - "identifiers": { - "title": "Identifiers", - "description": "An optional dictionary of additional identifiers by which this molecule can be referenced, such as INCHI, canonical SMILES, etc. See the :class:`~qcelemental.models.results.Identifiers` model for more details.", - "allOf": [ + "description": { + "anyOf": [ + { + "type": "string" + }, { - "$ref": "#/definitions/Identifiers" + "type": "null" } - ] - }, - "comment": { - "title": "Comment", - "description": "Additional comments for this molecule. Intended for pure human/user consumption and clarity.", - "type": "string" - }, - "molecular_charge": { - "title": "Molecular Charge", - "description": "The net electrostatic charge of the molecule.", - "default": 0.0, - "type": "number" + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" }, - "molecular_multiplicity": { - "title": "Molecular Multiplicity", - "description": "The total multiplicity of the molecule.", - "default": 1, - "type": "number" + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" }, - "masses": { - "title": "Masses", - "description": "The ordered array of atomic masses. Index order matches the 0-indexed indices of all other per-atom fields like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. If this is not provided, the mass of each atom is inferred from its most common isotope. If this is provided, it must be the same length as :attr:`~qcelemental.models.Molecule.symbols` but can accept ``None`` entries for standard masses to infer from the same index in the :attr:`~qcelemental.models.Molecule.symbols` field.", - "shape": [ - "nat" - ], - "units": "u", - "type": "array", - "items": { - "type": "number" - } - }, - "real": { - "title": "Real", - "description": "The ordered array indicating if each atom is real (``True``) or ghost/virtual (``False``). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and the first dimension of :attr:`~qcelemental.models.Molecule.geometry`. If this is not provided, all atoms are assumed to be real (``True``).If this is provided, the reality or ghostedness of every atom must be specified.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "boolean" - } - }, - "atom_labels": { - "title": "Atom Labels", - "description": "Additional per-atom labels as an array of strings. Typical use is in model conversions, such as Elemental <-> Molpro and not typically something which should be user assigned. See the :attr:`~qcelemental.models.Molecule.comment` field for general human-consumable text to affix to the molecule.", - "shape": [ - "nat" - ], - "type": "array", + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", "items": { "type": "string" - } - }, - "atomic_numbers": { - "title": "Atomic Numbers", - "description": "An optional ordered 1-D array-like object of atomic numbers of shape (nat,). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. Ghostedness should be indicated through :attr:`~qcelemental.models.Molecule.real` field, not zeros here.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "mass_numbers": { - "title": "Mass Numbers", - "description": "An optional ordered 1-D array-like object of atomic *mass* numbers of shape (nat). Index matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Values are inferred from the most common isotopes of the :attr:`~qcelemental.models.Molecule.symbols` list if not explicitly set. If single isotope not (yet) known for an atom, -1 is placeholder.", - "shape": [ - "nat" - ], - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - }, - "connectivity": { - "title": "Connectivity", - "description": "A list of bonds within the molecule. Each entry is a tuple of ``(atom_index_A, atom_index_B, bond_order)`` where the ``atom_index`` matches the 0-indexed indices of all other per-atom settings like :attr:`~qcelemental.models.Molecule.symbols` and :attr:`~qcelemental.models.Molecule.real`. Bonds may be freely reordered and inverted.", - "minItems": 1, - "type": "array", - "items": { - "type": "array", - "minItems": 3, - "maxItems": 3, - "items": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "integer", - "minimum": 0 - }, - { - "type": "number", - "minimum": 0, - "maximum": 5 - } - ] - } - }, - "fragments": { - "title": "Fragments", - "description": "List of indices grouping atoms (0-indexed) into molecular fragments within the molecule. Each entry in the outer list is a new fragment; index matches the ordering in :attr:`~qcelemental.models.Molecule.fragment_charges` and :attr:`~qcelemental.models.Molecule.fragment_multiplicities`. Inner lists are 0-indexed atoms which compose the fragment; every atom must be in exactly one inner list. Noncontiguous fragments are allowed, though no QM program is known to support them. Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).", - "shape": [ - "nfr", - "" - ], - "type": "array", - "items": { - "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } - } - }, - "fragment_charges": { - "title": "Fragment Charges", - "description": "The total charge of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fragment_multiplicities": { - "title": "Fragment Multiplicities", - "description": "The multiplicity of each fragment in the :attr:`~qcelemental.models.Molecule.fragments` list. The index of this list matches the 0-index indices of :attr:`~qcelemental.models.Molecule.fragments` list. Will be filled in based on a set of rules if not provided (and :attr:`~qcelemental.models.Molecule.fragments` are specified).", - "shape": [ - "nfr" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "fix_com": { - "title": "Fix Com", - "description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).When False, QCElemental will pre-process the Molecule object to translate the center of mass to (0,0,0) in Euclidean coordinate space, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_com=True` signals that the origin in `geometry` is a deliberate part of the Molecule spec, whereas `fix_com=False` (default) allows that the origin is happenstance and may be adjusted. guidance: A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).", - "default": false, - "type": "boolean" - }, - "fix_orientation": { - "title": "Fix Orientation", - "description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T). When False, QCElemental will pre-process the Molecule object to orient via the intertial tensor, resulting in a different :attr:`~qcelemental.models.Molecule.geometry` than the one provided. 'Fix' is used in the sense of 'specify': that is, `fix_orientation=True` signals that the frame orientation in `geometry` is a deliberate part of the Molecule spec, whereas `fix_orientation=False` (default) allows that the frame is happenstance and may be adjusted. guidance: A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).", - "default": false, - "type": "boolean" - }, - "fix_symmetry": { - "title": "Fix Symmetry", - "description": "Maximal point group symmetry which :attr:`~qcelemental.models.Molecule.geometry` should be treated. Lowercase.", - "type": "string" + }, + "title": "Atom Map", + "type": "array" }, - "provenance": { - "title": "Provenance", - "description": "The provenance information about how this Molecule (and its attributes) were generated, provided, and manipulated.", - "allOf": [ + "nbf": { + "anyOf": [ + { + "type": "integer" + }, { - "$ref": "#/definitions/Provenance" + "type": "null" } - ] - }, - "id": { - "title": "Id", - "description": "A unique identifier for this Molecule object. This field exists primarily for Databases (e.g. Fractal's Server) to track and lookup this specific object and should virtually never need to be manually set." - }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the molecule. Use for schema development and scratch space.", - "type": "object" + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" } }, "required": [ - "symbols", - "geometry" + "name", + "center_data", + "atom_map" ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "BasisSet", + "type": "object" }, "DriverEnum": { - "title": "DriverEnum", "description": "Allowed computation driver values.", "enum": [ "energy", @@ -503,46 +269,38 @@ "hessian", "properties" ], + "title": "DriverEnum", "type": "string" }, - "HarmonicType": { - "title": "HarmonicType", - "description": "The angular momentum representation of a shell.", - "enum": [ - "spherical", - "cartesian" - ], - "type": "string" - }, - "ElectronShell": { - "title": "ElectronShell", - "description": "Information for a single electronic shell.", - "type": "object", + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the shell as an array of integers.", - "minItems": 1, - "type": "array", + "description": "Angular momentum for the potential as an array of integers.", "items": { - "type": "integer", - "minimum": 0 + "minimum": 0, + "type": "integer" }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", "uniqueItems": true }, - "harmonic_type": { - "description": "The angular momentum representation of a shell.", - "allOf": [ - { - "$ref": "#/definitions/HarmonicType" - } - ] - }, - "exponents": { - "title": "Exponents", - "description": "Exponents for the contracted shell.", + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, "minItems": 1, - "type": "array", + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", "items": { "anyOf": [ { @@ -552,15 +310,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -571,65 +328,52 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ + "ecp_type", "angular_momentum", - "harmonic_type", - "exponents", + "r_exponents", + "gaussian_exponents", "coefficients" ], - "additionalProperties": false + "title": "ECPPotential", + "type": "object" }, "ECPType": { - "title": "ECPType", "description": "The type of the ECP potential.", "enum": [ "scalar", "spinorbit" ], + "title": "ECPType", "type": "string" }, - "ECPPotential": { - "title": "ECPPotential", - "description": "Information for a single ECP potential.", - "type": "object", + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", "properties": { - "ecp_type": { - "description": "The type of the ECP potential.", - "allOf": [ - { - "$ref": "#/definitions/ECPType" - } - ] - }, "angular_momentum": { - "title": "Angular Momentum", - "description": "Angular momentum for the potential as an array of integers.", - "minItems": 1, - "type": "array", + "description": "Angular momentum for the shell as an array of integers.", "items": { - "type": "integer", - "minimum": 0 + "minimum": 0, + "type": "integer" }, - "uniqueItems": true - }, - "r_exponents": { - "title": "R Exponents", - "description": "Exponents of the 'r' term.", "minItems": 1, + "title": "Angular Momentum", "type": "array", - "items": { - "type": "integer" - } + "uniqueItems": true }, - "gaussian_exponents": { - "title": "Gaussian Exponents", - "description": "Exponents of the 'gaussian' term.", - "minItems": 1, - "type": "array", + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", "items": { "anyOf": [ { @@ -639,15 +383,14 @@ "type": "string" } ] - } + }, + "minItems": 1, + "title": "Exponents", + "type": "array" }, "coefficients": { - "title": "Coefficients", - "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", - "minItems": 1, - "type": "array", + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", "items": { - "type": "array", "items": { "anyOf": [ { @@ -658,913 +401,278 @@ } ] }, - "minItems": 1 - } + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" } }, "required": [ - "ecp_type", "angular_momentum", - "r_exponents", - "gaussian_exponents", + "harmonic_type", + "exponents", "coefficients" ], - "additionalProperties": false + "title": "ElectronShell", + "type": "object" }, - "BasisCenter": { - "title": "BasisCenter", - "description": "Data for a single atom/center in a basis set.", - "type": "object", + "ErrorCorrectionProtocol": { + "additionalProperties": false, + "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", "properties": { - "electron_shells": { - "title": "Electron Shells", - "description": "Electronic shells for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ElectronShell" - }, - "uniqueItems": true - }, - "ecp_electrons": { - "title": "Ecp Electrons", - "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", - "default": 0, - "type": "integer" + "default_policy": { + "default": true, + "description": "Whether to allow error corrections to be used if not directly specified in `policies`", + "title": "Default Policy", + "type": "boolean" }, - "ecp_potentials": { - "title": "Ecp Potentials", - "description": "ECPs, MCPs, or other field potentials for this center.", - "minItems": 1, - "type": "array", - "items": { - "$ref": "#/definitions/ECPPotential" - }, - "uniqueItems": true + "policies": { + "anyOf": [ + { + "additionalProperties": { + "type": "boolean" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", + "title": "Policies" } }, - "required": [ - "electron_shells" + "title": "ErrorCorrectionProtocol", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" ], - "additionalProperties": false - }, - "BasisSet": { - "title": "BasisSet", - "description": "A quantum chemistry basis description.", - "type": "object", - "properties": { - "schema_name": { - "title": "Schema Name", - "description": "The QCSchema specification to which this model conforms. Explicitly fixed as qcschema_basis.", - "default": "qcschema_basis", - "pattern": "^(qcschema_basis)$", - "type": "string" - }, - "schema_version": { - "title": "Schema Version", - "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", - "default": 1, - "type": "integer" - }, - "name": { - "title": "Name", - "description": "The standard basis name if available (e.g., 'cc-pVDZ').", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Brief description of the basis set.", - "type": "string" - }, - "center_data": { - "title": "Center Data", - "description": "Shared basis data for all atoms/centers in the parent molecule", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/BasisCenter" - } - }, - "atom_map": { - "title": "Atom Map", - "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", - "type": "array", - "items": { - "type": "string" - } - }, - "nbf": { - "title": "Nbf", - "description": "The number of basis functions. Use for convenience or as checksum", - "type": "integer" - } - }, - "required": [ - "name", - "center_data", - "atom_map" - ], - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "HarmonicType", + "type": "string" }, "Model": { - "title": "Model", + "additionalProperties": true, "description": "The computational molecular sciences model to run.", - "type": "object", "properties": { "method": { - "title": "Method", "description": "The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). For MM, name of the force field.", + "title": "Method", "type": "string" }, "basis": { - "title": "Basis", - "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", "anyOf": [ { "type": "string" }, { - "$ref": "#/definitions/BasisSet" + "$ref": "#/$defs/BasisSet" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for methods without basis sets. For molecular mechanics, name of the atom-typer.", + "title": "Basis" } }, "required": [ "method" - ] + ], + "title": "Model", + "type": "object" }, - "WavefunctionProtocolEnum": { - "title": "WavefunctionProtocolEnum", - "description": "Wavefunction to keep from a computation.", + "Molecule": { + "additionalProperties": true, + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", "enum": [ "all", - "orbitals_and_eigenvalues", - "occupations_and_eigenvalues", - "return_results", + "input", "none" ], + "title": "NativeFilesProtocolEnum", "type": "string" }, - "ErrorCorrectionProtocol": { - "title": "ErrorCorrectionProtocol", - "description": "Configuration for how QCEngine handles error correction\n\nWARNING: These protocols are currently experimental and only supported by NWChem tasks", - "type": "object", + "Provenance": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": true, + "description": "Provenance information.", "properties": { - "default_policy": { - "title": "Default Policy", - "description": "Whether to allow error corrections to be used if not directly specified in `policies`", - "default": true, - "type": "boolean" + "creator": { + "description": "The name of the program, library, or person who created the object.", + "title": "Creator", + "type": "string" }, - "policies": { - "title": "Policies", - "description": "Settings that define whether specific error corrections are allowed. Keys are the name of a known error and values are whether it is allowed to be used.", - "type": "object", - "additionalProperties": { - "type": "boolean" - } + "version": { + "default": "", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "title": "Version", + "type": "string" + }, + "routine": { + "default": "", + "description": "The name of the routine or function within the creator, blank otherwise.", + "title": "Routine", + "type": "string" } }, - "additionalProperties": false + "required": [ + "creator" + ], + "title": "Provenance", + "type": "object" }, - "NativeFilesProtocolEnum": { - "title": "NativeFilesProtocolEnum", - "description": "CMS program files to keep from a computation.", + "WavefunctionProperties": { + "additionalProperties": true, + "type": "object" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", "enum": [ "all", - "input", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", "none" ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Results from a CMS program execution.", + "properties": { + "schema_name": { + "const": "qcschema_atomic_result", + "default": "qcschema_atomic_result", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", "type": "string" }, - "AtomicResultProtocols": { - "title": "AtomicResultProtocols", - "description": "Protocols regarding the manipulation of computational result data.", - "type": "object", - "properties": { - "wavefunction": { - "description": "Wavefunction to keep from a computation.", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/WavefunctionProtocolEnum" - } - ] - }, - "stdout": { - "title": "Stdout", - "description": "Primary output file to keep from the computation", - "default": true, - "type": "boolean" - }, - "error_correction": { - "title": "Error Correction", - "description": "Policies for error correction", - "allOf": [ - { - "$ref": "#/definitions/ErrorCorrectionProtocol" - } - ] + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.AtomicResult.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "id": { + "anyOf": [ + { + "type": "string" }, - "native_files": { - "description": "Policies for keeping processed files from the computation", - "default": "none", - "allOf": [ - { - "$ref": "#/definitions/NativeFilesProtocolEnum" - } - ] + { + "type": "null" } - }, - "additionalProperties": false + ], + "default": null, + "description": "The optional ID for the computation.", + "title": "Id" }, - "AtomicResultProperties": { - "title": "AtomicResultProperties", - "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", - "type": "object", - "properties": { - "calcinfo_nbasis": { - "title": "Calcinfo Nbasis", - "description": "The number of basis functions for the computation.", - "type": "integer" - }, - "calcinfo_nmo": { - "title": "Calcinfo Nmo", - "description": "The number of molecular orbitals for the computation.", - "type": "integer" - }, - "calcinfo_nalpha": { - "title": "Calcinfo Nalpha", - "description": "The number of alpha electrons in the computation.", - "type": "integer" - }, - "calcinfo_nbeta": { - "title": "Calcinfo Nbeta", - "description": "The number of beta electrons in the computation.", - "type": "integer" - }, - "calcinfo_natom": { - "title": "Calcinfo Natom", - "description": "The number of atoms in the computation.", - "type": "integer" - }, - "nuclear_repulsion_energy": { - "title": "Nuclear Repulsion Energy", - "description": "The nuclear repulsion energy.", - "type": "number" - }, - "return_energy": { - "title": "Return Energy", - "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", - "type": "number" - }, - "return_gradient": { - "title": "Return Gradient", - "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "return_hessian": { - "title": "Return Hessian", - "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_one_electron_energy": { - "title": "Scf One Electron Energy", - "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_two_electron_energy": { - "title": "Scf Two Electron Energy", - "description": "The two-electron energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_vv10_energy": { - "title": "Scf Vv10 Energy", - "description": "The VV10 functional energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_xc_energy": { - "title": "Scf Xc Energy", - "description": "The functional (XC) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_dispersion_correction_energy": { - "title": "Scf Dispersion Correction Energy", - "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", - "units": "E_h", - "type": "number" - }, - "scf_dipole_moment": { - "title": "Scf Dipole Moment", - "description": "The SCF X, Y, and Z dipole components", - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_quadrupole_moment": { - "title": "Scf Quadrupole Moment", - "description": "The quadrupole components (redundant; 6 unique).", - "shape": [ - 3, - 3 - ], - "units": "e a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_energy": { - "title": "Scf Total Energy", - "description": "The total electronic energy of the SCF stage of the calculation.", - "units": "E_h", - "type": "number" - }, - "scf_total_gradient": { - "title": "Scf Total Gradient", - "description": "The total electronic gradient of the SCF stage of the calculation.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_hessian": { - "title": "Scf Total Hessian", - "description": "The total electronic Hessian of the SCF stage of the calculation.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_iterations": { - "title": "Scf Iterations", - "description": "The number of SCF iterations taken before convergence.", - "type": "integer" - }, - "mp2_same_spin_correlation_energy": { - "title": "Mp2 Same Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_opposite_spin_correlation_energy": { - "title": "Mp2 Opposite Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_singles_energy": { - "title": "Mp2 Singles Energy", - "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "mp2_doubles_energy": { - "title": "Mp2 Doubles Energy", - "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "mp2_correlation_energy": { - "title": "Mp2 Correlation Energy", - "description": "The MP2 correlation energy.", - "units": "E_h", - "type": "number" - }, - "mp2_total_energy": { - "title": "Mp2 Total Energy", - "description": "The total MP2 energy (MP2 correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "mp2_dipole_moment": { - "title": "Mp2 Dipole Moment", - "description": "The MP2 X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_same_spin_correlation_energy": { - "title": "Ccsd Same Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_opposite_spin_correlation_energy": { - "title": "Ccsd Opposite Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_singles_energy": { - "title": "Ccsd Singles Energy", - "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "ccsd_doubles_energy": { - "title": "Ccsd Doubles Energy", - "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "ccsd_correlation_energy": { - "title": "Ccsd Correlation Energy", - "description": "The CCSD correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_total_energy": { - "title": "Ccsd Total Energy", - "description": "The total CCSD energy (CCSD correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_dipole_moment": { - "title": "Ccsd Dipole Moment", - "description": "The CCSD X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_iterations": { - "title": "Ccsd Iterations", - "description": "The number of CCSD iterations taken before convergence.", - "type": "integer" - }, - "ccsd_prt_pr_correlation_energy": { - "title": "Ccsd Prt Pr Correlation Energy", - "description": "The CCSD(T) correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_total_energy": { - "title": "Ccsd Prt Pr Total Energy", - "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_dipole_moment": { - "title": "Ccsd Prt Pr Dipole Moment", - "description": "The CCSD(T) X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_correlation_energy": { - "title": "Ccsdt Correlation Energy", - "description": "The CCSDT correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdt_total_energy": { - "title": "Ccsdt Total Energy", - "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdt_dipole_moment": { - "title": "Ccsdt Dipole Moment", - "description": "The CCSDT X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_iterations": { - "title": "Ccsdt Iterations", - "description": "The number of CCSDT iterations taken before convergence.", - "type": "integer" - }, - "ccsdtq_correlation_energy": { - "title": "Ccsdtq Correlation Energy", - "description": "The CCSDTQ correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdtq_total_energy": { - "title": "Ccsdtq Total Energy", - "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdtq_dipole_moment": { - "title": "Ccsdtq Dipole Moment", - "description": "The CCSDTQ X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } + "input_data": { + "$ref": "#/$defs/AtomicInput" + }, + "molecule": { + "$ref": "#/$defs/Molecule", + "description": "The molecule with frame and orientation of the results." + }, + "properties": { + "$ref": "#/$defs/AtomicProperties", + "description": "\n Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n * nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nbasis`\n * nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nmo`\n " + }, + "wavefunction": { + "anyOf": [ + { + "$ref": "#/$defs/WavefunctionProperties" }, - "ccsdtq_iterations": { - "title": "Ccsdtq Iterations", - "description": "The number of CCSDTQ iterations taken before convergence.", - "type": "integer" + { + "type": "null" } - }, - "additionalProperties": false + ], + "default": null, + "description": "Wavefunction properties resulting from a computation.\n Matrix quantities are stored in column-major order. Presence and contents configurable by protocol." }, - "WavefunctionProperties": { - "title": "WavefunctionProperties", - "description": "Wavefunction properties resulting from a computation. Matrix quantities are stored in column-major order. Presence and contents configurable by protocol.", - "type": "object", - "properties": { - "basis": { - "title": "Basis", - "description": "\n A quantum chemistry basis description.\n ", - "allOf": [ - { - "$ref": "#/definitions/BasisSet" - } - ] - }, - "restricted": { - "title": "Restricted", - "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", - "type": "boolean" - }, - "h_core_a": { - "title": "H Core A", - "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_core_b": { - "title": "H Core B", - "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_effective_a": { - "title": "H Effective A", - "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "h_effective_b": { - "title": "H Effective B", - "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_orbitals_a": { - "title": "Scf Orbitals A", - "description": "SCF alpha-spin orbitals in the AO basis.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_orbitals_b": { - "title": "Scf Orbitals B", - "description": "SCF beta-spin orbitals in the AO basis.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_density_a": { - "title": "Scf Density A", - "description": "SCF alpha-spin density matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_density_b": { - "title": "Scf Density B", - "description": "SCF beta-spin density matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_fock_a": { - "title": "Scf Fock A", - "description": "SCF alpha-spin Fock matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_fock_b": { - "title": "Scf Fock B", - "description": "SCF beta-spin Fock matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_eigenvalues_a": { - "title": "Scf Eigenvalues A", - "description": "SCF alpha-spin orbital eigenvalues.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_eigenvalues_b": { - "title": "Scf Eigenvalues B", - "description": "SCF beta-spin orbital eigenvalues.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_occupations_a": { - "title": "Scf Occupations A", - "description": "SCF alpha-spin orbital occupations.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_occupations_b": { - "title": "Scf Occupations B", - "description": "SCF beta-spin orbital occupations.", - "shape": [ - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_coulomb_a": { - "title": "Scf Coulomb A", - "description": "SCF alpha-spin Coulomb matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_coulomb_b": { - "title": "Scf Coulomb B", - "description": "SCF beta-spin Coulomb matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_exchange_a": { - "title": "Scf Exchange A", - "description": "SCF alpha-spin exchange matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "scf_exchange_b": { - "title": "Scf Exchange B", - "description": "SCF beta-spin exchange matrix in the AO basis.", - "shape": [ - "nao", - "nao" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "localized_orbitals_a": { - "title": "Localized Orbitals A", - "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "localized_orbitals_b": { - "title": "Localized Orbitals B", - "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nao", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } - }, - "localized_fock_a": { - "title": "Localized Fock A", - "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nmo", - "nmo" - ], - "type": "array", - "items": { - "type": "number" - } + "return_result": { + "anyOf": [ + { + "type": "number" }, - "localized_fock_b": { - "title": "Localized Fock B", - "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", - "shape": [ - "nmo", - "nmo" - ], - "type": "array", + { "items": { "type": "number" - } - }, - "orbitals_a": { - "title": "Orbitals A", - "description": "Index to the alpha-spin orbitals of the primary return.", - "type": "string" - }, - "orbitals_b": { - "title": "Orbitals B", - "description": "Index to the beta-spin orbitals of the primary return.", - "type": "string" - }, - "density_a": { - "title": "Density A", - "description": "Index to the alpha-spin density of the primary return.", - "type": "string" - }, - "density_b": { - "title": "Density B", - "description": "Index to the beta-spin density of the primary return.", - "type": "string" - }, - "fock_a": { - "title": "Fock A", - "description": "Index to the alpha-spin Fock matrix of the primary return.", - "type": "string" - }, - "fock_b": { - "title": "Fock B", - "description": "Index to the beta-spin Fock matrix of the primary return.", - "type": "string" - }, - "eigenvalues_a": { - "title": "Eigenvalues A", - "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", - "type": "string" - }, - "eigenvalues_b": { - "title": "Eigenvalues B", - "description": "Index to the beta-spin orbital eigenvalues of the primary return.", - "type": "string" + }, + "type": "array" }, - "occupations_a": { - "title": "Occupations A", - "description": "Index to the alpha-spin orbital occupations of the primary return.", + {} + ], + "description": "The primary return specified by the :attr:`~qcelemental.models.AtomicInput.driver` field. Scalar if energy; array if gradient or hessian; dictionary with property keys if properties.", + "title": "Return Result" + }, + "stdout": { + "anyOf": [ + { "type": "string" }, - "occupations_b": { - "title": "Occupations B", - "description": "Index to the beta-spin orbital occupations of the primary return.", - "type": "string" + { + "type": "null" } - }, - "required": [ - "basis", - "restricted" ], - "additionalProperties": false + "default": null, + "description": "The primary logging output of the program, whether natively standard output or a file. Presence vs. absence (or null-ness?) configurable by protocol.", + "title": "Stdout" }, - "ComputeError": { - "title": "ComputeError", - "description": "Complete description of the error from an unsuccessful program execution.", - "type": "object", - "properties": { - "error_type": { - "title": "Error Type", - "description": "The type of error which was thrown. Restrict this field to short classifiers e.g. 'input_error'. Suggested classifiers: https://github.com/MolSSI/QCEngine/blob/master/qcengine/exceptions.py", - "type": "string" - }, - "error_message": { - "title": "Error Message", - "description": "Text associated with the thrown error. This is often the backtrace, but it can contain additional information as well.", + "stderr": { + "anyOf": [ + { "type": "string" }, - "extras": { - "title": "Extras", - "description": "Additional information to bundle with the error.", - "type": "object" + { + "type": "null" } - }, - "required": [ - "error_type", - "error_message" ], - "additionalProperties": false + "default": null, + "description": "The standard error of the program execution.", + "title": "Stderr" + }, + "native_files": { + "additionalProperties": true, + "default": {}, + "description": "DSL files.", + "title": "Native Files", + "type": "object" + }, + "success": { + "const": true, + "default": true, + "description": "The success of program execution. If False, other fields may be blank.", + "title": "Success", + "type": "boolean" + }, + "provenance": { + "$ref": "#/$defs/Provenance" + }, + "extras": { + "default": {}, + "description": "Additional information to bundle with the computation. Use for schema development and scratch space.", + "title": "Extras" } - } + }, + "required": [ + "input_data", + "molecule", + "properties", + "return_result", + "provenance" + ], + "title": "AtomicResult", + "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_properties.schema b/qcschema/qcelemental_v2/schemas/qc_schema_properties.schema deleted file mode 100644 index 072d81e..0000000 --- a/qcschema/qcelemental_v2/schemas/qc_schema_properties.schema +++ /dev/null @@ -1,325 +0,0 @@ -{ - "title": "AtomicResultProperties", - "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicResultProperties.calcinfo_nmo`", - "type": "object", - "properties": { - "calcinfo_nbasis": { - "title": "Calcinfo Nbasis", - "description": "The number of basis functions for the computation.", - "type": "integer" - }, - "calcinfo_nmo": { - "title": "Calcinfo Nmo", - "description": "The number of molecular orbitals for the computation.", - "type": "integer" - }, - "calcinfo_nalpha": { - "title": "Calcinfo Nalpha", - "description": "The number of alpha electrons in the computation.", - "type": "integer" - }, - "calcinfo_nbeta": { - "title": "Calcinfo Nbeta", - "description": "The number of beta electrons in the computation.", - "type": "integer" - }, - "calcinfo_natom": { - "title": "Calcinfo Natom", - "description": "The number of atoms in the computation.", - "type": "integer" - }, - "nuclear_repulsion_energy": { - "title": "Nuclear Repulsion Energy", - "description": "The nuclear repulsion energy.", - "type": "number" - }, - "return_energy": { - "title": "Return Energy", - "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", - "type": "number" - }, - "return_gradient": { - "title": "Return Gradient", - "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "return_hessian": { - "title": "Return Hessian", - "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_one_electron_energy": { - "title": "Scf One Electron Energy", - "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_two_electron_energy": { - "title": "Scf Two Electron Energy", - "description": "The two-electron energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_vv10_energy": { - "title": "Scf Vv10 Energy", - "description": "The VV10 functional energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_xc_energy": { - "title": "Scf Xc Energy", - "description": "The functional (XC) energy contribution to the total SCF energy.", - "units": "E_h", - "type": "number" - }, - "scf_dispersion_correction_energy": { - "title": "Scf Dispersion Correction Energy", - "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", - "units": "E_h", - "type": "number" - }, - "scf_dipole_moment": { - "title": "Scf Dipole Moment", - "description": "The SCF X, Y, and Z dipole components", - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_quadrupole_moment": { - "title": "Scf Quadrupole Moment", - "description": "The quadrupole components (redundant; 6 unique).", - "shape": [ - 3, - 3 - ], - "units": "e a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_energy": { - "title": "Scf Total Energy", - "description": "The total electronic energy of the SCF stage of the calculation.", - "units": "E_h", - "type": "number" - }, - "scf_total_gradient": { - "title": "Scf Total Gradient", - "description": "The total electronic gradient of the SCF stage of the calculation.", - "units": "E_h/a0", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_total_hessian": { - "title": "Scf Total Hessian", - "description": "The total electronic Hessian of the SCF stage of the calculation.", - "units": "E_h/a0^2", - "type": "array", - "items": { - "type": "number" - } - }, - "scf_iterations": { - "title": "Scf Iterations", - "description": "The number of SCF iterations taken before convergence.", - "type": "integer" - }, - "mp2_same_spin_correlation_energy": { - "title": "Mp2 Same Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_opposite_spin_correlation_energy": { - "title": "Mp2 Opposite Spin Correlation Energy", - "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "mp2_singles_energy": { - "title": "Mp2 Singles Energy", - "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "mp2_doubles_energy": { - "title": "Mp2 Doubles Energy", - "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "mp2_correlation_energy": { - "title": "Mp2 Correlation Energy", - "description": "The MP2 correlation energy.", - "units": "E_h", - "type": "number" - }, - "mp2_total_energy": { - "title": "Mp2 Total Energy", - "description": "The total MP2 energy (MP2 correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "mp2_dipole_moment": { - "title": "Mp2 Dipole Moment", - "description": "The MP2 X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_same_spin_correlation_energy": { - "title": "Ccsd Same Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_opposite_spin_correlation_energy": { - "title": "Ccsd Opposite Spin Correlation Energy", - "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", - "units": "E_h", - "type": "number" - }, - "ccsd_singles_energy": { - "title": "Ccsd Singles Energy", - "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", - "units": "E_h", - "type": "number" - }, - "ccsd_doubles_energy": { - "title": "Ccsd Doubles Energy", - "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", - "units": "E_h", - "type": "number" - }, - "ccsd_correlation_energy": { - "title": "Ccsd Correlation Energy", - "description": "The CCSD correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_total_energy": { - "title": "Ccsd Total Energy", - "description": "The total CCSD energy (CCSD correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_dipole_moment": { - "title": "Ccsd Dipole Moment", - "description": "The CCSD X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsd_iterations": { - "title": "Ccsd Iterations", - "description": "The number of CCSD iterations taken before convergence.", - "type": "integer" - }, - "ccsd_prt_pr_correlation_energy": { - "title": "Ccsd Prt Pr Correlation Energy", - "description": "The CCSD(T) correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_total_energy": { - "title": "Ccsd Prt Pr Total Energy", - "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsd_prt_pr_dipole_moment": { - "title": "Ccsd Prt Pr Dipole Moment", - "description": "The CCSD(T) X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_correlation_energy": { - "title": "Ccsdt Correlation Energy", - "description": "The CCSDT correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdt_total_energy": { - "title": "Ccsdt Total Energy", - "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdt_dipole_moment": { - "title": "Ccsdt Dipole Moment", - "description": "The CCSDT X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdt_iterations": { - "title": "Ccsdt Iterations", - "description": "The number of CCSDT iterations taken before convergence.", - "type": "integer" - }, - "ccsdtq_correlation_energy": { - "title": "Ccsdtq Correlation Energy", - "description": "The CCSDTQ correlation energy.", - "units": "E_h", - "type": "number" - }, - "ccsdtq_total_energy": { - "title": "Ccsdtq Total Energy", - "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", - "units": "E_h", - "type": "number" - }, - "ccsdtq_dipole_moment": { - "title": "Ccsdtq Dipole Moment", - "description": "The CCSDTQ X, Y, and Z dipole components.", - "shape": [ - 3 - ], - "units": "e a0", - "type": "array", - "items": { - "type": "number" - } - }, - "ccsdtq_iterations": { - "title": "Ccsdtq Iterations", - "description": "The number of CCSDTQ iterations taken before convergence.", - "type": "integer" - } - }, - "additionalProperties": false -} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema b/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema index 5f55b88..7dcdd28 100644 --- a/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema +++ b/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema @@ -1,28 +1,29 @@ { - "title": "Provenance", + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": true, "description": "Provenance information.", - "type": "object", "properties": { "creator": { - "title": "Creator", "description": "The name of the program, library, or person who created the object.", + "title": "Creator", "type": "string" }, "version": { - "title": "Version", - "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", "default": "", + "description": "The version of the creator, blank otherwise. This should be sortable by the very broad `PEP 440 `_.", + "title": "Version", "type": "string" }, "routine": { - "title": "Routine", - "description": "The name of the routine or function within the creator, blank otherwise.", "default": "", + "description": "The name of the routine or function within the creator, blank otherwise.", + "title": "Routine", "type": "string" } }, "required": [ "creator" ], - "$schema": "http://json-schema.org/draft-04/schema#" + "title": "Provenance", + "type": "object" } \ No newline at end of file From 6b9fe7a3d0b93b3629a05f590ba884f0ade2417c Mon Sep 17 00:00:00 2001 From: Jennifer A Clark Date: Thu, 6 Aug 2026 11:34:08 -0400 Subject: [PATCH 10/14] Apply suggestions from code review Co-authored-by: Lori A. Burns --- qcschema/README.md | 1 + qcschema/qcelemental_v1/generate.py | 2 +- qcschema/qcelemental_v2/generate.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qcschema/README.md b/qcschema/README.md index 510c0dc..f121c64 100644 --- a/qcschema/README.md +++ b/qcschema/README.md @@ -70,6 +70,7 @@ python -m qcschema.v1_5.generate ``` The generators use modular component files in their respective `generator/` subdirectories. v1.5 inherits from v1 and extends it with wavefunction support. +v1.5 is the longstanding state of the QCSchema repo from 2020-2026. ## Public API diff --git a/qcschema/qcelemental_v1/generate.py b/qcschema/qcelemental_v1/generate.py index c8dcb2b..0fc1870 100644 --- a/qcschema/qcelemental_v1/generate.py +++ b/qcschema/qcelemental_v1/generate.py @@ -102,7 +102,7 @@ def _get_output_filename(model_name): # Check if this is a canonical type if model_name in type_mapping: schema_type = type_mapping[model_name] - return f"qc_schema_{schema_type}.schema" + return f"qcschema_{schema_type}.schema" # Otherwise use the model name as-is return f"{model_name}.schema" diff --git a/qcschema/qcelemental_v2/generate.py b/qcschema/qcelemental_v2/generate.py index ea0250b..15e9deb 100644 --- a/qcschema/qcelemental_v2/generate.py +++ b/qcschema/qcelemental_v2/generate.py @@ -141,7 +141,7 @@ def _get_output_filename(model_name): # Check if this is a canonical type if model_name in type_mapping: schema_type = type_mapping[model_name] - return f"qc_schema_{schema_type}.schema" + return f"qcschema_{schema_type}.schema" # Otherwise use the model name as-is return f"{model_name}.schema" From 76e47273c99d950fdd859aca655ca6f0c330befb Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Thu, 6 Aug 2026 11:38:49 -0400 Subject: [PATCH 11/14] Change qc_schema to qcschema --- docs/source/examples.rst | 4 ++-- qcschema/README.md | 6 +++--- qcschema/qcelemental_v1/generate.py | 2 +- ...hema_basis.schema => qcschema_basis.schema} | 0 ...hema_input.schema => qcschema_input.schema} | 0 ...olecule.schema => qcschema_molecule.schema} | 0 ...ma_output.schema => qcschema_output.schema} | 0 ...rties.schema => qcschema_properties.schema} | 0 ...nance.schema => qcschema_provenance.schema} | 0 ...hema_basis.schema => qcschema_basis.schema} | 0 ...hema_input.schema => qcschema_input.schema} | 0 ...olecule.schema => qcschema_molecule.schema} | 0 ...ma_output.schema => qcschema_output.schema} | 0 ...nance.schema => qcschema_provenance.schema} | 0 qcschema/v1/generate.py | 18 +++++++++--------- qcschema/v1/schemas/qc_schema_input.schema | 1 - qcschema/v1/schemas/qc_schema_molecule.schema | 1 - qcschema/v1/schemas/qc_schema_output.schema | 1 - qcschema/v1/schemas/qcschema_input.schema | 1 + qcschema/v1/schemas/qcschema_molecule.schema | 1 + qcschema/v1/schemas/qcschema_output.schema | 1 + qcschema/v1_5/generate.py | 12 ++++++------ ...hema_input.schema => qcschema_input.schema} | 0 ...olecule.schema => qcschema_molecule.schema} | 0 ...ma_output.schema => qcschema_output.schema} | 0 qcschema/versions.py | 4 ++-- .../waterZr_energy_B3LYP_STO3G_DEF2_input.json | 2 +- tests/basis/water_energy_B3LYP_631G_input.json | 2 +- .../missing_molecule_symbols.json | 2 +- tests/input_failures/multiplicity_float.json | 2 +- tests/output_failures/dipole_wrong_type.json | 2 +- tests/output_failures/unknown_property.json | 2 +- .../wavefunction_basis_name.json | 2 +- .../wavefunction_missing_basis.json | 2 +- tests/simple/he2_energy_VV10_input.json | 2 +- tests/simple/he2_energy_VV10_output.json | 2 +- tests/simple/water_energy_B3LYP_input.json | 2 +- tests/simple/water_energy_B3LYP_output.json | 2 +- .../simple/water_energy_CCSD_PRT_PR_input.json | 2 +- .../water_energy_CCSD_PRT_PR_output.json | 2 +- tests/simple/water_energy_CCSD_input.json | 2 +- tests/simple/water_energy_CCSD_output.json | 2 +- tests/simple/water_energy_MP2_input.json | 2 +- tests/simple/water_energy_MP2_output.json | 2 +- tests/simple/water_gradient_HF_input.json | 2 +- tests/simple/water_gradient_HF_output.json | 2 +- tests/test_packaging.py | 12 ++++++------ tests/test_qcelemental_schemas.py | 2 +- tests/wavefunction/water_output.json | 2 +- tests/wavefunction/water_output_v3.json | 2 +- 50 files changed, 55 insertions(+), 55 deletions(-) rename qcschema/qcelemental_v1/schemas/{qc_schema_basis.schema => qcschema_basis.schema} (100%) rename qcschema/qcelemental_v1/schemas/{qc_schema_input.schema => qcschema_input.schema} (100%) rename qcschema/qcelemental_v1/schemas/{qc_schema_molecule.schema => qcschema_molecule.schema} (100%) rename qcschema/qcelemental_v1/schemas/{qc_schema_output.schema => qcschema_output.schema} (100%) rename qcschema/qcelemental_v1/schemas/{qc_schema_properties.schema => qcschema_properties.schema} (100%) rename qcschema/qcelemental_v1/schemas/{qc_schema_provenance.schema => qcschema_provenance.schema} (100%) rename qcschema/qcelemental_v2/schemas/{qc_schema_basis.schema => qcschema_basis.schema} (100%) rename qcschema/qcelemental_v2/schemas/{qc_schema_input.schema => qcschema_input.schema} (100%) rename qcschema/qcelemental_v2/schemas/{qc_schema_molecule.schema => qcschema_molecule.schema} (100%) rename qcschema/qcelemental_v2/schemas/{qc_schema_output.schema => qcschema_output.schema} (100%) rename qcschema/qcelemental_v2/schemas/{qc_schema_provenance.schema => qcschema_provenance.schema} (100%) delete mode 100644 qcschema/v1/schemas/qc_schema_input.schema delete mode 100644 qcschema/v1/schemas/qc_schema_molecule.schema delete mode 100644 qcschema/v1/schemas/qc_schema_output.schema create mode 100644 qcschema/v1/schemas/qcschema_input.schema create mode 100644 qcschema/v1/schemas/qcschema_molecule.schema create mode 100644 qcschema/v1/schemas/qcschema_output.schema rename qcschema/v1_5/schemas/{qc_schema_input.schema => qcschema_input.schema} (100%) rename qcschema/v1_5/schemas/{qc_schema_molecule.schema => qcschema_molecule.schema} (100%) rename qcschema/v1_5/schemas/{qc_schema_output.schema => qcschema_output.schema} (100%) diff --git a/docs/source/examples.rst b/docs/source/examples.rst index f42671f..8a96b65 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -12,7 +12,7 @@ Water MP2 Energy .. code:: python { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "geometry": [ @@ -64,7 +64,7 @@ Water HF Gradient .. code:: python { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "geometry": [ diff --git a/qcschema/README.md b/qcschema/README.md index f121c64..db8243b 100644 --- a/qcschema/README.md +++ b/qcschema/README.md @@ -9,9 +9,9 @@ Contains the generated JSON Schema files for all schema versions. - **`v1/`** — v1 JSON Schema documents (draft-04, frozen) - Generated by `qcschema/v1/generate.py` - - `qc_schema_input.schema` — Input specification - - `qc_schema_molecule.schema` — Molecule structure - - `qc_schema_output.schema` — Output specification + - `qcschema_input.schema` — Input specification + - `qcschema_molecule.schema` — Molecule structure + - `qcschema_output.schema` — Output specification - **`v2/`** — v1.5 enhanced JSON Schema documents (draft-04, frozen) - Generated by `qcschema/v1_5/generate.py` diff --git a/qcschema/qcelemental_v1/generate.py b/qcschema/qcelemental_v1/generate.py index 0fc1870..67a5f92 100644 --- a/qcschema/qcelemental_v1/generate.py +++ b/qcschema/qcelemental_v1/generate.py @@ -86,7 +86,7 @@ def _validate_schema(schema, model_name): def _get_output_filename(model_name): """Map pydantic model names to schema filenames. - Maps model class names to schema type filenames, using qc_schema_* naming + Maps model class names to schema type filenames, using qcschema_* naming for types that match the QCSchema canonical types. """ # Map qcelemental model names to canonical QCSchema types diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_basis.schema b/qcschema/qcelemental_v1/schemas/qcschema_basis.schema similarity index 100% rename from qcschema/qcelemental_v1/schemas/qc_schema_basis.schema rename to qcschema/qcelemental_v1/schemas/qcschema_basis.schema diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_input.schema b/qcschema/qcelemental_v1/schemas/qcschema_input.schema similarity index 100% rename from qcschema/qcelemental_v1/schemas/qc_schema_input.schema rename to qcschema/qcelemental_v1/schemas/qcschema_input.schema diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema b/qcschema/qcelemental_v1/schemas/qcschema_molecule.schema similarity index 100% rename from qcschema/qcelemental_v1/schemas/qc_schema_molecule.schema rename to qcschema/qcelemental_v1/schemas/qcschema_molecule.schema diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_output.schema b/qcschema/qcelemental_v1/schemas/qcschema_output.schema similarity index 100% rename from qcschema/qcelemental_v1/schemas/qc_schema_output.schema rename to qcschema/qcelemental_v1/schemas/qcschema_output.schema diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_properties.schema b/qcschema/qcelemental_v1/schemas/qcschema_properties.schema similarity index 100% rename from qcschema/qcelemental_v1/schemas/qc_schema_properties.schema rename to qcschema/qcelemental_v1/schemas/qcschema_properties.schema diff --git a/qcschema/qcelemental_v1/schemas/qc_schema_provenance.schema b/qcschema/qcelemental_v1/schemas/qcschema_provenance.schema similarity index 100% rename from qcschema/qcelemental_v1/schemas/qc_schema_provenance.schema rename to qcschema/qcelemental_v1/schemas/qcschema_provenance.schema diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_basis.schema b/qcschema/qcelemental_v2/schemas/qcschema_basis.schema similarity index 100% rename from qcschema/qcelemental_v2/schemas/qc_schema_basis.schema rename to qcschema/qcelemental_v2/schemas/qcschema_basis.schema diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_input.schema b/qcschema/qcelemental_v2/schemas/qcschema_input.schema similarity index 100% rename from qcschema/qcelemental_v2/schemas/qc_schema_input.schema rename to qcschema/qcelemental_v2/schemas/qcschema_input.schema diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema b/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema similarity index 100% rename from qcschema/qcelemental_v2/schemas/qc_schema_molecule.schema rename to qcschema/qcelemental_v2/schemas/qcschema_molecule.schema diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_output.schema b/qcschema/qcelemental_v2/schemas/qcschema_output.schema similarity index 100% rename from qcschema/qcelemental_v2/schemas/qc_schema_output.schema rename to qcschema/qcelemental_v2/schemas/qcschema_output.schema diff --git a/qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema b/qcschema/qcelemental_v2/schemas/qcschema_provenance.schema similarity index 100% rename from qcschema/qcelemental_v2/schemas/qc_schema_provenance.schema rename to qcschema/qcelemental_v2/schemas/qcschema_provenance.schema diff --git a/qcschema/v1/generate.py b/qcschema/v1/generate.py index cd1cd82..6147912 100644 --- a/qcschema/v1/generate.py +++ b/qcschema/v1/generate.py @@ -103,7 +103,7 @@ def _build_v1_molecule(): """Build the frozen v1 molecule schema (original format without schema_name/version).""" return { "$schema": "http://json-schema.org/draft-04/schema#", - "name": "qc_schema_molecule", + "name": "qcschema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", @@ -439,7 +439,7 @@ def build_v1_schemas(): "type": "object", "properties": { "molecule": molecule_schema, - "schema_name": {"type": "string", "pattern": "\\W*(qc_schema)\\W*"}, + "schema_name": {"type": "string", "pattern": "\\W*(qcschema)\\W*"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": { @@ -466,12 +466,12 @@ def build_v1_schemas(): } input_schema = copy.deepcopy(base_schema) - input_schema["name"] = "qc_schema_input" - input_schema["properties"]["schema_name"]["pattern"] = "\\W*(qc_schema_input)\\W*" + input_schema["name"] = "qcschema_input" + input_schema["properties"]["schema_name"]["pattern"] = "\\W*(qcschema_input)\\W*" output_schema = copy.deepcopy(base_schema) - output_schema["name"] = "qc_schema_output" - output_schema["properties"]["schema_name"]["pattern"] = "\\W*(qc_schema_output)\\W*" + output_schema["name"] = "qcschema_output" + output_schema["properties"]["schema_name"]["pattern"] = "\\W*(qcschema_output)\\W*" output_schema["required"].extend(["provenance", "properties", "success", "return_result"]) v1_properties = _validate_schema_return(_build_v1_properties(), "v1 properties schema") output_schema["properties"].update( @@ -524,17 +524,17 @@ def write_schemas(schemas, schema_dir=None): # Write each schema with error handling try: - write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") + write_schema(schemas["input"], schema_dir / "qcschema_input.schema") except Exception as e: raise RuntimeError(f"Failed to write input schema: {e}") from e try: - write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") + write_schema(schemas["output"], schema_dir / "qcschema_output.schema") except Exception as e: raise RuntimeError(f"Failed to write output schema: {e}") from e try: - write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + write_schema(schemas["molecule"], schema_dir / "qcschema_molecule.schema") except Exception as e: raise RuntimeError(f"Failed to write molecule schema: {e}") from e diff --git a/qcschema/v1/schemas/qc_schema_input.schema b/qcschema/v1/schemas/qc_schema_input.schema deleted file mode 100644 index f5c3db2..0000000 --- a/qcschema/v1/schemas/qc_schema_input.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_input", "version": 1, "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]}, "schema_name": {"type": "string", "pattern": "\\W*(qc_schema_input)\\W*"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"type": "string"}, "basis_spec": {"$ref": "#/definitions/basis_spec"}}, "required": ["method"], "oneOf": [{"required": ["basis"]}, {"required": ["basis_spec"]}], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise.", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator"], "description": "A short provenance of the object.", "additionalProperties": true}, "basis_electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["shell_angular_momentum", "shell_exponents", "shell_coefficients"], "properties": {"shell_region": {"description": "The region this shell describes", "type": "string", "enum": ["valence", "polarization", "core", "tight", "diffuse"]}, "shell_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "shell_exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "shell_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["potential_ecp_type", "potential_angular_momentum", "potential_r_exponents", "potential_gaussian_exponents", "potential_coefficients"], "properties": {"potential_ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "potential_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "potential_r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "potential_gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "potential_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_single_data": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"element_electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_electron_shell"}}, "element_ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "element_ecp": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_ecp_potential"}}}}, "basis_spec": {"description": "Specification for a basis applied to a molecule", "type": "object", "additionalProperties": false, "properties": {"basis_set_description": {"description": "Brief description of the basis set", "type": "string"}, "basis_function_type": {"description": "Type of function for this basis", "type": "string", "enum": ["gto", "sto"]}, "basis_harmonic_type": {"description": "Harmonic type (spherical, cartesian)", "type": "string", "enum": ["spherical", "cartesian"]}, "basis_set_elements": {"description": "Per-element basis data", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}, "basis_set_atoms": {"description": "Basis set overrides for particular atoms or centers", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}}}}} \ No newline at end of file diff --git a/qcschema/v1/schemas/qc_schema_molecule.schema b/qcschema/v1/schemas/qc_schema_molecule.schema deleted file mode 100644 index ef57893..0000000 --- a/qcschema/v1/schemas/qc_schema_molecule.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]} \ No newline at end of file diff --git a/qcschema/v1/schemas/qc_schema_output.schema b/qcschema/v1/schemas/qc_schema_output.schema deleted file mode 100644 index 338ebb4..0000000 --- a/qcschema/v1/schemas/qc_schema_output.schema +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_output", "version": 1, "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qc_schema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]}, "schema_name": {"type": "string", "pattern": "\\W*(qc_schema_output)\\W*"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"type": "string"}, "basis_spec": {"$ref": "#/definitions/basis_spec"}}, "required": ["method"], "oneOf": [{"required": ["basis"]}, {"required": ["basis_spec"]}], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}, "properties": {"type": "object", "properties": {"scf_one_electron_energy": {"description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", "type": "number"}, "scf_two_electron_energy": {"type": "number", "description": "The two-electron energy contribution to the total SCF energy."}, "nuclear_repulsion_energy": {"type": "number", "description": "\nThe nuclear repulsion energy contribution to the total SCF energy.\n"}, "scf_vv10_energy": {"type": "number", "description": "The VV10 functional energy contribution to the total SCF energy."}, "scf_xc_energy": {"type": "number", "description": "The functional energy contribution to the total SCF energy."}, "scf_dispersion_correction_energy": {"type": "number", "description": "\nThe dispersion correction appended to an underlying functional\nwhen a DFT-D method is requested.\n"}, "scf_dipole_moment": {"type": "array", "description": "The X, Y, and Z dipole components.", "items": {"type": "number"}}, "scf_total_energy": {"type": "number", "description": "\nThe total electronic energy of the SCF stage of the calculation.\nThis is represented as the sum of the ... quantities.\n"}, "scf_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of SCF iterations taken before convergence."}, "mp2_same_spin_correlation_energy": {"type": "number", "description": "The unscaled portion of the MP2 correlation energy from same-spin or triplet doubles correlations."}, "mp2_opposite_spin_correlation_energy": {"type": "number", "description": "The unscaled portion of the MP2 correlation energy from opposite-spin or singlet doubles correlations."}, "mp2_singles_energy": {"type": "number", "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF."}, "mp2_doubles_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_total_correlation_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_total_energy": {"type": "number", "description": "The total MP2 energy (MP2 correlatin energy + HF energy)."}, "calcinfo_nbasis": {"type": "number", "multipleOf": 1.0, "description": "The number of basis functions for the computation."}, "calcinfo_nmo": {"type": "number", "multipleOf": 1.0, "description": "The number of molecular orbitals for the computation."}, "calcinfo_nalpha": {"type": "number", "multipleOf": 1.0, "description": "The number of alpha electrons in the computation."}, "calcinfo_nbeta": {"type": "number", "multipleOf": 1.0, "description": "The number of beta electrons in the computation."}, "calcinfo_natom": {"type": "number", "multipleOf": 1.0, "description": "The number of atoms in the computation."}, "return_energy": {"type": "number", "description": "The energy of the requested method, identical to `return_value` for energy computations."}}, "description": "The resulting properties of a computation", "additionalProperties": false}, "success": {"type": "boolean"}, "error": {"definition": "The type and description of error raised.", "type": "object", "$ref": "#/definitions/error"}, "return_result": {"definition": "The primary specified return of the requested computation.", "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model", "provenance", "properties", "success", "return_result"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise.", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator"], "description": "A short provenance of the object.", "additionalProperties": true}, "basis_electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["shell_angular_momentum", "shell_exponents", "shell_coefficients"], "properties": {"shell_region": {"description": "The region this shell describes", "type": "string", "enum": ["valence", "polarization", "core", "tight", "diffuse"]}, "shell_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "shell_exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "shell_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["potential_ecp_type", "potential_angular_momentum", "potential_r_exponents", "potential_gaussian_exponents", "potential_coefficients"], "properties": {"potential_ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "potential_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "potential_r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "potential_gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "potential_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_single_data": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"element_electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_electron_shell"}}, "element_ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "element_ecp": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_ecp_potential"}}}}, "basis_spec": {"description": "Specification for a basis applied to a molecule", "type": "object", "additionalProperties": false, "properties": {"basis_set_description": {"description": "Brief description of the basis set", "type": "string"}, "basis_function_type": {"description": "Type of function for this basis", "type": "string", "enum": ["gto", "sto"]}, "basis_harmonic_type": {"description": "Harmonic type (spherical, cartesian)", "type": "string", "enum": ["spherical", "cartesian"]}, "basis_set_elements": {"description": "Per-element basis data", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}, "basis_set_atoms": {"description": "Basis set overrides for particular atoms or centers", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}}}}} \ No newline at end of file diff --git a/qcschema/v1/schemas/qcschema_input.schema b/qcschema/v1/schemas/qcschema_input.schema new file mode 100644 index 0000000..c9448df --- /dev/null +++ b/qcschema/v1/schemas/qcschema_input.schema @@ -0,0 +1 @@ +{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_input", "version": 1, "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]}, "schema_name": {"type": "string", "pattern": "\\W*(qcschema_input)\\W*"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"type": "string"}, "basis_spec": {"$ref": "#/definitions/basis_spec"}}, "required": ["method"], "oneOf": [{"required": ["basis"]}, {"required": ["basis_spec"]}], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise.", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator"], "description": "A short provenance of the object.", "additionalProperties": true}, "basis_electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["shell_angular_momentum", "shell_exponents", "shell_coefficients"], "properties": {"shell_region": {"description": "The region this shell describes", "type": "string", "enum": ["valence", "polarization", "core", "tight", "diffuse"]}, "shell_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "shell_exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "shell_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["potential_ecp_type", "potential_angular_momentum", "potential_r_exponents", "potential_gaussian_exponents", "potential_coefficients"], "properties": {"potential_ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "potential_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "potential_r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "potential_gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "potential_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_single_data": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"element_electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_electron_shell"}}, "element_ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "element_ecp": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_ecp_potential"}}}}, "basis_spec": {"description": "Specification for a basis applied to a molecule", "type": "object", "additionalProperties": false, "properties": {"basis_set_description": {"description": "Brief description of the basis set", "type": "string"}, "basis_function_type": {"description": "Type of function for this basis", "type": "string", "enum": ["gto", "sto"]}, "basis_harmonic_type": {"description": "Harmonic type (spherical, cartesian)", "type": "string", "enum": ["spherical", "cartesian"]}, "basis_set_elements": {"description": "Per-element basis data", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}, "basis_set_atoms": {"description": "Basis set overrides for particular atoms or centers", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}}}}} \ No newline at end of file diff --git a/qcschema/v1/schemas/qcschema_molecule.schema b/qcschema/v1/schemas/qcschema_molecule.schema new file mode 100644 index 0000000..2922ca4 --- /dev/null +++ b/qcschema/v1/schemas/qcschema_molecule.schema @@ -0,0 +1 @@ +{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]} \ No newline at end of file diff --git a/qcschema/v1/schemas/qcschema_output.schema b/qcschema/v1/schemas/qcschema_output.schema new file mode 100644 index 0000000..e9fff98 --- /dev/null +++ b/qcschema/v1/schemas/qcschema_output.schema @@ -0,0 +1 @@ +{"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_output", "version": 1, "description": "The MolSSI Quantum Chemistry Schema", "type": "object", "properties": {"molecule": {"$schema": "http://json-schema.org/draft-04/schema#", "name": "qcschema_molecule", "version": 1, "description": "The physical cartesian representation of the molecular system", "type": "object", "properties": {"symbols": {"description": "(nat, ) atom symbols in title case.", "type": "array", "items": {"type": "string"}}, "geometry": {"description": "(3 * nat, ) vector of XYZ coordinates of the atoms.", "type": "array", "items": {"type": "number"}}, "masses": {"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", "items": {"type": "number"}}, "name": {"description": "The name of the molecule.", "type": "string"}, "comment": {"description": "Any additional comment one would attach to the molecule.", "type": "string"}, "molecular_charge": {"description": "The overall charge of the molecule.", "type": "number", "default": 0.0}, "molecular_multiplicity": {"description": "The overall multiplicity of the molecule.", "type": "number", "multipleOf": 1.0, "default": 1}, "real": {"description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", "items": {"type": "boolean"}}, "connectivity": {"description": "(nat, ) list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", "type": "array", "items": {"type": "array", "minItems": 3, "maxItems": 3, "items": {"type": "number", "minimum": 0, "maximum": 5}}}, "fragments": {"description": "(nfr, -1) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.", "type": "array", "items": {"type": "array", "items": {"type": "number", "multipleOf": 1.0}}}, "fragment_charges": {"description": "(nfr, ) list of charges associated with each fragment tuple.", "type": "array", "items": {"type": "number"}}, "fragment_multiplicities": {"description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", "items": {"type": "number", "multipleOf": 1.0}}, "fix_com": {"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "fix_orientation": {"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).", "type": "boolean", "default": false}, "provenance": {"type": "object", "$ref": "#/definitions/provenance"}}, "required": ["symbols", "geometry"]}, "schema_name": {"type": "string", "pattern": "\\W*(qcschema_output)\\W*"}, "schema_version": {"type": "integer"}, "driver": {"definition": "The type of computation requested", "enum": ["energy", "gradient", "hessian"]}, "model": {"definition": "The method and basis specification requested", "properties": {"method": {"type": "string"}, "basis": {"type": "string"}, "basis_spec": {"$ref": "#/definitions/basis_spec"}}, "required": ["method"], "oneOf": [{"required": ["basis"]}, {"required": ["basis_spec"]}], "description": "The quantum chemistry model to be run."}, "keywords": {"type": "object", "description": "Program specific parameters to be used."}, "provenance": {"anyOf": [{"type": "object", "$ref": "#/definitions/provenance"}, {"type": "array", "items": {"type": "object", "$ref": "#/definitions/provenance"}}]}, "properties": {"type": "object", "properties": {"scf_one_electron_energy": {"description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", "type": "number"}, "scf_two_electron_energy": {"type": "number", "description": "The two-electron energy contribution to the total SCF energy."}, "nuclear_repulsion_energy": {"type": "number", "description": "\nThe nuclear repulsion energy contribution to the total SCF energy.\n"}, "scf_vv10_energy": {"type": "number", "description": "The VV10 functional energy contribution to the total SCF energy."}, "scf_xc_energy": {"type": "number", "description": "The functional energy contribution to the total SCF energy."}, "scf_dispersion_correction_energy": {"type": "number", "description": "\nThe dispersion correction appended to an underlying functional\nwhen a DFT-D method is requested.\n"}, "scf_dipole_moment": {"type": "array", "description": "The X, Y, and Z dipole components.", "items": {"type": "number"}}, "scf_total_energy": {"type": "number", "description": "\nThe total electronic energy of the SCF stage of the calculation.\nThis is represented as the sum of the ... quantities.\n"}, "scf_iterations": {"type": "number", "multipleOf": 1.0, "description": "The number of SCF iterations taken before convergence."}, "mp2_same_spin_correlation_energy": {"type": "number", "description": "The unscaled portion of the MP2 correlation energy from same-spin or triplet doubles correlations."}, "mp2_opposite_spin_correlation_energy": {"type": "number", "description": "The unscaled portion of the MP2 correlation energy from opposite-spin or singlet doubles correlations."}, "mp2_singles_energy": {"type": "number", "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF."}, "mp2_doubles_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_total_correlation_energy": {"type": "number", "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations."}, "mp2_total_energy": {"type": "number", "description": "The total MP2 energy (MP2 correlatin energy + HF energy)."}, "calcinfo_nbasis": {"type": "number", "multipleOf": 1.0, "description": "The number of basis functions for the computation."}, "calcinfo_nmo": {"type": "number", "multipleOf": 1.0, "description": "The number of molecular orbitals for the computation."}, "calcinfo_nalpha": {"type": "number", "multipleOf": 1.0, "description": "The number of alpha electrons in the computation."}, "calcinfo_nbeta": {"type": "number", "multipleOf": 1.0, "description": "The number of beta electrons in the computation."}, "calcinfo_natom": {"type": "number", "multipleOf": 1.0, "description": "The number of atoms in the computation."}, "return_energy": {"type": "number", "description": "The energy of the requested method, identical to `return_value` for energy computations."}}, "description": "The resulting properties of a computation", "additionalProperties": false}, "success": {"type": "boolean"}, "error": {"definition": "The type and description of error raised.", "type": "object", "$ref": "#/definitions/error"}, "return_result": {"definition": "The primary specified return of the requested computation.", "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}]}}, "required": ["schema_name", "schema_version", "molecule", "driver", "keywords", "model", "provenance", "properties", "success", "return_result"], "definitions": {"error": {"properties": {"error_type": {"description": "The type of error raised.", "enum": ["convergence_error", "file_error", "memory_error"]}, "error_message": {"description": "A description of the raised error.", "type": "string"}}, "required": ["error_type", "error_message"], "description": "The type of error message raised.", "additionalProperties": false}, "provenance": {"properties": {"creator": {"description": "The name of the person or program who created this object.", "type": "string"}, "version": {"description": "The version of the program which created this object, blank otherwise.", "type": "string"}, "routine": {"description": "The routine of the program which created this object, blank otherwise.", "type": "string"}}, "required": ["creator"], "description": "A short provenance of the object.", "additionalProperties": true}, "basis_electron_shell": {"description": "Information for a single electronic shell", "additionalProperties": false, "required": ["shell_angular_momentum", "shell_exponents", "shell_coefficients"], "properties": {"shell_region": {"description": "The region this shell describes", "type": "string", "enum": ["valence", "polarization", "core", "tight", "diffuse"]}, "shell_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "shell_exponents": {"description": "Exponents for this contracted shell", "type": "array", "minItems": 1, "items": {"type": "string"}}, "shell_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_ecp_potential": {"description": "ECP potential", "additionalProperties": false, "required": ["potential_ecp_type", "potential_angular_momentum", "potential_r_exponents", "potential_gaussian_exponents", "potential_coefficients"], "properties": {"potential_ecp_type": {"description": "Type of the ECP Potential", "type": "string", "enum": ["scalar", "spinorbit"]}, "potential_angular_momentum": {"description": "Angular momentum (as an array of integers)", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "integer", "minimum": 0}}, "potential_r_exponents": {"description": "Exponents of the r term", "type": "array", "minItems": 1, "items": {"type": "integer"}}, "potential_gaussian_exponents": {"description": "Exponents of the gaussian term", "type": "array", "minItems": 1, "items": {"type": "string"}}, "potential_coefficients": {"description": "General contraction coefficients for this contracted shell", "type": "array", "minItems": 1, "items": {"description": "Segmented contraction coefficients", "type": "array", "minItems": 1, "items": {"type": "string"}}}}}, "basis_single_data": {"description": "Data for a single atom/center in the basis set", "type": "object", "additionalProperties": false, "properties": {"element_electron_shells": {"description": "(Electronic) shells for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_electron_shell"}}, "element_ecp_electrons": {"description": "Number of electrons replaced by ECP", "type": "integer", "minimum": 1}, "element_ecp": {"description": "Effective Core Potential for this element", "type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/definitions/basis_ecp_potential"}}}}, "basis_spec": {"description": "Specification for a basis applied to a molecule", "type": "object", "additionalProperties": false, "properties": {"basis_set_description": {"description": "Brief description of the basis set", "type": "string"}, "basis_function_type": {"description": "Type of function for this basis", "type": "string", "enum": ["gto", "sto"]}, "basis_harmonic_type": {"description": "Harmonic type (spherical, cartesian)", "type": "string", "enum": ["spherical", "cartesian"]}, "basis_set_elements": {"description": "Per-element basis data", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}, "basis_set_atoms": {"description": "Basis set overrides for particular atoms or centers", "type": "object", "additionalProperties": false, "patternProperties": {"^\\d+$": {"$ref": "#/definitions/basis_single_data"}}}}}}} \ No newline at end of file diff --git a/qcschema/v1_5/generate.py b/qcschema/v1_5/generate.py index 4989f79..9259c4c 100644 --- a/qcschema/v1_5/generate.py +++ b/qcschema/v1_5/generate.py @@ -11,9 +11,9 @@ python -m qcschema.v1_5.generate Output: - - qcschema/v1_5/schemas/qc_schema_input.schema - - qcschema/v1_5/schemas/qc_schema_molecule.schema - - qcschema/v1_5/schemas/qc_schema_output.schema + - qcschema/v1_5/schemas/qcschema_input.schema + - qcschema/v1_5/schemas/qcschema_molecule.schema + - qcschema/v1_5/schemas/qcschema_output.schema """ import copy @@ -206,17 +206,17 @@ def write_schemas(schemas, schema_dir=None): # Write each schema try: - write_schema(schemas["input"], schema_dir / "qc_schema_input.schema") + write_schema(schemas["input"], schema_dir / "qcschema_input.schema") except Exception as e: raise RuntimeError(f"Failed to write input schema: {e}") from e try: - write_schema(schemas["output"], schema_dir / "qc_schema_output.schema") + write_schema(schemas["output"], schema_dir / "qcschema_output.schema") except Exception as e: raise RuntimeError(f"Failed to write output schema: {e}") from e try: - write_schema(schemas["molecule"], schema_dir / "qc_schema_molecule.schema") + write_schema(schemas["molecule"], schema_dir / "qcschema_molecule.schema") except Exception as e: raise RuntimeError(f"Failed to write molecule schema: {e}") from e diff --git a/qcschema/v1_5/schemas/qc_schema_input.schema b/qcschema/v1_5/schemas/qcschema_input.schema similarity index 100% rename from qcschema/v1_5/schemas/qc_schema_input.schema rename to qcschema/v1_5/schemas/qcschema_input.schema diff --git a/qcschema/v1_5/schemas/qc_schema_molecule.schema b/qcschema/v1_5/schemas/qcschema_molecule.schema similarity index 100% rename from qcschema/v1_5/schemas/qc_schema_molecule.schema rename to qcschema/v1_5/schemas/qcschema_molecule.schema diff --git a/qcschema/v1_5/schemas/qc_schema_output.schema b/qcschema/v1_5/schemas/qcschema_output.schema similarity index 100% rename from qcschema/v1_5/schemas/qc_schema_output.schema rename to qcschema/v1_5/schemas/qcschema_output.schema diff --git a/qcschema/versions.py b/qcschema/versions.py index 3176fc4..07fe87c 100644 --- a/qcschema/versions.py +++ b/qcschema/versions.py @@ -173,8 +173,8 @@ def get_schema(schema_type, version="1.5"): schemas_dir = version_dir / "schemas" # Find the schema file for this type - # Filenames are qc_schema_* - schema_file = schemas_dir / f"qc_schema_{schema_key}.schema" + # Filenames are qcschema_* + schema_file = schemas_dir / f"qcschema_{schema_key}.schema" if not schema_file.exists(): raise FileNotFoundError( diff --git a/tests/basis/waterZr_energy_B3LYP_STO3G_DEF2_input.json b/tests/basis/waterZr_energy_B3LYP_STO3G_DEF2_input.json index 5864519..799cb0a 100644 --- a/tests/basis/waterZr_energy_B3LYP_STO3G_DEF2_input.json +++ b/tests/basis/waterZr_energy_B3LYP_STO3G_DEF2_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 2, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/basis/water_energy_B3LYP_631G_input.json b/tests/basis/water_energy_B3LYP_631G_input.json index b8a9fd0..6cd89a0 100644 --- a/tests/basis/water_energy_B3LYP_631G_input.json +++ b/tests/basis/water_energy_B3LYP_631G_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 2, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/input_failures/missing_molecule_symbols.json b/tests/input_failures/missing_molecule_symbols.json index 40e405b..554caa6 100644 --- a/tests/input_failures/missing_molecule_symbols.json +++ b/tests/input_failures/missing_molecule_symbols.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "geometry": [ diff --git a/tests/input_failures/multiplicity_float.json b/tests/input_failures/multiplicity_float.json index 67f29f8..725810b 100644 --- a/tests/input_failures/multiplicity_float.json +++ b/tests/input_failures/multiplicity_float.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "geometry": [ diff --git a/tests/output_failures/dipole_wrong_type.json b/tests/output_failures/dipole_wrong_type.json index 2178a8b..3222184 100644 --- a/tests/output_failures/dipole_wrong_type.json +++ b/tests/output_failures/dipole_wrong_type.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "provenance": { "creator": "My QM Program", diff --git a/tests/output_failures/unknown_property.json b/tests/output_failures/unknown_property.json index ba2d5cc..ff8ea1b 100644 --- a/tests/output_failures/unknown_property.json +++ b/tests/output_failures/unknown_property.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "provenance": { "creator": "My QM Program", diff --git a/tests/output_failures/wavefunction_basis_name.json b/tests/output_failures/wavefunction_basis_name.json index 87190e5..e4bd633 100644 --- a/tests/output_failures/wavefunction_basis_name.json +++ b/tests/output_failures/wavefunction_basis_name.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/output_failures/wavefunction_missing_basis.json b/tests/output_failures/wavefunction_missing_basis.json index 53f1be4..2aa94d0 100644 --- a/tests/output_failures/wavefunction_missing_basis.json +++ b/tests/output_failures/wavefunction_missing_basis.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/he2_energy_VV10_input.json b/tests/simple/he2_energy_VV10_input.json index 48154e1..ac844b3 100644 --- a/tests/simple/he2_energy_VV10_input.json +++ b/tests/simple/he2_energy_VV10_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/he2_energy_VV10_output.json b/tests/simple/he2_energy_VV10_output.json index aff4a0b..6cbcbad 100644 --- a/tests/simple/he2_energy_VV10_output.json +++ b/tests/simple/he2_energy_VV10_output.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_B3LYP_input.json b/tests/simple/water_energy_B3LYP_input.json index 670d500..62fa0ea 100644 --- a/tests/simple/water_energy_B3LYP_input.json +++ b/tests/simple/water_energy_B3LYP_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_B3LYP_output.json b/tests/simple/water_energy_B3LYP_output.json index 27992aa..58e8d85 100644 --- a/tests/simple/water_energy_B3LYP_output.json +++ b/tests/simple/water_energy_B3LYP_output.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_CCSD_PRT_PR_input.json b/tests/simple/water_energy_CCSD_PRT_PR_input.json index 17a2c5e..baf97b3 100644 --- a/tests/simple/water_energy_CCSD_PRT_PR_input.json +++ b/tests/simple/water_energy_CCSD_PRT_PR_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_CCSD_PRT_PR_output.json b/tests/simple/water_energy_CCSD_PRT_PR_output.json index 3c4bddf..8dd3810 100644 --- a/tests/simple/water_energy_CCSD_PRT_PR_output.json +++ b/tests/simple/water_energy_CCSD_PRT_PR_output.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 2, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_CCSD_input.json b/tests/simple/water_energy_CCSD_input.json index bb2c9e3..51fe375 100644 --- a/tests/simple/water_energy_CCSD_input.json +++ b/tests/simple/water_energy_CCSD_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_CCSD_output.json b/tests/simple/water_energy_CCSD_output.json index 9fd277c..45db892 100644 --- a/tests/simple/water_energy_CCSD_output.json +++ b/tests/simple/water_energy_CCSD_output.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 2, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_MP2_input.json b/tests/simple/water_energy_MP2_input.json index b226503..b3753a2 100644 --- a/tests/simple/water_energy_MP2_input.json +++ b/tests/simple/water_energy_MP2_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_energy_MP2_output.json b/tests/simple/water_energy_MP2_output.json index 7a8cf87..6b2bcb5 100644 --- a/tests/simple/water_energy_MP2_output.json +++ b/tests/simple/water_energy_MP2_output.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 2, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_gradient_HF_input.json b/tests/simple/water_gradient_HF_input.json index 62c5c19..fbb6f42 100644 --- a/tests/simple/water_gradient_HF_input.json +++ b/tests/simple/water_gradient_HF_input.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_input", + "schema_name": "qcschema_input", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/simple/water_gradient_HF_output.json b/tests/simple/water_gradient_HF_output.json index ff83f28..7c7dcc4 100644 --- a/tests/simple/water_gradient_HF_output.json +++ b/tests/simple/water_gradient_HF_output.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/test_packaging.py b/tests/test_packaging.py index 7e55698..2d6ebc2 100644 --- a/tests/test_packaging.py +++ b/tests/test_packaging.py @@ -66,12 +66,12 @@ def test_schema_files_in_wheel(tmp_path): # Check wheel contents for schema files expected_schemas = { - "qcschema/v1/schemas/qc_schema_input.schema", - "qcschema/v1/schemas/qc_schema_molecule.schema", - "qcschema/v1/schemas/qc_schema_output.schema", - "qcschema/v1_5/schemas/qc_schema_input.schema", - "qcschema/v1_5/schemas/qc_schema_molecule.schema", - "qcschema/v1_5/schemas/qc_schema_output.schema", + "qcschema/v1/schemas/qcschema_input.schema", + "qcschema/v1/schemas/qcschema_molecule.schema", + "qcschema/v1/schemas/qcschema_output.schema", + "qcschema/v1_5/schemas/qcschema_input.schema", + "qcschema/v1_5/schemas/qcschema_molecule.schema", + "qcschema/v1_5/schemas/qcschema_output.schema", } with zipfile.ZipFile(whl_path, "r") as whl: diff --git a/tests/test_qcelemental_schemas.py b/tests/test_qcelemental_schemas.py index 4c381b3..7ca899b 100644 --- a/tests/test_qcelemental_schemas.py +++ b/tests/test_qcelemental_schemas.py @@ -3,7 +3,7 @@ Tests that qcelemental-specific schemas can be loaded and used for validation. Note: qcelemental uses different schema_name conventions than the original -qcschema (e.g., "qcschema_output" vs "qc_schema_output"), so this test file +qcschema (e.g., "qcschema_output" vs "qcschema_output"), so this test file uses qcelemental-appropriate data rather than the qcschema test fixtures. """ diff --git a/tests/wavefunction/water_output.json b/tests/wavefunction/water_output.json index 7175b1d..c6151a7 100644 --- a/tests/wavefunction/water_output.json +++ b/tests/wavefunction/water_output.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 1, "molecule": { "schema_name": "qcschema_molecule", diff --git a/tests/wavefunction/water_output_v3.json b/tests/wavefunction/water_output_v3.json index c594abf..faa9a69 100644 --- a/tests/wavefunction/water_output_v3.json +++ b/tests/wavefunction/water_output_v3.json @@ -1,5 +1,5 @@ { - "schema_name": "qc_schema_output", + "schema_name": "qcschema_output", "schema_version": 3, "molecule": { "schema_name": "qcschema_molecule", From 47f32f5cc7360c1d586252a766d1e4d6c3c5a519 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Thu, 6 Aug 2026 11:57:41 -0400 Subject: [PATCH 12/14] resolve testing --- qcschema/qcelemental_v2/generate.py | 78 +- .../schemas/AtomicProperties.schema | 4 - .../schemas/OptimizationProperties.schema | 124 ++- .../schemas/WavefunctionProperties.schema | 868 +++++++++++++++++- .../schemas/qcschema_molecule.schema | 86 +- .../schemas/qcschema_properties.schema | 700 ++++++++++++++ tests/test_qcelemental_schemas.py | 75 +- 7 files changed, 1902 insertions(+), 33 deletions(-) delete mode 100644 qcschema/qcelemental_v2/schemas/AtomicProperties.schema create mode 100644 qcschema/qcelemental_v2/schemas/qcschema_properties.schema diff --git a/qcschema/qcelemental_v2/generate.py b/qcschema/qcelemental_v2/generate.py index 15e9deb..b2588cc 100644 --- a/qcschema/qcelemental_v2/generate.py +++ b/qcschema/qcelemental_v2/generate.py @@ -135,6 +135,7 @@ def _get_output_filename(model_name): "Molecule": "molecule", "BasisSet": "basis", "AtomicResultProperties": "properties", + "AtomicProperties": "properties", "Provenance": "provenance", } @@ -147,15 +148,88 @@ def _get_output_filename(model_name): return f"{model_name}.schema" +def _build_schema_from_fields(model_class): + """Build a JSON schema from pydantic model fields when automatic generation fails. + + This is a fallback when model_json_schema() fails due to custom handler bugs. + Generates a basic schema with all fields listed, but without full type information. + """ + schema = {"title": model_class.__name__, "type": "object", "properties": {}, "required": []} + + if not hasattr(model_class, "model_fields"): + raise AttributeError(f"{model_class.__name__} has no model_fields") + + for field_name, field_info in model_class.model_fields.items(): + # Add field to properties (minimal type info) + schema["properties"][field_name] = {"title": field_name.replace("_", " ").title()} + # Track required fields + if field_info.is_required(): + schema["required"].append(field_name) + + return schema + + def _get_schema(model_class): """Get JSON schema from a pydantic v2 model using model_json_schema(). Requires pydantic v2 API. Does not fall back to pydantic v1 schema(). - Uses mode="serialization" to respect custom serializers from qcelemental. + + Tries validation mode first (most complete), falls back to serialization mode. + Some models like Molecule have bugs in validation schema generation due to + custom numpy dtype handlers. Falls back to building schema from model_fields. + + Always tries to populate title from model class name if missing. + + Raises exceptions explicitly - no silent fallbacks. If all attempts fail, + errors are reported in generate_schemas() with clear messaging. """ if not hasattr(model_class, "model_json_schema"): raise AttributeError(f"{model_class.__name__} does not have model_json_schema() method (pydantic v2 required)") - return model_class.model_json_schema(mode="serialization") + + validation_error = None + serialization_error = None + + # Try validation mode first (most complete) + try: + schema = model_class.model_json_schema(mode="validation") + # Ensure schema has a title + if "title" not in schema: + schema["title"] = model_class.__name__ + return schema + except Exception as e: + validation_error = e + + # Fall back to serialization mode if validation fails + try: + schema = model_class.model_json_schema(mode="serialization") + # Ensure schema has a title + if "title" not in schema: + schema["title"] = model_class.__name__ + # Check if we got a meaningful schema (has properties) + if "properties" in schema or "$defs" in schema or "type" in schema and schema["type"] != "object": + return schema + # Otherwise fall through to field-based approach + except Exception as e: + serialization_error = e + + # Last resort: build from model fields + # This is triggered when model_json_schema fails due to custom handler bugs + # (like qcelemental's numpy dtype handlers) + try: + schema = _build_schema_from_fields(model_class) + # Add a note that this was generated from fields + schema["description"] = ( + f"{model_class.__name__} schema generated from model fields (automatic schema generation failed)" + ) + return schema + except Exception as field_error: + # All attempts failed - raise with full context + raise RuntimeError( + f"{model_class.__name__}: All schema generation attempts failed. " + f"Validation error: {validation_error}. " + f"Serialization error: {serialization_error}. " + f"Field-based fallback error: {field_error}" + ) from field_error def generate_schemas(output_dir=None): diff --git a/qcschema/qcelemental_v2/schemas/AtomicProperties.schema b/qcschema/qcelemental_v2/schemas/AtomicProperties.schema deleted file mode 100644 index ca11ede..0000000 --- a/qcschema/qcelemental_v2/schemas/AtomicProperties.schema +++ /dev/null @@ -1,4 +0,0 @@ -{ - "additionalProperties": true, - "type": "object" -} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema b/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema index ca11ede..85fabf8 100644 --- a/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema +++ b/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema @@ -1,4 +1,126 @@ { - "additionalProperties": true, + "additionalProperties": false, + "description": "Named properties of geometry optimization computations following the MolSSI QCSchema.", + "properties": { + "schema_name": { + "const": "qcschema_optimization_properties", + "default": "qcschema_optimization_properties", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "nuclear_repulsion_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The nuclear repulsion energy.", + "title": "Nuclear Repulsion Energy" + }, + "return_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The energy of the final optimized molecule. Always available. Identical to the final :attr:`~qcelemental.models.OptimizationResult.trajectory_properties.return_energy`.", + "title": "Return Energy", + "units": "E_h" + }, + "return_gradient": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The gradient of the final optimized molecule. Always available. Identical to :attr:`~qcelemental.models.OptimizationResult.trajectory_properties.return_gradient`.", + "shape": [ + "nat", + 3 + ], + "title": "Return Gradient", + "units": "E_h/a0" + }, + "optimization_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of geometry iterations taken before convergence.", + "title": "Optimization Iterations" + }, + "final_max_force": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Final Max Force" + }, + "final_rms_force": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The final RMS gradient of the molecule in Hartrees/Bohr.", + "title": "Final Rms Force", + "units": "E_h/a0" + }, + "final_max_displacement": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Final Max Displacement" + }, + "final_rms_displacement": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Final Rms Displacement" + } + }, + "title": "OptimizationProperties", "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema b/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema index ca11ede..5fc25e5 100644 --- a/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema +++ b/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema @@ -1,4 +1,870 @@ { - "additionalProperties": true, + "$defs": { + "BasisCenter": { + "additionalProperties": false, + "description": "Data for a single atom/center in a basis set.", + "properties": { + "electron_shells": { + "description": "Electronic shells for this center.", + "items": { + "$ref": "#/$defs/ElectronShell" + }, + "minItems": 1, + "title": "Electron Shells", + "type": "array", + "uniqueItems": true + }, + "ecp_electrons": { + "default": 0, + "description": "Number of electrons replaced by ECP, MCP, or other field potentials.", + "title": "Ecp Electrons", + "type": "integer" + }, + "ecp_potentials": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ECPPotential" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ECPs, MCPs, or other field potentials for this center.", + "title": "Ecp Potentials", + "uniqueItems": true + } + }, + "required": [ + "electron_shells" + ], + "title": "BasisCenter", + "type": "object" + }, + "BasisSet": { + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A quantum chemistry basis description.", + "properties": { + "schema_name": { + "const": "qcschema_basis_set", + "default": "qcschema_basis_set", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "schema_version": { + "const": 2, + "default": 2, + "description": "The version number of :attr:`~qcelemental.models.BasisSet.schema_name` to which this model conforms.", + "title": "Schema Version", + "type": "integer" + }, + "name": { + "description": "The standard basis name if available (e.g., 'cc-pVDZ').", + "title": "Name", + "type": "string" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Brief description of the basis set.", + "title": "Description" + }, + "center_data": { + "additionalProperties": { + "$ref": "#/$defs/BasisCenter" + }, + "description": "Shared basis data for all atoms/centers in the parent molecule", + "title": "Center Data", + "type": "object" + }, + "atom_map": { + "description": "Mapping of all atoms/centers in the parent molecule to centers in ``center_data``.", + "items": { + "type": "string" + }, + "title": "Atom Map", + "type": "array" + }, + "nbf": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions. Use for convenience or as checksum", + "title": "Nbf" + } + }, + "required": [ + "name", + "center_data", + "atom_map" + ], + "title": "BasisSet", + "type": "object" + }, + "ECPPotential": { + "additionalProperties": false, + "description": "Information for a single ECP potential.", + "properties": { + "ecp_type": { + "$ref": "#/$defs/ECPType" + }, + "angular_momentum": { + "description": "Angular momentum for the potential as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "r_exponents": { + "description": "Exponents of the 'r' term.", + "items": { + "type": "integer" + }, + "minItems": 1, + "title": "R Exponents", + "type": "array" + }, + "gaussian_exponents": { + "description": "Exponents of the 'gaussian' term.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Gaussian Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the potential; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "ecp_type", + "angular_momentum", + "r_exponents", + "gaussian_exponents", + "coefficients" + ], + "title": "ECPPotential", + "type": "object" + }, + "ECPType": { + "description": "The type of the ECP potential.", + "enum": [ + "scalar", + "spinorbit" + ], + "title": "ECPType", + "type": "string" + }, + "ElectronShell": { + "additionalProperties": false, + "description": "Information for a single electronic shell.", + "properties": { + "angular_momentum": { + "description": "Angular momentum for the shell as an array of integers.", + "items": { + "minimum": 0, + "type": "integer" + }, + "minItems": 1, + "title": "Angular Momentum", + "type": "array", + "uniqueItems": true + }, + "harmonic_type": { + "$ref": "#/$defs/HarmonicType" + }, + "exponents": { + "description": "Exponents for the contracted shell.", + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "title": "Exponents", + "type": "array" + }, + "coefficients": { + "description": "General contraction coefficients for the shell; individual list components will be the individual segment contraction coefficients.", + "items": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "minItems": 1, + "title": "Coefficients", + "type": "array" + } + }, + "required": [ + "angular_momentum", + "harmonic_type", + "exponents", + "coefficients" + ], + "title": "ElectronShell", + "type": "object" + }, + "HarmonicType": { + "description": "The angular momentum representation of a shell.", + "enum": [ + "spherical", + "cartesian" + ], + "title": "HarmonicType", + "type": "string" + } + }, + "additionalProperties": false, + "description": "Wavefunction properties resulting from a computation.\nMatrix quantities are stored in column-major order. Presence and contents configurable by protocol.", + "properties": { + "schema_name": { + "const": "qcschema_wavefunction_properties", + "default": "qcschema_wavefunction_properties", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "basis": { + "$ref": "#/$defs/BasisSet", + "description": "\n A quantum chemistry basis description.\n " + }, + "restricted": { + "description": "If the computation was restricted or not (alpha == beta). If True, all beta quantities are skipped.", + "title": "Restricted", + "type": "boolean" + }, + "h_core_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Alpha-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "H Core A" + }, + "h_core_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Beta-spin core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "H Core B" + }, + "h_effective_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Alpha-spin effective core (one-electron) Hamiltonian in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "H Effective A" + }, + "h_effective_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Beta-spin effective core (one-electron) Hamiltonian in the AO basis", + "shape": [ + "nao", + "nao" + ], + "title": "H Effective B" + }, + "scf_orbitals_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF alpha-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "title": "Scf Orbitals A" + }, + "scf_orbitals_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF beta-spin orbitals in the AO basis.", + "shape": [ + "nao", + "nmo" + ], + "title": "Scf Orbitals B" + }, + "scf_density_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF alpha-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Density A" + }, + "scf_density_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF beta-spin density matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Density B" + }, + "scf_fock_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF alpha-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Fock A" + }, + "scf_fock_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF beta-spin Fock matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Fock B" + }, + "scf_eigenvalues_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF alpha-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "title": "Scf Eigenvalues A" + }, + "scf_eigenvalues_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF beta-spin orbital eigenvalues.", + "shape": [ + "nmo" + ], + "title": "Scf Eigenvalues B" + }, + "scf_occupations_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF alpha-spin orbital occupations.", + "shape": [ + "nmo" + ], + "title": "Scf Occupations A" + }, + "scf_occupations_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF beta-spin orbital occupations.", + "shape": [ + "nmo" + ], + "title": "Scf Occupations B" + }, + "scf_coulomb_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF alpha-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Coulomb A" + }, + "scf_coulomb_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF beta-spin Coulomb matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Coulomb B" + }, + "scf_exchange_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF alpha-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Exchange A" + }, + "scf_exchange_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "SCF beta-spin exchange matrix in the AO basis.", + "shape": [ + "nao", + "nao" + ], + "title": "Scf Exchange B" + }, + "localized_orbitals_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Localized alpha-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "title": "Localized Orbitals A" + }, + "localized_orbitals_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Localized beta-spin orbitals in the AO basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nao", + "nmo" + ], + "title": "Localized Orbitals B" + }, + "localized_fock_a": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Alpha-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "title": "Localized Fock A" + }, + "localized_fock_b": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Beta-spin Fock matrix in the localized molecular orbital basis. All nmo orbitals are included, even if only a subset were localized.", + "shape": [ + "nmo", + "nmo" + ], + "title": "Localized Fock B" + }, + "orbitals_a": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the alpha-spin orbitals of the primary return.", + "title": "Orbitals A" + }, + "orbitals_b": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the beta-spin orbitals of the primary return.", + "title": "Orbitals B" + }, + "density_a": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the alpha-spin density of the primary return.", + "title": "Density A" + }, + "density_b": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the beta-spin density of the primary return.", + "title": "Density B" + }, + "fock_a": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the alpha-spin Fock matrix of the primary return.", + "title": "Fock A" + }, + "fock_b": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the beta-spin Fock matrix of the primary return.", + "title": "Fock B" + }, + "eigenvalues_a": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the alpha-spin orbital eigenvalues of the primary return.", + "title": "Eigenvalues A" + }, + "eigenvalues_b": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the beta-spin orbital eigenvalues of the primary return.", + "title": "Eigenvalues B" + }, + "occupations_a": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the alpha-spin orbital occupations of the primary return.", + "title": "Occupations A" + }, + "occupations_b": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Index to the beta-spin orbital occupations of the primary return.", + "title": "Occupations B" + } + }, + "required": [ + "basis", + "restricted" + ], + "title": "WavefunctionProperties", "type": "object" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema b/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema index ca11ede..9e5553b 100644 --- a/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema +++ b/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema @@ -1,4 +1,86 @@ { - "additionalProperties": true, - "type": "object" + "title": "Molecule", + "type": "object", + "properties": { + "schema_name": { + "title": "Schema Name" + }, + "schema_version": { + "title": "Schema Version" + }, + "validated": { + "title": "Validated" + }, + "symbols": { + "title": "Symbols" + }, + "geometry": { + "title": "Geometry" + }, + "name": { + "title": "Name" + }, + "identifiers": { + "title": "Identifiers" + }, + "comment": { + "title": "Comment" + }, + "molecular_charge": { + "title": "Molecular Charge" + }, + "molecular_multiplicity": { + "title": "Molecular Multiplicity" + }, + "masses_": { + "title": "Masses " + }, + "real_": { + "title": "Real " + }, + "atom_labels_": { + "title": "Atom Labels " + }, + "atomic_numbers_": { + "title": "Atomic Numbers " + }, + "mass_numbers_": { + "title": "Mass Numbers " + }, + "connectivity": { + "title": "Connectivity" + }, + "fragments_": { + "title": "Fragments " + }, + "fragment_charges_": { + "title": "Fragment Charges " + }, + "fragment_multiplicities_": { + "title": "Fragment Multiplicities " + }, + "fix_com": { + "title": "Fix Com" + }, + "fix_orientation": { + "title": "Fix Orientation" + }, + "fix_symmetry": { + "title": "Fix Symmetry" + }, + "provenance": { + "title": "Provenance" + }, + "id": { + "title": "Id" + }, + "extras": { + "title": "Extras" + } + }, + "required": [ + "symbols", + "geometry" + ], + "description": "Molecule schema generated from model fields (automatic schema generation failed)" } \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qcschema_properties.schema b/qcschema/qcelemental_v2/schemas/qcschema_properties.schema new file mode 100644 index 0000000..5c1c32d --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qcschema_properties.schema @@ -0,0 +1,700 @@ +{ + "additionalProperties": false, + "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\nAll arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n\n* nao: number of atomic orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nbasis`\n* nmo: number of molecular orbitals = :attr:`~qcelemental.models.AtomicProperties.calcinfo_nmo`", + "properties": { + "schema_name": { + "const": "qcschema_atomic_properties", + "default": "qcschema_atomic_properties", + "description": "The QCSchema specification to which this model conforms.", + "title": "Schema Name", + "type": "string" + }, + "calcinfo_nbasis": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of basis functions for the computation.", + "title": "Calcinfo Nbasis" + }, + "calcinfo_nmo": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of molecular orbitals for the computation.", + "title": "Calcinfo Nmo" + }, + "calcinfo_nalpha": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of alpha electrons in the computation.", + "title": "Calcinfo Nalpha" + }, + "calcinfo_nbeta": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of beta electrons in the computation.", + "title": "Calcinfo Nbeta" + }, + "calcinfo_natom": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of atoms in the computation.", + "title": "Calcinfo Natom" + }, + "nuclear_repulsion_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The nuclear repulsion energy.", + "title": "Nuclear Repulsion Energy" + }, + "return_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The energy of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.energy` computations.", + "title": "Return Energy" + }, + "return_gradient": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The gradient of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.gradient` computations.", + "title": "Return Gradient", + "units": "E_h/a0" + }, + "return_hessian": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The Hessian of the requested method, identical to :attr:`~qcelemental.models.AtomicResult.return_result` for :attr:`~qcelemental.models.AtomicInput.driver`\\ =\\ :attr:`~qcelemental.models.DriverEnum.hessian` computations.", + "title": "Return Hessian", + "units": "E_h/a0^2" + }, + "scf_one_electron_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", + "title": "Scf One Electron Energy", + "units": "E_h" + }, + "scf_two_electron_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The two-electron energy contribution to the total SCF energy.", + "title": "Scf Two Electron Energy", + "units": "E_h" + }, + "scf_vv10_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The VV10 functional energy contribution to the total SCF energy.", + "title": "Scf Vv10 Energy", + "units": "E_h" + }, + "scf_xc_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The functional (XC) energy contribution to the total SCF energy.", + "title": "Scf Xc Energy", + "units": "E_h" + }, + "scf_dispersion_correction_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The dispersion correction appended to an underlying functional when a DFT-D method is requested.", + "title": "Scf Dispersion Correction Energy", + "units": "E_h" + }, + "scf_dipole_moment": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The SCF X, Y, and Z dipole components", + "title": "Scf Dipole Moment", + "units": "e a0" + }, + "scf_quadrupole_moment": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quadrupole components (redundant; 6 unique).", + "shape": [ + 3, + 3 + ], + "title": "Scf Quadrupole Moment", + "units": "e a0^2" + }, + "scf_total_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total electronic energy of the SCF stage of the calculation.", + "title": "Scf Total Energy", + "units": "E_h" + }, + "scf_total_gradient": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total electronic gradient of the SCF stage of the calculation.", + "title": "Scf Total Gradient", + "units": "E_h/a0" + }, + "scf_total_hessian": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total electronic Hessian of the SCF stage of the calculation.", + "title": "Scf Total Hessian", + "units": "E_h/a0^2" + }, + "scf_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of SCF iterations taken before convergence.", + "title": "Scf Iterations" + }, + "mp2_same_spin_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "title": "Mp2 Same Spin Correlation Energy", + "units": "E_h" + }, + "mp2_opposite_spin_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "title": "Mp2 Opposite Spin Correlation Energy", + "units": "E_h" + }, + "mp2_singles_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The singles portion of the MP2 correlation energy. Zero except in ROHF.", + "title": "Mp2 Singles Energy", + "units": "E_h" + }, + "mp2_doubles_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.", + "title": "Mp2 Doubles Energy", + "units": "E_h" + }, + "mp2_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The MP2 correlation energy.", + "title": "Mp2 Correlation Energy", + "units": "E_h" + }, + "mp2_total_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total MP2 energy (MP2 correlation energy + HF energy).", + "title": "Mp2 Total Energy", + "units": "E_h" + }, + "mp2_dipole_moment": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The MP2 X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "title": "Mp2 Dipole Moment", + "units": "e a0" + }, + "ccsd_same_spin_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.", + "title": "Ccsd Same Spin Correlation Energy", + "units": "E_h" + }, + "ccsd_opposite_spin_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.", + "title": "Ccsd Opposite Spin Correlation Energy", + "units": "E_h" + }, + "ccsd_singles_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The singles portion of the CCSD correlation energy. Zero except in ROHF.", + "title": "Ccsd Singles Energy", + "units": "E_h" + }, + "ccsd_doubles_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.", + "title": "Ccsd Doubles Energy", + "units": "E_h" + }, + "ccsd_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSD correlation energy.", + "title": "Ccsd Correlation Energy", + "units": "E_h" + }, + "ccsd_total_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total CCSD energy (CCSD correlation energy + HF energy).", + "title": "Ccsd Total Energy", + "units": "E_h" + }, + "ccsd_dipole_moment": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSD X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "title": "Ccsd Dipole Moment", + "units": "e a0" + }, + "ccsd_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of CCSD iterations taken before convergence.", + "title": "Ccsd Iterations" + }, + "ccsd_prt_pr_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSD(T) correlation energy.", + "title": "Ccsd Prt Pr Correlation Energy", + "units": "E_h" + }, + "ccsd_prt_pr_total_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).", + "title": "Ccsd Prt Pr Total Energy", + "units": "E_h" + }, + "ccsd_prt_pr_dipole_moment": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSD(T) X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "title": "Ccsd Prt Pr Dipole Moment", + "units": "e a0" + }, + "ccsdt_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSDT correlation energy.", + "title": "Ccsdt Correlation Energy", + "units": "E_h" + }, + "ccsdt_total_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total CCSDT energy (CCSDT correlation energy + HF energy).", + "title": "Ccsdt Total Energy", + "units": "E_h" + }, + "ccsdt_dipole_moment": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSDT X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "title": "Ccsdt Dipole Moment", + "units": "e a0" + }, + "ccsdt_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of CCSDT iterations taken before convergence.", + "title": "Ccsdt Iterations" + }, + "ccsdtq_correlation_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSDTQ correlation energy.", + "title": "Ccsdtq Correlation Energy", + "units": "E_h" + }, + "ccsdtq_total_energy": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).", + "title": "Ccsdtq Total Energy", + "units": "E_h" + }, + "ccsdtq_dipole_moment": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The CCSDTQ X, Y, and Z dipole components.", + "shape": [ + 3 + ], + "title": "Ccsdtq Dipole Moment", + "units": "e a0" + }, + "ccsdtq_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of CCSDTQ iterations taken before convergence.", + "title": "Ccsdtq Iterations" + } + }, + "title": "AtomicProperties", + "type": "object" +} \ No newline at end of file diff --git a/tests/test_qcelemental_schemas.py b/tests/test_qcelemental_schemas.py index 7ca899b..719e42b 100644 --- a/tests/test_qcelemental_schemas.py +++ b/tests/test_qcelemental_schemas.py @@ -19,14 +19,24 @@ class TestQCElementalSchemas: def test_schema_discovery(self, version): """Verify qcelemental versions are discoverable.""" - for schema_type in ["molecule", "input", "output", "basis", "properties", "provenance"]: + # These are the canonical types that should be available + required_types = ["molecule", "input", "output", "basis", "properties", "provenance"] + missing_types = [] + + for schema_type in required_types: try: schema = qcschema.get_schema(schema_type, version) - assert isinstance(schema, dict) - assert "$schema" in schema or "properties" in schema or "title" in schema - except KeyError: - # Some types may not be in all versions, that's OK - pass + assert isinstance(schema, dict), f"{schema_type}: schema is not dict" + assert ( + "$schema" in schema or "properties" in schema or "title" in schema + ), f"{schema_type}: schema missing required fields ($schema, properties, or title)" + except KeyError as e: + missing_types.append((schema_type, str(e))) + + # Report any missing types explicitly (no silent skipping) + if missing_types: + missing_str = ", ".join([f"{t} ({e})" for t, e in missing_types]) + raise AssertionError(f"{version} missing schema types: {missing_str}") def test_molecule_schema_loading(self, version): """Test that Molecule schema can be loaded.""" @@ -82,23 +92,42 @@ def test_minimal_molecule_validation(self, version): validator.validate(molecule) def test_minimal_atomic_input_validation(self, version): - """Test validation of minimal AtomicInput using qcelemental schema.""" + """Test validation of minimal AtomicInput using qcelemental schema. + + Uses simple, non-manybody test data appropriate for each version. + """ schema = qcschema.get_schema("input", version) - atomic_input = { - "schema_name": "qcschema_input", - "schema_version": 1, - "molecule": { - "schema_name": "qcschema_molecule", - "schema_version": 2, - "symbols": ["H", "H"], - "geometry": [0.0, 0.0, 0.0, 0.0, 0.0, 1.0], - }, - "driver": "energy", - "model": {"method": "HF", "basis": "sto-3g"}, - "keywords": {}, + molecule = { + "schema_name": "qcschema_molecule", + "schema_version": 2, + "symbols": ["H", "H"], + "geometry": [0.0, 0.0, 0.0, 0.0, 0.0, 1.0], } + if version == "qcelemental.v1": + # v1 format: driver/model/keywords at top level + atomic_input = { + "schema_name": "qcschema_input", + "schema_version": 1, + "molecule": molecule, + "driver": "energy", + "model": {"method": "HF", "basis": "sto-3g"}, + "keywords": {}, + } + else: + # v2 format: driver/model inside specification + atomic_input = { + "schema_name": "qcschema_input", + "schema_version": 2, + "molecule": molecule, + "specification": { + "schema_name": "qcschema_atomic_specification", + "driver": "energy", + "model": {"method": "HF", "basis": "sto-3g"}, + }, + } + validator = Draft4Validator(schema) validator.validate(atomic_input) @@ -126,11 +155,11 @@ def test_all_canonical_types_available(self): def test_schema_validator_available(self): """Test that validators can be obtained for qcelemental versions.""" - from qcschema.qcelemental_v1 import utils as v1_utils - from qcschema.qcelemental_v2 import utils as v2_utils + from qcschema.qcelemental_v1 import generate as v1_generate + from qcschema.qcelemental_v2 import generate as v2_generate - v1_validator = v1_utils.get_validator() - v2_validator = v2_utils.get_validator() + v1_validator = v1_generate.get_validator() + v2_validator = v2_generate.get_validator() # Both should return Draft4Validator (for now) assert v1_validator is Draft4Validator From 4b8f086f1660014f6805fc1758c5138918b0855b Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Thu, 6 Aug 2026 13:38:42 -0400 Subject: [PATCH 13/14] Add test dependencies --- .github/workflows/tests.yml | 3 +-- pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4633503..0a8fce7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,8 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest jsonschema - pip install -e . + pip install -e ".[tests]" - name: Test with pytest run: make test diff --git a/pyproject.toml b/pyproject.toml index 806a115..c92a975 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,8 @@ docs = [ ] tests = [ "pytest", + "qcelemental", + "qcmanybody", ] [project.urls] From 558e9b0749ec380543905629e53ed2a6eb630626 Mon Sep 17 00:00:00 2001 From: jaclark5 Date: Thu, 6 Aug 2026 13:50:02 -0400 Subject: [PATCH 14/14] fix python versions --- .github/workflows/tests.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a8fce7..d388824 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.11", "3.12", "3.13", "3.14"] + python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index c92a975..bd56a09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "qcschema" version = "1" description = "A schema for quantum chemistry" readme = "README.md" -requires-python = ">3.11" +requires-python = ">=3.11" dependencies = [ "jsonschema", "pathlib2; python_version < '3.5'",