sample.xsd 6.02 KB
Newer Older
Francois Gygi committed
1
<?xml version="1.0"?>
Francois Gygi committed
2
<schema xmlns="http://www.w3.org/2001/XMLSchema"
3
  xmlns:fpmd="http://www.quantum-simulation.org/ns/fpmd/fpmd-1.0"
Francois Gygi committed
4
  targetNamespace="http://www.quantum-simulation.org/ns/fpmd/fpmd-1.0">
Francois Gygi committed
5

Francois Gygi committed
6
  <annotation>
7 8
    <documentation> $Id: sample.xsd,v 1.12 2008-03-07 20:05:01 fgygi Exp $
      http://www.quantum-simulation.org
Francois Gygi committed
9
      FPMD sample XML Schema specification.
10
      Copyright (c) 2006-2008 The Regents of the University of California.
Francois Gygi committed
11 12
    </documentation>
  </annotation>
Francois Gygi committed
13

Francois Gygi committed
14
  <include schemaLocation="species.xsd"/>
Francois Gygi committed
15

16
  <element name="sample" type="fpmd:sampleType"/>
Francois Gygi committed
17 18
  <complexType name="sampleType">
    <sequence>
Francois Gygi committed
19
      <element name="description" type="string" minOccurs="0" maxOccurs="1"/>
20 21
      <element name="atomset" type="fpmd:atomsetType" minOccurs="0"/>
      <element name="wavefunction" type="fpmd:wavefunctionType" minOccurs="0"/>
Francois Gygi committed
22
      <element name="wavefunction_velocity"
23
         type="fpmd:wavefunctionType" minOccurs="0"/>
Francois Gygi committed
24 25
    </sequence>
  </complexType>
Francois Gygi committed
26

Francois Gygi committed
27 28
  <complexType name="atomsetType">
    <sequence minOccurs="0">
29 30
      <element name="unit_cell" type="fpmd:domainType"
               minOccurs="0"/>
Francois Gygi committed
31
      <element name="species" type="fpmd:speciesType"
Francois Gygi committed
32
               minOccurs="0" maxOccurs="unbounded"/>
33
      <element name="atom" type="fpmd:atomType"
Francois Gygi committed
34 35
               minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
Francois Gygi committed
36
    <attribute name="href" type="anyURI" use="optional"/>
Francois Gygi committed
37
  </complexType>
Francois Gygi committed
38

Francois Gygi committed
39 40
  <complexType name="atomType">
    <sequence>
41 42
      <element name="position" type="fpmd:d3vectorType"/>
      <element name="velocity" minOccurs="0" type="fpmd:d3vectorType"/>
Francois Gygi committed
43 44 45 46
    </sequence>
    <attribute name="name" type="NMTOKEN" use="required"/>
    <attribute name="species" type="NMTOKEN" use="required"/>
  </complexType>
Francois Gygi committed
47

Francois Gygi committed
48 49
  <complexType name="wavefunctionType">
    <sequence minOccurs="0">
50 51 52 53
      <element name="domain" type="fpmd:domainType"/>
      <element name="reference_domain" minOccurs="0" type="fpmd:domainType"/>
      <element name="grid" type="fpmd:gridType"/>
      <element name="slater_determinant" type="fpmd:slater_determinantType"
Francois Gygi committed
54 55
               maxOccurs="unbounded"/>
    </sequence>
56 57
    <attribute name="ecut" type="fpmd:nonNegativeDouble" use="optional"/>
    <attribute name="nspin" type="fpmd:nspinType" use="required"/>
Francois Gygi committed
58 59
    <attribute name="nel" type="nonNegativeInteger" use="required"/>
    <attribute name="nempty" type="nonNegativeInteger" default="0"/>
Francois Gygi committed
60
    <attribute name="href" type="anyURI" use="optional"/>
Francois Gygi committed
61
  </complexType>
Francois Gygi committed
62

Francois Gygi committed
63
  <complexType name="domainType">
64 65 66
    <attribute name="a" type="fpmd:d3vectorType" use="required"/>
    <attribute name="b" type="fpmd:d3vectorType" use="required"/>
    <attribute name="c" type="fpmd:d3vectorType" use="required"/>
Francois Gygi committed
67
  </complexType>
Francois Gygi committed
68

Francois Gygi committed
69 70 71 72 73
  <complexType name="gridType">
    <attribute name="nx" type="positiveInteger" use="required"/>
    <attribute name="ny" type="positiveInteger" use="required"/>
    <attribute name="nz" type="positiveInteger" use="required"/>
  </complexType>
Francois Gygi committed
74

Francois Gygi committed
75 76
  <complexType name="slater_determinantType">
    <sequence minOccurs="0">
77 78
      <element name="density_matrix" type="fpmd:density_matrixType"/>
      <element name="grid_function" type="fpmd:grid_functionType"
Francois Gygi committed
79 80
               maxOccurs="unbounded"/>
    </sequence>
81 82
    <attribute name="spin" type="fpmd:spinType" use="optional"/>
    <attribute name="kpoint" type="fpmd:d3vectorType" use="required"/>
Francois Gygi committed
83 84
    <attribute name="weight" type="double" use="required"/>
    <attribute name="size" type="positiveInteger" use="required"/>
Francois Gygi committed
85
    <attribute name="href" type="anyURI" use="optional"/>
Francois Gygi committed
86
  </complexType>
Francois Gygi committed
87

Francois Gygi committed
88 89 90 91 92 93
  <simpleType name="nspinType">
    <restriction base="integer">
      <minInclusive value="1"/>
      <maxInclusive value="2"/>
    </restriction>
  </simpleType>
Francois Gygi committed
94

Francois Gygi committed
95 96 97 98 99 100
  <simpleType name="spinType">
    <restriction base="string">
    <enumeration value="up"/>
    <enumeration value="down"/>
    </restriction>
  </simpleType>
Francois Gygi committed
101

Francois Gygi committed
102 103 104 105 106 107 108 109
  <simpleType name="d3vectorType">
    <restriction>
       <simpleType>
         <list itemType="double"/>
       </simpleType>
       <length value="3"/>
    </restriction>
  </simpleType>
Francois Gygi committed
110

Francois Gygi committed
111 112 113
  <complexType name="vectorType">
    <simpleContent>
      <extension base="string">
114
      <attribute name="type" type="fpmd:numericType" use="required"/>
Francois Gygi committed
115
      <attribute name="size" type="positiveInteger" use="required"/>
116
      <attribute name="encoding" type="fpmd:encodingType" use="required"/>
Francois Gygi committed
117 118 119
      </extension>
    </simpleContent>
  </complexType>
Francois Gygi committed
120

Francois Gygi committed
121 122 123 124 125 126
  <simpleType name="numericType">
    <restriction base="string">
    <enumeration value="double"/>
    <enumeration value="complex"/>
    </restriction>
  </simpleType>
Francois Gygi committed
127

Francois Gygi committed
128 129 130 131 132 133
  <simpleType name="encodingType">
    <restriction base="string">
    <enumeration value="text"/>
    <enumeration value="base64"/>
    </restriction>
  </simpleType>
Francois Gygi committed
134

Francois Gygi committed
135 136 137
  <complexType name="grid_functionType">
    <simpleContent>
      <extension base="string">
138
      <attribute name="type" type="fpmd:numericType" use="required"/>
Francois Gygi committed
139 140 141 142 143 144
      <attribute name="nx" type="positiveInteger" use="required"/>
      <attribute name="ny" type="positiveInteger" use="required"/>
      <attribute name="nz" type="positiveInteger" use="required"/>
      <attribute name="x0" type="nonNegativeInteger" default="0"/>
      <attribute name="y0" type="nonNegativeInteger" default="0"/>
      <attribute name="z0" type="nonNegativeInteger" default="0"/>
145
      <attribute name="encoding" type="fpmd:encodingType" use="required"/>
Francois Gygi committed
146
      <attribute name="href" type="anyURI" use="optional"/>
Francois Gygi committed
147 148 149 150 151 152
      </extension>
    </simpleContent>
  </complexType>

  <complexType name="density_matrixType">
    <simpleContent>
153 154
      <extension base="fpmd:doubleListType">
        <attribute name="form" type="fpmd:density_matrix_formType" use="required"/>
Francois Gygi committed
155
        <attribute name="size" type="positiveInteger" use="required"/>
Francois Gygi committed
156
        <attribute name="href" type="anyURI" use="optional"/>
Francois Gygi committed
157 158 159
      </extension>
    </simpleContent>
  </complexType>
Francois Gygi committed
160

Francois Gygi committed
161 162 163 164 165 166 167 168
  <simpleType name="density_matrix_formType">
    <restriction base="string">
    <enumeration value="full"/>
    <enumeration value="diagonal"/>
    </restriction>
  </simpleType>

</schema>