From df27381c83adcad61cb3684a83e7fc912ae41b87 Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Tue, 8 Aug 2023 15:52:56 +0300 Subject: [PATCH 01/48] update: add refinementTags field to raw property schema --- schema/property/raw.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/schema/property/raw.json b/schema/property/raw.json index 803485639..9abb6c29f 100644 --- a/schema/property/raw.json +++ b/schema/property/raw.json @@ -23,6 +23,17 @@ }, "source": { "$ref": "source.json" + }, + "refinementTags": { + "description": "property refinement tags, marks property as refined or best (could be both)", + "type": "array", + "items": { + "type": "string", + "enum": [ + "refined", + "best" + ] + } } }, "required": [ From d8d9f831fe315cc98724a08820a0c1d17960f3cd Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Thu, 10 Aug 2023 12:31:42 +0300 Subject: [PATCH 02/48] update: add systemTags to in-memory-entity/base schema --- schema/in_memory_entity/base.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/schema/in_memory_entity/base.json b/schema/in_memory_entity/base.json index eb4277ae2..ab6da562c 100644 --- a/schema/in_memory_entity/base.json +++ b/schema/in_memory_entity/base.json @@ -19,6 +19,13 @@ }, "systemName": { "type": "string" + }, + "systemTags": { + "description": "entity system tags, marks property system characteristics", + "type": "array", + "items": { + "type": "string" + } } } } From 13d02c49000db9512b8c2a24a4e21698d72bb66b Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Thu, 10 Aug 2023 12:32:15 +0300 Subject: [PATCH 03/48] chore: change refinement tags to systemTags in raw property schema --- schema/property/raw.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/property/raw.json b/schema/property/raw.json index 9abb6c29f..38accc35a 100644 --- a/schema/property/raw.json +++ b/schema/property/raw.json @@ -24,8 +24,8 @@ "source": { "$ref": "source.json" }, - "refinementTags": { - "description": "property refinement tags, marks property as refined or best (could be both)", + "systemTags": { + "description": "property system tags, marks property system characteristics, values refined or best (could be both)", "type": "array", "items": { "type": "string", From dc836d06d8a7692c648e7c08e2584903eb53d309 Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Thu, 10 Aug 2023 15:15:16 +0300 Subject: [PATCH 04/48] update: add fields exabyteId, precision and count to raw property schema --- schema/property/raw.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/schema/property/raw.json b/schema/property/raw.json index 38accc35a..05ce541fa 100644 --- a/schema/property/raw.json +++ b/schema/property/raw.json @@ -24,6 +24,20 @@ "source": { "$ref": "source.json" }, + "exabyteId": { + "description": "Id of the corresponding item in the entity bank that this property is obtained for", + "type": "array", + "items": { + "type": "string" + } + }, + "precision": { + "type": "object" + }, + "count": { + "description": "total number of properties among which this property is the best.", + "type": "number" + }, "systemTags": { "description": "property system tags, marks property system characteristics, values refined or best (could be both)", "type": "array", From 07edf62799655393b8dbb694525f669b164147af Mon Sep 17 00:00:00 2001 From: Kostiantyn Dvornik Date: Thu, 31 Aug 2023 14:59:12 +0300 Subject: [PATCH 05/48] update: 3pse schemas --- .../file/applications/espresso/7.2/pw.x.json | 94 +++ package.json | 3 +- .../file/applications/espresso/7.2/pw.x.json | 52 ++ .../espresso/7.2/pw.x/atomic_positions.json | 72 ++ .../espresso/7.2/pw.x/atomic_species.json | 30 + .../applications/espresso/7.2/pw.x/cell.json | 89 +++ .../espresso/7.2/pw.x/cell_parameters.json | 36 + .../espresso/7.2/pw.x/control.json | 179 +++++ .../espresso/7.2/pw.x/electrons.json | 157 +++++ .../espresso/7.2/pw.x/hubbard.json | 219 ++++++ .../applications/espresso/7.2/pw.x/ions.json | 216 ++++++ .../espresso/7.2/pw.x/k_points.json | 87 +++ .../espresso/7.2/pw.x/system.json | 638 ++++++++++++++++++ 13 files changed, 1871 insertions(+), 1 deletion(-) create mode 100644 example/3pse/file/applications/espresso/7.2/pw.x.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/cell.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/control.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/electrons.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/ions.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json create mode 100644 schema/3pse/file/applications/espresso/7.2/pw.x/system.json diff --git a/example/3pse/file/applications/espresso/7.2/pw.x.json b/example/3pse/file/applications/espresso/7.2/pw.x.json new file mode 100644 index 000000000..528c80090 --- /dev/null +++ b/example/3pse/file/applications/espresso/7.2/pw.x.json @@ -0,0 +1,94 @@ +{ + "&CONTROL": { + "calculation": "scf", + "title": "", + "verbosity": "low", + "restart_mode": "from_scratch", + "wf_collect": true, + "tstress": true, + "tprnfor": true, + "outdir": "{{ JOB_WORK_DIR }}/outdir", + "wfcdir": "{{ JOB_WORK_DIR }}/outdir", + "prefix": "__prefix__", + "pseudo_dir": "{{ JOB_WORK_DIR }}/pseudo" + }, + "&SYSTEM": { + "ibrav": 0, + "nat": 2, + "ntyp": 2, + "ecutwfc": 40, + "ecutrho": 200, + "occupations": "smearing", + "degauss": 0.005, + "starting_magnetization": [ + 0.01, + 0.02 + ], + "Hubbard_occ": [ + [ + 1.1, + 0.00, + 0.00 + ], + [ + 0.02, + 0.02, + 0.02 + ] + ] + }, + "&ELECTRONS": { + "diagonalization": "david", + "diago_david_ndim": 4, + "diago_full_acc": true, + "mixing_beta": 0.3, + "startingwfc": "atomic+random" + }, + "&IONS": null, + "&CELL": null, + "ATOMIC_SPECIES": { + "values": [ + { + "x": "Cs", + "Mass_X": 132.90543, + "PseudoPot_X": "Cs.upf" + }, + { + "x": "Cl", + "Mass_X": 35.4527, + "PseudoPot_X": "Cl.upf" + } + ] + }, + "CELL_PARAMETERS": { + "card": "angstrom", + "values": { + "v1": [ + 4.324582724, + 0.000000000, + 2.496799000 + ], + "v2": [ + 1.441527575, + 4.077255694, + 2.496799000 + ], + "v3": [ + 0.000000000, + 0.000000000, + 4.993598000 + ] + } + }, + "K_POINTS": { + "card": "automatic", + "values": { + "nk1": 2, + "nk2": 2, + "nk3": 2, + "sk1": 0, + "sk2": 0, + "sk3": 0 + } + } +} diff --git a/package.json b/package.json index 991afbcb0..274dd2b36 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "lint:fix": "eslint --fix --cache src/js && prettier --write src/js", "prettier": "prettier --check src/js", "postinstall": "npm run transpile", - "prepare": "husky install || exit 0" + "prepare": "husky install || exit 0", + "setSchemaIds": "cd src/js/scripts && node setSchemaIds.mjs" }, "repository": { "type": "git", diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x.json b/schema/3pse/file/applications/espresso/7.2/pw.x.json new file mode 100644 index 000000000..00088dba1 --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x.json @@ -0,0 +1,52 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "pwx main schema", + "additionalProperties": false, + "properties": { + "&CONTROL": { + "$ref": "./pw.x/control.json" + }, + "&SYSTEM": { + "$ref": "./pw.x/system.json" + }, + "&ELECTRONS": { + "$ref": "./pw.x/electrons.json" + }, + "&IONS": { + "oneOf": [ + { + "$ref": "./pw.x/ions.json" + }, + { + "type": "null" + } + ] + }, + "&CELL": { + "oneOf": [ + { + "$ref": "./pw.x/cell.json" + }, + { + "type": "null" + } + ] + }, + "ATOMIC_SPECIES": { + "$ref": "./pw.x/atomic_species.json" + }, + "ATOMIC_POSITIONS": { + "$ref": "./pw.x/atomic_positions.json" + }, + "K_POINTS": { + "$ref": "./pw.x/k_points.json" + }, + "CELL_PARAMETERS": { + "$ref": "./pw.x/cell_parameters.json" + }, + "HUBBARD": { + "$ref": "./pw.x/hubbard.json" + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json new file mode 100644 index 000000000..8a4404c55 --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json @@ -0,0 +1,72 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/atomic-positions", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "atomic positions schema", + "description": "https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm1493", + "type": "object", + "additionalProperties": false, + "properties": { + "card": { + "type": "string", + "enum": [ + "alat", + "bohr", + "angstrom", + "crystal", + "crystal_sg" + ], + "default": "alat" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "X": { + "type": "string", + "description": "label of the atom as specified in ATOMIC_SPECIE" + }, + "x": { + "type": "number", + "description": "atomic positions" + }, + "y": { + "type": "number", + "description": "atomic positions" + }, + "z": { + "type": "number", + "description": "atomic positions" + }, + "if_pos(1)": { + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "description": "component i of the force for this atom is multiplied by if_pos(i), which must be either 0 or 1. Used to keep selected atoms and/or selected components fixed in MD dynamics or structural optimization run." + }, + "if_pos(2)": { + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "description": "component i of the force for this atom is multiplied by if_pos(i), which must be either 0 or 1. Used to keep selected atoms and/or selected components fixed in MD dynamics or structural optimization run." + }, + "if_pos(3)": { + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "description": "component i of the force for this atom is multiplied by if_pos(i), which must be either 0 or 1. Used to keep selected atoms and/or selected components fixed in MD dynamics or structural optimization run." + } + }, + "required": [ + "x", + "y", + "z" + ] + } + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json new file mode 100644 index 000000000..d57f67305 --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json @@ -0,0 +1,30 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/atomic-species", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "atomic species schema", + "type": "object", + "additionalProperties": false, + "properties": { + "values": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "x": { + "type": "string", + "description": "label of the atom. Acceptable syntax: chemical symbol X (1 or 2 characters, case-insensitive) or chemical symbol plus a number or a letter, as in \"Xn\" (e.g. Fe1) or \"X_*\" or \"X-*\" (e.g. C1, C_h; max total length cannot exceed 3 characters)" + }, + "Mass_X": { + "type": "number", + "description": "mass of the atomic species [amu: mass of C = 12]. Used only when performing Molecular Dynamics run or structural optimization runs using Damped MD. Not actually used in all other cases (but stored in data files, so phonon calculations will use these values unless other values are provided)" + }, + "PseudoPot_X": { + "type": "string", + "description": "PseudoPot_X" + } + } + } + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/cell.json b/schema/3pse/file/applications/espresso/7.2/pw.x/cell.json new file mode 100644 index 000000000..92a84539b --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/cell.json @@ -0,0 +1,89 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/cell", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "cell schema", + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "cell_dynamics": { + "type": "string", + "enum": [ + "none", + "sd", + "damp-pr", + "damp-w", + "bfgs" + ], + "default": "bfgs", + "description": "CASE ( calculation == 'vc-relax' )" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "cell_dynamics": { + "type": "string", + "enum": [ + "none", + "pr", + "w" + ], + "description": "CASE ( calculation == 'vc-md' )" + } + } + } + ], + "properties": { + "press": { + "type": "number", + "description": "Target pressure [KBar] in a variable-cell md or relaxation run.", + "default": 0 + }, + "wmass": { + "type": "number", + "description": "Fictitious cell mass [amu] for variable-cell simulations (both 'vc-md' and 'vc-relax'). Default: 0.75*Tot_Mass/pi**2 for Parrinello-Rahman MD; 0.75*Tot_Mass/pi**2/Omega**(2/3) for Wentzcovitch MD" + }, + "cell_factor": { + "type": "number", + "description": "Used in the construction of the pseudopotential tables. It should exceed the maximum linear contraction of the cell during a simulation. Default: 2.0 for variable-cell calculations, 1.0 otherwise" + }, + "press_conv_thr": { + "type": "number", + "default": 0.5, + "description": "Convergence threshold on the pressure for variable cell relaxation ('vc-relax' : note that the other convergence thresholds for ionic relaxation apply as well)." + }, + "cell_dofree": { + "type": "string", + "enum": [ + "all", + "ibrav", + "a", + "b", + "c", + "fixa", + "fixb", + "fixc", + "x", + "y", + "xy", + "xz", + "xyz", + "shape", + "volume", + "2Dxy", + "2Dshape", + "epitaxial_ab", + "epitaxial_ac", + "epitaxial_bc" + ], + "default": "all", + "description": "Select which of the cell parameters should be moved" + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json b/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json new file mode 100644 index 000000000..de66c36ac --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json @@ -0,0 +1,36 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/cell-parameters", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "cell parameters schema", + "type": "object", + "additionalProperties": false, + "properties": { + "card": { + "type": "string", + "enum": [ + "alat", + "bohr", + "angstrom" + ], + "description": "label of the atom. Acceptable syntax: chemical symbol X (1 or 2 characters, case-insensitive) or chemical symbol plus a number or a letter, as in \"Xn\" (e.g. Fe1) or \"X_*\" or \"X-*\" (e.g. C1, C_h; max total length cannot exceed 3 characters)" + }, + "values": { + "type": "object", + "additionalProperties": false, + "properties": { + "v1": { + "$ref": "../../../../../../core/primitive/array_of_3_numbers.json", + "description": "1st lattice vector" + }, + "v2": { + "$ref": "../../../../../../core/primitive/array_of_3_numbers.json", + "description": "2nd lattice vector" + }, + "v3": { + "$ref": "../../../../../../core/primitive/array_of_3_numbers.json", + "description": "3rd lattice vector" + } + } + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/control.json b/schema/3pse/file/applications/espresso/7.2/pw.x/control.json new file mode 100644 index 000000000..5900c5be2 --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/control.json @@ -0,0 +1,179 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/control", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "control schema", + "type": "object", + "additionalProperties": false, + "properties": { + "calculation": { + "description": "A string describing the task to be performed", + "type": "string", + "enum": [ + "scf", + "nscf", + "bands", + "relax", + "md", + "vc-relax", + "vc-md" + ], + "default": "scf" + }, + "title": { + "description": "reprinted on output.", + "type": "string", + "default": "" + }, + "verbosity": { + "description": "Currently two verbosity levels are implemented: high, low. 'debug' and 'medium' have the same effect as 'high'; 'default' and 'minimal' as 'low'", + "type": "string", + "enum": [ + "high", + "low", + "debug", + "medium", + "minimal", + "default" + ], + "default": "low" + }, + "restart_mode": { + "type": "string", + "enum": [ + "from_scratch", + "restart" + ], + "default": "from_scratch" + }, + "wf_collect": { + "type": "boolean", + "description": "OBSOLETE - NO LONGER IMPLEMENTED" + }, + "nstep": { + "description": "Default: 1 if calculation == 'scf', 'nscf', 'bands'; 50 for the other cases; Number of molecular-dynamics or structural optimization steps performed in this run. If set to 0, the code performs a quick \"dry run\", stopping just after initialization. This is useful to check for input correctness and to have the summary printed. NOTE: in MD calculations, the code will perform \"nstep\" steps even if restarting from a previously interrupted calculation.", + "type": "number", + "default": 1 + }, + "iprint": { + "description": "band energies are written every iprint iterations", + "type": "number" + }, + "tstress": { + "type": "boolean", + "default": false, + "description": "calculate stress. It is set to .TRUE. automatically if calculation == 'vc-md' or 'vc-relax'" + }, + "tprnfor": { + "type": "boolean", + "description": "calculate forces. It is set to .TRUE. automatically if calculation == 'relax','md','vc-md'" + }, + "dt": { + "type": "number", + "description": "time step for molecular dynamics, in Rydberg atomic units (1 a.u.=4.8378 * 10^-17 s : beware, the CP code uses Hartree atomic units, half that much!!!)", + "default": 20 + }, + "outdir": { + "type": "string", + "description": "input, temporary, output files are found in this directory, see also wfcdir" + }, + "wfcdir": { + "type": "string", + "description": "This directory specifies where to store files generated by each processor (*.wfc{N}, *.igk{N}, etc.). Useful for machines without a parallel file system: set wfcdir to a local file system, while outdir should be a parallel or network file system, visible to all processors. Beware: in order to restart from interrupted runs, or to perform further calculations using the produced data files, you may need to copy files to outdir. Works only for pw.x." + }, + "prefix": { + "type": "string", + "description": "prepended to input/output filenames: prefix.wfc, prefix.rho, etc.", + "default": "pwscf" + }, + "lkpoint_dir": { + "type": "boolean", + "description": "OBSOLETE - NO LONGER IMPLEMENTED" + }, + "max_seconds": { + "type": "number", + "default": 10000000, + "description": "Jobs stops after max_seconds CPU time. Use this option in conjunction with option restart_mode if you need to split a job too long to complete into shorter jobs that fit into your batch queues." + }, + "etot_conv_thr": { + "type": "number", + "default": 0.0001, + "description": "Convergence threshold on total energy (a.u) for ionic minimization: the convergence criterion is satisfied when the total energy changes less than etot_conv_thr between two consecutive scf steps. Note that etot_conv_thr is extensive, like the total energy. See also forc_conv_thr - both criteria must be satisfied" + }, + "forc_conv_thr": { + "type": "number", + "default": 0.001, + "description": "Convergence threshold on forces (a.u) for ionic minimization: the convergence criterion is satisfied when all components of all forces are smaller than forc_conv_thr. See also etot_conv_thr - both criteria must be satisfied" + }, + "disk_io": { + "type": "string", + "enum": [ + "high", + "medium", + "low", + "nowf", + "none" + ], + "description": "Specifies the amount of disk I/O activity: (only for binary files and xml data file in data directory; other files printed at each molecular dynamics / structural optimization step are not controlled by this option )" + }, + "pseudo_dir": { + "type": "string", + "description": "directory containing pseudopotential files. Default: value of the $ESPRESSO_PSEUDO environment variable if set; '$HOME/espresso/pseudo/' otherwise" + }, + "tefield": { + "type": "boolean", + "default": false, + "description": "If .TRUE. a saw-like potential simulating an electric field is added to the bare ionic potential. See variables edir, eamp, emaxpos, eopreg for the form and size of the added potential." + }, + "dipfield": { + "type": "boolean", + "default": false, + "description": "If .TRUE. and tefield==.TRUE. a dipole correction is also added to the bare ionic potential - implements the recipe of L. Bengtsson, PRB 59, 12301 (1999). See variables edir, emaxpos, eopreg for the form of the correction. Must be used ONLY in a slab geometry, for surface calculations, with the discontinuity FALLING IN THE EMPTY SPACE." + }, + "lelfield": { + "type": "boolean", + "default": false, + "description": "If .TRUE. a homogeneous finite electric field described through the modern theory of the polarization is applied. This is different from tefield == .true. !" + }, + "nberrycyc": { + "type": "integer", + "default": 1, + "description": "In the case of a finite electric field ( lelfield == .TRUE. ) it defines the number of iterations for converging the wavefunctions in the electric field Hamiltonian, for each external iteration on the charge density" + }, + "lorbm": { + "type": "boolean", + "default": false, + "description": "If .TRUE. perform orbital magnetization calculation." + }, + "lberry": { + "type": "boolean", + "default": false, + "description": "If .TRUE. perform a Berry phase calculation. See the header of PW/src/bp_c_phase.f90 for documentation" + }, + "gdir": { + "type": "number", + "description": "For Berry phase calculation: direction of the k-point strings in reciprocal space. Allowed values: 1, 2, 3 1=first, 2=second, 3=third reciprocal lattice vector For calculations with finite electric fields (lelfield==.true.) \"gdir\" is the direction of the field." + }, + "nppstr": { + "type": "number", + "description": "For Berry phase calculation: number of k-points to be calculated along each symmetry-reduced string. The same for calculation with finite electric fields (lelfield==.true.)." + }, + "gate": { + "type": "boolean", + "default": false + }, + "twochem": { + "type": "boolean", + "default": false, + "description": "IF .TRUE. , a two chemical potential calculation for the simulation of photoexcited systems is performed, constraining a fraction of the electrons in the conduction manifold." + }, + "lfcp": { + "type": "boolean", + "default": false, + "description": "If .TRUE. perform a constant bias potential (constant-mu) calculation for a system with ESM method. See the header of PW/src/fcp_module.f90 for documentation. To perform the calculation, you must set a namelist FCP." + }, + "trism": { + "type": "boolean", + "default": false + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/electrons.json b/schema/3pse/file/applications/espresso/7.2/pw.x/electrons.json new file mode 100644 index 000000000..70eab5db7 --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/electrons.json @@ -0,0 +1,157 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/electrons", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "electrons schema", + "type": "object", + "additionalProperties": false, + "properties": { + "electron_maxstep": { + "type": "integer", + "default": 100, + "description": "maximum number of iterations in a scf step. If exact exchange is active, this will affect the inner loops." + }, + "exx_maxstep": { + "type": "integer", + "default": 100, + "description": "maximum number of outer iterations in a scf calculation with exact exchange." + }, + "scf_must_converge": { + "type": "boolean", + "default": true, + "description": "If .false. do not stop molecular dynamics or ionic relaxation when electron_maxstep is reached. Use with care." + }, + "conv_thr": { + "type": "number" + }, + "adaptive_thr": { + "type": "boolean", + "default": false, + "description": "If .TRUE. this turns on the use of an adaptive conv_thr for the inner scf loops when using EXX." + }, + "conv_thr_init": { + "type": "number", + "description": "When adaptive_thr = .TRUE. this is the convergence threshold used for the first scf cycle." + }, + "conv_thr_multi": { + "type": "number", + "description": "When adaptive_thr = .TRUE. the convergence threshold for each scf cycle is given by: max( conv_thr, conv_thr_multi * dexx )" + }, + "mixing_mode": { + "type": "string", + "enum": [ + "plain", + "TF", + "local-TF" + ], + "default": "plain" + }, + "mixing_beta": { + "type": "number", + "description": "mixing factor for self-consistency" + }, + "mixing_ndim": { + "type": "integer", + "default": 8, + "description": "number of iterations used in mixing scheme" + }, + "mixing_fixed_ns": { + "type": "integer", + "default": 0, + "description": "For DFT+U : number of iterations with fixed ns ( ns is the atomic density appearing in the Hubbard term )." + }, + "diagonalization": { + "type": "string", + "enum": [ + "david", + "cg", + "ppcg", + "paro", + "ParO", + "rmm-davidson", + "rmm-paro" + ], + "default": "david" + }, + "diago_thr_init": { + "type": "number", + "description": "Convergence threshold (ethr) for iterative diagonalization (the check is on eigenvalue convergence)." + }, + "diago_cg_maxiter": { + "type": "integer", + "description": "For conjugate gradient diagonalization: max number of iterations" + }, + "diago_ppcg_maxiter": { + "type": "integer", + "description": "For ppcg diagonalization: max number of iterations" + }, + "diago_david_ndim": { + "type": "integer", + "default": 2, + "description": "For Davidson diagonalization: dimension of workspace (number of wavefunction packets, at least 2 needed)." + }, + "diago_rmm_ndim": { + "type": "integer", + "default": 4, + "description": "For RMM-DIIS diagonalization: dimension of workspace (number of wavefunction packets, at least 2 needed)." + }, + "diago_rmm_conv": { + "type": "boolean", + "default": false, + "description": "If .TRUE., RMM-DIIS is performed up to converge. If .FALSE., RMM-DIIS is performed only once." + }, + "diago_gs_nblock": { + "type": "integer", + "default": 16, + "description": "For RMM-DIIS diagonalization: blocking size of Gram-Schmidt orthogonalization" + }, + "diago_full_acc": { + "type": "boolean", + "default": false, + "description": "If .TRUE. all the empty states are diagonalized at the same level of accuracy of the occupied ones. Otherwise the empty states are diagonalized using a larger threshold (this should not affect total energy, forces, and other ground-state properties)." + }, + "efield": { + "type": "number", + "description": "Amplitude of the finite electric field (in Ry a.u.; 1 a.u. = 36.3609*10^10 V/m). Used only if lelfield==.TRUE. and if k-points (K_POINTS card) are not automatic." + }, + "efield_cart": { + "$ref": "../../../../../../core/primitive/array_of_3_numbers.json", + "description": "Finite electric field (in Ry a.u.=36.3609*10^10 V/m) in cartesian axis. Used only if lelfield==.TRUE. and if k-points (K_POINTS card) are automatic." + }, + "efield_phase": { + "type": "string", + "enum": [ + "read", + "write", + "none" + ], + "default": "none" + }, + "startingpot": { + "type": "string", + "enum": [ + "atomic", + "file" + ] + }, + "startingwfc": { + "type": "string", + "enum": [ + "atomic", + "atomic+random", + "random", + "file" + ], + "default": "atomic+random" + }, + "tqr": { + "type": "boolean", + "default": false, + "description": "If .true., use a real-space algorithm for augmentation charges of ultrasoft pseudopotentials and PAWsets. Faster but numerically less accurate than the default G-space algorithm. Use with care and after testing!" + }, + "real_space": { + "type": "boolean", + "default": false, + "description": "If .true., exploit real-space localization to compute matrix elements for nonlocal projectors. Faster and in principle better scaling than the default G-space algorithm, but numerically less accurate, may lead to some loss of translational invariance. Use with care and after testing!" + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json b/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json new file mode 100644 index 000000000..471a35283 --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json @@ -0,0 +1,219 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/hubbard", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "hubbard schema", + "type": "object", + "additionalProperties": false, + "properties": { + "card": { + "type": "string", + "enum": [ + "atomic", + "ortho-atomic", + "norm-atomic", + "wf", + "pseudo" + ] + }, + "values": { + "oneOf": [ + { + "description": "IF DFT+U", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "description": "https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm1764", + "additionalProperties": false, + "properties": { + "U": { + "type": "string", + "enum": [ + "U" + ], + "description": "string constant \"U\"; indicates the specs for the U parameter will be given" + }, + "label": { + "type": "string", + "description": "label of the atom (as defined in ATOMIC_SPECIES)" + }, + "manifold": { + "type": "string", + "description": "specs of the manifold (e.g., 3d, 2p...)" + }, + "u_val": { + "type": "number", + "description": "value of the U parameter (in eV)" + } + } + }, + { + "type": "object", + "description": "https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm1784", + "additionalProperties": false, + "properties": { + "J0": { + "type": "string", + "enum": [ + "J0" + ], + "description": "string constant \"J0\"; indicates the specs for the J0 parameter will be given" + }, + "label": { + "type": "string", + "description": "label of the atom (as defined in ATOMIC_SPECIES)" + }, + "manifold": { + "type": "string", + "description": "specs of the manifold (e.g., 3d, 2p...)" + }, + "j0_val": { + "type": "number", + "description": "value of the J0 parameter (in eV)" + } + } + } + ] + } + }, + { + "description": "IF DFT+U+J", + "type": "array", + "items": { + "type": "object", + "description": "https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm1817", + "additionalProperties": false, + "properties": { + "paramType": { + "type": "string", + "enum": [ + "U", + "J", + "B", + "E2", + "E3" + ], + "description": "character describing the type of Hubbard parameter allowed values: U, J and either B (for d-orbitals) or E2 and E3 (for f-orbitals)" + }, + "label": { + "type": "string", + "description": "label of the atom (as defined in ATOMIC_SPECIES)" + }, + "manifold": { + "type": "string", + "description": "specs of the manifold (e.g., 3d, 2p...)" + }, + "paramValue": { + "type": "number", + "description": "value of the J0 parameter (in eV)" + } + } + } + }, + { + "description": "IF DFT+U+V", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "description": "https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm1847", + "additionalProperties": false, + "properties": { + "U": { + "type": "string", + "enum": [ + "U" + ], + "description": "string constant \"U\"; indicates the specs for the U parameter will be given" + }, + "label": { + "type": "string", + "description": "label of the atom (as defined in ATOMIC_SPECIES)" + }, + "manifold": { + "type": "string", + "description": "specs of the manifold (e.g., 3d, 2p...)" + }, + "u_val": { + "type": "number", + "description": "value of the U parameter (in eV)" + } + } + }, + { + "type": "object", + "description": "https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm1865", + "additionalProperties": false, + "properties": { + "J0": { + "type": "string", + "enum": [ + "J0" + ], + "description": "string constant \"J0\"; indicates the specs for the J0 parameter will be given" + }, + "label": { + "type": "string", + "description": "label of the atom (as defined in ATOMIC_SPECIES)" + }, + "manifold": { + "type": "string", + "description": "specs of the manifold (e.g., 3d, 2p...)" + }, + "j0_val": { + "type": "number", + "description": "value of the J0 parameter (in eV)" + } + } + }, + { + "type": "object", + "description": "https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm1884", + "additionalProperties": false, + "properties": { + "V": { + "type": "string", + "enum": [ + "V" + ], + "description": "string constant \"V\"; indicates the specs for the V parameter will be given" + }, + "label(I)": { + "type": "string", + "description": "label of the atom I (as defined in ATOMIC_SPECIES)" + }, + "manifold(I)": { + "type": "string", + "description": "specs of the manifold for atom I (e.g., 3d, 2p...)" + }, + "label(J)": { + "type": "string", + "description": "label of the atom J (as defined in ATOMIC_SPECIES)" + }, + "manifold(J)": { + "type": "string", + "description": "specs of the manifold for atom J (e.g., 3d, 2p...)" + }, + "I": { + "type": "integer", + "description": "index of the atom I" + }, + "J": { + "type": "integer", + "description": "index of the atom J" + }, + "v_val(I,J)": { + "type": "number", + "description": "value of the V parameter for the atom pair I,J (in eV)" + } + } + } + ] + } + } + ] + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/ions.json b/schema/3pse/file/applications/espresso/7.2/pw.x/ions.json new file mode 100644 index 000000000..d20fd2f0e --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/ions.json @@ -0,0 +1,216 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/ions", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "ions schema", + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "ion_dynamics": { + "type": "string", + "enum": [ + "bfgs", + "damp", + "fire" + ], + "default": "bfgs", + "description": "CASE: calculation == 'relax'" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "ion_dynamics": { + "type": "string", + "enum": [ + "verlet", + "langevin", + "langevin-smc" + ], + "default": "verlet", + "description": "CASE: calculation == 'md'" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "ion_dynamics": { + "type": "string", + "enum": [ + "bfgs", + "damp" + ], + "default": "bfgs", + "description": "CASE: calculation == 'vc-relax'" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "ion_dynamics": { + "type": "string", + "enum": [ + "beeman" + ], + "default": "beeman", + "description": "CASE: calculation == 'vc-md'" + } + } + } + ], + "properties": { + "ion_positions": { + "type": "string", + "enum": [ + "default", + "from_input" + ], + "default": "default" + }, + "ion_velocities": { + "type": "string", + "enum": [ + "default", + "from_input" + ], + "default": "default" + }, + "pot_extrapolation": { + "type": "string", + "enum": [ + "none", + "atomic", + "first_order", + "second_order" + ], + "default": "atomic", + "description": "Used to extrapolate the potential from preceding ionic steps." + }, + "wfc_extrapolation": { + "type": "string", + "enum": [ + "none", + "first_order", + "second_order" + ], + "default": "none", + "description": "Used to extrapolate the wavefunctions from preceding ionic steps." + }, + "remove_rigid_rot": { + "type": "boolean", + "default": false, + "description": "This keyword is useful when simulating the dynamics and/or the thermodynamics of an isolated system. If set to true the total torque of the internal forces is set to zero by adding new forces that compensate the spurious interaction with the periodic images. This allows for the use of smaller supercells." + }, + "ion_temperature": { + "type": "string", + "enum": [ + "rescaling", + "rescale-v", + "rescale-T", + "reduce-T", + "berendsen", + "andersen", + "svr", + "initial", + "not_controlled" + ], + "default": "not_controlled" + }, + "tempw": { + "type": "number", + "description": "Starting temperature (Kelvin) in MD runs target temperature for most thermostats.", + "default": 300 + }, + "tolp": { + "type": "number", + "description": "Tolerance for velocity rescaling. Velocities are rescaled if the run-averaged and target temperature differ more than tolp.", + "default": 100 + }, + "delta_t": { + "type": "number", + "default": 1 + }, + "nraise": { + "type": "integer", + "default": 1 + }, + "refold_pos": { + "type": "boolean", + "default": false, + "description": "This keyword applies only in the case of molecular dynamics or damped dynamics. If true the ions are refolded at each step into the supercell." + }, + "upscale": { + "type": "number", + "description": "Max reduction factor for conv_thr during structural optimization conv_thr is automatically reduced when the relaxation approaches convergence so that forces are still accurate, but conv_thr will not be reduced to less that conv_thr / upscale.", + "default": 100 + }, + "bfgs_ndim": { + "type": "integer", + "default": 1, + "description": "Number of old forces and displacements vectors used in the PULAY mixing of the residual vectors obtained on the basis of the inverse hessian matrix given by the BFGS algorithm." + }, + "trust_radius_max": { + "type": "number", + "description": "Maximum ionic displacement in the structural relaxation. (bfgs only)", + "default": 0.8 + }, + "trust_radius_min": { + "type": "number", + "description": "Minimum ionic displacement in the structural relaxation BFGS is reset when trust_radius < trust_radius_min. (bfgs only)", + "default": 0.001 + }, + "trust_radius_ini": { + "type": "number", + "description": "Initial ionic displacement in the structural relaxation. (bfgs only)", + "default": 0.5 + }, + "w_1": { + "type": "number", + "default": 0.01 + }, + "w_2": { + "type": "number", + "description": "Parameters used in line search based on the Wolfe conditions. (bfgs only)", + "default": 0.5 + }, + "fire_alpha_init": { + "type": "number", + "description": "Initial value of the alpha mixing factor in the FIRE minimization scheme; recommended values are between 0.1 and 0.3", + "default": 0.2 + }, + "fire_falpha": { + "type": "number", + "description": "Scaling of the alpha mixing parameter for steps with P > 0;", + "default": 0.99 + }, + "fire_nmin": { + "type": "integer", + "default": 5, + "description": "Minimum number of steps with P > 0 before increase of dt" + }, + "fire_f_inc": { + "type": "number", + "description": "Factor for increasing dt", + "default": 1.1 + }, + "fire_f_dec": { + "type": "number", + "description": "Factor for decreasing dt", + "default": 0.5 + }, + "fire_dtmax": { + "type": "number", + "description": "Determines the maximum value of dt in the FIRE minimization; dtmax = fire_dtmax*dt", + "default": 10 + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json b/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json new file mode 100644 index 000000000..e8420ec37 --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json @@ -0,0 +1,87 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/k-points", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "k points schema", + "type": "object", + "additionalProperties": false, + "properties": { + "card": { + "type": "string", + "enum": [ + "tpiba", + "automatic", + "crystal", + "gamma", + "tpiba_b", + "crystal_b", + "tpiba_c", + "crystal_c" + ] + }, + "values": { + "oneOf": [ + { + "type": "array", + "description": "K_POINTS tpiba | crystal | tpiba_b | crystal_b | tpiba_c | crystal_c", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "nks": { + "type": "integer", + "description": "Number of supplied special k-points." + }, + "xk_x": { + "type": "number" + }, + "xk_y": { + "type": "number" + }, + "xk_z": { + "type": "number" + }, + "wk": { + "type": "number" + } + } + } + }, + { + "type": "object", + "description": "K_POINTS automatic", + "additionalProperties": false, + "properties": { + "nk1": { + "type": "integer", + "description": "Number of supplied special k-points." + }, + "nk2": { + "type": "integer", + "description": "Number of supplied special k-points." + }, + "nk3": { + "type": "integer", + "description": "Number of supplied special k-points." + }, + "sk1": { + "type": "integer", + "description": "Number of supplied special k-points." + }, + "sk2": { + "type": "integer", + "description": "Number of supplied special k-points." + }, + "sk3": { + "type": "integer", + "description": "Number of supplied special k-points." + } + } + }, + { + "type": "null", + "description": "K_POINTS gamma" + } + ] + } + } +} diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/system.json b/schema/3pse/file/applications/espresso/7.2/pw.x/system.json new file mode 100644 index 000000000..ff4fee1da --- /dev/null +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/system.json @@ -0,0 +1,638 @@ +{ + "$id": "3pse/file/applications/espresso/7.2/pw.x/system", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "system schema", + "type": "object", + "additionalProperties": false, + "anyOf": [ + { + "properties": { + "celldm": { + "type": "array", + "items": { + "type": "number" + }, + "minLength": 6, + "maxLength": 6 + } + } + }, + { + "properties": { + "A": { + "type": "number" + }, + "B": { + "type": "number" + }, + "C": { + "type": "number" + }, + "cosAB": { + "type": "number" + }, + "cosAC": { + "type": "number" + }, + "cosBC": { + "type": "number" + } + } + } + ], + "properties": { + "ibrav": { + "type": "integer" + }, + "nat": { + "type": "integer", + "description": "number of atoms in the unit cell (ALL atoms, except if space_group is set, in which case, INEQUIVALENT atoms)" + }, + "ntyp": { + "type": "integer", + "description": "number of types of atoms in the unit cell" + }, + "nbnd": { + "type": "integer", + "description": "Default: for an insulator, nbnd = number of valence bands (nbnd = # of electrons /2); for a metal, 20% more (minimum 4 more)" + }, + "nbnd_cond": { + "type": "integer", + "description": "Default: nbnd_cond = nbnd - # of electrons / 2 in the collinear case; nbnd_cond = nbnd - # of electrons in the noncollinear case." + }, + "tot_charge": { + "type": "number", + "default": 0 + }, + "starting_charge": { + "type": "number", + "default": 0, + "description": "starting charge on atomic type 'i', to create starting potential with startingpot = 'atomic'." + }, + "tot_magnetization": { + "type": "number", + "default": -10000, + "description": "Total majority spin charge - minority spin charge. Used to impose a specific total electronic magnetization. If unspecified then tot_magnetization variable is ignored and the amount of electronic magnetization is determined during the self-consistent cycle." + }, + "starting_magnetization": { + "type": "array", + "items": { + "type": "number", + "default": 0 + } + }, + "ecutwfc": { + "type": "number", + "description": "kinetic energy cutoff (Ry) for wavefunctions" + }, + "ecutrho": { + "type": "number", + "description": "Kinetic energy cutoff (Ry) for charge density and potential For norm-conserving pseudopotential you should stick to the default value, you can reduce it by a little but it will introduce noise especially on forces and stress. Default: 4 * ecutwfc" + }, + "ecutfock": { + "type": "number", + "description": "Kinetic energy cutoff (Ry) for the exact exchange operator in EXX type calculations. By default this is the same as ecutrho but in some EXX calculations, a significant speed-up can be obtained by reducing ecutfock, at the expense of some loss in accuracy. Must be .gt. ecutwfc. Not implemented for stress calculation and for US-PP and PAW pseudopotentials." + }, + "nr1": { + "type": "integer", + "description": "Three-dimensional FFT mesh (hard grid) for charge density (and scf potential). If not specified the grid is calculated based on the cutoff for charge density (see also ecutrho)" + }, + "nr2": { + "type": "integer", + "description": "Three-dimensional FFT mesh (hard grid) for charge density (and scf potential). If not specified the grid is calculated based on the cutoff for charge density (see also ecutrho)" + }, + "nr3": { + "type": "integer", + "description": "Three-dimensional FFT mesh (hard grid) for charge density (and scf potential). If not specified the grid is calculated based on the cutoff for charge density (see also ecutrho)" + }, + "nr1s": { + "type": "integer", + "description": "Three-dimensional mesh for wavefunction FFT and for the smooth part of charge density ( smooth grid ). Coincides with nr1, nr2, nr3 if ecutrho = 4 * ecutwfc ( default )" + }, + "nr2s": { + "type": "integer", + "description": "Three-dimensional mesh for wavefunction FFT and for the smooth part of charge density ( smooth grid ). Coincides with nr1, nr2, nr3 if ecutrho = 4 * ecutwfc ( default )" + }, + "nr3s": { + "type": "integer", + "description": "Three-dimensional mesh for wavefunction FFT and for the smooth part of charge density ( smooth grid ). Coincides with nr1, nr2, nr3 if ecutrho = 4 * ecutwfc ( default )" + }, + "nosym": { + "type": "boolean", + "default": false + }, + "nosym_evc": { + "type": "boolean", + "default": false + }, + "noinv": { + "type": "boolean", + "default": false, + "description": "if (.TRUE.) disable the usage of k => -k symmetry (time reversal) in k-point generation" + }, + "no_t_rev": { + "type": "boolean", + "default": false, + "description": "if (.TRUE.) disable the usage of magnetic symmetry operations that consist in a rotation + time reversal." + }, + "force_symmorphic": { + "type": "boolean", + "default": false, + "description": "if (.TRUE.) force the symmetry group to be symmorphic by disabling symmetry operations having an associated fractionary translation" + }, + "use_all_frac": { + "type": "boolean", + "default": false + }, + "occupations": { + "type": "string", + "enum": [ + "smearing", + "tetrahedra", + "tetrahedra_lin", + "tetrahedra_opt", + "fixed", + "from_input" + ] + }, + "one_atom_occupations": { + "type": "boolean", + "default": false + }, + "starting_spin_angle": { + "type": "boolean", + "default": false + }, + "degauss_cond": { + "type": "number", + "default": 0, + "description": "value of the gaussian spreading (Ry) for brillouin-zone integration in the conduction manifold in a two-chemical potential calculation (twochem=.true.)." + }, + "nelec_cond": { + "type": "number", + "default": 0, + "description": "Number of electrons placed in the conduction manifold in a two-chemical potential calculation (twochem=.true.). Of the total # of electrons nelec, nelec-nelec_cond will occupy the valence manifold and nelec_cond will be constrained in the conduction manifold." + }, + "degauss": { + "type": "number", + "default": 0, + "description": "value of the gaussian spreading (Ry) for brillouin-zone integration in metals." + }, + "smearing": { + "type": "string", + "enum": [ + "gaussian", + "gauss", + "methfessel-paxton", + "m-p", + "mp", + "marzari-vanderbilt", + "cold", + "m-v", + "mv", + "fermi-dirac", + "f-d", + "fd" + ], + "default": "gaussian" + }, + "nspin": { + "type": "integer", + "default": 1 + }, + "sic_gamma": { + "type": "number", + "default": 0, + "description": "Strength of the gammaDFT potential." + }, + "pol_type": { + "type": "string", + "enum": [ + "e", + "h" + ], + "description": "Type of polaron in gammaDFT." + }, + "sic_energy": { + "type": "boolean", + "default": false, + "description": "Enable the calculation of the total energy in gammaDFT. When .true., a preliminary calculation is performed to calculate the electron density in the absence of the polaron. When .false., the total energy printed in output should not be considered. For structural relaxations, it is recommended to use .false. to avoid doubling the computational cost." + }, + "sci_vb": { + "type": "number", + "default": 0, + "description": "Valence band shift (in eV) through self-consistent scissor operator. When performing gammaDFT calculations of polarons, the polaron level is not shifted." + }, + "sci_cb": { + "type": "number", + "default": 0, + "description": "Conduction band band shift (in eV) through self-consistent scissor operator. When performing gammaDFT calculations of polarons, the polaron level is not shifted." + }, + "noncolin": { + "type": "boolean", + "default": false, + "description": "if .true. the program will perform a noncollinear calculation." + }, + "ecfixed": { + "type": "number", + "default": 0 + }, + "qcutz": { + "type": "number", + "default": 0 + }, + "q2sigma": { + "type": "number", + "default": 0.1 + }, + "input_dft": { + "type": "string", + "description": "Exchange-correlation functional: eg 'PBE', 'BLYP' etc See Modules/funct.f90 for allowed values. Overrides the value read from pseudopotential files. Use with care and if you know what you are doing!" + }, + "ace": { + "type": "boolean", + "default": true, + "description": "Use Adaptively Compressed Exchange operator as in Lin Lin, J. Chem. Theory Comput. 2016, 12, 2242--2249, doi:10.1021/acs.jctc.6b00092" + }, + "exx_fraction": { + "type": "number", + "description": "Fraction of EXX for hybrid functional calculations. In the case of input_dft='PBE0', the default value is 0.25, while for input_dft='B3LYP' the exx_fraction default value is 0.20." + }, + "screening_parameter": { + "type": "number", + "default": 0.106, + "description": "screening_parameter for HSE like hybrid functionals." + }, + "exxdiv_treatment": { + "type": "string", + "default": "gygi-baldereschi", + "enum": [ + "gygi-baldereschi", + "vcut_spherical", + "vcut_ws", + "none" + ] + }, + "x_gamma_extrapolation": { + "type": "boolean", + "default": true, + "description": "Specific for EXX. If .true., extrapolate the G=0 term of the potential" + }, + "ecutvcut": { + "type": "number", + "description": "Reciprocal space cutoff for correcting Coulomb potential divergencies at small q vectors." + }, + "nqx1": { + "type": "integer", + "default": 0, + "description": "Three-dimensional mesh for q (k1-k2) sampling of the Fock operator (EXX). Can be smaller than the number of k-points." + }, + "nqx2": { + "type": "integer", + "description": "Three-dimensional mesh for q (k1-k2) sampling of the Fock operator (EXX). Can be smaller than the number of k-points." + }, + "nqx3": { + "type": "integer", + "description": "Three-dimensional mesh for q (k1-k2) sampling of the Fock operator (EXX). Can be smaller than the number of k-points." + }, + "localization_thr": { + "type": "number", + "default": 0, + "description": "Overlap threshold over which the exchange integral over a pair of localized orbitals is included in the evaluation of EXX operator. Any value greater than 0.0 triggers the SCDM localization and the evaluation on EXX using the localized orbitals. Very small value of the threshold should yield the same result as the default EXX evaluation" + }, + "Hubbard_occ": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + }, + "maxItems": 3, + "minItems": 3 + } + }, + "Hubbard_alpha": { + "type": "array", + "items": { + "type": "number", + "default": 0 + } + }, + "Hubbard_beta": { + "type": "array", + "items": { + "type": "number", + "default": 0 + } + }, + "starting_ns_eigenvalue": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number" + } + } + } + }, + "dmft": { + "type": "boolean", + "default": false, + "description": "If true, nscf calculation will exit in restart mode, scf calculation will restart from there if DMFT updates are provided as hdf5 archive. Scf calculation should be used only with electron_maxstep = 1." + }, + "dmft_prefix": { + "type": "string", + "description": "prepended to hdf5 archive: dmft_prefix.h5" + }, + "ensemble_energies": { + "type": "boolean", + "default": false, + "description": "If ensemble_energies = .true., an ensemble of xc energies is calculated non-selfconsistently for perturbed exchange-enhancement factors and LDA vs. PBE correlation ratios after each converged electronic ground state calculation." + }, + "edir": { + "type": "integer", + "description": "The direction of the electric field or dipole correction is parallel to the bg(:,edir) reciprocal lattice vector, so the potential is constant in planes defined by FFT grid points; edir = 1, 2 or 3. Used only if tefield is .TRUE." + }, + "emaxpos": { + "type": "number", + "default": 0.5, + "description": "Position of the maximum of the saw-like potential along crystal axis edir, within the unit cell (see below), 0 < emaxpos < 1 Used only if tefield is .TRUE." + }, + "eopreg": { + "type": "number", + "default": 0.1, + "description": "Zone in the unit cell where the saw-like potential decreases. ( see below, 0 < eopreg < 1 ). Used only if tefield is .TRUE." + }, + "eamp": { + "type": "number", + "default": 0.001 + }, + "angle1": { + "type": "array", + "items": { + "type": "number" + }, + "maxItems": 1, + "minItems": 1, + "description": "The angle expressed in degrees between the initial magnetization and the z-axis. For noncollinear calculations only; index i runs over the atom types." + }, + "angle2": { + "type": "array", + "items": { + "type": "number" + }, + "maxItems": 1, + "minItems": 1, + "description": "The angle expressed in degrees between the projection of the initial magnetization on x-y plane and the x-axis. For noncollinear calculations only." + }, + "lforcet": { + "type": "boolean", + "description": "When starting a non collinear calculation using an existing density file from a collinear lsda calculation assumes previous density points in z direction and rotates it in the direction described by angle1 and angle2 variables for atomic type 1" + }, + "constrained_magnetization": { + "type": "string", + "enum": [ + "none", + "total", + "atomic", + "total direction", + "atomic direction" + ], + "default": "none", + "description": "Used to perform constrained calculations in magnetic systems." + }, + "fixed_magnetization": { + "type": "array", + "items": { + "type": "number", + "default": 0 + }, + "maxItems": 3, + "minItems": 3 + }, + "lambda": { + "type": "number", + "default": 1, + "description": "parameter used for constrained_magnetization calculations N.B.: if the scf calculation does not converge, try to reduce lambda to obtain convergence, then restart the run with a larger lambda" + }, + "report": { + "type": "integer", + "default": -1, + "description": "determines when atomic magnetic moments are printed on output" + }, + "lspinorb": { + "type": "boolean", + "description": "if .TRUE. the noncollinear code can use a pseudopotential with spin-orbit." + }, + "assume_isolated": { + "type": "string", + "enum": [ + "none", + "makov-payne", + "m-p", + "mp", + "martyna-tuckerman", + "m-t", + "mt", + "esm", + "2D" + ], + "default": "none", + "definition": "Used to perform calculation assuming the system to be isolated (a molecule or a cluster in a 3D supercell)" + }, + "esm_bc": { + "type": "string", + "enum": [ + "pbc", + "bc1", + "bc2", + "bc3" + ], + "default": "pbc", + "definition": "If assume_isolated = 'esm', determines the boundary conditions used for either side of the slab." + }, + "esm_w": { + "type": "number", + "default": 0, + "description": "If assume_isolated = 'esm', determines the position offset [in a.u.] of the start of the effective screening region, measured relative to the cell edge. (ESM region begins at z = +/- [L_z/2 + esm_w] )." + }, + "esm_efield": { + "type": "number", + "default": 0, + "description": "If assume_isolated = 'esm' and esm_bc = 'bc2', gives the magnitude of the electric field [Ry/a.u.] to be applied between semi-infinite ESM electrodes." + }, + "esm_nfit": { + "type": "integer", + "default": 4, + "description": "If assume_isolated = 'esm', gives the number of z-grid points for the polynomial fit along the cell edge." + }, + "lgcscf": { + "type": "boolean", + "default": false, + "description": "If .TRUE. perform a constant bias potential (constant-mu) calculation with Grand-Canonical SCF." + }, + "gcscf_mu": { + "type": "number", + "description": "The target Fermi energy (eV) of GC-SCF. One can start with appropriate total charge of the system by giving tot_charge" + }, + "gcscf_conv_thr": { + "type": "number", + "default": 0.01, + "description": "Convergence threshold of Fermi energy (eV) for GC-SCF." + }, + "gcscf_beta": { + "type": "number", + "default": 0.05, + "description": "Mixing factor for GC-SCF. Larger values are recommended, if systems with small DOS on Fermi surface as graphite." + }, + "vdw_corr": { + "type": "string", + "enum": [ + "grimme-d2", + "Grimme-D2", + "DFT-D", + "dft-d", + "grimme-d3", + "Grimme-D3", + "DFT-D3", + "dft-d3", + "TS", + "ts", + "ts-vdw", + "ts-vdW", + "tkatchenko-scheffler", + "MBD", + "mbd", + "many-body-dispersion", + "mbd_vdw", + "XDM", + "xdm" + ], + "default": "none", + "description": "Type of Van der Waals correction" + }, + "london": { + "type": "boolean", + "default": false, + "description": "OBSOLESCENT, same as vdw_corr='DFT-D'" + }, + "london_s6": { + "type": "number", + "default": 0.75, + "description": "global scaling parameter for DFT-D. Default is good for PBE." + }, + "london_c6": { + "type": "number", + "description": "atomic C6 coefficient of each atom type" + }, + "london_rvdw": { + "type": "number", + "description": "atomic vdw radii of each atom type" + }, + "london_rcut": { + "type": "number", + "default": 200, + "description": "cutoff radius (a.u.) for dispersion interactions" + }, + "dftd3_version": { + "type": "integer", + "default": 3, + "minimum": 2, + "maximum": 6, + "description": "Version of Grimme implementation of Grimme-D3" + }, + "dftd3_threebody": { + "type": "boolean", + "default": true, + "description": "Turn three-body terms in Grimme-D3 on. If .false. two-body contributions only are computed, using two-body parameters of Grimme-D3. If dftd3_version=2, three-body contribution is always disabled." + }, + "ts_vdw_econv_thr": { + "type": "number", + "default": 0.000001, + "description": "Optional: controls the convergence of the vdW energy (and forces). The default value is a safe choice, likely too safe, but you do not gain much in increasing it" + }, + "ts_vdw_isolated": { + "type": "boolean", + "default": false, + "description": "Optional: set it to .TRUE. when computing the Tkatchenko-Scheffler vdW energy or the Many-Body dispersion (MBD) energy for an isolated (non-periodic) system." + }, + "xdm": { + "type": "boolean", + "default": false, + "description": "OBSOLESCENT, same as vdw_corr='xdm'" + }, + "xdm_a1": { + "type": "number", + "default": 0.6836, + "description": "Damping function parameter a1 (adimensional)" + }, + "xdm_a2": { + "type": "number", + "default": 1.5045, + "description": "Damping function parameter a2 (angstrom)" + }, + "space_group": { + "type": "integer", + "default": 0, + "description": "The number of the space group of the crystal, as given in the International Tables of Crystallography A (ITA)" + }, + "uniqueb": { + "type": "boolean", + "default": false, + "description": "Used only for monoclinic lattices" + }, + "origin_choice": { + "type": "integer", + "default": 1, + "description": "Used only for space groups that in the ITA allow the use of two different origins" + }, + "rhombohedral": { + "type": "boolean", + "default": true, + "description": "Used only for rhombohedral space groups." + }, + "zgate": { + "type": "number", + "default": 0.5, + "description": "used only if gate = .TRUE." + }, + "relaxz": { + "type": "boolean", + "default": false, + "description": "used only if gate = .TRUE." + }, + "block": { + "type": "boolean", + "default": false, + "description": "used only if gate = .TRUE." + }, + "block_1": { + "type": "number", + "default": 0.45, + "description": "used only if gate = .TRUE. and block = .TRUE." + }, + "block_2": { + "type": "number", + "default": 0.55, + "description": "used only if gate = .TRUE. and block = .TRUE." + }, + "block_height": { + "type": "number", + "default": 0.1, + "description": "used only if gate = .TRUE. and block = .TRUE." + }, + "nextffield": { + "type": "integer", + "default": 0, + "description": "Number of activated external ionic force fields." + } + }, + "required": [ + "ibrav", + "nat", + "ntyp", + "ecutwfc" + ] +} From fd586bc17ada1314a642fd07e488dbff08893432 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:04:45 +0800 Subject: [PATCH 06/48] SOF-6873: include valence configuration in pseudopotential schema --- schema/core/reusable/atomic_orbital.json | 31 +++++++++++++++++++ .../methods_directory/physical/psp/file.json | 6 ++++ 2 files changed, 37 insertions(+) create mode 100644 schema/core/reusable/atomic_orbital.json diff --git a/schema/core/reusable/atomic_orbital.json b/schema/core/reusable/atomic_orbital.json new file mode 100644 index 000000000..057f16ad3 --- /dev/null +++ b/schema/core/reusable/atomic_orbital.json @@ -0,0 +1,31 @@ +{ + "$id": "core/reusable/atomic_orbital.json", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "atomic orbital schema", + "type": "object", + "properties": { + "orbitalName": { + "type": "string", + "pattern": "^[1-7][sSpPdDfF]$" + }, + "orbitalIndex": { + "type": "number", + "minimum": 1 + }, + "principalNumber": { + "type": "number", + "minimum": 1, + "maximum": 7 + }, + "angularMomentum": { + "type": "number", + "minimum": 0, + "maximum": 3 + }, + "occupation": { + "type": "number", + "minimum": 0, + "maximum": 14 + } + } +} diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index 768bba3ea..145a2c984 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -28,6 +28,12 @@ "$ref": "../../../core/reusable/category_path.json", "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'" }, + "valenceConfiguration": { + "type": "array", + "items": { + "$ref": "../../../core/reusable/atomic_orbital.json" + } + }, "path": { "type": "string", "description": "location of the pseudopotential file on filesystem" From ef767ae69bec6fc1317bd536053e3bb5dde096c7 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Tue, 5 Sep 2023 19:02:47 +0800 Subject: [PATCH 07/48] adjust schema fields to match with current web-app implementation --- schema/methods_directory/physical/psp/file.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index 145a2c984..be8d6a0a4 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -7,9 +7,9 @@ "type": "string", "description": "chemical element" }, - "textHeading": { + "hash": { "type": "string", - "description": "text of pseudopotential file header" + "description": "MD5 hash of the pseudopotential file" }, "type": { "type": "string", @@ -30,6 +30,7 @@ }, "valenceConfiguration": { "type": "array", + "description": "contains pseudo orbital information, including orbital names and occupations", "items": { "$ref": "../../../core/reusable/atomic_orbital.json" } @@ -45,6 +46,10 @@ "filename": { "type": "string", "description": "filename of pseudopotential file on filesystem" + }, + "name": { + "type": "string", + "description": "name of the data category: pseudopotential" } }, "required": [ From 3ae1503c840dd477bf2775994d4ad6467d2e31b5 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Tue, 5 Sep 2023 19:16:05 +0800 Subject: [PATCH 08/48] update example json for validation tests --- example/methods_directory/physical/psp.json | 24 ++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/example/methods_directory/physical/psp.json b/example/methods_directory/physical/psp.json index 16ebacb71..2f1d2638c 100644 --- a/example/methods_directory/physical/psp.json +++ b/example/methods_directory/physical/psp.json @@ -10,11 +10,8 @@ "data": { "pseudo": [ { - "_id": "56f26f3c9abea1134ba0c50e", - "textHeading": "VRHFIN =Si: s2p2\n LEXCH = PE\n EATOM = 103.0669 eV, 7.5752 Ry\n\n TITEL = PAW_PBE Si 05Jan2001\n LULTRA = F use ultrasoft PP ?\n IUNSCR = 1 unscreen: 0-lin 1-nonlin 2-no\n RPACOR = 1.500 partial core radius\n POMASS = 28.085; ZVAL = 4.000 mass and valenz\n RCORE = 1.900 outmost cutoff radius\n RWIGS = 2.480; RWIGS = 1.312 wigner-seitz radius (au A)\n ENMAX = 245.345; ENMIN = 184.009 eV\n ICORE = 2 local potential\n LCOR = T correct aug charges\n LPAW = T paw PP\n EAUG = 322.069\n DEXC = 0.000\n RMAX = 1.950 core radius for proj-oper\n RAUG = 1.300 factor for augmentation sphere\n RDEP = 1.993 radius for radial grids\n RDEPT = 1.837 core radius for aug-charge\n \n Atomic configuration\n 6 entries\n n l j E occ.\n 1 0 0.50 -1785.8828 2.0000\n 2 0 0.50 -139.4969 2.0000\n 2 1 1.50 -95.5546 6.0000\n 3 0 0.50 -10.8127 2.0000\n 3 1 0.50 -4.0811 2.0000\n 3 2 1.50 -4.0817 0.0000\n Description\n l E TYP RCUT TYP RCUT\n 0 -10.8127223 23 1.900\n 0 -7.6451159 23 1.900\n 1 -4.0811372 23 1.900\n 1 2.4879257 23 1.900\n 2 -4.0817478 7 1.900\n Error from kinetic energy argument (eV)\n NDATA = 100\n STEP = 20.000 1.050\n 10.1 9.04 8.56 7.65 7.23 6.44 5.73 5.40\n 4.79 4.25 4.00 3.54 3.13 2.77 2.45 2.16\n 1.91 1.69 1.50 1.24 1.10 0.975 0.812 0.718\n 0.636 0.529 0.440 0.388 0.322 0.266 0.219 0.180\n 0.148 0.121 0.986E-01 0.804E-01 0.614E-01 0.504E-01 0.392E-01 0.328E-01\n 0.265E-01 0.220E-01 0.189E-01 0.166E-01 0.149E-01 0.135E-01 0.123E-01 0.109E-01\n 0.977E-02 0.840E-02 0.707E-02 0.605E-02 0.488E-02 0.387E-02 0.290E-02 0.229E-02\n 0.185E-02 0.152E-02 0.134E-02 0.125E-02 0.121E-02 0.117E-02 0.112E-02 0.102E-02\n 0.915E-03 0.776E-03 0.640E-03 0.524E-03 0.425E-03 0.369E-03 0.331E-03 0.310E-03\n 0.294E-03 0.273E-03 0.242E-03 0.210E-03 0.175E-03 0.146E-03 0.124E-03 0.113E-03\n 0.105E-03 0.973E-04 0.879E-04 0.755E-04 0.633E-04 0.539E-04 0.478E-04 0.438E-04\n 0.404E-04 0.362E-04 0.308E-04 0.264E-04 0.229E-04 0.209E-04 0.192E-04 0.170E-04\n 0.145E-04 0.126E-04 0.112E-04 0.103E-04", - "apps": [ - "vasp" - ], + "hash": "4e058592231fc4e091ac0c92d87797b0", + "apps": ["vasp"], "element": "Si", "source": "vasp", "version": "5.2", @@ -23,6 +20,23 @@ "exchangeCorrelation": "/pb/qm/dft/ksdft/gga?functional=pbe", "filename": "POTCAR", "schemaVersion": "0.2.0", + "name": "pseudopotential", + "valenceConfiguration": [ + { + "orbitalName": "3S", + "orbitalIndex": 1, + "principalNumber": 3, + "angularMomentum": 0, + "occupation": 2 + }, + { + "orbitalName": "3P", + "orbitalIndex": 2, + "principalNumber": 3, + "angularMomentum": 1, + "occupation": 2 + } + ], "inSet": [], "tags": [] } From 6ac85be80d231d5e0aef635329e0718e0c78d9b1 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 11:17:18 -0700 Subject: [PATCH 09/48] chore: add schema for path object --- schema/system/path.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 schema/system/path.json diff --git a/schema/system/path.json b/schema/system/path.json new file mode 100644 index 000000000..1b015c7f4 --- /dev/null +++ b/schema/system/path.json @@ -0,0 +1,11 @@ +{ + "$id": "system/path", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "path schema", + "type": "object", + "properties": { + "path": { + "$ref": "../core/reusable/category_path.json" + } + } +} From a8ad97a210c37b57fda616b1833c88cce66aa511 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 11:18:04 -0700 Subject: [PATCH 10/48] chore: add schema for path entity --- schema/system/path_entity.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 schema/system/path_entity.json diff --git a/schema/system/path_entity.json b/schema/system/path_entity.json new file mode 100644 index 000000000..051f5717f --- /dev/null +++ b/schema/system/path_entity.json @@ -0,0 +1,13 @@ +{ + "$id": "system/path-entity", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "path entity schema", + "allOf": [ + { + "$ref": "./name.json" + }, + { + "$ref": "./path.json" + } + ] +} From 3c2accaf86ef77d0cb51f8b3a6a7790e76c98e1d Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 11:19:16 -0700 Subject: [PATCH 11/48] refactor: use path entity schema --- schema/method/categorized_method.json | 5 +---- schema/method/unit_method.json | 6 +----- schema/model/model_without_method.json | 5 +---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/schema/method/categorized_method.json b/schema/method/categorized_method.json index 177bf4710..72bafb6a6 100644 --- a/schema/method/categorized_method.json +++ b/schema/method/categorized_method.json @@ -4,16 +4,13 @@ "title": "categorized method schema", "allOf": [ { - "$ref": "../system/name.json" + "$ref": "../system/path_entity.json" }, { "$ref": "../system/tags.json" } ], "properties": { - "path": { - "$ref": "../core/reusable/category_path.json" - }, "units": { "type": "array", "items": { diff --git a/schema/method/unit_method.json b/schema/method/unit_method.json index 413078901..6a18be5a7 100644 --- a/schema/method/unit_method.json +++ b/schema/method/unit_method.json @@ -4,7 +4,7 @@ "title": "unit method schema (base)", "allOf": [ { - "$ref": "../system/name.json" + "$ref": "../system/path_entity.json" }, { "$ref": "../system/tags.json" @@ -15,10 +15,6 @@ "description": "Method categories", "$ref": "../core/reusable/categories.json" }, - "path": { - "description": "URL-like method path, e.g. physical/pw", - "$ref": "../core/reusable/category_path.json" - }, "parameters": { "description": "Instructive parameters defining the method", "type": "object" diff --git a/schema/model/model_without_method.json b/schema/model/model_without_method.json index b50bc4df0..4017442ee 100644 --- a/schema/model/model_without_method.json +++ b/schema/model/model_without_method.json @@ -4,16 +4,13 @@ "title": "model without method schema (base)", "allOf": [ { - "$ref": "../system/name.json" + "$ref": "../system/path_entity.json" }, { "$ref": "../system/tags.json" } ], "properties": { - "path": { - "$ref": "../core/reusable/category_path.json" - }, "categories": { "description": "Model categories", "$ref": "../core/reusable/categories.json" From f4bda596cda8cfca6d373dde232c2fbe4c58c4de Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 12:18:32 -0700 Subject: [PATCH 12/48] chore: add model parameters schema --- example/model/model_parameters.json | 7 ++++++ schema/model/model_parameters.json | 38 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 example/model/model_parameters.json create mode 100644 schema/model/model_parameters.json diff --git a/example/model/model_parameters.json b/example/model/model_parameters.json new file mode 100644 index 000000000..a80dcd124 --- /dev/null +++ b/example/model/model_parameters.json @@ -0,0 +1,7 @@ +{ + "functional": "pbe", + "dispersionCorrection": "dft-d3", + "hubbardType": "u", + "spinPolarization": "collinear", + "spinOrbitCoupling": true +} diff --git a/schema/model/model_parameters.json b/schema/model/model_parameters.json new file mode 100644 index 000000000..b33eab987 --- /dev/null +++ b/schema/model/model_parameters.json @@ -0,0 +1,38 @@ +{ + "$id": "model/model-parameters", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "ModelParameters", + "allOf": [ + { + "$ref": "./mixins/hubbard.json" + }, + { + "$ref": "./mixins/spin_polarization.json" + }, + { + "$ref": "./mixins/spin_orbit_coupling.json" + }, + { + "$ref": "./mixins/dispersion_correction.json" + }, + { + "oneOf": [ + { + "$ref": "./mixins/dft/lda_functional.json" + }, + { + "$ref": "./mixins/dft/gga_functional.json" + }, + { + "$ref": "./mixins/dft/mgga_functional.json" + }, + { + "$ref": "./mixins/dft/hybrid_functional.json" + }, + { + "$ref": "./mixins/dft/double_hybrid_functional.json" + } + ] + } + ] +} From a8c48ed6ea9e7fddb5eda3ee2b4d43b6a1bcb1f7 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 12:19:20 -0700 Subject: [PATCH 13/48] refactor: use definitions for ao basis parameters --- schema/methods_directory/physical/ao/dunning.json | 15 ++++++++++----- schema/methods_directory/physical/ao/other.json | 15 ++++++++++----- schema/methods_directory/physical/ao/pople.json | 15 ++++++++++----- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/schema/methods_directory/physical/ao/dunning.json b/schema/methods_directory/physical/ao/dunning.json index ffb783f28..629957a6d 100644 --- a/schema/methods_directory/physical/ao/dunning.json +++ b/schema/methods_directory/physical/ao/dunning.json @@ -14,13 +14,18 @@ "parameters": { "allOf": [ { - "properties": { - "basisSlug": { - "$ref": "./enum_options.json#/dunningAoBasis" - } - } + "$ref": "#/definitions/ao-basis-dunning" } ] } + }, + "definitions": { + "ao-basis-dunning": { + "properties": { + "basisSlug": { + "$ref": "./enum_options.json#/dunningAoBasis" + } + } + } } } diff --git a/schema/methods_directory/physical/ao/other.json b/schema/methods_directory/physical/ao/other.json index 4be5df773..9cdfc35c7 100644 --- a/schema/methods_directory/physical/ao/other.json +++ b/schema/methods_directory/physical/ao/other.json @@ -14,13 +14,18 @@ "parameters": { "allOf": [ { - "properties": { - "basisSlug": { - "$ref": "./enum_options.json#/otherAoBasis" - } - } + "$ref": "#/definitions/ao-basis-other" } ] } + }, + "definitions": { + "ao-basis-other": { + "properties": { + "basisSlug": { + "$ref": "./enum_options.json#/otherAoBasis" + } + } + } } } diff --git a/schema/methods_directory/physical/ao/pople.json b/schema/methods_directory/physical/ao/pople.json index 480109613..43aa0419d 100644 --- a/schema/methods_directory/physical/ao/pople.json +++ b/schema/methods_directory/physical/ao/pople.json @@ -14,13 +14,18 @@ "parameters": { "allOf": [ { - "properties": { - "basisSlug": { - "$ref": "./enum_options.json#/popleAoBasis" - } - } + "$ref": "#/definitions/ao-basis-pople" } ] } + }, + "definitions": { + "ao-basis-pople": { + "properties": { + "basisSlug": { + "$ref": "./enum_options.json#/popleAoBasis" + } + } + } } } From 2ae1cd0cc8fa1ba6f059715435cd56c244658a7e Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 12:19:46 -0700 Subject: [PATCH 14/48] chore: add method parameter schema --- example/method/method_parameters.json | 3 +++ schema/method/method_parameters.json | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 example/method/method_parameters.json create mode 100644 schema/method/method_parameters.json diff --git a/example/method/method_parameters.json b/example/method/method_parameters.json new file mode 100644 index 000000000..fbbd736b2 --- /dev/null +++ b/example/method/method_parameters.json @@ -0,0 +1,3 @@ +{ + "basisSlug": "6-311G" +} diff --git a/schema/method/method_parameters.json b/schema/method/method_parameters.json new file mode 100644 index 000000000..27fad6621 --- /dev/null +++ b/schema/method/method_parameters.json @@ -0,0 +1,20 @@ +{ + "$id": "method/method-parameters", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MethodParameters", + "allOf": [ + { + "oneOf": [ + { + "$ref": "../methods_directory/physical/ao/dunning.json#/definitions/ao-basis-dunning" + }, + { + "$ref": "../methods_directory/physical/ao/pople.json#/definitions/ao-basis-pople" + }, + { + "$ref": "../methods_directory/physical/ao/other.json#/definitions/ao-basis-other" + } + ] + } + ] +} From 6ab718bd9cc5b9d490cc4007d18b9e6311a05465 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 14:53:41 -0700 Subject: [PATCH 15/48] chore: adjust titles for improved TS type names --- schema/core/reusable/categories.json | 2 +- schema/method.json | 2 +- schema/method/categorized_method.json | 2 +- schema/method/unit_method.json | 2 +- schema/model/categorized_model.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/schema/core/reusable/categories.json b/schema/core/reusable/categories.json index 2e4e70259..f747a8d52 100644 --- a/schema/core/reusable/categories.json +++ b/schema/core/reusable/categories.json @@ -1,7 +1,7 @@ { "$id": "core/reusable/categories", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "categories schema", + "title": "categories", "description": "Used to categorize entities such as models and methods", "type": "object", "properties": { diff --git a/schema/method.json b/schema/method.json index b71eead9f..881a92d07 100644 --- a/schema/method.json +++ b/schema/method.json @@ -1,7 +1,7 @@ { "$id": "method", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "method schema (base)", + "title": "base method", "properties": { "type": { "description": "general type of this method, eg. `pseudopotential`", diff --git a/schema/method/categorized_method.json b/schema/method/categorized_method.json index 72bafb6a6..cb70c4300 100644 --- a/schema/method/categorized_method.json +++ b/schema/method/categorized_method.json @@ -1,7 +1,7 @@ { "$id": "method/categorized-method", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "categorized method schema", + "title": "categorized method", "allOf": [ { "$ref": "../system/path_entity.json" diff --git a/schema/method/unit_method.json b/schema/method/unit_method.json index 6a18be5a7..c8d462025 100644 --- a/schema/method/unit_method.json +++ b/schema/method/unit_method.json @@ -1,7 +1,7 @@ { "$id": "method/unit-method", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "unit method schema (base)", + "title": "categorized method unit", "allOf": [ { "$ref": "../system/path_entity.json" diff --git a/schema/model/categorized_model.json b/schema/model/categorized_model.json index 6c9391d1e..171f521a9 100644 --- a/schema/model/categorized_model.json +++ b/schema/model/categorized_model.json @@ -1,7 +1,7 @@ { "$id": "model/categorized-model", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "categorized base model", + "title": "categorized model", "allOf": [ { "$ref": "./model_without_method.json" From 456eec1ef82df62dc3e05d18a8ff3c4ffbf8c754 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 17:41:57 -0700 Subject: [PATCH 16/48] chore: add specific legacy models with examples --- example/models_directory/legacy/dft.json | 8 ++ example/models_directory/legacy/ml.json | 7 ++ example/models_directory/legacy/unknown.json | 7 ++ schema/models_directory/legacy/dft.json | 81 ++++++++++++++++++++ schema/models_directory/legacy/ml.json | 22 ++++++ schema/models_directory/legacy/unknown.json | 22 ++++++ 6 files changed, 147 insertions(+) create mode 100644 example/models_directory/legacy/dft.json create mode 100644 example/models_directory/legacy/ml.json create mode 100644 example/models_directory/legacy/unknown.json create mode 100644 schema/models_directory/legacy/dft.json create mode 100644 schema/models_directory/legacy/ml.json create mode 100644 schema/models_directory/legacy/unknown.json diff --git a/example/models_directory/legacy/dft.json b/example/models_directory/legacy/dft.json new file mode 100644 index 000000000..6b1e8d11a --- /dev/null +++ b/example/models_directory/legacy/dft.json @@ -0,0 +1,8 @@ +{ + "type": "dft", + "subtype": "gga", + "functional": "pbe", + "method": { + "...": "include(../../method.json)" + } +} diff --git a/example/models_directory/legacy/ml.json b/example/models_directory/legacy/ml.json new file mode 100644 index 000000000..bec9990ad --- /dev/null +++ b/example/models_directory/legacy/ml.json @@ -0,0 +1,7 @@ +{ + "type": "ml", + "subtype": "re", + "method": { + "...": "include(../../method.json)" + } +} diff --git a/example/models_directory/legacy/unknown.json b/example/models_directory/legacy/unknown.json new file mode 100644 index 000000000..d42c77410 --- /dev/null +++ b/example/models_directory/legacy/unknown.json @@ -0,0 +1,7 @@ +{ + "type": "unknown", + "subtype": "unknown", + "method": { + "...": "include(../../method.json)" + } +} diff --git a/schema/models_directory/legacy/dft.json b/schema/models_directory/legacy/dft.json new file mode 100644 index 000000000..461e1b98f --- /dev/null +++ b/schema/models_directory/legacy/dft.json @@ -0,0 +1,81 @@ +{ + "$id": "models-directory/legacy/dft", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "dft model legacy", + "allOf": [ + { + "$ref": "../../model.json" + }, + { + "oneOf": [ + { + "$ref": "#/definitions/lda" + }, + { + "$ref": "#/definitions/gga" + }, + { + "$ref": "#/definitions/hybrid" + } + ] + } + ], + "properties": { + "type": { + "enum": [ + "dft" + ] + } + }, + "definitions": { + "lda": { + "properties": { + "subtype": { + "enum": [ + "lda" + ] + }, + "functional": { + "enum": [ + "pz", + "pw", + "vwn", + "other" + ] + } + } + }, + "gga": { + "properties": { + "subtype": { + "enum": [ + "gga" + ] + }, + "functional": { + "enum": [ + "pbe", + "pbesol", + "pw91", + "other" + ] + } + } + }, + "hybrid": { + "properties": { + "subtype": { + "enum": [ + "hybrid" + ] + }, + "functional": { + "enum": [ + "b3lyp", + "hse06" + ] + } + } + } + } +} diff --git a/schema/models_directory/legacy/ml.json b/schema/models_directory/legacy/ml.json new file mode 100644 index 000000000..b2afd5091 --- /dev/null +++ b/schema/models_directory/legacy/ml.json @@ -0,0 +1,22 @@ +{ + "$id": "models-directory/legacy/ml", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "ml model legacy", + "allOf": [ + { + "$ref": "../../model.json" + } + ], + "properties": { + "type": { + "enum": [ + "ml" + ] + }, + "subtype": { + "enum": [ + "re" + ] + } + } +} diff --git a/schema/models_directory/legacy/unknown.json b/schema/models_directory/legacy/unknown.json new file mode 100644 index 000000000..ab9ebabfd --- /dev/null +++ b/schema/models_directory/legacy/unknown.json @@ -0,0 +1,22 @@ +{ + "$id": "models-directory/legacy/unknown", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "unknown model legacy", + "allOf": [ + { + "$ref": "../../model.json" + } + ], + "properties": { + "type": { + "enum": [ + "unknown" + ] + }, + "subtype": { + "enum": [ + "unknown" + ] + } + } +} From 12e3a6a05a4c356a4bb5a4c0a5e94be50d93eef3 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 17:42:26 -0700 Subject: [PATCH 17/48] chore: add legacy methods with examples --- .../legacy/localorbital.json | 4 ++ .../legacy/pseudopotential.json | 4 ++ .../methods_directory/legacy/regression.json | 61 +++++++++++++++++++ example/methods_directory/legacy/unknown.json | 4 ++ .../legacy/localorbital.json | 22 +++++++ .../legacy/pseudopotential.json | 24 ++++++++ .../methods_directory/legacy/regression.json | 34 +++++++++++ schema/methods_directory/legacy/unknown.json | 22 +++++++ 8 files changed, 175 insertions(+) create mode 100644 example/methods_directory/legacy/localorbital.json create mode 100644 example/methods_directory/legacy/pseudopotential.json create mode 100644 example/methods_directory/legacy/regression.json create mode 100644 example/methods_directory/legacy/unknown.json create mode 100644 schema/methods_directory/legacy/localorbital.json create mode 100644 schema/methods_directory/legacy/pseudopotential.json create mode 100644 schema/methods_directory/legacy/regression.json create mode 100644 schema/methods_directory/legacy/unknown.json diff --git a/example/methods_directory/legacy/localorbital.json b/example/methods_directory/legacy/localorbital.json new file mode 100644 index 000000000..41e7d64de --- /dev/null +++ b/example/methods_directory/legacy/localorbital.json @@ -0,0 +1,4 @@ +{ + "type": "localorbital", + "subtype": "pople" +} diff --git a/example/methods_directory/legacy/pseudopotential.json b/example/methods_directory/legacy/pseudopotential.json new file mode 100644 index 000000000..fa9bf4d37 --- /dev/null +++ b/example/methods_directory/legacy/pseudopotential.json @@ -0,0 +1,4 @@ +{ + "type": "pseudopotential", + "subtype": "us" +} diff --git a/example/methods_directory/legacy/regression.json b/example/methods_directory/legacy/regression.json new file mode 100644 index 000000000..52f1eb600 --- /dev/null +++ b/example/methods_directory/legacy/regression.json @@ -0,0 +1,61 @@ +{ + "data": { + "dataSet": { + "exabyteIds": [ + "LCthJ6E2QabYCZqf4", + "LCthJ6E2QabYCZqf5", + "LCthJ6E2QabYCZqf6", + "LCthJ6E2QabYCZqf7", + "LCthJ6E2QabYCZqf8", + "LCthJ6E2QabYCZqf9", + "LCthJ6E2QabYCZq10", + "LCthJ6E2QabYCZq11" + ], + "extra": {} + }, + "perProperty": [ + { + "intercept": 0.363, + "name": "band_gaps:direct", + "perFeature": [ + { + "coefficient": 0.015, + "importance": 0.134, + "name": "atomic_radius:Ge" + }, + { + "coefficient": 0.016, + "importance": 0.135, + "name": "atomic_radius:Si" + } + ] + }, + { + "intercept": 0.364, + "name": "band_gaps:indirect", + "perFeature": [ + { + "coefficient": 0.016, + "importance": 0.135, + "name": "atomic_radius:Ge" + }, + { + "coefficient": 0.017, + "importance": 0.136, + "name": "atomic_radius:Si" + } + ] + } + ] + }, + "precision": { + "perProperty": [ + { + "score": 0.8, + "trainingError": 0.002 + } + ] + }, + "subtype": "least_squares", + "type": "linear" +} diff --git a/example/methods_directory/legacy/unknown.json b/example/methods_directory/legacy/unknown.json new file mode 100644 index 000000000..cca176ce9 --- /dev/null +++ b/example/methods_directory/legacy/unknown.json @@ -0,0 +1,4 @@ +{ + "type": "unknown", + "subtype": "unknown" +} diff --git a/schema/methods_directory/legacy/localorbital.json b/schema/methods_directory/legacy/localorbital.json new file mode 100644 index 000000000..c6a98e56d --- /dev/null +++ b/schema/methods_directory/legacy/localorbital.json @@ -0,0 +1,22 @@ +{ + "$id": "methods-directory/legacy/localorbital", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "localorbital legacy method", + "allOf": [ + { + "$ref": "../../method.json" + } + ], + "properties": { + "type": { + "enum": [ + "localorbital" + ] + }, + "subtype": { + "enum": [ + "pople" + ] + } + } +} diff --git a/schema/methods_directory/legacy/pseudopotential.json b/schema/methods_directory/legacy/pseudopotential.json new file mode 100644 index 000000000..1acba6b91 --- /dev/null +++ b/schema/methods_directory/legacy/pseudopotential.json @@ -0,0 +1,24 @@ +{ + "$id": "methods-directory/legacy/pseudopotential", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "pseudopotential legacy method", + "allOf": [ + { + "$ref": "../../method.json" + } + ], + "properties": { + "type": { + "enum": [ + "pseudopotential" + ] + }, + "subtype": { + "enum": [ + "paw", + "nc", + "us" + ] + } + } +} diff --git a/schema/methods_directory/legacy/regression.json b/schema/methods_directory/legacy/regression.json new file mode 100644 index 000000000..849de73f6 --- /dev/null +++ b/schema/methods_directory/legacy/regression.json @@ -0,0 +1,34 @@ +{ + "$id": "methods-directory/legacy/regression", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "regression legacy method", + "allOf": [ + { + "$ref": "../../method.json" + } + ], + "properties": { + "type": { + "enum": [ + "linear", + "kernel_ridge" + ] + }, + "subtype": { + "enum": [ + "least_squares", + "ridge" + ] + }, + "precision": { + "$ref": "../mathematical/regression/precision.json" + }, + "data": { + "$ref": "../mathematical/regression/data.json" + } + }, + "required": [ + "precision", + "data" + ] +} diff --git a/schema/methods_directory/legacy/unknown.json b/schema/methods_directory/legacy/unknown.json new file mode 100644 index 000000000..aa32edfc9 --- /dev/null +++ b/schema/methods_directory/legacy/unknown.json @@ -0,0 +1,22 @@ +{ + "$id": "methods-directory/legacy/unknown", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "unknown legacy method", + "allOf": [ + { + "$ref": "../../method.json" + } + ], + "properties": { + "type": { + "enum": [ + "unknown" + ] + }, + "subtype": { + "enum": [ + "unknown" + ] + } + } +} From 26673e07ea298a82f59e4a1ebd6080f7dc0a3ff8 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 18:53:13 -0700 Subject: [PATCH 18/48] chore: add required keys for TS types --- schema/models_directory/double_hybrid.json | 6 +++++- schema/models_directory/gga.json | 6 +++++- schema/models_directory/gw.json | 6 +++++- schema/models_directory/hybrid.json | 6 +++++- schema/models_directory/lda.json | 6 +++++- schema/models_directory/mgga.json | 6 +++++- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/schema/models_directory/double_hybrid.json b/schema/models_directory/double_hybrid.json index b102768d5..6f71a3d12 100644 --- a/schema/models_directory/double_hybrid.json +++ b/schema/models_directory/double_hybrid.json @@ -31,5 +31,9 @@ } ] } - } + }, + "required": [ + "categories", + "parameters" + ] } diff --git a/schema/models_directory/gga.json b/schema/models_directory/gga.json index c655e6390..3f973323d 100644 --- a/schema/models_directory/gga.json +++ b/schema/models_directory/gga.json @@ -34,5 +34,9 @@ } ] } - } + }, + "required": [ + "categories", + "parameters" + ] } diff --git a/schema/models_directory/gw.json b/schema/models_directory/gw.json index 80f76db8c..1148982fc 100644 --- a/schema/models_directory/gw.json +++ b/schema/models_directory/gw.json @@ -46,5 +46,9 @@ } ] } - } + }, + "required": [ + "categories", + "parameters" + ] } diff --git a/schema/models_directory/hybrid.json b/schema/models_directory/hybrid.json index 7a74be827..c8c3a4b08 100644 --- a/schema/models_directory/hybrid.json +++ b/schema/models_directory/hybrid.json @@ -34,5 +34,9 @@ } ] } - } + }, + "required": [ + "categories", + "parameters" + ] } diff --git a/schema/models_directory/lda.json b/schema/models_directory/lda.json index 86ea9bad2..d5691c0ec 100644 --- a/schema/models_directory/lda.json +++ b/schema/models_directory/lda.json @@ -34,5 +34,9 @@ } ] } - } + }, + "required": [ + "categories", + "parameters" + ] } diff --git a/schema/models_directory/mgga.json b/schema/models_directory/mgga.json index 7e6a80152..51db018d9 100644 --- a/schema/models_directory/mgga.json +++ b/schema/models_directory/mgga.json @@ -34,5 +34,9 @@ } ] } - } + }, + "required": [ + "categories", + "parameters" + ] } From 6545cdee3ded03f5c6751c161e88a77a77df85cf Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 5 Sep 2023 19:43:49 -0700 Subject: [PATCH 19/48] chore: add required keys to methods --- schema/methods_directory/mathematical/cg.json | 3 ++- schema/methods_directory/mathematical/davidson.json | 3 ++- schema/methods_directory/mathematical/regression.json | 1 + schema/methods_directory/physical/ao/dunning.json | 1 + schema/methods_directory/physical/ao/other.json | 1 + schema/methods_directory/physical/ao/pople.json | 1 + schema/methods_directory/physical/psp.json | 3 ++- schema/methods_directory/physical/pw.json | 3 ++- schema/methods_directory/physical/smearing.json | 3 ++- schema/methods_directory/physical/tetrahedron.json | 3 ++- 10 files changed, 16 insertions(+), 6 deletions(-) diff --git a/schema/methods_directory/mathematical/cg.json b/schema/methods_directory/mathematical/cg.json index 6e817b347..e7ba26a05 100644 --- a/schema/methods_directory/mathematical/cg.json +++ b/schema/methods_directory/mathematical/cg.json @@ -11,5 +11,6 @@ "categories": { "$ref": "../../methods_category/mathematical/opt/diff/ordern/cg.json" } - } + }, + "required": ["categories"] } diff --git a/schema/methods_directory/mathematical/davidson.json b/schema/methods_directory/mathematical/davidson.json index 9eef262bc..490563d34 100644 --- a/schema/methods_directory/mathematical/davidson.json +++ b/schema/methods_directory/mathematical/davidson.json @@ -11,5 +11,6 @@ "categories": { "$ref": "../../methods_category/mathematical/linalg/diag/davidson.json" } - } + }, + "required": ["categories"] } diff --git a/schema/methods_directory/mathematical/regression.json b/schema/methods_directory/mathematical/regression.json index 407491c57..e69595ade 100644 --- a/schema/methods_directory/mathematical/regression.json +++ b/schema/methods_directory/mathematical/regression.json @@ -19,6 +19,7 @@ } }, "required": [ + "categories", "precision", "data" ] diff --git a/schema/methods_directory/physical/ao/dunning.json b/schema/methods_directory/physical/ao/dunning.json index 629957a6d..e704a30e7 100644 --- a/schema/methods_directory/physical/ao/dunning.json +++ b/schema/methods_directory/physical/ao/dunning.json @@ -19,6 +19,7 @@ ] } }, + "required": ["categories"], "definitions": { "ao-basis-dunning": { "properties": { diff --git a/schema/methods_directory/physical/ao/other.json b/schema/methods_directory/physical/ao/other.json index 9cdfc35c7..15d4cf4c2 100644 --- a/schema/methods_directory/physical/ao/other.json +++ b/schema/methods_directory/physical/ao/other.json @@ -19,6 +19,7 @@ ] } }, + "required": ["categories"], "definitions": { "ao-basis-other": { "properties": { diff --git a/schema/methods_directory/physical/ao/pople.json b/schema/methods_directory/physical/ao/pople.json index 43aa0419d..5a6bd7b58 100644 --- a/schema/methods_directory/physical/ao/pople.json +++ b/schema/methods_directory/physical/ao/pople.json @@ -19,6 +19,7 @@ ] } }, + "required": ["categories"], "definitions": { "ao-basis-pople": { "properties": { diff --git a/schema/methods_directory/physical/psp.json b/schema/methods_directory/physical/psp.json index 54d3e517d..7d1d0db38 100644 --- a/schema/methods_directory/physical/psp.json +++ b/schema/methods_directory/physical/psp.json @@ -24,5 +24,6 @@ } } } - } + }, + "required": ["categories"] } diff --git a/schema/methods_directory/physical/pw.json b/schema/methods_directory/physical/pw.json index 99c33b9a1..e136cf6db 100644 --- a/schema/methods_directory/physical/pw.json +++ b/schema/methods_directory/physical/pw.json @@ -12,5 +12,6 @@ "categories": { "$ref": "../../methods_category/physical/qm/wf/pw.json" } - } + }, + "required": ["categories"] } diff --git a/schema/methods_directory/physical/smearing.json b/schema/methods_directory/physical/smearing.json index afdc6a5d7..099c2671a 100644 --- a/schema/methods_directory/physical/smearing.json +++ b/schema/methods_directory/physical/smearing.json @@ -12,5 +12,6 @@ "categories": { "$ref": "../../methods_category/physical/qm/wf/smearing.json" } - } + }, + "required": ["categories"] } diff --git a/schema/methods_directory/physical/tetrahedron.json b/schema/methods_directory/physical/tetrahedron.json index d116efb8f..0b9ee97d4 100644 --- a/schema/methods_directory/physical/tetrahedron.json +++ b/schema/methods_directory/physical/tetrahedron.json @@ -11,5 +11,6 @@ "categories": { "$ref": "../../methods_category/physical/qm/wf/tetrahedron.json" } - } + }, + "required": ["categories"] } From 756390745180bee4afe46613e212935e56b25846 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Wed, 6 Sep 2023 12:28:14 -0700 Subject: [PATCH 20/48] chore: use consistent method names --- schema/methods_directory/legacy/localorbital.json | 2 +- schema/methods_directory/legacy/pseudopotential.json | 2 +- schema/methods_directory/legacy/unknown.json | 2 +- schema/methods_directory/mathematical/cg.json | 1 + schema/methods_directory/mathematical/davidson.json | 1 + schema/methods_directory/mathematical/regression.json | 2 +- schema/methods_directory/physical/ao/dunning.json | 1 + schema/methods_directory/physical/ao/other.json | 1 + schema/methods_directory/physical/ao/pople.json | 1 + schema/methods_directory/physical/psp.json | 2 +- schema/methods_directory/physical/psp/file.json | 2 +- schema/methods_directory/physical/pw.json | 2 +- schema/methods_directory/physical/smearing.json | 2 +- schema/methods_directory/physical/tetrahedron.json | 2 +- 14 files changed, 14 insertions(+), 9 deletions(-) diff --git a/schema/methods_directory/legacy/localorbital.json b/schema/methods_directory/legacy/localorbital.json index c6a98e56d..5821047ca 100644 --- a/schema/methods_directory/legacy/localorbital.json +++ b/schema/methods_directory/legacy/localorbital.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/legacy/localorbital", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "localorbital legacy method", + "title": "legacy method localorbital", "allOf": [ { "$ref": "../../method.json" diff --git a/schema/methods_directory/legacy/pseudopotential.json b/schema/methods_directory/legacy/pseudopotential.json index 1acba6b91..335a662c9 100644 --- a/schema/methods_directory/legacy/pseudopotential.json +++ b/schema/methods_directory/legacy/pseudopotential.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/legacy/pseudopotential", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "pseudopotential legacy method", + "title": "legacy method pseudopotential", "allOf": [ { "$ref": "../../method.json" diff --git a/schema/methods_directory/legacy/unknown.json b/schema/methods_directory/legacy/unknown.json index aa32edfc9..7ccf2823a 100644 --- a/schema/methods_directory/legacy/unknown.json +++ b/schema/methods_directory/legacy/unknown.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/legacy/unknown", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "unknown legacy method", + "title": "legacy method unknown", "allOf": [ { "$ref": "../../method.json" diff --git a/schema/methods_directory/mathematical/cg.json b/schema/methods_directory/mathematical/cg.json index e7ba26a05..194e3b7f0 100644 --- a/schema/methods_directory/mathematical/cg.json +++ b/schema/methods_directory/mathematical/cg.json @@ -1,6 +1,7 @@ { "$id": "methods-directory/mathematical/cg", "$schema": "http://json-schema.org/draft-04/schema#", + "title": "unit method conjugate gradient", "description": "conjugate gradient method schema", "allOf": [ { diff --git a/schema/methods_directory/mathematical/davidson.json b/schema/methods_directory/mathematical/davidson.json index 490563d34..97cb7981d 100644 --- a/schema/methods_directory/mathematical/davidson.json +++ b/schema/methods_directory/mathematical/davidson.json @@ -1,6 +1,7 @@ { "$id": "methods-directory/mathematical/davidson", "$schema": "http://json-schema.org/draft-04/schema#", + "title": "unit method davidson", "description": "Davidson diagonalization method", "allOf": [ { diff --git a/schema/methods_directory/mathematical/regression.json b/schema/methods_directory/mathematical/regression.json index e69595ade..d44106de4 100644 --- a/schema/methods_directory/mathematical/regression.json +++ b/schema/methods_directory/mathematical/regression.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/mathematical/regression", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "linear methods schema", + "title": "unit method regression", "allOf": [ { "$ref": "../../method/unit_method.json" diff --git a/schema/methods_directory/physical/ao/dunning.json b/schema/methods_directory/physical/ao/dunning.json index e704a30e7..e901df684 100644 --- a/schema/methods_directory/physical/ao/dunning.json +++ b/schema/methods_directory/physical/ao/dunning.json @@ -1,6 +1,7 @@ { "$id": "methods-directory/physical/ao/dunning", "$schema": "http://json-schema.org/draft-04/schema#", + "title": "unit method ao dunning", "description": "Dunning correlation-consistent basis set unit method", "allOf": [ { diff --git a/schema/methods_directory/physical/ao/other.json b/schema/methods_directory/physical/ao/other.json index 15d4cf4c2..6c64aa791 100644 --- a/schema/methods_directory/physical/ao/other.json +++ b/schema/methods_directory/physical/ao/other.json @@ -1,6 +1,7 @@ { "$id": "methods-directory/physical/ao/other", "$schema": "http://json-schema.org/draft-04/schema#", + "title": "unit method ao other", "description": "Other (neither Pople nor Dunning) basis set unit method", "allOf": [ { diff --git a/schema/methods_directory/physical/ao/pople.json b/schema/methods_directory/physical/ao/pople.json index 5a6bd7b58..a30dadb6b 100644 --- a/schema/methods_directory/physical/ao/pople.json +++ b/schema/methods_directory/physical/ao/pople.json @@ -1,6 +1,7 @@ { "$id": "methods-directory/physical/ao/pople", "$schema": "http://json-schema.org/draft-04/schema#", + "title": "unit method ao pople", "description": "Pople basis set unit method", "allOf": [ { diff --git a/schema/methods_directory/physical/psp.json b/schema/methods_directory/physical/psp.json index 7d1d0db38..927431f75 100644 --- a/schema/methods_directory/physical/psp.json +++ b/schema/methods_directory/physical/psp.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/physical/psp", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Pseudopotential unit method schema", + "title": "unit method pseudopotential", "description": "Core-valence separation by means of pseudopotentials (effective potential)", "allOf": [ { diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index 768bba3ea..c33dce525 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/physical/psp/file", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "pseudopotential file schema", + "title": "pseudopotential file", "properties": { "element": { "type": "string", diff --git a/schema/methods_directory/physical/pw.json b/schema/methods_directory/physical/pw.json index e136cf6db..70c79ff77 100644 --- a/schema/methods_directory/physical/pw.json +++ b/schema/methods_directory/physical/pw.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/physical/pw", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Plane wave method unit schema", + "title": "unit method plane wave", "description": "Approximating the electronic wave function with a plane wave basis", "allOf": [ { diff --git a/schema/methods_directory/physical/smearing.json b/schema/methods_directory/physical/smearing.json index 099c2671a..f73d82a5d 100644 --- a/schema/methods_directory/physical/smearing.json +++ b/schema/methods_directory/physical/smearing.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/physical/smearing", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Smearing methods schema for partial occupancies (Brillouin zone integration for metals)", + "title": "unit method smearing", "description": "Approximating Heaviside step function with smooth function", "allOf": [ { diff --git a/schema/methods_directory/physical/tetrahedron.json b/schema/methods_directory/physical/tetrahedron.json index 0b9ee97d4..16acfa57a 100644 --- a/schema/methods_directory/physical/tetrahedron.json +++ b/schema/methods_directory/physical/tetrahedron.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/physical/tetrahedron", "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Tetrahedron method (Brillouin zone integration) schema ", + "title": "unit method tetrahedron", "allOf": [ { "$ref": "../../method/unit_method.json" From 54aa2b7b8159dbf59fe4409146ec56ebd5fc7ceb Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Wed, 6 Sep 2023 12:51:30 -0700 Subject: [PATCH 21/48] chore: use consistent model names --- schema/models_directory/double_hybrid.json | 2 +- schema/models_directory/gga.json | 2 +- schema/models_directory/gw.json | 2 +- schema/models_directory/hybrid.json | 2 +- schema/models_directory/lda.json | 2 +- schema/models_directory/legacy/dft.json | 2 +- schema/models_directory/legacy/ml.json | 2 +- schema/models_directory/legacy/unknown.json | 2 +- schema/models_directory/mgga.json | 2 +- schema/models_directory/re.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/schema/models_directory/double_hybrid.json b/schema/models_directory/double_hybrid.json index 6f71a3d12..ebaf589f6 100644 --- a/schema/models_directory/double_hybrid.json +++ b/schema/models_directory/double_hybrid.json @@ -1,7 +1,7 @@ { "$id": "models-directory/double-hybrid", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Double hybrid functional model schema", + "title": "model double hybrid functional", "allOf": [ { "$ref": "../model/model_without_method.json" diff --git a/schema/models_directory/gga.json b/schema/models_directory/gga.json index 3f973323d..5003e9624 100644 --- a/schema/models_directory/gga.json +++ b/schema/models_directory/gga.json @@ -1,7 +1,7 @@ { "$id": "models-directory/gga", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Generalized Gradient Approximation model schema", + "title": "model generalized gradient approximation", "allOf": [ { "$ref": "../model/model_without_method.json" diff --git a/schema/models_directory/gw.json b/schema/models_directory/gw.json index 1148982fc..2e022673f 100644 --- a/schema/models_directory/gw.json +++ b/schema/models_directory/gw.json @@ -1,7 +1,7 @@ { "$id": "models-directory/gw", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "GW Approximation schema", + "title": "model gw approximation", "allOf": [ { "$ref": "../model/model_without_method.json" diff --git a/schema/models_directory/hybrid.json b/schema/models_directory/hybrid.json index c8c3a4b08..c8862e6ba 100644 --- a/schema/models_directory/hybrid.json +++ b/schema/models_directory/hybrid.json @@ -1,7 +1,7 @@ { "$id": "models-directory/hybrid", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Hybrid functional model schema", + "title": "model hybrid functional", "allOf": [ { "$ref": "../model/model_without_method.json" diff --git a/schema/models_directory/lda.json b/schema/models_directory/lda.json index d5691c0ec..b475e185f 100644 --- a/schema/models_directory/lda.json +++ b/schema/models_directory/lda.json @@ -1,7 +1,7 @@ { "$id": "models-directory/lda", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Local Density Approximation model schema", + "title": "model local density approximation", "allOf": [ { "$ref": "../model/model_without_method.json" diff --git a/schema/models_directory/legacy/dft.json b/schema/models_directory/legacy/dft.json index 461e1b98f..558604727 100644 --- a/schema/models_directory/legacy/dft.json +++ b/schema/models_directory/legacy/dft.json @@ -1,7 +1,7 @@ { "$id": "models-directory/legacy/dft", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "dft model legacy", + "title": "legacy model density functional theory", "allOf": [ { "$ref": "../../model.json" diff --git a/schema/models_directory/legacy/ml.json b/schema/models_directory/legacy/ml.json index b2afd5091..26600718b 100644 --- a/schema/models_directory/legacy/ml.json +++ b/schema/models_directory/legacy/ml.json @@ -1,7 +1,7 @@ { "$id": "models-directory/legacy/ml", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "ml model legacy", + "title": "legacy model regression", "allOf": [ { "$ref": "../../model.json" diff --git a/schema/models_directory/legacy/unknown.json b/schema/models_directory/legacy/unknown.json index ab9ebabfd..5235412fc 100644 --- a/schema/models_directory/legacy/unknown.json +++ b/schema/models_directory/legacy/unknown.json @@ -1,7 +1,7 @@ { "$id": "models-directory/legacy/unknown", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "unknown model legacy", + "title": "legacy model unknown", "allOf": [ { "$ref": "../../model.json" diff --git a/schema/models_directory/mgga.json b/schema/models_directory/mgga.json index 51db018d9..4e5a040ae 100644 --- a/schema/models_directory/mgga.json +++ b/schema/models_directory/mgga.json @@ -1,7 +1,7 @@ { "$id": "models-directory/mgga", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Meta Generalized Gradient Approximation model schema", + "title": "model meta generalized gradient approximation", "allOf": [ { "$ref": "../model/model_without_method.json" diff --git a/schema/models_directory/re.json b/schema/models_directory/re.json index 3d62b6860..ff735b146 100644 --- a/schema/models_directory/re.json +++ b/schema/models_directory/re.json @@ -1,7 +1,7 @@ { "$id": "models-directory/re", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "machine learning model schema", + "title": "model regression", "description": "machine learning model type/subtype schema", "allOf": [ { From 1bc495a1b4683f0ec6b3cfe546b5ec5e919d44f4 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Wed, 6 Sep 2023 13:17:30 -0700 Subject: [PATCH 22/48] chore: update required keys for regression --- schema/models_directory/re.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/schema/models_directory/re.json b/schema/models_directory/re.json index ff735b146..3d263f5aa 100644 --- a/schema/models_directory/re.json +++ b/schema/models_directory/re.json @@ -12,5 +12,9 @@ "categories": { "$ref": "../models_category/st/det/ml/re.json" } - } + }, + "required": [ + "categories", + "parameters" + ] } From ee09d910b4b1a2cabfee50ce2859882efd6799c5 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Wed, 6 Sep 2023 13:21:42 -0700 Subject: [PATCH 23/48] chore: adjust title regression legacy method --- schema/methods_directory/legacy/regression.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/methods_directory/legacy/regression.json b/schema/methods_directory/legacy/regression.json index 849de73f6..ec42bf3c2 100644 --- a/schema/methods_directory/legacy/regression.json +++ b/schema/methods_directory/legacy/regression.json @@ -1,7 +1,7 @@ { "$id": "methods-directory/legacy/regression", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "regression legacy method", + "title": "legacy method regression", "allOf": [ { "$ref": "../../method.json" From 1634b8faf308c3facee371d1cc6faf5083aada99 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Wed, 6 Sep 2023 15:16:28 -0700 Subject: [PATCH 24/48] chore: add parameters property for TS type --- schema/models_directory/re.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schema/models_directory/re.json b/schema/models_directory/re.json index 3d263f5aa..ae37bed27 100644 --- a/schema/models_directory/re.json +++ b/schema/models_directory/re.json @@ -11,6 +11,9 @@ "properties": { "categories": { "$ref": "../models_category/st/det/ml/re.json" + }, + "parameters": { + "type": "object" } }, "required": [ From e82f1f0a685c94d0ff6d8e9d4125e423e0195b0c Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 7 Sep 2023 08:43:14 +0800 Subject: [PATCH 25/48] generate schema id using setSchemaIds.mjs, removes file extension --- schema/core/reusable/atomic_orbital.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/core/reusable/atomic_orbital.json b/schema/core/reusable/atomic_orbital.json index 057f16ad3..10af5c1a9 100644 --- a/schema/core/reusable/atomic_orbital.json +++ b/schema/core/reusable/atomic_orbital.json @@ -1,5 +1,5 @@ { - "$id": "core/reusable/atomic_orbital.json", + "$id": "core/reusable/atomic-orbital", "$schema": "http://json-schema.org/draft-04/schema#", "title": "atomic orbital schema", "type": "object", From 286a1cc38c3322931e34fb7471b507f2304509b7 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:00:54 +0800 Subject: [PATCH 26/48] adapt exchange correlation to the current web-app schema --- example/methods_directory/physical/psp.json | 5 ++++- schema/core/reusable/atomic_orbital.json | 1 + schema/methods_directory/physical/psp/file.json | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/example/methods_directory/physical/psp.json b/example/methods_directory/physical/psp.json index 2f1d2638c..7fba5a400 100644 --- a/example/methods_directory/physical/psp.json +++ b/example/methods_directory/physical/psp.json @@ -17,7 +17,10 @@ "version": "5.2", "path": "/export/share/pseudo/si/gga/pbe/vasp/5.2/paw/default/POTCAR", "type": "paw", - "exchangeCorrelation": "/pb/qm/dft/ksdft/gga?functional=pbe", + "exchangeCorrelation": { + "approximation": "gga", + "functional": "pbe" + }, "filename": "POTCAR", "schemaVersion": "0.2.0", "name": "pseudopotential", diff --git a/schema/core/reusable/atomic_orbital.json b/schema/core/reusable/atomic_orbital.json index 10af5c1a9..1ac1248e1 100644 --- a/schema/core/reusable/atomic_orbital.json +++ b/schema/core/reusable/atomic_orbital.json @@ -24,6 +24,7 @@ }, "occupation": { "type": "number", + "description": "Shell occupation", "minimum": 0, "maximum": 14 } diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index be8d6a0a4..e7120e8b0 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -25,8 +25,21 @@ "description": "explains the version of where this came from" }, "exchangeCorrelation": { - "$ref": "../../../core/reusable/category_path.json", - "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'" + "properties": { + "approximation": { + "description": "DFT approximation", + "type": "string" + }, + "functional": { + "description": "Exchange correlation functional", + "type": "string" + }, + "path": { + "description": "DFT model path, e.g. '/pb/qm/dft/ksdft/gga?functional=pbe'", + "$ref": "../../../core/reusable/category_path.json" + } + } + }, "valenceConfiguration": { "type": "array", From 4f577899a7098d5cf32dd81d6ce57efd820be041 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Thu, 7 Sep 2023 19:19:52 +0800 Subject: [PATCH 27/48] enforce interger validation instead of number where applicable --- schema/core/reusable/atomic_orbital.json | 6 +++--- schema/methods_directory/physical/psp/file.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/schema/core/reusable/atomic_orbital.json b/schema/core/reusable/atomic_orbital.json index 1ac1248e1..dcb3fbff0 100644 --- a/schema/core/reusable/atomic_orbital.json +++ b/schema/core/reusable/atomic_orbital.json @@ -9,16 +9,16 @@ "pattern": "^[1-7][sSpPdDfF]$" }, "orbitalIndex": { - "type": "number", + "type": "integer", "minimum": 1 }, "principalNumber": { - "type": "number", + "type": "integer", "minimum": 1, "maximum": 7 }, "angularMomentum": { - "type": "number", + "type": "integer", "minimum": 0, "maximum": 3 }, diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index e7120e8b0..3c840c57a 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -25,6 +25,7 @@ "description": "explains the version of where this came from" }, "exchangeCorrelation": { + "type": "object", "properties": { "approximation": { "description": "DFT approximation", @@ -39,7 +40,6 @@ "$ref": "../../../core/reusable/category_path.json" } } - }, "valenceConfiguration": { "type": "array", From a74617ee98bb0d01563b6f84b6f37b1ff98faee6 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:59:45 +0800 Subject: [PATCH 28/48] add exchange correlation path in the example data --- example/methods_directory/physical/psp.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/methods_directory/physical/psp.json b/example/methods_directory/physical/psp.json index 7fba5a400..eedabf2a8 100644 --- a/example/methods_directory/physical/psp.json +++ b/example/methods_directory/physical/psp.json @@ -19,7 +19,8 @@ "type": "paw", "exchangeCorrelation": { "approximation": "gga", - "functional": "pbe" + "functional": "pbe", + "path": "/pb/qm/dft/ksdft/gga?functional=pbe" }, "filename": "POTCAR", "schemaVersion": "0.2.0", From 4097b77f7247254c4708aaa4f7f61ad1649720ca Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 8 Sep 2023 16:30:14 -0700 Subject: [PATCH 29/48] feat: add dielectric tensor schema + example --- .../non-scalar/dielectric_tensor.json | 31 ++++++++++++++ .../non-scalar/dielectric_tensor.json | 41 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 example/properties_directory/non-scalar/dielectric_tensor.json create mode 100644 schema/properties_directory/non-scalar/dielectric_tensor.json diff --git a/example/properties_directory/non-scalar/dielectric_tensor.json b/example/properties_directory/non-scalar/dielectric_tensor.json new file mode 100644 index 000000000..de008d2c5 --- /dev/null +++ b/example/properties_directory/non-scalar/dielectric_tensor.json @@ -0,0 +1,31 @@ +{ + "name": "dielectric_tensor", + "diagonalReal": { + "frequencies": [ + 0.000000000, + 0.060120240, + 0.120240481, + 0.180360721 + ], + "dielectricComponents": [ + [20.137876673, 20.137876704, 20.137849785], + [20.143821034, 20.143821066, 20.143794147], + [20.161680126, 20.161680158, 20.161653237], + [20.191532277, 20.191532311, 20.191505388] + ] + }, + "diagonalImaginary": { + "frequencies": [ + 0.000000000, + 0.060120240, + 0.120240481, + 0.180360721 + ], + "dielectricComponents": [ + [0.000000000, 0.000000000, 0.000000000], + [0.019862988, 0.019862988, 0.019862987], + [0.039813564, 0.039813565, 0.039813563], + [0.059940387, 0.059940389, 0.059940385] + ] + } +} diff --git a/schema/properties_directory/non-scalar/dielectric_tensor.json b/schema/properties_directory/non-scalar/dielectric_tensor.json new file mode 100644 index 000000000..12599880c --- /dev/null +++ b/schema/properties_directory/non-scalar/dielectric_tensor.json @@ -0,0 +1,41 @@ +{ + "$id": "properties-directory/non-scalar/dielectric-tensor", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "dielectric tensor property", + "properties": { + "name": { + "enum": [ + "dielectric_tensor" + ] + }, + "diagonalReal": { + "description": "Real parts of the dielectric tensor diagonal components", + "$ref": "#/definitions/dielectric-function" + }, + "diagonalImaginary": { + "description": "Imaginary parts of the dielectric tensor diagonal components", + "$ref": "#/definitions/dielectric-function" + } + }, + "definitions": { + "dielectric-function": { + "type": "object", + "properties": { + "frequencies": { + "description": "Frequencies in eV", + "type": "array", + "items": { + "type": "number" + } + }, + "dielectricComponents": { + "description": "Dielectric components, e.g. espr_x, espr_y, espr_z", + "type": "array", + "items": { + "$ref": "../../core/primitive/array_of_3_numbers.json" + } + } + } + } + } +} From 2bb455992de84613bed6a9a4a341a8d3016be6bd Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 8 Sep 2023 16:30:45 -0700 Subject: [PATCH 30/48] chore: add dielectric tensor property to manifest --- manifest/properties.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifest/properties.yaml b/manifest/properties.yaml index 35ca3a385..15133f989 100644 --- a/manifest/properties.yaml +++ b/manifest/properties.yaml @@ -193,6 +193,10 @@ average_potential_profile: schemaId: properties-directory/non-scalar/average-potential-profile isResult: true +dielectric_tensor: + schemaId: properties-directory/non-scalar/dielectric-tensor + isResult: true + # STRUCTURAL basis: defaults: From 0494f58bbfbe7dd856b61849a12e5b709ef5e009 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 8 Sep 2023 18:31:55 -0700 Subject: [PATCH 31/48] refactor: generalize frequency component schema --- .../reusable/frequency_function_matrix.json | 23 ++++++++++++++ .../non-scalar/dielectric_tensor.json | 31 +++++-------------- 2 files changed, 31 insertions(+), 23 deletions(-) create mode 100644 schema/core/reusable/frequency_function_matrix.json diff --git a/schema/core/reusable/frequency_function_matrix.json b/schema/core/reusable/frequency_function_matrix.json new file mode 100644 index 000000000..5086acde1 --- /dev/null +++ b/schema/core/reusable/frequency_function_matrix.json @@ -0,0 +1,23 @@ +{ + "$id": "core/reusable/frequency-function-matrix", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "", + "description": "Schema for a function of frequency yielding a nx3 matrix", + "type": "object", + "properties": { + "frequencies": { + "description": "Frequencies", + "type": "array", + "items": { + "type": "number" + } + }, + "components": { + "description": "Matrix with 3 columns, e.g. x, y, z", + "type": "array", + "items": { + "$ref": "../primitive/array_of_3_numbers.json" + } + } + } +} diff --git a/schema/properties_directory/non-scalar/dielectric_tensor.json b/schema/properties_directory/non-scalar/dielectric_tensor.json index 12599880c..823836ea4 100644 --- a/schema/properties_directory/non-scalar/dielectric_tensor.json +++ b/schema/properties_directory/non-scalar/dielectric_tensor.json @@ -10,32 +10,17 @@ }, "diagonalReal": { "description": "Real parts of the dielectric tensor diagonal components", - "$ref": "#/definitions/dielectric-function" + "$ref": "../../core/reusable/frequency_function_matrix.json" }, "diagonalImaginary": { "description": "Imaginary parts of the dielectric tensor diagonal components", - "$ref": "#/definitions/dielectric-function" + "$ref": "../../core/reusable/frequency_function_matrix.json" + }, + "spin": { + "type": "number" } }, - "definitions": { - "dielectric-function": { - "type": "object", - "properties": { - "frequencies": { - "description": "Frequencies in eV", - "type": "array", - "items": { - "type": "number" - } - }, - "dielectricComponents": { - "description": "Dielectric components, e.g. espr_x, espr_y, espr_z", - "type": "array", - "items": { - "$ref": "../../core/primitive/array_of_3_numbers.json" - } - } - } - } - } + "required": [ + "name" + ] } From 17234571a4b0daf27190b2b2a8b160afc7f5d1fa Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 8 Sep 2023 19:50:02 -0700 Subject: [PATCH 32/48] chore: fix example --- .../properties_directory/non-scalar/dielectric_tensor.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/properties_directory/non-scalar/dielectric_tensor.json b/example/properties_directory/non-scalar/dielectric_tensor.json index de008d2c5..74891553f 100644 --- a/example/properties_directory/non-scalar/dielectric_tensor.json +++ b/example/properties_directory/non-scalar/dielectric_tensor.json @@ -7,7 +7,7 @@ 0.120240481, 0.180360721 ], - "dielectricComponents": [ + "components": [ [20.137876673, 20.137876704, 20.137849785], [20.143821034, 20.143821066, 20.143794147], [20.161680126, 20.161680158, 20.161653237], @@ -21,7 +21,7 @@ 0.120240481, 0.180360721 ], - "dielectricComponents": [ + "components": [ [0.000000000, 0.000000000, 0.000000000], [0.019862988, 0.019862988, 0.019862987], [0.039813564, 0.039813565, 0.039813563], From 9ceaa182c8af3ff90a178fa2a9b2fc6f976d1462 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 8 Sep 2023 20:58:07 -0700 Subject: [PATCH 33/48] chore: restructure dielectric tensor property --- .../non-scalar/dielectric_tensor.json | 158 ++++++++++++++---- .../reusable/dielectric_tensor_component.json | 28 ++++ .../non-scalar/dielectric_tensor.json | 16 +- 3 files changed, 164 insertions(+), 38 deletions(-) create mode 100644 schema/core/reusable/dielectric_tensor_component.json diff --git a/example/properties_directory/non-scalar/dielectric_tensor.json b/example/properties_directory/non-scalar/dielectric_tensor.json index 74891553f..37b6176cd 100644 --- a/example/properties_directory/non-scalar/dielectric_tensor.json +++ b/example/properties_directory/non-scalar/dielectric_tensor.json @@ -1,31 +1,133 @@ { "name": "dielectric_tensor", - "diagonalReal": { - "frequencies": [ - 0.000000000, - 0.060120240, - 0.120240481, - 0.180360721 - ], - "components": [ - [20.137876673, 20.137876704, 20.137849785], - [20.143821034, 20.143821066, 20.143794147], - [20.161680126, 20.161680158, 20.161653237], - [20.191532277, 20.191532311, 20.191505388] - ] - }, - "diagonalImaginary": { - "frequencies": [ - 0.000000000, - 0.060120240, - 0.120240481, - 0.180360721 - ], - "components": [ - [0.000000000, 0.000000000, 0.000000000], - [0.019862988, 0.019862988, 0.019862987], - [0.039813564, 0.039813565, 0.039813563], - [0.059940387, 0.059940389, 0.059940385] - ] - } + "values": [ + { + "part": "real", + "spin": 0.5, + "frequencies": [ + 0.000000000, + 0.060120240, + 0.120240481, + 0.180360721 + ], + "components": [ + [ + 0.000000000, + 0.000000000, + 0.000000000 + ], + [ + 0.019862988, + 0.019862988, + 0.019862987 + ], + [ + 0.039813564, + 0.039813565, + 0.039813563 + ], + [ + 0.059940387, + 0.059940389, + 0.059940385 + ] + ] + }, + { + "part": "imaginary", + "spin": 0.5, + "frequencies": [ + 0.000000000, + 0.060120240, + 0.120240481, + 0.180360721 + ], + "components": [ + [ + 0.000000000, + 0.000000000, + 0.000000000 + ], + [ + 0.019862988, + 0.019862988, + 0.019862987 + ], + [ + 0.039813564, + 0.039813565, + 0.039813563 + ], + [ + 0.059940387, + 0.059940389, + 0.059940385 + ] + ] + }, + { + "part": "real", + "spin": -0.5, + "frequencies": [ + 0.000000000, + 0.060120240, + 0.120240481, + 0.180360721 + ], + "components": [ + [ + 0.000000000, + 0.000000000, + 0.000000000 + ], + [ + 0.019862988, + 0.019862988, + 0.019862987 + ], + [ + 0.039813564, + 0.039813565, + 0.039813563 + ], + [ + 0.059940387, + 0.059940389, + 0.059940385 + ] + ] + }, + { + "part": "imaginary", + "spin": -0.5, + "frequencies": [ + 0.000000000, + 0.060120240, + 0.120240481, + 0.180360721 + ], + "components": [ + [ + 0.000000000, + 0.000000000, + 0.000000000 + ], + [ + 0.019862988, + 0.019862988, + 0.019862987 + ], + [ + 0.039813564, + 0.039813565, + 0.039813563 + ], + [ + 0.059940387, + 0.059940389, + 0.059940385 + ] + ] + } + ] } diff --git a/schema/core/reusable/dielectric_tensor_component.json b/schema/core/reusable/dielectric_tensor_component.json new file mode 100644 index 000000000..c30234ac4 --- /dev/null +++ b/schema/core/reusable/dielectric_tensor_component.json @@ -0,0 +1,28 @@ +{ + "$id": "core/reusable/dielectric-tensor-component", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Dielectric Tensor", + "allOf": [ + { + "$ref": "./frequency_function_matrix.json" + } + ], + "properties": { + "part": { + "description": "Real or imaginary part of the dielectric tensor component", + "type": "string", + "enum": [ + "real", + "imaginary" + ] + }, + "spin": { + "type": "number" + } + }, + "required": [ + "part", + "frequencies", + "components" + ] +} diff --git a/schema/properties_directory/non-scalar/dielectric_tensor.json b/schema/properties_directory/non-scalar/dielectric_tensor.json index 823836ea4..02daebac7 100644 --- a/schema/properties_directory/non-scalar/dielectric_tensor.json +++ b/schema/properties_directory/non-scalar/dielectric_tensor.json @@ -2,22 +2,18 @@ "$id": "properties-directory/non-scalar/dielectric-tensor", "$schema": "http://json-schema.org/draft-04/schema#", "title": "dielectric tensor property", + "description": "The real and imaginary parts of the diagonal elements of the dieletric tensor", "properties": { "name": { "enum": [ "dielectric_tensor" ] }, - "diagonalReal": { - "description": "Real parts of the dielectric tensor diagonal components", - "$ref": "../../core/reusable/frequency_function_matrix.json" - }, - "diagonalImaginary": { - "description": "Imaginary parts of the dielectric tensor diagonal components", - "$ref": "../../core/reusable/frequency_function_matrix.json" - }, - "spin": { - "type": "number" + "values": { + "type": "array", + "items": { + "$ref": "../../core/reusable/dielectric_tensor_component.json" + } } }, "required": [ From e5ce061cffc3f105d15278f58623abc13f5bc04e Mon Sep 17 00:00:00 2001 From: Kostiantyn Dvornik Date: Mon, 11 Sep 2023 17:36:04 +0300 Subject: [PATCH 34/48] chore: pw.x schema improvements --- .../file/applications/espresso/7.2/pw.x.json | 12 +++++----- .../espresso/7.2/pw.x/atomic_positions.json | 14 ++++------- .../espresso/7.2/pw.x/atomic_species.json | 2 +- .../espresso/7.2/pw.x/control.json | 6 +++-- .../espresso/7.2/pw.x/system.json | 23 ++++++++++++++----- .../core/primitive/integer_one_or_zero.json | 8 +++++++ src/js/esse/index.js | 8 ++++++- src/js/scripts/createEnumsFromYaml.mjs | 5 +--- 8 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 schema/core/primitive/integer_one_or_zero.json diff --git a/example/3pse/file/applications/espresso/7.2/pw.x.json b/example/3pse/file/applications/espresso/7.2/pw.x.json index 528c80090..5bcfc544f 100644 --- a/example/3pse/file/applications/espresso/7.2/pw.x.json +++ b/example/3pse/file/applications/espresso/7.2/pw.x.json @@ -26,13 +26,13 @@ ], "Hubbard_occ": [ [ - 1.1, - 0.00, + 1, + 1, 0.00 ], [ - 0.02, - 0.02, + 1, + 2, 0.02 ] ] @@ -49,12 +49,12 @@ "ATOMIC_SPECIES": { "values": [ { - "x": "Cs", + "X": "Cs", "Mass_X": 132.90543, "PseudoPot_X": "Cs.upf" }, { - "x": "Cl", + "X": "Cl", "Mass_X": 35.4527, "PseudoPot_X": "Cl.upf" } diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json index 8a4404c55..d8f87531a 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json @@ -25,7 +25,7 @@ "properties": { "X": { "type": "string", - "description": "label of the atom as specified in ATOMIC_SPECIE" + "description": "label of the atom as specified in ATOMIC_SPECIES" }, "x": { "type": "number", @@ -40,24 +40,18 @@ "description": "atomic positions" }, "if_pos(1)": { - "type": "number", + "$ref": "../../../../../../core/primitive/integer_one_or_zero.json", "default": 1, - "minimum": 0, - "maximum": 1, "description": "component i of the force for this atom is multiplied by if_pos(i), which must be either 0 or 1. Used to keep selected atoms and/or selected components fixed in MD dynamics or structural optimization run." }, "if_pos(2)": { - "type": "number", + "$ref": "../../../../../../core/primitive/integer_one_or_zero.json", "default": 1, - "minimum": 0, - "maximum": 1, "description": "component i of the force for this atom is multiplied by if_pos(i), which must be either 0 or 1. Used to keep selected atoms and/or selected components fixed in MD dynamics or structural optimization run." }, "if_pos(3)": { - "type": "number", + "$ref": "../../../../../../core/primitive/integer_one_or_zero.json", "default": 1, - "minimum": 0, - "maximum": 1, "description": "component i of the force for this atom is multiplied by if_pos(i), which must be either 0 or 1. Used to keep selected atoms and/or selected components fixed in MD dynamics or structural optimization run." } }, diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json index d57f67305..c367d9114 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json @@ -11,7 +11,7 @@ "type": "object", "additionalProperties": false, "properties": { - "x": { + "X": { "type": "string", "description": "label of the atom. Acceptable syntax: chemical symbol X (1 or 2 characters, case-insensitive) or chemical symbol plus a number or a letter, as in \"Xn\" (e.g. Fe1) or \"X_*\" or \"X-*\" (e.g. C1, C_h; max total length cannot exceed 3 characters)" }, diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/control.json b/schema/3pse/file/applications/espresso/7.2/pw.x/control.json index 5900c5be2..32af1815c 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/control.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/control.json @@ -159,7 +159,8 @@ }, "gate": { "type": "boolean", - "default": false + "default": false, + "description": "In the case of charged cells (tot_charge .ne. 0) setting gate = .TRUE. represents the counter charge (i.e. -tot_charge) not by a homogeneous background charge but with a charged plate, which is placed at zgate (see below). Details of the gate potential can be found in T. Brumme, M. Calandra, F. Mauri; PRB 89, 245406 (2014). Note, that in systems which are not symmetric with respect to the plate, one needs to enable the dipole correction! (dipfield=.true.). Currently, symmetry can be used with gate=.true. but carefully check that no symmetry is included which maps z to -z even if in principle one could still use them for symmetric systems (i.e. no dipole correction). For nosym=.false. verbosity is set to 'high'. Note: this option was called \"monopole\" in v6.0 and 6.1 of pw.x" }, "twochem": { "type": "boolean", @@ -173,7 +174,8 @@ }, "trism": { "type": "boolean", - "default": false + "default": false, + "description": "If .TRUE. perform a 3D-RISM-SCF calculation [for details see H.Sato et al., JCP 112, 9463 (2000), doi:10.1063/1.481564]. The solvent's distributions are calculated by 3D-RISM, though solute is treated as SCF. The charge density and the atomic positions are optimized, simultaneously with the solvents. To perform the calculation, you must set a namelist RISM and a card SOLVENTS. If assume_isolated = 'esm' and esm_bc = 'bc1', Laue-RISM is calculated instead of 3D-RISM and coupled with ESM method (i.e. ESM-RISM). [for details see S.Nishihara and M.Otani, PRB 96, 115429 (2017)]. The default of mixing_beta is 0.2 for both 3D-RISM and Laue-RISM. For structural relaxation with BFGS, ignore_wolfe is always .TRUE. ." } } } diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/system.json b/schema/3pse/file/applications/espresso/7.2/pw.x/system.json index ff4fee1da..14851b8c2 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/system.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/system.json @@ -78,7 +78,9 @@ "type": "array", "items": { "type": "number", - "default": 0 + "default": 0, + "minimum": -1, + "maximum": 1 } }, "ecutwfc": { @@ -304,11 +306,20 @@ "type": "array", "items": { "type": "array", - "items": { - "type": "number" - }, - "maxItems": 3, - "minItems": 3 + "items": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + { + "type": "number" + } + ] } }, "Hubbard_alpha": { diff --git a/schema/core/primitive/integer_one_or_zero.json b/schema/core/primitive/integer_one_or_zero.json new file mode 100644 index 000000000..8c879fd78 --- /dev/null +++ b/schema/core/primitive/integer_one_or_zero.json @@ -0,0 +1,8 @@ +{ + "$id": "core/primitive/integer-one-or-zero", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "integer one or zero", + "type": "number", + "minimum": 0, + "maximum": 1 +} diff --git a/src/js/esse/index.js b/src/js/esse/index.js index 923807f70..1a4a47c9c 100644 --- a/src/js/esse/index.js +++ b/src/js/esse/index.js @@ -25,7 +25,13 @@ export class ESSE { */ validate = (example, schema) => { const ajv = new Ajv({ allErrors: true }); - return ajv.validate(schema, example); + const isValid = ajv.validate(schema, example); + + if (!isValid) { + console.error(ajv.errors); + } + + return isValid; }; buildGlobalSchema() { diff --git a/src/js/scripts/createEnumsFromYaml.mjs b/src/js/scripts/createEnumsFromYaml.mjs index 80ff24ffb..fc09712a4 100644 --- a/src/js/scripts/createEnumsFromYaml.mjs +++ b/src/js/scripts/createEnumsFromYaml.mjs @@ -39,8 +39,5 @@ walkDir(SCHEMA_DIR, (filePath) => { const obj = yaml.load(fileContents); const enumObj = lodash.mapValues(obj, (value) => ({ enum: value })); - fs.writeFileSync( - `${path.join(dirname, outFilename)}`, - `${JSON.stringify(enumObj, null, 4)}\n`, - ); + fs.writeFileSync(`${path.join(dirname, outFilename)}`, `${JSON.stringify(enumObj, null, 4)}\n`); }); From 050f24110674e8889847150ddbc8e6e6593657a9 Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Wed, 13 Sep 2023 11:54:03 +0300 Subject: [PATCH 35/48] chore: remove redunand best and refined schemas --- schema/property/best.json | 16 ---------------- schema/property/refined.json | 25 ------------------------- 2 files changed, 41 deletions(-) delete mode 100644 schema/property/best.json delete mode 100644 schema/property/refined.json diff --git a/schema/property/best.json b/schema/property/best.json deleted file mode 100644 index bb21659c8..000000000 --- a/schema/property/best.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "schemaId": "property/best", - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Schema of material's best properties", - "allOf": [ - { - "$ref": "refined.json" - } - ], - "properties": { - "count": { - "description": "total number of properties among which this property is the best.", - "type": "number" - } - } -} diff --git a/schema/property/refined.json b/schema/property/refined.json deleted file mode 100644 index f06b9865b..000000000 --- a/schema/property/refined.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "schemaId": "property/refined", - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Schema of material's property", - "allOf": [ - { - "$ref": "raw.json" - } - ], - "properties": { - "exabyteId": { - "description": "Id of the corresponding item in the entity bank that this property is obtained for", - "type": "array", - "items": { - "type": "string" - } - }, - "precision": { - "type": "object" - } - }, - "required": [ - "exabyteId" - ] -} From 37fdab370a05b07235e339e7df8dbced7811de5d Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Wed, 13 Sep 2023 11:55:13 +0300 Subject: [PATCH 36/48] update: change systemTags enum values for property to isRefined and isBest --- schema/property/raw.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/property/raw.json b/schema/property/raw.json index 05ce541fa..a19a66f4e 100644 --- a/schema/property/raw.json +++ b/schema/property/raw.json @@ -44,8 +44,8 @@ "items": { "type": "string", "enum": [ - "refined", - "best" + "isRefined", + "isBest" ] } } From 895064268d30ffc28424a213d53fa94978144cb4 Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sat, 16 Sep 2023 08:17:04 +0800 Subject: [PATCH 37/48] specify data category as enum instead of arbitrary string --- schema/methods_directory/physical/psp/file.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/methods_directory/physical/psp/file.json b/schema/methods_directory/physical/psp/file.json index 3c840c57a..3632e9f3b 100644 --- a/schema/methods_directory/physical/psp/file.json +++ b/schema/methods_directory/physical/psp/file.json @@ -62,7 +62,8 @@ }, "name": { "type": "string", - "description": "name of the data category: pseudopotential" + "description": "name of the data category", + "enum": ["pseudopotential"] } }, "required": [ From 4e24c84a7fd42a11e7f3bf9a9011834068bf7529 Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Mon, 18 Sep 2023 17:18:56 +0300 Subject: [PATCH 38/48] chore: remove systemTags from in_memory_entity/base --- schema/in_memory_entity/base.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/schema/in_memory_entity/base.json b/schema/in_memory_entity/base.json index bc109b394..05d890942 100644 --- a/schema/in_memory_entity/base.json +++ b/schema/in_memory_entity/base.json @@ -19,13 +19,6 @@ }, "systemName": { "type": "string" - }, - "systemTags": { - "description": "entity system tags, marks property system characteristics", - "type": "array", - "items": { - "type": "string" - } } } } From 668b30f680421cfb9d314157f6cde9d8a6888a1e Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Mon, 18 Sep 2023 17:28:11 +0300 Subject: [PATCH 39/48] chore: remove obsolete best and refined examples --- example/property/best.json | 4 ---- example/property/refined.json | 8 -------- 2 files changed, 12 deletions(-) delete mode 100644 example/property/best.json delete mode 100644 example/property/refined.json diff --git a/example/property/best.json b/example/property/best.json deleted file mode 100644 index d65aa7b6e..000000000 --- a/example/property/best.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "count": 2, - "...": "include(refined.json)" -} diff --git a/example/property/refined.json b/example/property/refined.json deleted file mode 100644 index 98c986813..000000000 --- a/example/property/refined.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "exabyteId": ["coXq5vJPaGHB2qhAv"], - "precision": { - "value" : 10, - "metric" : "KPPRA" - }, - "...": "include(raw.json)" -} From 335d08603326b10956f597a1ccee089b95c2aeec Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Wed, 20 Sep 2023 12:46:33 +0300 Subject: [PATCH 40/48] update: added base.json for properties --- schema/property/base.json | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 schema/property/base.json diff --git a/schema/property/base.json b/schema/property/base.json new file mode 100644 index 000000000..a2eb8d286 --- /dev/null +++ b/schema/property/base.json @@ -0,0 +1,57 @@ +{ + "$id": "property/base", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Schema of material's preliminary property", + "allOf": [ + { + "description": "entity schema", + "$ref": "../in_memory_entity/base.json" + } + ], + "properties": { + "slug": { + "description": "property slug, e.g. total_energy", + "type": "string" + }, + "group": { + "description": "property group, e.g. qe:dft:gga:pbe", + "type": "string" + }, + "data": { + "description": "container of the information, specific to each property", + "type": "object" + }, + "source": { + "$ref": "source.json" + }, + "exabyteId": { + "description": "Id of the corresponding item in the entity bank that this property is obtained for", + "type": "array", + "items": { + "type": "string" + } + }, + "precision": { + "type": "object" + }, + "count": { + "description": "total number of properties among which this property is the best.", + "type": "number" + }, + "systemTags": { + "description": "property system tags, marks property system characteristics, values refined or best (could be both)", + "type": "array", + "items": { + "type": "string", + "enum": [ + "isRefined", + "isBest" + ] + } + } + }, + "required": [ + "data", + "source" + ] +} From bd43db7c32aa1f61611ef62fe8281debaf79ac87 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Thu, 21 Sep 2023 18:42:14 -0700 Subject: [PATCH 41/48] chore: rename card -> card_option --- example/3pse/file/applications/espresso/7.2/pw.x.json | 4 ++-- .../file/applications/espresso/7.2/pw.x/atomic_positions.json | 2 +- .../file/applications/espresso/7.2/pw.x/cell_parameters.json | 2 +- schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json | 2 +- schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/3pse/file/applications/espresso/7.2/pw.x.json b/example/3pse/file/applications/espresso/7.2/pw.x.json index 5bcfc544f..ada871a7b 100644 --- a/example/3pse/file/applications/espresso/7.2/pw.x.json +++ b/example/3pse/file/applications/espresso/7.2/pw.x.json @@ -61,7 +61,7 @@ ] }, "CELL_PARAMETERS": { - "card": "angstrom", + "card_option": "angstrom", "values": { "v1": [ 4.324582724, @@ -81,7 +81,7 @@ } }, "K_POINTS": { - "card": "automatic", + "card_option": "automatic", "values": { "nk1": 2, "nk2": 2, diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json index d8f87531a..0c02295dd 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "properties": { - "card": { + "card_option": { "type": "string", "enum": [ "alat", diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json b/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json index de66c36ac..c2a80855f 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json @@ -5,7 +5,7 @@ "type": "object", "additionalProperties": false, "properties": { - "card": { + "card_option": { "type": "string", "enum": [ "alat", diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json b/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json index 471a35283..287e8d5eb 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json @@ -5,7 +5,7 @@ "type": "object", "additionalProperties": false, "properties": { - "card": { + "card_option": { "type": "string", "enum": [ "atomic", diff --git a/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json b/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json index e8420ec37..9c487a2dc 100644 --- a/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json +++ b/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json @@ -5,7 +5,7 @@ "type": "object", "additionalProperties": false, "properties": { - "card": { + "card_option": { "type": "string", "enum": [ "tpiba", From 5a4982310cbee392f72f0d4d5cdc183291a23e7e Mon Sep 17 00:00:00 2001 From: Kostiantyn Dvornik Date: Fri, 22 Sep 2023 19:39:26 +0300 Subject: [PATCH 42/48] fix: integer-one-or-zero definition --- schema/core/primitive/integer_one_or_zero.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/core/primitive/integer_one_or_zero.json b/schema/core/primitive/integer_one_or_zero.json index 8c879fd78..9a462e40e 100644 --- a/schema/core/primitive/integer_one_or_zero.json +++ b/schema/core/primitive/integer_one_or_zero.json @@ -2,7 +2,7 @@ "$id": "core/primitive/integer-one-or-zero", "$schema": "http://json-schema.org/draft-04/schema#", "title": "integer one or zero", - "type": "number", + "type": "integer", "minimum": 0, "maximum": 1 } From 2a93fbfa6030e74b85e741639ec1f12e2f392106 Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Thu, 28 Sep 2023 14:10:13 +0300 Subject: [PATCH 43/48] update: remove raw.json for schemas --- schema/property/meta.json | 2 +- schema/property/raw.json | 57 --------------------------------------- 2 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 schema/property/raw.json diff --git a/schema/property/meta.json b/schema/property/meta.json index e524b559a..08a55d8e3 100644 --- a/schema/property/meta.json +++ b/schema/property/meta.json @@ -4,7 +4,7 @@ "title": "Schema of material's meta properties", "allOf": [ { - "$ref": "raw.json" + "$ref": "base.json" } ] } diff --git a/schema/property/raw.json b/schema/property/raw.json deleted file mode 100644 index 4026afc37..000000000 --- a/schema/property/raw.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$id": "property/raw", - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Schema of material's preliminary property", - "allOf": [ - { - "description": "entity schema", - "$ref": "../in_memory_entity/base.json" - } - ], - "properties": { - "slug": { - "description": "property slug, e.g. total_energy", - "type": "string" - }, - "group": { - "description": "property group, e.g. qe:dft:gga:pbe", - "type": "string" - }, - "data": { - "description": "container of the information, specific to each property", - "type": "object" - }, - "source": { - "$ref": "source.json" - }, - "exabyteId": { - "description": "Id of the corresponding item in the entity bank that this property is obtained for", - "type": "array", - "items": { - "type": "string" - } - }, - "precision": { - "type": "object" - }, - "count": { - "description": "total number of properties among which this property is the best.", - "type": "number" - }, - "systemTags": { - "description": "property system tags, marks property system characteristics, values refined or best (could be both)", - "type": "array", - "items": { - "type": "string", - "enum": [ - "isRefined", - "isBest" - ] - } - } - }, - "required": [ - "data", - "source" - ] -} From 18222eb69ce3e406fd6dce3cd35344f185ee0b30 Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Fri, 29 Sep 2023 11:54:45 +0300 Subject: [PATCH 44/48] Revert "update: remove raw.json for schemas" This reverts commit 2a93fbfa6030e74b85e741639ec1f12e2f392106. --- schema/property/meta.json | 2 +- schema/property/raw.json | 57 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 schema/property/raw.json diff --git a/schema/property/meta.json b/schema/property/meta.json index 08a55d8e3..e524b559a 100644 --- a/schema/property/meta.json +++ b/schema/property/meta.json @@ -4,7 +4,7 @@ "title": "Schema of material's meta properties", "allOf": [ { - "$ref": "base.json" + "$ref": "raw.json" } ] } diff --git a/schema/property/raw.json b/schema/property/raw.json new file mode 100644 index 000000000..4026afc37 --- /dev/null +++ b/schema/property/raw.json @@ -0,0 +1,57 @@ +{ + "$id": "property/raw", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Schema of material's preliminary property", + "allOf": [ + { + "description": "entity schema", + "$ref": "../in_memory_entity/base.json" + } + ], + "properties": { + "slug": { + "description": "property slug, e.g. total_energy", + "type": "string" + }, + "group": { + "description": "property group, e.g. qe:dft:gga:pbe", + "type": "string" + }, + "data": { + "description": "container of the information, specific to each property", + "type": "object" + }, + "source": { + "$ref": "source.json" + }, + "exabyteId": { + "description": "Id of the corresponding item in the entity bank that this property is obtained for", + "type": "array", + "items": { + "type": "string" + } + }, + "precision": { + "type": "object" + }, + "count": { + "description": "total number of properties among which this property is the best.", + "type": "number" + }, + "systemTags": { + "description": "property system tags, marks property system characteristics, values refined or best (could be both)", + "type": "array", + "items": { + "type": "string", + "enum": [ + "isRefined", + "isBest" + ] + } + } + }, + "required": [ + "data", + "source" + ] +} From ac066e0d0d06b952275fa5d0c4c70054326b55b4 Mon Sep 17 00:00:00 2001 From: Yurii Vlasiuk Date: Fri, 29 Sep 2023 12:05:21 +0300 Subject: [PATCH 45/48] fix: unit tests --- example/property/{raw.json => base.json} | 0 schema/property/base.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename example/property/{raw.json => base.json} (100%) diff --git a/example/property/raw.json b/example/property/base.json similarity index 100% rename from example/property/raw.json rename to example/property/base.json diff --git a/schema/property/base.json b/schema/property/base.json index a2eb8d286..934e653b1 100644 --- a/schema/property/base.json +++ b/schema/property/base.json @@ -1,7 +1,7 @@ { "$id": "property/base", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Schema of material's preliminary property", + "title": "Schema of base material's preliminary property", "allOf": [ { "description": "entity schema", From c7fb280f3fbe55347fb8f74b918d625852fe4e41 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 10 Oct 2023 14:15:42 -0700 Subject: [PATCH 46/48] chore: rename unit method type --- schema/method/unit_method.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/method/unit_method.json b/schema/method/unit_method.json index c8d462025..6765fc3d1 100644 --- a/schema/method/unit_method.json +++ b/schema/method/unit_method.json @@ -1,7 +1,7 @@ { "$id": "method/unit-method", "$schema": "http://json-schema.org/draft-04/schema#", - "title": "categorized method unit", + "title": "categorized unit method", "allOf": [ { "$ref": "../system/path_entity.json" From 140169a73b23f880caa9eb8985472b5dd1028d13 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Tue, 10 Oct 2023 14:16:22 -0700 Subject: [PATCH 47/48] chore: add any to pseduo enum --- schema/methods_directory/legacy/pseudopotential.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/methods_directory/legacy/pseudopotential.json b/schema/methods_directory/legacy/pseudopotential.json index 335a662c9..597edd72a 100644 --- a/schema/methods_directory/legacy/pseudopotential.json +++ b/schema/methods_directory/legacy/pseudopotential.json @@ -17,7 +17,8 @@ "enum": [ "paw", "nc", - "us" + "us", + "any" ] } } From b633a5ceb9c29985def0d8d6fddf48e3efc3abf6 Mon Sep 17 00:00:00 2001 From: Timur Bazhirov Date: Tue, 10 Oct 2023 16:56:59 -0700 Subject: [PATCH 48/48] chore: add DOI and URL to database source --- schema/system/database_source.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/schema/system/database_source.json b/schema/system/database_source.json index 727fa0844..8435d212a 100644 --- a/schema/system/database_source.json +++ b/schema/system/database_source.json @@ -10,16 +10,26 @@ "type": "string" }, "source": { - "description": "Third party source name.", + "description": "Third party source name, e.g. materials project, 2dmatpedia, ICSD, etc.", "type": "string" }, "origin": { "description": "A flag that is true when material is initially imported from a third party * (as opposed to being independently designed from scratch).", - "type": "boolean" + "type": "boolean", + "comment": "Deprecated. To be removed." }, "data": { - "description": "Original response from external source", + "description": "Original response from external source.", "type": "object" + }, + "doi":{ + "description": "Digital Object Identifier, e.g. 10.1088/0953-8984/25/10/105506", + "type": "string" + }, + "url": { + "description": "The URL of the original record, e.g. https://next-gen.materialsproject.org/materials/mp-48", + "type": "string", + "comment": "ToDo: update to use URI type per https://json-schema.org/understanding-json-schema/reference/string#resource-identifiers" } }, "required": [