Skip to content

Commit

Permalink
Merge pull request #262 from wilhadams/qcschema_input
Browse files Browse the repository at this point in the history
Add QCSchema Input `load_one` and `dump_one` functions
  • Loading branch information
tovrstra authored May 18, 2021
2 parents 506ce9b + 1344b4e commit 5725867
Show file tree
Hide file tree
Showing 16 changed files with 2,373 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,too-many-arguments,too-many-locals,too-few-public-methods,fixme,invalid-name,duplicate-code,unsubscriptable-object,no-member
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,too-many-arguments,too-many-locals,too-few-public-methods,fixme,invalid-name,duplicate-code,unsubscriptable-object,no-member,too-many-lines

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
1,354 changes: 1,237 additions & 117 deletions iodata/formats/json.py

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions iodata/test/data/H2O_CCSDprTpr_STO3G_output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2.0,
"symbols": [
"O",
"H",
"H"
],
"geometry": [
0.0,
0.0,
-0.12947694,
0.0,
-1.49418734,
1.02744651,
0.0,
1.49418734,
1.02744651
],
"molecular_charge": 0.0,
"molecular_multiplicity": 1,
"connectivity": [
[0, 1, 1],
[0, 2, 1]
],
"fix_orientation": true,
"fix_symmetry": "c1",
"provenance": {
"creator": "HORTON3",
"routine": "Extracted from molpro_ccsd_prt_pr_water_energy_output.json"
},
"real": [true, true, true]
},
"driver": "energy",
"model": {
"method": "CCSD(T)",
"basis": "sto-3g"
},
"id": "1",
"schema_name": "qcschema_output",
"schema_version": 2.0,
"provenance": [
{
"creator": "QCElemental",
"version": "v0.2.6",
"routine": "qcelemental.models.results"
},
{
"creator": "HORTON3",
"routine": "Manual validation"
}
],
"success": true,
"return_result": -75.0197177197499,
"properties": {
"nuclear_repulsion_energy": 8.80146205625184,
"scf_dipole_moment": [0.0, 0.0, 0.65662910269302],
"scf_total_energy": -74.9646625166939,
"ccsd_same_spin_correlation_energy": -0.0019035720854254133,
"ccsd_opposite_spin_correlation_energy": -0.0530757170419502,
"ccsd_correlation_energy": -0.0549792917918461,
"ccsd_total_energy": -75.0196418084857,
"ccsd_prt_pr_correlation_energy": -0.0550552030560323,
"ccsd_prt_pr_total_energy": -75.0197177197499,
"calcinfo_nalpha": 5,
"calcinfo_nbeta": 5,
"calcinfo_nbasis": 7
}
}
36 changes: 36 additions & 0 deletions iodata/test/data/H2O_HF_STO3G_Gaussian_input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"schema_name": "qcschema_input",
"schema_version": 2.0,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2.0,
"symbols": ["O", "H", "H"],
"geometry": [0.0, 0.0, -0.1295, 0.0, -1.4942, 1.0274, 0.0, 1.4942, 1.0274],
"molecular_charge": 0,
"molecular_multiplicity": 1,
"real": [true, true, true],
"provenance": [
{
"creator": "Gaussian 16",
"version": "ES64L-G16RevC.01"
}
]
},
"driver": "energy",
"model": {
"method": "HF",
"basis": "STO-3G"
},
"keywords": {
"program": "Gaussian",
"verbose": "normal",
"run_type": "energy"
},
"provenance": [
{
"creator": "IOData",
"version": "X.X.X",
"routine": "iodata.dump_one.com"
}
]
}
54 changes: 54 additions & 0 deletions iodata/test/data/LiCl_STO4G_Gaussian_input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"schema_name": "qcschema_input",
"schema_version": 2.0,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2.0,
"symbols": ["Li", "Cl"],
"geometry": [0.000000, 0.000000, -1.631761, 0.000000, 0.000000, 0.287958],
"molecular_charge": 0,
"molecular_multiplicity": 1,
"real": [true, true],
"provenance": [
{
"creator": "Gaussian 16",
"version": "ES64L-G16RevC.01"
},
{
"creator": "HORTON3",
"routine": "Manual validation"
}
]
},
"id": "LiCl_HF_STO4G",
"driver": "energy",
"model": {
"method": "HF",
"basis": "STO-4G"
},
"keywords": {
"program": "Gaussian",
"verbose": "normal",
"run_type": "freq",
"geom": "AllCheck",
"mem": "7GB",
"nprocshared": "2",
"oldchk": "LiCl_OPT.chk",
"chk": "LiCl_HF_STO4G.chk"
},
"protocols": {
"wavefunction": "none",
"stdout": false
},
"extras": {
"lewis_acid_group": "alkali_metals",
"lewis_base_group": "halides"
},
"provenance": [
{
"creator": "IOData",
"version": "X.X.X",
"routine": "iodata.dump_one.com"
}
]
}
55 changes: 55 additions & 0 deletions iodata/test/data/LiCl_STO4G_Gaussian_input_extra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"schema_name": "qcschema_input",
"schema_version": 2.0,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2.0,
"symbols": ["Li", "Cl"],
"geometry": [0.000000, 0.000000, -1.631761, 0.000000, 0.000000, 0.287958],
"molecular_charge": 0,
"molecular_multiplicity": 1,
"real": [true, true],
"provenance": [
{
"creator": "Gaussian 16",
"version": "ES64L-G16RevC.01"
},
{
"creator": "HORTON3",
"routine": "Manual validation"
}
]
},
"id": "LiCl_HF_STO4G",
"driver": "energy",
"model": {
"method": "HF",
"basis": "STO-4G"
},
"keywords": {
"program": "Gaussian",
"verbose": "normal",
"run_type": "freq",
"geom": "AllCheck",
"mem": "7GB",
"nprocshared": "2",
"oldchk": "LiCl_OPT.chk",
"chk": "LiCl_HF_STO4G.chk"
},
"protocols": {
"wavefunction": "none",
"stdout": false
},
"extras": {
"lewis_acid_group": "alkali_metals",
"lewis_base_group": "halides"
},
"provenance": [
{
"creator": "IOData",
"version": "X.X.X",
"routine": "iodata.dump_one.com"
}
],
"another_field": true
}
55 changes: 55 additions & 0 deletions iodata/test/data/LiCl_STO4G_Gaussian_input_extra_molecule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"schema_name": "qcschema_input",
"schema_version": 2.0,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2.0,
"symbols": ["Li", "Cl"],
"geometry": [0.000000, 0.000000, -1.631761, 0.000000, 0.000000, 0.287958],
"molecular_charge": 0,
"molecular_multiplicity": 1,
"real": [true, true],
"provenance": [
{
"creator": "Gaussian 16",
"version": "ES64L-G16RevC.01"
},
{
"creator": "HORTON3",
"routine": "Manual validation"
}
],
"another_field": true
},
"id": "LiCl_HF_STO4G",
"driver": "energy",
"model": {
"method": "HF",
"basis": "STO-4G"
},
"keywords": {
"program": "Gaussian",
"verbose": "normal",
"run_type": "freq",
"geom": "AllCheck",
"mem": "7GB",
"nprocshared": "2",
"oldchk": "LiCl_OPT.chk",
"chk": "LiCl_HF_STO4G.chk"
},
"protocols": {
"wavefunction": "none",
"stdout": false
},
"extras": {
"lewis_acid_group": "alkali_metals",
"lewis_base_group": "halides"
},
"provenance": [
{
"creator": "IOData",
"version": "X.X.X",
"routine": "iodata.dump_one.com"
}
]
}
62 changes: 62 additions & 0 deletions iodata/test/data/LiCl_STO4G_Gaussian_input_nested_extra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"schema_name": "qcschema_input",
"schema_version": 2.0,
"molecule": {
"schema_name": "qcschema_molecule",
"schema_version": 2.0,
"symbols": ["Li", "Cl"],
"geometry": [0.000000, 0.000000, -1.631761, 0.000000, 0.000000, 0.287958],
"molecular_charge": 0,
"molecular_multiplicity": 1,
"real": [true, true],
"provenance": [
{
"creator": "Gaussian 16",
"version": "ES64L-G16RevC.01"
},
{
"creator": "HORTON3",
"routine": "Manual validation"
}
]
},
"id": "LiCl_HF_STO4G",
"driver": "energy",
"model": {
"method": "HF",
"basis": "STO-4G"
},
"keywords": {
"program": "Gaussian",
"verbose": "normal",
"run_type": "freq",
"geom": "AllCheck",
"mem": "7GB",
"nprocshared": "2",
"oldchk": "LiCl_OPT.chk",
"chk": "LiCl_HF_STO4G.chk"
},
"protocols": {
"wavefunction": "none",
"stdout": false
},
"extras": {
"lewis_acid_group": "alkali_metals",
"lewis_base_group": "halides"
},
"provenance": [
{
"creator": "IOData",
"version": "X.X.X",
"routine": "iodata.dump_one.com"
}
],
"related_projects": {
"HSAB": {
"id": "HSAB_2019_LALB"
},
"4PB3": {
"id": "4PB3_2020_Group1"
}
}
}
Loading

0 comments on commit 5725867

Please sign in to comment.