Skip to content

Commit

Permalink
qcschema_input and qcschema_molecule updating (#60)
Browse files Browse the repository at this point in the history
* Update dev_schema.py

* Update molecule.py

* Update water_energy_MP2_input.json

* Update water_gradient_HF_input.json

* Update water_gradient_HF_output.json

* Update water_energy_MP2_output.json

* Update he2_energy_VV10_input.json

* Update he2_energy_VV10_output.json

* Update water_energy_B3LYP_output.json

* Update water_energy_B3LYP_input.json

* Update waterZr_energy_B3LYP_STO3G_DEF2_input.json

* Update water_energy_B3LYP_631G_input.json

* Update molecule.py

* Update dev_schema.py
  • Loading branch information
loriab authored and dgasmith committed Feb 25, 2019
1 parent e435f43 commit c855c2f
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 11 deletions.
12 changes: 6 additions & 6 deletions qcschema/dev/dev_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
# The base schema definition
base_schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"name": "qc_schema_input",
"name": "qcschema_input",
"version": "1.dev",
"description": "The MolSSI Quantum Chemistry Schema",
"type": "object",
"properties": {
"molecule": molecule.molecule,
"schema_name": {
"type": "string",
"pattern": "\W*(qc_schema)\W*"
"pattern": "^(qc_?schema)$"
},
"schema_version": {
"type": "integer"
Expand Down Expand Up @@ -97,15 +97,15 @@

# Snapshot the input dev schema
input_dev_schema = copy.deepcopy(base_schema)
input_dev_schema["name"] = "qc_schema_input"
input_dev_schema["properties"]["schema_name"]["pattern"] = "\W*(qc_schema_input)\W*"
input_dev_schema["name"] = "qcschema_input"
input_dev_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_input)$"

# Snapshot the input dev schema
output_dev_schema = copy.deepcopy(base_schema)
output_dev_schema["name"] = "qc_schema_output"
output_dev_schema["name"] = "qcschema_output"
output_dev_schema["properties"].update(output_properties)
output_dev_schema["required"].extend(["provenance", "properties", "success", "return_result"])
output_dev_schema["properties"]["schema_name"]["pattern"] = "\W*(qc_schema_output)\W*"
output_dev_schema["properties"]["schema_name"]["pattern"] = "^(qc_?schema_output)$"

# Build out the molecule schema
molecule_dev_schema = copy.deepcopy(molecule.molecule)
Expand Down
14 changes: 11 additions & 3 deletions qcschema/dev/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
"""
molecule = {
"$schema": "http://json-schema.org/draft-04/schema#",
"name": "qc_schema_molecule",
"version": "dev",
"name": "qcschema_molecule",
"version": "2.dev",
"description": "The MolSSI Quantum Chemistry Molecular Schema",
"type": "object",
"properties": {
"schema_name": {
"guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2",
"type": "string",
"pattern": "^(qcschema_molecule)$"
},
"schema_version": {
"type": "integer"
},
"symbols": {
"description": "(nat, ) atom symbols in title case.",
"type": "array",
Expand Down Expand Up @@ -156,6 +164,6 @@
"$ref": "#/definitions/provenance"
}
},
"required": ["symbols", "geometry"],
"required": ["symbols", "geometry", "schema_name", "schema_version"],
"description": "The physical cartesian representation of the molecular system"
}
2 changes: 2 additions & 0 deletions tests/basis/waterZr_energy_B3LYP_STO3G_DEF2_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_input",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down
2 changes: 2 additions & 0 deletions tests/basis/water_energy_B3LYP_631G_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_input",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down
2 changes: 2 additions & 0 deletions tests/simple/he2_energy_VV10_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_input",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0,
0,
Expand Down
2 changes: 2 additions & 0 deletions tests/simple/he2_energy_VV10_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_output",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0,
0,
Expand Down
2 changes: 2 additions & 0 deletions tests/simple/water_energy_B3LYP_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_input",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down
2 changes: 2 additions & 0 deletions tests/simple/water_energy_B3LYP_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_output",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down
4 changes: 3 additions & 1 deletion tests/simple/water_energy_MP2_input.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"schema_name": "qc_schema_input",
"schema_name": "qcschema_input",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down
4 changes: 3 additions & 1 deletion tests/simple/water_energy_MP2_output.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"schema_name": "qc_schema_output",
"schema_name": "qcschema_output",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down
2 changes: 2 additions & 0 deletions tests/simple/water_gradient_HF_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_input",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down
2 changes: 2 additions & 0 deletions tests/simple/water_gradient_HF_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"schema_name": "qc_schema_output",
"schema_version": 1,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2,
"geometry": [
0.0,
0.0,
Expand Down

0 comments on commit c855c2f

Please sign in to comment.