diff --git a/README.rst b/README.rst
index d8541e1..c851756 100644
--- a/README.rst
+++ b/README.rst
@@ -48,7 +48,7 @@ Quantum ESPRESSO suite:
.. code-block:: pycon
- >>> pw_document.read("tests/examples/pw/Al001_relax_bfgs.xml")
+ >>> pw_document.read("tests/examples/pw/Si.xml")
Loaded data can be decoded to Python data dictionary or written to JSON or YAML formats:
diff --git a/docs/usage.rst b/docs/usage.rst
index 5a754d1..c351812 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -16,7 +16,7 @@ by qeschema.
>>> import qeschema
>>> doc = qeschema.PwDocument(schema='qes.xsd')
- >>> doc.read('tests/resources/pw/Al001_relax_bfgs.xml')
+ >>> doc.read('tests/resources/pw/Si.xml')
>>> pw_data = doc.to_dict()
>>> control_variables = pw_data['qes:espresso']['input']['control_variables']
diff --git a/qeschema/schemas/qes.xsd b/qeschema/schemas/qes.xsd
index e501a16..dd615fc 100644
--- a/qeschema/schemas/qes.xsd
+++ b/qeschema/schemas/qes.xsd
@@ -5,11 +5,12 @@ This file is distributed under the terms of the MIT License. See the
file 'LICENSE' in the root directory of the present distribution, or
http://opensource.org/licenses/MIT.
Authors: Antonio Zambon, Paolo Giannozzi, Pietro Delugas
-datecode 211101
+datecode 220603
-->
+ targetNamespace="http://www.quantum-espresso.org/ns/qes/qes-1.0"
+ version= "230310">
@@ -66,6 +67,9 @@ datecode 211101
+
+
+
@@ -83,8 +87,8 @@ datecode 211101
-
-
+
+
@@ -105,8 +109,10 @@ datecode 211101
-
-
+
+
+
+
@@ -144,6 +150,8 @@ datecode 211101
+
+
@@ -290,6 +298,7 @@ datecode 211101
+
@@ -328,19 +337,21 @@ datecode 211101
+
+
-
+
@@ -350,6 +361,18 @@ datecode 211101
+
+
+
+
+
+
+
+
+
+
+
+
@@ -367,6 +390,20 @@ datecode 211101
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -406,9 +443,14 @@ datecode 211101
-
-
+
+
+
+
+
+
+
@@ -417,13 +459,6 @@ datecode 211101
-
-
-
-
-
-
-
@@ -488,7 +523,6 @@ datecode 211101
-
@@ -529,6 +563,7 @@ datecode 211101
+
@@ -543,6 +578,88 @@ datecode 211101
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -552,11 +669,11 @@ datecode 211101
-
-
-
-
-
+
+
+
+
+
@@ -640,16 +757,16 @@ datecode 211101
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -666,16 +783,34 @@ datecode 211101
-
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -736,7 +871,7 @@ datecode 211101
-
+
@@ -744,7 +879,8 @@ datecode 211101
-
+
+
@@ -756,6 +892,7 @@ datecode 211101
+
@@ -948,6 +1085,8 @@ datecode 211101
+
+
@@ -1195,8 +1334,34 @@ datecode 211101
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/qeschema/schemas/qes_neb_test_ref.xsd b/qeschema/schemas/qes_neb_test_ref.xsd
new file mode 100644
index 0000000..110ff52
--- /dev/null
+++ b/qeschema/schemas/qes_neb_test_ref.xsd
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/qeschema/schemas/qes_test_ref.xsd b/qeschema/schemas/qes_test_ref.xsd
new file mode 100644
index 0000000..e501a16
--- /dev/null
+++ b/qeschema/schemas/qes_test_ref.xsd
@@ -0,0 +1,1202 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/yaml2qeinput.py b/scripts/yaml2qeinput.py
index 0e5fe28..17c789d 100755
--- a/scripts/yaml2qeinput.py
+++ b/scripts/yaml2qeinput.py
@@ -25,6 +25,9 @@ def parse_args():
parser.add_argument("-v", "--verbosity", action="count", default=1,
help="Increase output verbosity.")
parser.add_argument('-in', metavar='FILE', required=True, help="YAML input filename.")
+ parser.add_argument('-schema', metavar='FILE', required=False,
+ help="Specify XSD schema in input", default=None)
+
return parser.parse_args()
@@ -48,6 +51,7 @@ def parse_args():
qeschema.set_logger(args.verbosity)
input_fn = getattr(args, 'in')
+ schema_fn = getattr(args, 'schema', None)
with open(input_fn) as f:
data = yaml.load(f, Loader=yaml.Loader)
@@ -55,15 +59,15 @@ def parse_args():
for key in data:
element_name = key.split('}')[-1]
if element_name == 'espresso':
- xml_document = qeschema.PwDocument()
+ xml_document = qeschema.PwDocument(schema=schema_fn)
elif element_name == 'nebRun':
- xml_document = qeschema.NebDocument()
+ xml_document = qeschema.NebDocument(schema=schema_fn)
elif element_name == 'espressoph':
- xml_document = qeschema.PhononDocument()
+ xml_document = qeschema.PhononDocument(schema=schema_fn)
elif element_name == 'tddfpt':
- xml_document = qeschema.TdDocument()
+ xml_document = qeschema.TdDocument(schema=schema_fn)
elif element_name == 'spectrumDoc':
- xml_document = qeschema.TdSpectrumDocument()
+ xml_document = qeschema.TdSpectrumDocument(schema=schema_fn)
else:
continue
break
diff --git a/tests/resources/pw/Al001_rlx_damp.xml b/tests/resources/pw/Al001_rlx_damp.xml
index 07ae8d2..65e3a32 100644
--- a/tests/resources/pw/Al001_rlx_damp.xml
+++ b/tests/resources/pw/Al001_rlx_damp.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
Al001 relaxation with damped dynamics
diff --git a/tests/resources/pw/CO_bgfs_relax.in.test b/tests/resources/pw/CO_bgfs_relax.in.test
index e5bb9f2..46731ba 100644
--- a/tests/resources/pw/CO_bgfs_relax.in.test
+++ b/tests/resources/pw/CO_bgfs_relax.in.test
@@ -1,14 +1,15 @@
&CONTROL
calculation='relax'
disk_io='low'
- etot_conv_thr=0.0001
- forc_conv_thr=0.001
+ etot_conv_thr=5e-05
+ forc_conv_thr=0.0005
input_xml_schema_file='CO_bgfs_relax.xml'
iprint=100000
max_seconds=10000000
- outdir='/scratch/pdelugas/espresso-xsd/tempdir'
+ nstep=50
+ outdir='./'
prefix='CO'
- pseudo_dir='/scratch/pdelugas/espresso-xsd/pseudo'
+ pseudo_dir='./'
restart_mode='from_scratch'
title='CO bfgs relaxation'
tprnfor=.false.
@@ -17,8 +18,8 @@
wf_collect=.false.
/
&SYSTEM
- ecutrho=144.0
- ecutwfc=24.0
+ ecutrho=72.0
+ ecutwfc=12.0
force_symmorphic=.false.
ibrav=0
input_dft='PZ'
@@ -32,14 +33,13 @@
nspin=1
ntyp=2
occupations='fixed'
- spline_ps=.true.
starting_magnetization(1)=0.0
starting_magnetization(2)=0.0
tot_charge=0.0
use_all_frac=.false.
/
&ELECTRONS
- conv_thr=1e-07
+ conv_thr=5e-08
diago_cg_maxiter=20
diago_full_acc=.false.
diago_thr_init=0.0
@@ -65,20 +65,20 @@
w_2=0.5
/
&CELL
+ cell_dofree = 'all'
cell_dynamics='none'
- cell_factor=0.0
press=0.0
press_conv_thr=0.5
- wmass=1822.888
+ wmass=0.0
/
ATOMIC_SPECIES
- O 1.0 O.pz-rrkjus.UPF
- C 1.0 C.pz-rrkjus.UPF
+ O 1.0 O.pbesol-n-kjpaw_psl.0.1.UPF
+ C 1.0 C.pbesol-n-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS bohr
C 0.18800000 0.00000000 0.00000000
O 0.00000000 0.00000000 0.00000000 0 0 0
K_POINTS gamma
CELL_PARAMETERS bohr
- 1.00000000 0.00000000 0.00000000
- 0.00000000 1.00000000 0.00000000
- 0.00000000 0.00000000 1.00000000
+ 10.00000000 0.00000000 0.00000000
+ 0.00000000 10.00000000 0.00000000
+ 0.00000000 0.00000000 10.00000000
\ No newline at end of file
diff --git a/tests/resources/pw/CO_bgfs_relax.xml b/tests/resources/pw/CO_bgfs_relax.xml
index 1573d4d..ebc918c 100644
--- a/tests/resources/pw/CO_bgfs_relax.xml
+++ b/tests/resources/pw/CO_bgfs_relax.xml
@@ -1,216 +1,123 @@
-
+
+
+
CO bfgs relaxation
relax
from_scratch
CO
- /scratch/pdelugas/espresso-xsd/pseudo
- /scratch/pdelugas/espresso-xsd/tempdir
-
- false
-
-
- false
-
-
- false
-
+ ./
+ ./
+ false
+ false
+ false
low
-
- 10000000
-
-
- 0.1000000E-03
-
-
- 0.1000000E-02
-
-
- 0.5000000E+00
-
+ 10000000
+ 50
+ 5.000000000000000E-005
+ 5.000000000000000E-004
+ 5.000000000000000E-001
low
-
- 100000
-
+ 100000
+ false
+ false
-
- 0.1000000E+01
-
- O.pz-rrkjus.UPF
+ 1.000000000000000E+000
+ O.pbesol-n-kjpaw_psl.0.1.UPF
-
- 0.1000000E+01
-
- C.pz-rrkjus.UPF
+ 1.000000000000000E+000
+ C.pbesol-n-kjpaw_psl.1.0.0.UPF
-
+
-
- 0.1880000E+00 0.0000000E+00 0.0000000E+00
-
-
- 0.0000000E+00 0.0000000E+00 0.0000000E+00
+
+ 1.880000000000000E-001 0.000000000000000E+000 0.000000000000000E+000
+ 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000
-
- 0.1000000E+01 0.0000000E+00 0.0000000E+00
-
-
- 0.0000000E+00 0.1000000E+01 0.0000000E+00
-
-
- 0.0000000E+00 0.0000000E+00 0.1000000E+01
-
+ 1.000000000000000E+001 0.000000000000000E+000 0.000000000000000E+000
+ 0.000000000000000E+000 1.000000000000000E+001 0.000000000000000E+000
+ 0.000000000000000E+000 0.000000000000000E+000 1.000000000000000E+001
|
PZ
-
- false
-
-
- false
-
-
- false
-
+ false
+ false
+ false
-
- 0.0000000E+00
-
+ 0.000000000000000E+000
fixed
-
- true
-
-
- 0.2400000E+02
-
-
- 0.1440000E+03
-
- true
+ true
+ 1.200000000000000E+001
+ 7.200000000000000E+001
davidson
plain
-
- 0.7000000E+00
-
-
- 0.1000000E-06
-
-
- 8
-
-
- 100
-
-
- false
-
- false
- false
-
- 0.0000000E+00
-
-
- false
-
-
- 20
-
+ 7.000000000000000E-001
+ 5.000000000000000E-008
+ 8
+ 100
+ 100
+ false
+ false
+ false
+ false
+ 0.000000000000000E+000
+ false
+ 20
+ 20
+ 4
+ 16
+ false
-
- 1
-
-
- 0.0000000E+00 0.0000000E+00 0.0000000E+00
-
+ 1
+ 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000
bfgs
-
- 0.1000000E+03
-
-
- false
-
-
- false
-
+ 1.000000000000000E+002
+ false
+ false
-
- 1
-
-
- 0.1000000E-03
-
-
- 0.8000000E+00
-
-
- 0.5000000E+00
-
-
- 0.1000000E-01
-
-
- 0.5000000E+00
-
+ 1
+ 1.000000000000000E-004
+ 8.000000000000000E-001
+ 5.000000000000000E-001
+ 1.000000000000000E-002
+ 5.000000000000000E-001
none
- 0.0
-
- 0.1822888E+04
-
-
- 0.0000000E+00
-
-
- 1 1 1
- 1 1 1
- 1 1 1
-
+ 0.000000000000000E+000
+ 0.000000000000000E+000
+ all
-
- false
-
-
- false
-
-
- false
-
-
- false
-
-
- false
-
-
- false
-
+ false
+ false
+ false
+ false
+ false
+ false
-
- 1 1 1
- 0 0 0
+
+ 1 1 1
+ 0 0 0
diff --git a/tests/resources/pw/ESM_2Dxy.xml b/tests/resources/pw/ESM_2Dxy.xml
index c064191..9af2ea2 100644
--- a/tests/resources/pw/ESM_2Dxy.xml
+++ b/tests/resources/pw/ESM_2Dxy.xml
@@ -1,6 +1,6 @@
+xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
ESM_2Dxy
diff --git a/tests/resources/pw/FeO_LDAU_standard.xml b/tests/resources/pw/FeO_LDAU_standard.xml
index 0931497..d348614 100644
--- a/tests/resources/pw/FeO_LDAU_standard.xml
+++ b/tests/resources/pw/FeO_LDAU_standard.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
FeO_LDA+U
diff --git a/tests/resources/pw/FeO_LDAU_with_no_U.xml b/tests/resources/pw/FeO_LDAU_with_no_U.xml
index 3bfc255..8263033 100644
--- a/tests/resources/pw/FeO_LDAU_with_no_U.xml
+++ b/tests/resources/pw/FeO_LDAU_with_no_U.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
FeO_LDA+U=0
diff --git a/tests/resources/pw/FeO_LDAU_with_starting_ns.xml b/tests/resources/pw/FeO_LDAU_with_starting_ns.xml
index 2e2f9ee..769da04 100644
--- a/tests/resources/pw/FeO_LDAU_with_starting_ns.xml
+++ b/tests/resources/pw/FeO_LDAU_with_starting_ns.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
uffa
diff --git a/tests/resources/pw/Fe_Im-3m_0_dftd3.xml b/tests/resources/pw/Fe_Im-3m_0_dftd3.xml
index c3b0594..9a6f833 100644
--- a/tests/resources/pw/Fe_Im-3m_0_dftd3.xml
+++ b/tests/resources/pw/Fe_Im-3m_0_dftd3.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
Fe_Im-3m_0_dftd3
diff --git a/tests/resources/pw/Fe_crystal_crystal_positions.xml b/tests/resources/pw/Fe_crystal_crystal_positions.xml
index d67722e..87293fd 100644
--- a/tests/resources/pw/Fe_crystal_crystal_positions.xml
+++ b/tests/resources/pw/Fe_crystal_crystal_positions.xml
@@ -1,6 +1,6 @@
+xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
Fe_crystal_crystal_positions
diff --git a/tests/resources/pw/Fe_non_collinear_penalty.xml b/tests/resources/pw/Fe_non_collinear_penalty.xml
index 5f9c7df..56732bb 100644
--- a/tests/resources/pw/Fe_non_collinear_penalty.xml
+++ b/tests/resources/pw/Fe_non_collinear_penalty.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
diff --git a/tests/resources/pw/Fe_noncolin.xml b/tests/resources/pw/Fe_noncolin.xml
index 55d550a..8be062f 100644
--- a/tests/resources/pw/Fe_noncolin.xml
+++ b/tests/resources/pw/Fe_noncolin.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
Fe_non_collinear
diff --git a/tests/resources/pw/PbTiO3_BerryPhase.xml b/tests/resources/pw/PbTiO3_BerryPhase.xml
index d575af4..0c8f066 100644
--- a/tests/resources/pw/PbTiO3_BerryPhase.xml
+++ b/tests/resources/pw/PbTiO3_BerryPhase.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
PbTiO_3_BerryPhase
diff --git a/tests/resources/pw/PbTiO3_bc3_fcp_opt.xml b/tests/resources/pw/PbTiO3_bc3_fcp_opt.xml
index dc630c2..0a95b9e 100644
--- a/tests/resources/pw/PbTiO3_bc3_fcp_opt.xml
+++ b/tests/resources/pw/PbTiO3_bc3_fcp_opt.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
PBTiO3_scf
diff --git a/tests/resources/pw/PbTiO3_scf.xml b/tests/resources/pw/PbTiO3_scf.xml
index 7f5b2d1..3a117fe 100644
--- a/tests/resources/pw/PbTiO3_scf.xml
+++ b/tests/resources/pw/PbTiO3_scf.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
PBTiO3_scf
diff --git a/tests/resources/pw/Pt_spinorbit.xml b/tests/resources/pw/Pt_spinorbit.xml
index ab67206..6d1ce73 100644
--- a/tests/resources/pw/Pt_spinorbit.xml
+++ b/tests/resources/pw/Pt_spinorbit.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
Pt_fullyRelativistic
diff --git a/tests/resources/pw/Si.xml b/tests/resources/pw/Si.xml
index ff03093..52fd501 100644
--- a/tests/resources/pw/Si.xml
+++ b/tests/resources/pw/Si.xml
@@ -1,92 +1,61 @@
-
+
+
+
- QEXSD_0.1.0
- XML file generated by PWSCF
- This run was terminated on: 18:24:51 24 Aug 2017
+ QEXSD_23.03.10
+ XML file generated by PWSCF
+ This run was terminated on: 14:12:52 29 Feb 2024
-
- 4
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 4
-
+ 4
+ 1
+ 1
+ 1
+ 1
+ 4
- bands
+ scf
from_scratch
- Si
+ pwscf
./
- ./tmp
+ ./
true
false
true
low
-
- 10000000
-
-
- 0.1000000000000000E-03
-
-
- 0.1000000000000000E-02
-
-
- 0.5000000000000000E+00
-
+ 10000000
+ 1
+ 5.000000000000000E-005
+ 5.000000000000000E-004
+ 5.000000000000000E-001
low
-
- 100000
-
+ 100000
+ false
+ false
-
- 0.2808600000000000E+02
-
- Si.pz-vbc.UPF
+ 2.808600000000000E+001
+ Si.pbe-n-rrkjus_psl.1.0.0.UPF
-
+
-
- 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00
-
-
- 0.2550000000000000E+01 0.2550000000000000E+01 0.2550000000000000E+01
-
+ 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000
+ 2.552500000000000E+000 2.552500000000000E+000 2.552500000000000E+000
-
- -0.5100000000000000E+01 0.0000000000000000E+00 0.5100000000000000E+01
-
-
- 0.0000000000000000E+00 0.5100000000000000E+01 0.5100000000000000E+01
-
-
- -0.5100000000000000E+01 0.5100000000000000E+01 0.0000000000000000E+00
-
+ -5.105000000000000E+000 0.000000000000000E+000 5.105000000000000E+000
+ 0.000000000000000E+000 5.105000000000000E+000 5.105000000000000E+000
+ -5.105000000000000E+000 5.105000000000000E+000 0.000000000000000E+000
|
- PZ
+ PBE
false
@@ -94,464 +63,48 @@
false
-
- 8
-
-
- 0.0000000000000000E+00
-
+ 0.000000000000000E+000
fixed
-
- 0.9000000000000000E+01
-
+ false
+ 2.000000000000000E+001
+ 1.200000000000000E+002
davidson
plain
-
- 0.7000000000000000E+00
-
-
- 0.1000000000000000E-05
-
-
- 8
-
-
- 100
-
+ 7.000000000000000E-001
+ 5.000000000000000E-011
+ 8
+ 100
+ 100
false
+ false
false
false
-
- 0.0000000000000000E+00
-
+ 0.000000000000000E+000
false
-
- 20
-
+ 20
+ 20
+ 4
+ 16
+ false
-
- 131
-
-
- 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3333333333333333E-01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6666666666666667E-01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1666666666666667E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2666666666666667E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3666666666666666E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4666666666666667E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5666666666666667E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6666666666666666E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7666666666666666E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8333333333333334E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8666666666666667E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9333333333333333E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9666666666666667E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.5000000000000000E-01 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.1000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.1500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.2000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.2500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.3000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.3500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.4000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.4500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.5000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.4500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.4000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.3500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.3000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.2500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.2000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.1500000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.9999999999999998E-01 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.4999999999999999E-01 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1000000000000000E+01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9800000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9600000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9399999999999999E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8800000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8600000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8400000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8200000000000001E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.8000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7800000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7600000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7400000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6799999999999999E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6599999999999999E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6400000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.6000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5800000000000001E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5600000000000001E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5400000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4800000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4600000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4399999999999999E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3800000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3600000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3400000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.3200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2999999999999999E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2800000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2600000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2400000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2000000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1799999999999999E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1600000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1400000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.1200000000000000E+00 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.9999999999999998E-01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.7999999999999996E-01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.5999999999999994E-01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.4000000000000004E-01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.2000000000000002E-01 0.0000000000000000E+00
-
-
- 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00
-
-
- 0.1666666666666667E-01 0.1666666666666667E-01 0.1666666666666667E-01
-
-
- 0.3333333333333333E-01 0.3333333333333333E-01 0.3333333333333333E-01
-
-
- 0.5000000000000000E-01 0.5000000000000000E-01 0.5000000000000000E-01
-
-
- 0.6666666666666667E-01 0.6666666666666667E-01 0.6666666666666667E-01
-
-
- 0.8333333333333333E-01 0.8333333333333333E-01 0.8333333333333333E-01
-
-
- 0.1000000000000000E+00 0.1000000000000000E+00 0.1000000000000000E+00
-
-
- 0.1166666666666667E+00 0.1166666666666667E+00 0.1166666666666667E+00
-
-
- 0.1333333333333333E+00 0.1333333333333333E+00 0.1333333333333333E+00
-
-
- 0.1500000000000000E+00 0.1500000000000000E+00 0.1500000000000000E+00
-
-
- 0.1666666666666667E+00 0.1666666666666667E+00 0.1666666666666667E+00
-
-
- 0.1833333333333333E+00 0.1833333333333333E+00 0.1833333333333333E+00
-
-
- 0.2000000000000000E+00 0.2000000000000000E+00 0.2000000000000000E+00
-
-
- 0.2166666666666667E+00 0.2166666666666667E+00 0.2166666666666667E+00
-
-
- 0.2333333333333333E+00 0.2333333333333333E+00 0.2333333333333333E+00
-
-
- 0.2500000000000000E+00 0.2500000000000000E+00 0.2500000000000000E+00
-
-
- 0.2666666666666667E+00 0.2666666666666667E+00 0.2666666666666667E+00
-
-
- 0.2833333333333333E+00 0.2833333333333333E+00 0.2833333333333333E+00
-
-
- 0.3000000000000000E+00 0.3000000000000000E+00 0.3000000000000000E+00
-
-
- 0.3166666666666667E+00 0.3166666666666667E+00 0.3166666666666667E+00
-
-
- 0.3333333333333333E+00 0.3333333333333333E+00 0.3333333333333333E+00
-
-
- 0.3500000000000000E+00 0.3500000000000000E+00 0.3500000000000000E+00
-
-
- 0.3666666666666666E+00 0.3666666666666666E+00 0.3666666666666666E+00
-
-
- 0.3833333333333333E+00 0.3833333333333333E+00 0.3833333333333333E+00
-
-
- 0.4000000000000000E+00 0.4000000000000000E+00 0.4000000000000000E+00
-
-
- 0.4166666666666667E+00 0.4166666666666667E+00 0.4166666666666667E+00
-
-
- 0.4333333333333333E+00 0.4333333333333333E+00 0.4333333333333333E+00
-
-
- 0.4500000000000000E+00 0.4500000000000000E+00 0.4500000000000000E+00
-
-
- 0.4666666666666667E+00 0.4666666666666667E+00 0.4666666666666667E+00
-
-
- 0.4833333333333333E+00 0.4833333333333333E+00 0.4833333333333333E+00
-
-
- 0.5000000000000000E+00 0.5000000000000000E+00 0.5000000000000000E+00
-
+ Monkhorst-Pack
none
+ 1.000000000000000E+002
false
false
none
-
- 0.0000000000000000E+00
-
-
- 0.5119764596905401E+05
-
-
- 0.0000000000000000E+00
-
-
- 1 1 1
- 1 1 1
- 1 1 1
-
+ 0.000000000000000E+000
+ 0.000000000000000E+000
+ all
false
@@ -565,46 +118,32 @@
-
- 0
-
- 5
-
+ 0
+
+
+ 1.450685000000000E+000
+ 2.340905189514160E+000
+
+
+ 1.209120000000000E-001
+ 5.453820228576660E-001
+
+
+ 5.107699999999998E-002
+ 5.985188484191895E-002
+
+
+ 8.419999999999817E-004
+ 8.449554443359375E-004
+
+
+ 3.756400000000001E-002
+ 3.913593292236328E-002
+
+
+ 2.381400000000089E-002
+ 3.260946273803711E-002
+
+
+ 3.830329999999997E-001
+ 4.403598308563232E-001
+
+
+ 2.714000000000022E-003
+ 3.786110877990723E-002
+
+
+ 2.776800000000001E-002
+ 3.180193901062012E-002
+
+
+ 2.900000000000014E-002
+ 3.290581703186035E-002
+
+
+ 1.633000000000218E-003
+ 1.786231994628906E-003
+
+
+ 1.549000000000245E-003
+ 1.889705657958984E-003
+
+
+ 8.059999999996403E-004
+ 1.135349273681641E-003
+
+
+ 6.980100000000022E-002
+ 7.987427711486816E-002
+
+
+ 4.538900000000001E-002
+ 4.240880012512207E-001
+
+
+ 2.278800000000003E-002
+ 4.364705085754395E-002
+
+
+ 2.176099999999881E-002
+ 4.255318641662598E-002
+
+
+ 4.920000000001035E-004
+ 6.814002990722656E-004
+
+
+ 4.480000000001150E-004
+ 6.213188171386719E-004
+
+
+ 4.262499999999989E-002
+ 4.039311408996582E-001
+
+
+ 4.258699999999990E-002
+ 4.038801193237305E-001
+
+
+ 4.252599999999990E-002
+ 4.038043022155762E-001
+
+
+ 1.783599999999994E-002
+ 3.960299491882324E-002
+
+
+ 5.839860000000008E-001
+ 6.752722263336182E-001
+
+
+ 5.821729999999975E-001
+ 6.732413768768311E-001
+
+
+ 5.793480000000022E-001
+ 6.700830459594727E-001
+
+
+ 5.088879999999993E-001
+ 5.927751064300537E-001
+
+
+ 5.003719999999957E-001
+ 5.734276771545410E-001
+
+
+ 5.429799999999951E-002
+ 5.888056755065918E-002
+
+
+ 5.994200000000283E-002
+ 6.526374816894531E-002
+
+
+ 1.220000000000021E-002
+ 1.402449607849121E-002
+
+
+ 1.245000000000052E-003
+ 1.670837402343750E-003
+
+
+ 1.351599999999720E-002
+ 1.545310020446777E-002
+
+
+ 1.109900000000619E-002
+ 1.268577575683594E-002
+
+
+ 2.315600000000001E-002
+ 3.621413707733154E-001
+
+
+ 4.684800000000067E-002
+ 4.086534976959229E-001
+
+
+ 1.659999999999162E-004
+ 2.355575561523438E-004
+
+
+ 1.171055000000000E+000
+ 1.446416854858398E+000
+
+
+ 8.917250000000000E-001
+ 1.013895034790039E+000
+
+
+ 7.750249999999976E-001
+ 8.794586658477783E-001
+
+
+ 4.204000000000541E-003
+ 5.847930908203125E-003
+
+
+ 5.306000000000699E-003
+ 6.201744079589844E-003
+
+
+ 1.833999999999447E-003
+ 2.063274383544922E-003
+
+
+ 7.632700000000026E-002
+ 7.977151870727539E-002
+
+
+ 2.571200000000440E-002
+ 4.873895645141602E-002
+
+
+ 6.993000000002247E-003
+ 7.997989654541016E-003
+
+
+ 1.682480000000002E-001
+ 2.115292549133301E-001
+
+
+ 2.000000000013102E-005
+ 2.074241638183594E-005
+
+
+ 6.294600000000017E-002
+ 7.411670684814453E-002
+
+
+ 7.849999999987034E-004
+ 8.985996246337891E-004
+
+
+ 1.034099999999838E-002
+ 1.259756088256836E-002
+
+
+ 5.418000000001255E-003
+ 6.281614303588867E-003
+
+
+ 8.950000000005343E-004
+ 1.033782958984375E-003
+
+
+ 8.529800000000010E-002
+ 1.155290603637695E-001
+
+
+ 2.529999999996146E-004
+ 3.089904785156250E-004
+
+
+ 1.929099999999995E-002
+ 2.087283134460449E-002
+
+
+ 3.379000000000021E-003
+ 1.054263114929199E-002
+
+
+ 9.579999999997924E-004
+ 1.033067703247070E-003
+
+
+ 8.697900000000014E-002
+ 9.064221382141113E-002
+
+
+ 8.696600000000010E-002
+ 9.062790870666504E-002
+
+
+
-
diff --git a/tests/resources/pw/Si_md.xml b/tests/resources/pw/Si_md.xml
index d8b9b1d..9556bbb 100644
--- a/tests/resources/pw/Si_md.xml
+++ b/tests/resources/pw/Si_md.xml
@@ -1,6 +1,6 @@
+ xsi:schemaLocation="http://www.quantum-espresso.org/ns/qes/qes-1.0 qes_test_ref.xsd">
Si_molecular_dynamics
diff --git a/tests/test_converters.py b/tests/test_converters.py
index fce3d00..fee8c73 100755
--- a/tests/test_converters.py
+++ b/tests/test_converters.py
@@ -34,7 +34,7 @@ def test(self):
if element_name == 'espresso':
xml_conf = qeschema.PwDocument(source=xml_file)
elif element_name == 'nebRun':
- xml_conf = qeschema.NebDocument(source=xml_file)
+ xml_conf = qeschema.NebDocument(source=xml_file, schema='qes_neb_test_ref.xsd')
elif element_name == 'espressoph':
xml_conf = qeschema.PhononDocument(source=xml_file)
elif element_name == 'tddfpt':
@@ -102,13 +102,13 @@ def test_yaml2qeinput_script(self):
os.remove(in_filename)
if platform.system() == 'Windows':
- os.system("python %s -in %s" % (py_filename, xml_filename))
+ os.system("python %s -schema qes_test_ref.xsd -in %s" % (py_filename, xml_filename))
self.assertTrue('Al001_relax_bfgs.in' in os.listdir(os.path.dirname(xml_filename)))
else:
if platform.system() == 'Linux':
- command = 'python %s -in %s 1> /dev/null 2> /dev/null'
+ command = 'python %s -schema qes_test_ref.xsd -in %s 1> /dev/null 2> /dev/null'
else:
- command = 'python3 %s -in %s 1> /dev/null 2> /dev/null'
+ command = 'python3 %s -schema qes_test_ref.xsd -in %s 1> /dev/null 2> /dev/null'
os.system(command % (py_filename, xml_filename))
self.assertTrue(os.path.isfile(in_filename),
diff --git a/tests/test_documents.py b/tests/test_documents.py
index 38afbc0..c6670cd 100755
--- a/tests/test_documents.py
+++ b/tests/test_documents.py
@@ -116,7 +116,7 @@ def test_pw_document_init(self):
self.assertEqual(document.filename, source)
else:
self.assertTrue(document.filename.endswith('Al001_rlx_damp.xml'))
- self.assertTrue(document.schema.url.endswith("qeschema/schemas/qes.xsd"))
+ self.assertTrue(document.schema.url.endswith("qeschema/schemas/qes_test_ref.xsd"))
def test_phonon_document_init(self):
schema = os.path.join(self.schemas_dir, 'ph_temp.xsd')
@@ -149,7 +149,7 @@ def test_init_from_xml_resource(self):
self.assertEqual(document.filename, xml_file)
else:
self.assertTrue(document.filename.endswith('CO_bgfs_relax.xml'))
- self.assertTrue(document.schema.url.endswith("qeschema/schemas/qes.xsd"))
+ self.assertTrue(document.schema.url.endswith("qes_230310.xsd"))
def test_init_with_schema_only(self):
schema = os.path.join(self.schemas_dir, 'qes.xsd')
@@ -216,7 +216,7 @@ def test_exception_class(self):
with self.assertRaises(XmlDocumentError):
document.get_fortran_input()
- schema = os.path.join(self.schemas_dir, 'qes.xsd')
+ schema = os.path.join(self.schemas_dir, 'qes_test_ref.xsd')
document = TdSpectrumDocument(schema=schema)
document.read(os.path.join(self.test_dir, 'resources/pw/Al001_relax_bfgs.xml'))
@@ -631,7 +631,7 @@ def test_phonon_document(self):
def test_neb_document(self):
xml_filename = os.path.join(self.test_dir, 'resources/neb/Al001_plus_H_bc3.xml')
- document = NebDocument()
+ document = NebDocument(schema='qes_neb_test_ref.xsd')
document.read(xml_filename)
self.assertTrue(hasattr(document.root, 'tag'))
@@ -683,7 +683,7 @@ def test_td_spectrum_document(self):
def test_fortran_input_generator(self):
xml_filename = os.path.join(self.test_dir, 'resources/pw/Al001_relax_bfgs.xml')
- document = PwDocument()
+ document = PwDocument(schema='qes_test_ref.xsd')
document.read(xml_filename)
self.assertFalse(os.path.isfile(self.output_file))
@@ -734,10 +734,12 @@ def test_pw_get_stress(self):
stress = document.get_stress()
self.assertListEqual(
stress,
- [[-1.825058728527109e-06, 1.058791184067875e-22, -1.058791184067875e-22],
- [1.058791184067875e-22, -1.825058728527109e-06, 0.0],
- [-1.058791184067875e-22, 1.058791184067875e-22, -1.825058728527109e-06]]
- )
+ [
+ [0.0001200028001026682, -3.388131789017201e-20, 1.355252715606881e-20],
+ [-3.388131789017201e-20, 0.0001200028001026682, -1.355252715606881e-20],
+ [6.776263578034403e-21, -6.776263578034403e-21, 0.0001200028001026683]
+ ]
+ )
if __name__ == '__main__':
diff --git a/tox.ini b/tox.ini
index 88be00f..a3a9cce 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,7 +9,7 @@ skip_missing_interpreters = true
[testenv]
deps =
- xmlschema>=1.6.4
+ xmlschema>=1.6.4,~=2.3
pyyaml
numpy
h5py