Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace schema with autogen from qcelemental #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,29 @@ matrices in a consistent format that can be easily parsed.

Please see the [website](http://molssi-qc-schema.readthedocs.io/en/latest/index.html#) for the current specification.

## Modifying the Schema

JSON Schema can specify only data layout, descriptions, and basic
defaults and type information for the models that compose QCSchema. To
supplement data layout validation, physics validation, defaulting,
serialization, and helper functions, a reference implementation in
Python for the latest development version of QCSchema is available
at the [QCElemental](https://github.com/MolSSI/QCElemental/)
project. QCElemental uses
[Pydantic](https://github.com/samuelcolvin/pydantic) to encode the
models into Python classes which undergo considerable testing. Since
the classes can auto-generate JSON Schema, it makes sense to use them
as the definition of QCSchema, rather than hand-writing schema here
and synching versions.

The gist of the above is that schema in this repository are read-only. To
propose a change, open an issue here at QCSchema or open a pull
request at QCElemental. Any discussion of changes to QCSchema will
take place here or will be cross-linked to here in accordance with [The
Guidance](https://github.com/MolSSI/QCSchema/issues/68#issuecomment-578256825).

* [`qcschema/dev/QCSchema.schema`](qcschema/dev/QCSchema.schema) — single-file, human-readable development schema exported from QCElemental.
* [`qcschema/data/vdev/`](qcschema/data/vdev) — multi-file, compressed development schema exported from QCElemental. contents redundant to above.
* [`qcschema/data/v2/`](qcschema/data/v2) — multi-file, compressed version 2 schema hand-written here. contents were `qcschema/dev/` until September 2020.
* [`qcschema/data/v1/`](qcschema/data/v1) — multi-file, compressed version 1 schema hand-written here.

4 changes: 3 additions & 1 deletion docs/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ found at the `JSON-Schema website <http://json-schema.org/implementations.html>`
Does the schema accept arbitrary extra fields if my software piece needs internal extensions?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yes, we are currently discussing which fields are reserved and where the best
place for arbitrary fields would be.
place for arbitrary fields would be. Most high-level schema do *not* accept
additional arbitrary fields, but they do have an ``extras`` dictionary-like field
that can be used for schema development and scratch space.

Are there libraries for writing the schema in [programming-language]?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions qcschema/data/vdev/AtomicInput.schema

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions qcschema/data/vdev/AtomicResult.schema

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions qcschema/data/vdev/AtomicResultProperties.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"title": "AtomicResultProperties", "description": "Named properties of quantum chemistry computations following the MolSSI QCSchema.\n\n Notes\n -----\n All arrays are stored flat but must be reshapable into the dimensions in attribute ``shape``, with abbreviations as follows:\n nao: number of atomic orbitals = calcinfo_nbasis\n nmo: number of molecular orbitals\n\n\nParameters\n----------\ncalcinfo_nbasis : int, Optional\n The number of basis functions for the computation.\ncalcinfo_nmo : int, Optional\n The number of molecular orbitals for the computation.\ncalcinfo_nalpha : int, Optional\n The number of alpha electrons in the computation.\ncalcinfo_nbeta : int, Optional\n The number of beta electrons in the computation.\ncalcinfo_natom : int, Optional\n The number of atoms in the computation.\nnuclear_repulsion_energy : float, Optional\n The nuclear repulsion energy.\nreturn_energy : float, Optional\n The energy of the requested method, identical to ``return_result`` for ``driver=energy`` computations.\nscf_one_electron_energy : float, Optional\n The one-electron (core Hamiltonian) energy contribution to the total SCF energy.\nscf_two_electron_energy : float, Optional\n The two-electron energy contribution to the total SCF energy.\nscf_vv10_energy : float, Optional\n The VV10 functional energy contribution to the total SCF energy.\nscf_xc_energy : float, Optional\n The functional (XC) energy contribution to the total SCF energy.\nscf_dispersion_correction_energy : float, Optional\n The dispersion correction appended to an underlying functional when a DFT-D method is requested.\nscf_dipole_moment : Array, Optional\n The SCF X, Y, and Z dipole components\nscf_quadrupole_moment : Array, Optional\n The quadrupole components (redundant; 6 unique).\nscf_total_energy : float, Optional\n The total electronic energy of the SCF stage of the calculation.\nscf_iterations : int, Optional\n The number of SCF iterations taken before convergence.\nmp2_same_spin_correlation_energy : float, Optional\n The portion of MP2 doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.\nmp2_opposite_spin_correlation_energy : float, Optional\n The portion of MP2 doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.\nmp2_singles_energy : float, Optional\n The singles portion of the MP2 correlation energy. Zero except in ROHF.\nmp2_doubles_energy : float, Optional\n The doubles portion of the MP2 correlation energy including same-spin and opposite-spin correlations.\nmp2_total_correlation_energy : float, Optional\n The MP2 correlation energy.\nmp2_correlation_energy : float, Optional\n The MP2 correlation energy.\nmp2_total_energy : float, Optional\n The total MP2 energy (MP2 correlation energy + HF energy).\nmp2_dipole_moment : Array, Optional\n The MP2 X, Y, and Z dipole components.\nccsd_same_spin_correlation_energy : float, Optional\n The portion of CCSD doubles correlation energy from same-spin (i.e. triplet) correlations, without any user scaling.\nccsd_opposite_spin_correlation_energy : float, Optional\n The portion of CCSD doubles correlation energy from opposite-spin (i.e. singlet) correlations, without any user scaling.\nccsd_singles_energy : float, Optional\n The singles portion of the CCSD correlation energy. Zero except in ROHF.\nccsd_doubles_energy : float, Optional\n The doubles portion of the CCSD correlation energy including same-spin and opposite-spin correlations.\nccsd_correlation_energy : float, Optional\n The CCSD correlation energy.\nccsd_total_energy : float, Optional\n The total CCSD energy (CCSD correlation energy + HF energy).\nccsd_dipole_moment : Array, Optional\n The CCSD X, Y, and Z dipole components.\nccsd_iterations : int, Optional\n The number of CCSD iterations taken before convergence.\nccsd_prt_pr_correlation_energy : float, Optional\n The CCSD(T) correlation energy.\nccsd_prt_pr_total_energy : float, Optional\n The total CCSD(T) energy (CCSD(T) correlation energy + HF energy).\nccsd_prt_pr_dipole_moment : Array, Optional\n The CCSD(T) X, Y, and Z dipole components.\nccsdt_correlation_energy : float, Optional\n The CCSDT correlation energy.\nccsdt_total_energy : float, Optional\n The total CCSDT energy (CCSDT correlation energy + HF energy).\nccsdt_dipole_moment : Array, Optional\n The CCSDT X, Y, and Z dipole components.\nccsdt_iterations : int, Optional\n The number of CCSDT iterations taken before convergence.\nccsdtq_correlation_energy : float, Optional\n The CCSDTQ correlation energy.\nccsdtq_total_energy : float, Optional\n The total CCSDTQ energy (CCSDTQ correlation energy + HF energy).\nccsdtq_dipole_moment : Array, Optional\n The CCSDTQ X, Y, and Z dipole components.\nccsdtq_iterations : int, Optional\n The number of CCSDTQ iterations taken before convergence.", "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 ``return_result`` for ``driver=energy`` computations.", "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_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_total_correlation_energy": {"title": "Mp2 Total Correlation Energy", "description": "The MP2 correlation energy.", "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}
Loading