Skip to content

Commit

Permalink
Merge pull request #44 from pietrodelugas/new_master
Browse files Browse the repository at this point in the history
update qeschema for v1.5.1
  • Loading branch information
pietrodelugas authored Feb 29, 2024
2 parents dccbe25 + 5db2a87 commit 5134386
Show file tree
Hide file tree
Showing 26 changed files with 2,638 additions and 3,543 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
245 changes: 205 additions & 40 deletions qeschema/schemas/qes.xsd

Large diffs are not rendered by default.

165 changes: 165 additions & 0 deletions qeschema/schemas/qes_neb_test_ref.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?xml version="1.0"?>
<!--
Copyright (c), 2016, Quantum Espresso Foundation. All rights reserved.
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: Paolo Giannozzi, Pietro Delugas
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:qes="http://www.quantum-espresso.org/ns/qes/qes-1.0"
xmlns:neb="http://www.quantum-espresso.org/ns/neb"
targetNamespace="http://www.quantum-espresso.org/ns/neb" version="development">
<import id="qes" namespace="http://www.quantum-espresso.org/ns/qes/qes-1.0" schemaLocation="./qes_test_ref.xsd"/>
<element name="nebRun" type="neb:NebRunType"/>
<complexType name="NebRunType">
<sequence>
<element name="GeneralInfo" type="qes:general_infoType" minOccurs="0"/>
<element name="ParallelInfo" type="neb:nebPInfoType" minOccurs="0"/>
<element name="input" type="neb:nebInputType" minOccurs="1" maxOccurs="1"/>
<element name="nebStep" type="neb:nebStepType" minOccurs="0" maxOccurs="unbounded" />
<element name="nebOutput" type="neb:nebOutputType" minOccurs="0" maxOccurs="1"/>
<element type="nonNegativeInteger" name="CpuTime" minOccurs="0"/>
<element type="qes:statusType" name="status" minOccurs="0" />
<element type="qes:closedType" name="closed" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="nebPInfoType">
<sequence>
<element type="positiveInteger" name="nimages"/>
<element type="qes:parallel_infoType" name="parallelInfo"/>
</sequence>
</complexType>

<complexType name="nebInputType">
<sequence>
<element name="path" type="neb:pathInputType"/>
<element name="engine" type="neb:engineInputType"/>
</sequence>
</complexType>

<complexType name="pathInputType">
<sequence>
<element name="stringMethod" type="neb:stringMethodType"/>
<element type="qes:controlRestartModeType" name="restart_mode" maxOccurs="1" default="from_scratch"/>
<element type="positiveInteger" name="pathNstep" maxOccurs="1" minOccurs="1"/>
<element type="positiveInteger" name="numOfImages" minOccurs ="0"/>
<element name="optimizationScheme" type="neb:optimizationSchemeType" minOccurs="1" maxOccurs="1"/>
<element name="climbingImage" type="neb:climbingImageType" maxOccurs="1" default="no-CI"/>
<element name="endImagesOptimizationFlag" type="boolean" maxOccurs="1" default="false"/>
<element name="minimumImageFlag" type="boolean" maxOccurs="1" default="false"/>
<element name="temperature" type="double" minOccurs="0" maxOccurs="1" />
<element name="optimizationStepLength" type="double" minOccurs="1" maxOccurs="1" />
<element name="pathThreshold" type="double"/>
<element name="elasticConstMax" type="double" minOccurs="1" maxOccurs="1" />
<element name="elasticConstMin" type="double" minOccurs="1" maxOccurs="1"/>
<element name="useMassesFlag" type="boolean" default="false" maxOccurs="1"/>
<element name="useFreezingFlag" type="boolean" default="false" maxOccurs="1"/>
<element name="constantBiasFlag" type="boolean" default="false" minOccurs="0" maxOccurs="1"/>
<element name="targetFermiEnergy" type="double" minOccurs="0" maxOccurs="1"/>
<element name="totChargeFirst" type="double" minOccurs="0" maxOccurs="1"/>
<element name="totChargeLast" type="double" minOccurs="0" maxOccurs="1" />
<element name="climbingImageIndex" type="positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="engineInputType">
<sequence>
<element type="qes:control_variablesType" name="control_variables"/>
<element type="qes:atomic_speciesType" name="atomic_species" />
<element name="atomic_structure" type="qes:atomic_structureType" minOccurs="2" maxOccurs="unbounded"/>
<element type="qes:dftType" name="dft"/>
<element type="qes:spinType" name="spin" />
<element type="qes:bandsType" name="bands"/>
<element type="qes:basisType" name="basis"/>
<element type="qes:electron_controlType" name="electron_control"/>
<element type="qes:k_points_IBZType" name="k_points_IBZ"/>
<element type="qes:ion_controlType" name="ion_control" minOccurs="0" maxOccurs="1" />
<element type="qes:cell_controlType" name="cell_control" minOccurs="0" maxOccurs="1"/>
<element type="qes:symmetry_flagsType" name="symmetry_flags" minOccurs="0" />
<element type="qes:boundary_conditionsType" name="boundary_conditions" minOccurs="0" />
<element type="qes:ekin_functionalType" name="ekin_functional" minOccurs="0" />
<element type="qes:matrixType" name="external_atomic_forces" minOccurs="0" />
<element type="qes:integerMatrixType" name="free_positions" minOccurs="0" />
<element type="qes:matrixType" name="starting_atomic_velocities" minOccurs="0" />
<element type="qes:electric_fieldType" name="electric_field" minOccurs="0" />
<element type="qes:atomic_constraintsType" name="atomic_constraints" minOccurs="0" />
<element type="qes:spin_constraintsType" name="spin_constraints" minOccurs="0" />
</sequence>
</complexType>

<complexType name="nebStepType">
<sequence>
<element name="Iteration" type="positiveInteger"/>
<element name="ActivationEnergyForward" type="double" />
<element name="ActivationEnergyBack" type="double"/>
<element name="Bead" type="neb:nebBeadType" maxOccurs="unbounded"/>
<element name="pathLength" type="double"/>
<element name="InterBeadDistance" type="double"/>
</sequence>
</complexType>
<complexType name="nebOutputType">
<sequence>
<element name="finalNebStep" type="neb:nebStepType"/>
<element name="nebControl" type="neb:engineInputType" />
<element name="nebPlot" type="neb:plotType"/>
<element name="finalImageGradient" type="neb:imageGradientType" maxOccurs="unbounded"/>
</sequence>
</complexType>

<complexType name="imageGradientType">
<sequence>
<element name="imageNumber" type="positiveInteger"/>
<element name="gradient" type="qes:matrixType"/>
</sequence>
</complexType>
<complexType name="plotType">
<sequence>
<element name="Abscissae" type="qes:vectorType"/>
<element name="Ordinates" type="qes:vectorType"/>
</sequence>
</complexType>
<complexType name="nebBeadType">
<sequence>
<element name="ImageIndex" type="positiveInteger"/>
<element name="Energy" type="double"/>
<element name="Error" type="double"/>
<element name="FrozenFlag" type="boolean"/>
<element name="Structure" type="qes:atomic_structureType"/>
</sequence>
</complexType>

<simpleType name="stringMethodType">
<restriction base="string">
<enumeration value="neb"/>
<enumeration value="smd"/>
</restriction>
</simpleType>
<simpleType name="optimizationSchemeType">
<restriction base="string">
<enumeration value="sd"/>
<enumeration value="broyden"/>
<enumeration value="broyden2"/>
<enumeration value="quick-min"/>
<enumeration value="langevin"/>
</restriction>
</simpleType>
<simpleType name="climbingImageType">
<restriction base="string">
<enumeration value="no-CI"/>
<enumeration value="auto"/>
<enumeration value="manual"/>
</restriction>
</simpleType>
<complexType name="manyPosStructType">
<sequence>
<choice minOccurs="2" maxOccurs="unbounded">
<element type="qes:atomic_positionsType" name="atomic_positions" minOccurs="2" maxOccurs="unbounded" />
<element type="qes:wyckoff_positionsType" name="wyckoff_positions" minOccurs="0" maxOccurs="unbounded" />
</choice>
<element type="qes:cellType" name="cell"/>
</sequence>
<attribute type="positiveInteger" name="nat" />
<attribute type="double" name="alat" use="optional"/>
<attribute type="positiveInteger" name="bravais_index" use="optional"/>
</complexType>
</schema>
Loading

0 comments on commit 5134386

Please sign in to comment.