diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4633503..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 @@ -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/.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/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/pyproject.toml b/pyproject.toml index 3577047..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'", @@ -22,26 +22,19 @@ docs = [ ] tests = [ "pytest", + "qcelemental", + "qcmanybody", ] [project.urls] 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 @@ -62,5 +55,13 @@ lint.ignore = [ [tool.ruff.lint.isort] known-first-party = ["qcschema"] -[tool.ruff.format] -line-length = 120 +[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/README.md b/qcschema/README.md new file mode 100644 index 0000000..db8243b --- /dev/null +++ b/qcschema/README.md @@ -0,0 +1,85 @@ +# 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` + - `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` + - 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. +v1.5 is the longstanding state of the QCSchema repo from 2020-2026. + +## 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/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/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/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/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/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/wavefunction/__init__.py b/qcschema/dev/wavefunction/__init__.py deleted file mode 100644 index 1f83c3b..0000000 --- a/qcschema/dev/wavefunction/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .wavefunction_base import output_wavefunction 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/__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 new file mode 100644 index 0000000..67a5f92 --- /dev/null +++ b/qcschema/qcelemental_v1/generate.py @@ -0,0 +1,169 @@ +#!/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). + +Errors on invalid or missing models — no silent skipping. + +Usage: + cd qcschema/qcelemental_v1 + python generate.py + +Output: + - schemas/.schema (JSON Schema files for each model) + +Dependencies: + - qcelemental (manual install required, not shipped) + - pydantic v1 +""" + +import inspect +import json +import sys +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(): + """Discover all pydantic BaseModel classes in qcelemental.models.""" + models = {} + + for name in dir(qcelemental.models): + if name.startswith("_"): + continue + + 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"): + # 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. + + 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 + 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"qcschema_{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: + raise RuntimeError("No pydantic models found in qcelemental.models") + + print(f"Found {len(models)} pydantic models") + + 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) + output_file = output_dir / filename + with open(output_file, "w") as f: + json.dump(schema, f, indent=2) + + print(f"✓ {model_name} → {output_file.name}") + except Exception as e: + 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 + + +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/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/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/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/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 new file mode 100644 index 0000000..fb71508 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/FailedOperation.schema @@ -0,0 +1,70 @@ +{ + "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.", + "default": {}, + "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/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 new file mode 100644 index 0000000..79cd7d1 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/OptimizationInput.schema @@ -0,0 +1,816 @@ +{ + "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, + "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.", + "default": { + "creator": "QCElemental", + "version": "0.50.5.dev2+g269420111", + "routine": "qcelemental.models.v1.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, + "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#" + } + } +} \ No newline at end of file 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 new file mode 100644 index 0000000..6d9e741 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/OptimizationResult.schema @@ -0,0 +1,1802 @@ +{ + "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, + "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, + "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#" + }, + "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#" + } + } +} \ No newline at end of file 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/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/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 new file mode 100644 index 0000000..f177984 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/Result.schema @@ -0,0 +1,1580 @@ +{ + "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.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#", + "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, + "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#" + }, + "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" + ] + }, + "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..0859c7d --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/ResultInput.schema @@ -0,0 +1,820 @@ +{ + "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, + "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" + } + ] + } + }, + "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, + "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#" + }, + "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" + ] + }, + "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/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/qcschema_basis.schema b/qcschema/qcelemental_v1/schemas/qcschema_basis.schema new file mode 100644 index 0000000..ec9b8b2 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qcschema_basis.schema @@ -0,0 +1,266 @@ +{ + "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#", + "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/qcschema_input.schema b/qcschema/qcelemental_v1/schemas/qcschema_input.schema new file mode 100644 index 0000000..e9576b9 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qcschema_input.schema @@ -0,0 +1,820 @@ +{ + "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, + "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" + } + ] + } + }, + "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, + "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#" + }, + "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" + ] + }, + "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/qcschema_molecule.schema b/qcschema/qcelemental_v1/schemas/qcschema_molecule.schema new file mode 100644 index 0000000..10c5f70 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qcschema_molecule.schema @@ -0,0 +1,341 @@ +{ + "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#", + "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/qcschema_output.schema b/qcschema/qcelemental_v1/schemas/qcschema_output.schema new file mode 100644 index 0000000..8812576 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qcschema_output.schema @@ -0,0 +1,1580 @@ +{ + "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#", + "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, + "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#" + }, + "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" + ] + }, + "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/qcschema_properties.schema b/qcschema/qcelemental_v1/schemas/qcschema_properties.schema new file mode 100644 index 0000000..072d81e --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qcschema_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/qcschema_provenance.schema b/qcschema/qcelemental_v1/schemas/qcschema_provenance.schema new file mode 100644 index 0000000..5f55b88 --- /dev/null +++ b/qcschema/qcelemental_v1/schemas/qcschema_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/__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/__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 new file mode 100644 index 0000000..b2588cc --- /dev/null +++ b/qcschema/qcelemental_v2/generate.py @@ -0,0 +1,308 @@ +#!/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.v2 and generates JSON Schema files +for each pydantic v2 model by calling model_json_schema() (pydantic v2 API). + +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 + python generate.py + +Output: + - schemas/.schema (JSON Schema files for each model) + +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 +import json +import sys +from pathlib import Path + +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 + + +def discover_pydantic_models(): + """Discover pydantic v2 models in qcelemental.models.v2. + + 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 + + models = {} + + for name in dir(models_v2): + if name.startswith("_"): + continue + + 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 + + return models + + +def _is_pydantic_model(obj): + """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 + + # Only accept pydantic v2 API + if hasattr(obj, "model_json_schema"): + return True + + # 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. + + 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", + "AtomicProperties": "properties", + "Provenance": "provenance", + } + + # Check if this is a canonical type + if model_name in type_mapping: + schema_type = type_mapping[model_name] + return f"qcschema_{schema_type}.schema" + + # Otherwise use the model name as-is + 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(). + + 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)") + + 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): + """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: + raise RuntimeError("No pydantic models found in qcelemental.models") + + 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(): + 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) + output_file = output_dir / filename + with open(output_file, "w") as f: + json.dump(schema, f, indent=2) + + print(f"✓ {model_name} → {output_file.name}") + except Exception as e: + 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 + + +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..028b37d --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/AlignmentMill.schema @@ -0,0 +1,63 @@ +{ + "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.", + "properties": { + "shift": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Translation array (3,) for coordinates.", + "title": "Shift" + }, + "rotation": { + "anyOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Rotation array (3, 3) for coordinates.", + "title": "Rotation" + }, + "atommap": { + "anyOf": [ + { + "items": { + "multipleOf": 1.0, + "type": "number" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Atom exchange map (nat,) for coordinates.", + "title": "Atommap" + }, + "mirror": { + "default": false, + "description": "Do mirror invert coordinates?", + "title": "Mirror", + "type": "boolean" + } + }, + "title": "AlignmentMill", + "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/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 new file mode 100644 index 0000000..842949e --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ComputeError.schema @@ -0,0 +1,33 @@ +{ + "additionalProperties": false, + "description": "Complete description of the error from an unsuccessful program execution.", + "properties": { + "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": { + "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": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "Additional information to bundle with the error.", + "title": "Extras" + } + }, + "required": [ + "error_type", + "error_message" + ], + "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 new file mode 100644 index 0000000..e2aa3bc --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/FailedOperation.schema @@ -0,0 +1,100 @@ +{ + "$defs": { + "ComputeError": { + "additionalProperties": false, + "description": "Complete description of the error from an unsuccessful program execution.", + "properties": { + "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": { + "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": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "Additional information to bundle with the error.", + "title": "Extras" + } + }, + "required": [ + "error_type", + "error_message" + ], + "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 new file mode 100644 index 0000000..bb271b8 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationInput.schema @@ -0,0 +1,823 @@ +{ + "$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" + }, + "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" + }, + { + "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" +} \ 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..85fabf8 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationProperties.schema @@ -0,0 +1,126 @@ +{ + "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/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 new file mode 100644 index 0000000..964321d --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/OptimizationResult.schema @@ -0,0 +1,1354 @@ +{ + "$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" + }, + "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" + }, + "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" + }, + { + "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" +} \ 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 new file mode 100644 index 0000000..6ff2f4d --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/ProtoModel.schema @@ -0,0 +1,7 @@ +{ + "additionalProperties": false, + "description": "QCSchema extension of pydantic.BaseModel.", + "properties": {}, + "title": "ProtoModel", + "type": "object" +} \ 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..5fc25e5 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/WavefunctionProperties.schema @@ -0,0 +1,870 @@ +{ + "$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_basis.schema b/qcschema/qcelemental_v2/schemas/qcschema_basis.schema new file mode 100644 index 0000000..73eba9b --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qcschema_basis.schema @@ -0,0 +1,276 @@ +{ + "$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" + }, + "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" + } + }, + "$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" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qcschema_input.schema b/qcschema/qcelemental_v2/schemas/qcschema_input.schema new file mode 100644 index 0000000..fe61c06 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qcschema_input.schema @@ -0,0 +1,541 @@ +{ + "$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" + }, + "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" + }, + "Molecule": { + "additionalProperties": true, + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "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" + }, + "WavefunctionProtocolEnum": { + "description": "Wavefunction to keep from a computation.", + "enum": [ + "all", + "orbitals_and_eigenvalues", + "occupations_and_eigenvalues", + "return_results", + "none" + ], + "title": "WavefunctionProtocolEnum", + "type": "string" + } + }, + "$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" +} \ No newline at end of file diff --git a/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema b/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema new file mode 100644 index 0000000..9e5553b --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qcschema_molecule.schema @@ -0,0 +1,86 @@ +{ + "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_output.schema b/qcschema/qcelemental_v2/schemas/qcschema_output.schema new file mode 100644 index 0000000..58eeb7f --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qcschema_output.schema @@ -0,0 +1,678 @@ +{ + "$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" + }, + "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" + }, + "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" + }, + "Molecule": { + "additionalProperties": true, + "type": "object" + }, + "NativeFilesProtocolEnum": { + "description": "CMS program files to keep from a computation.", + "enum": [ + "all", + "input", + "none" + ], + "title": "NativeFilesProtocolEnum", + "type": "string" + }, + "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" + }, + "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 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" +} \ 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/qcschema/qcelemental_v2/schemas/qcschema_provenance.schema b/qcschema/qcelemental_v2/schemas/qcschema_provenance.schema new file mode 100644 index 0000000..7dcdd28 --- /dev/null +++ b/qcschema/qcelemental_v2/schemas/qcschema_provenance.schema @@ -0,0 +1,29 @@ +{ + "$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" +} \ No newline at end of file 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 new file mode 100644 index 0000000..6147912 --- /dev/null +++ b/qcschema/v1/generate.py @@ -0,0 +1,547 @@ +#!/usr/bin/env python +""" +Generate v1 JSON Schema documents in frozen v1 format. + +The v1 format is the original QCSchema with classic basis definitions. +Generates schemas to qcschema/v1/schemas/ directory. + +Run as: python -m qcschema.v1.generate +""" + +import copy +import json +import sys +from pathlib import Path + +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 { + "$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"], + } + + +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 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"] = ( + "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. + + Validates all property imports and schema return values. + """ + # Validate property imports first + _validate_property_imports() + + # 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#", + "name": "qcschema_input", + "version": 1, + "description": "The MolSSI Quantum Chemistry Schema", + "type": "object", + "properties": { + "molecule": molecule_schema, + "schema_name": {"type": "string", "pattern": "\\W*(qcschema)\\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"] = "qcschema_input" + input_schema["properties"]["schema_name"]["pattern"] = "\\W*(qcschema_input)\\W*" + + output_schema = copy.deepcopy(base_schema) + 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( + { + "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"}}], + }, + } + ) + + # 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. + + 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) + + # 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 / "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 / "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 / "qcschema_molecule.schema") + except Exception as e: + raise RuntimeError(f"Failed to write molecule schema: {e}") from e + + 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/data/v1/__init__.py b/qcschema/v1/generator/__init__.py similarity index 100% rename from qcschema/data/v1/__init__.py rename to qcschema/v1/generator/__init__.py 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/dev/definitions.py b/qcschema/v1/generator/definitions.py similarity index 66% rename from qcschema/dev/definitions.py rename to qcschema/v1/generator/definitions.py index 25c69f2..5d16d5e 100644 --- a/qcschema/dev/definitions.py +++ b/qcschema/v1/generator/definitions.py @@ -8,70 +8,54 @@ "properties": { "error_type": { "description": "The type of error raised.", - "enum": ["convergence_error", "file_error", "memory_error"] + "enum": ["convergence_error", "file_error", "memory_error"], }, - "error_message": { - "description": "A description of the raised error.", - "type": "string" - } + "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 + "additionalProperties": False, } definitions["provenance"] = { "properties": { - "creator": { - "description": "The name of the person or program who created this object.", - "type": "string" - }, + "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" + "type": "string", }, "routine": { "description": "The routine of the program which created this object, blank otherwise.", - "type": "string" - } + "type": "string", + }, }, "required": ["creator", "version", "routine"], "description": "A short provenance of the object.", - "additionalProperties": True + "additionalProperties": True, } definitions["electron_shell"] = { "description": "Information for a single electronic shell", "additionalProperties": False, - "required": [ - "angular_momentum", - "harmonic_type", - "exponents", - "coefficients" - ], + "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 - } + "items": {"type": "integer", "minimum": 0}, }, "harmonic_type": { "description": "Whether this shell is spherical or cartesian", "type": "string", - "enum": ["spherical", "cartesian"] + "enum": ["spherical", "cartesian"], }, "exponents": { "description": "Exponents for this contracted shell", "type": "array", "minItems": 1, - "items": { - "type": "string" - } + "items": {"type": "string"}, }, "coefficients": { "description": "General contraction coefficients for this contracted shell", @@ -81,53 +65,36 @@ "description": "Segmented contraction coefficients", "type": "array", "minItems": 1, - "items": {"type": "string"} - } - } - } + "items": {"type": "string"}, + }, + }, + }, } definitions["ecp_potential"] = { "description": "ECP potential", "additionalProperties": False, - "required": [ - "ecp_type", - "angular_momentum", - "r_exponents", - "gaussian_exponents", - "coefficients" - ], + "required": ["ecp_type", "angular_momentum", "r_exponents", "gaussian_exponents", "coefficients"], "properties": { - "ecp_type": { - "description": "Type of the ECP Potential", - "type": "string", - "enum": [ "scalar", "spinorbit" ] - }, + "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 - } + "items": {"type": "integer", "minimum": 0}, }, "r_exponents": { "description": "Exponents of the r term", "type": "array", "minItems": 1, - "items": { - "type": "integer" - } + "items": {"type": "integer"}, }, "gaussian_exponents": { "description": "Exponents of the gaussian term", "type": "array", "minItems": 1, - "items": { - "type": "string" - } + "items": {"type": "string"}, }, "coefficients": { "description": "General contraction coefficients for this potential", @@ -137,10 +104,10 @@ "description": "Segmented contraction coefficients", "type": "array", "minItems": 1, - "items": { "type": "string" } - } - } - } + "items": {"type": "string"}, + }, + }, + }, } definitions["center_basis"] = { @@ -153,24 +120,15 @@ "type": "array", "minItems": 1, "uniqueItems": True, - "items": { - "$ref": "#/definitions/electron_shell" - } - }, - "ecp_electrons": - { - "description": "Number of electrons replaced by ECP", - "type": "integer", - "minimum": 1 + "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" - } - } - } + "items": {"$ref": "#/definitions/ecp_potential"}, + }, + }, } diff --git a/qcschema/dev/dev_schema.py b/qcschema/v1/generator/dev_schema.py similarity index 56% rename from qcschema/dev/dev_schema.py rename to qcschema/v1/generator/dev_schema.py index 026912d..31ac46b 100644 --- a/qcschema/dev/dev_schema.py +++ b/qcschema/v1/generator/dev_schema.py @@ -15,77 +15,48 @@ "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"] - }, + "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" - }, + "method": {"type": "string"}, "basis": { - "anyOf": [ - basis.basis, - { - "description": "Name of the basis set to apply to the whole molecule", - "type": "string" - }, - ] - } + "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." + "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" - } - }] - } + "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 + "definitions": definitions.definitions, } # Additional properties to contain in the output output_properties = { "properties": properties.properties, - "success": { - "type": "boolean" - }, + "success": {"type": "boolean"}, "error": { "definition": "The type and description of error raised.", "type": "object", - "$ref": "#/definitions/error" + "$ref": "#/definitions/error", }, "return_result": { "definition": "The primary specified return of the requested computation.", - "anyOf": [{ - "type": "number" - }, { - "type": "array", - "items": {"type": "number"} - }] - } + "anyOf": [{"type": "number"}, {"type": "array", "items": {"type": "number"}}], + }, } # Snapshot the input dev schema @@ -106,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/dev/molecule.py b/qcschema/v1/generator/molecule.py similarity index 64% rename from qcschema/dev/molecule.py rename to qcschema/v1/generator/molecule.py index 30bca8f..9df45bc 100644 --- a/qcschema/dev/molecule.py +++ b/qcschema/v1/generator/molecule.py @@ -1,91 +1,60 @@ """ 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", + "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" - } + "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" - } + "items": {"type": "number"}, }, "masses": { "description": "(nat, ) atom masses [u]; canonical weights assumed if not given.", "type": "array", - "items": { - "type": "number" - } + "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 - } + "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 - } + "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 + "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 + "default": 1, }, "real": { "description": "(nat, ) list describing if atoms are real (T) or ghost (F).", "type": "array", - "items": { - "type": "boolean" - } + "items": {"type": "boolean"}, }, "connectivity": { "description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.", @@ -96,74 +65,54 @@ "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 one end of bond.", "type": "number", "multipleOf": 1.0}, { "description": "Atom number (0-indexed) at other end of bond.", "type": "number", - "multipleOf": 1.0 + "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.", + "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 - } - } + "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" - } + "items": {"type": "number"}, }, "fragment_multiplicities": { "description": "(nfr, ) list of multiplicities associated with each fragment tuple.", "type": "array", - "items": { - "type": "number", - "multipleOf": 1.0 - } + "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 + "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 + "default": False, }, - "fix_symmetry":{ + "fix_symmetry": { "description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.", - "type": "string" + "type": "string", }, - "provenance": { - "type": "object", - "$ref": "#/definitions/provenance" - } + "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/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/dev/properties/calcinfo_properties.py b/qcschema/v1/generator/properties/calcinfo_properties.py similarity index 86% rename from qcschema/dev/properties/calcinfo_properties.py rename to qcschema/v1/generator/properties/calcinfo_properties.py index f0fe5ab..3105986 100644 --- a/qcschema/dev/properties/calcinfo_properties.py +++ b/qcschema/v1/generator/properties/calcinfo_properties.py @@ -7,34 +7,34 @@ calcinfo_properties["calcinfo_nbasis"] = { "type": "number", "multipleOf": 1.0, - "description": "The number of basis functions for the computation." + "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." + "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." + "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." + "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." + "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." + "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/dev/properties/properties_base.py b/qcschema/v1/generator/properties/properties_base.py similarity index 94% rename from qcschema/dev/properties/properties_base.py rename to qcschema/v1/generator/properties/properties_base.py index 43dda33..fc98162 100644 --- a/qcschema/dev/properties/properties_base.py +++ b/qcschema/v1/generator/properties/properties_base.py @@ -11,7 +11,7 @@ "type": "object", "properties": {}, "description": "The resulting properties of a computation", - "additionalProperties": False + "additionalProperties": False, } # Update new keys diff --git a/qcschema/dev/properties/scf_properties.py b/qcschema/v1/generator/properties/scf_properties.py similarity index 76% rename from qcschema/dev/properties/scf_properties.py rename to qcschema/v1/generator/properties/scf_properties.py index b05891f..6172861 100644 --- a/qcschema/dev/properties/scf_properties.py +++ b/qcschema/v1/generator/properties/scf_properties.py @@ -6,64 +6,56 @@ scf_properties["scf_one_electron_energy"] = { "description": "The one-electron (core Hamiltonian) energy contribution to the total SCF energy.", - "type": "number" + "type": "number", } scf_properties["scf_two_electron_energy"] = { "type": "number", - "description": "The two-electron energy contribution to the total SCF energy." + "description": "The two-electron energy contribution to the total SCF energy.", } scf_properties["nuclear_repulsion_energy"] = { - "type": - "number", - "description": - r""" + "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"], +} 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 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 qcschema_* + schema_file = schemas_dir / f"qcschema_{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/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/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/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_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_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_packaging.py b/tests/test_packaging.py index 4f795a9..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/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/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 new file mode 100644 index 0000000..719e42b --- /dev/null +++ b/tests/test_qcelemental_schemas.py @@ -0,0 +1,193 @@ +""" +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 "qcschema_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.""" + # 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), 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.""" + 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. + + Uses simple, non-manybody test data appropriate for each version. + """ + schema = qcschema.get_schema("input", version) + + 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) + + 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 generate as v1_generate + from qcschema.qcelemental_v2 import generate as v2_generate + + v1_validator = v1_generate.get_validator() + v2_validator = v2_generate.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 5ee6135..9264756 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,58 @@ ### 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")) -def test_simple_input(version, testfile): - +@pytest.mark.parametrize("version", input_versions) +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 +### 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")) -def test_simple_output(version, testfile): - +@pytest.mark.parametrize("version", output_versions) +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") +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")) -def test_simple_basis_input(version, testfile): - +@pytest.mark.parametrize("version", basis_input_versions) +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") +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) - - # 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) 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",