1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <STYLE> |
---|
4 | TABLE {align: center; } |
---|
5 | H1 {color: #ffffff; background: Navy; font-weight: bold; font-family: Tahoma, Verdana; margin: 0px; padding: 2px; } |
---|
6 | H2 {color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; } |
---|
7 | TH {color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; } |
---|
8 | LI {font-weight: bold; font-family: Tahoma, Verdana; } |
---|
9 | </STYLE> |
---|
10 | </HEAD> |
---|
11 | <BODY> |
---|
12 | |
---|
13 | <H1>Jumbo90</H1> |
---|
14 | |
---|
15 | <ol> |
---|
16 | <h2><li>What is Jumbo90?</li></h2> |
---|
17 | <ul> |
---|
18 | <li>Jumbo90 is a CML formatting Library for Fortran, it provides: </li> |
---|
19 | <li>Convenience routines to write complete CML elements</li> |
---|
20 | <li>Convenience routines to write complete STMML elements</li> |
---|
21 | <li>Optional Indentation of output</li> |
---|
22 | <li>Checks that tags are properly balanced</li> |
---|
23 | <li>Checks that attribute names are well formed (i.e. contain only [A-Z a-z 0-9 _ -] and start with [A-Z a-z _]). |
---|
24 | <ul> |
---|
25 | <li>The colon is allowed but should be reserved for namespacing so an error is flagged if more than one colon is present in attribute name</li> |
---|
26 | </ul> |
---|
27 | <li>Checks if attribute values contain predefined entities (<, >, &, ', ")</li> |
---|
28 | <li>Checks for duplicate attribute names</li> |
---|
29 | </ul> |
---|
30 | |
---|
31 | <h2><li>How to use Jumbo90</li></h2> |
---|
32 | <p>Jumbo covers CML, STMML and basic XML. Below is the full list of subroutine names, followed by the arguments they take. Whenever writing a real*8 or real*4 you can always pass an optional format argument, e.g.<pre> |
---|
33 | |
---|
34 | call xml_AddAttribute(file, 'martin','height', 32.1285) |
---|
35 | call xml_AddAttribute(file, 'martin','height', 32.1285, '(f6.2)') |
---|
36 | |
---|
37 | </pre> |
---|
38 | would add an "height" attribute with a value of "32.1285" to a "martin" element . In the first case the default format '(f8.3)' would be used, in the second case the user supplied format '(f6.2)' would be used. Many subroutines can take a number of optional arguments (reflecting the CML schema) therefore the longer 'argument=value' format should be use when calling these subroutines, e.g.,<pre> |
---|
39 | |
---|
40 | call xml_OpenFile('myFile.xml', file) |
---|
41 | |
---|
42 | </pre> |
---|
43 | </p> |
---|
44 | |
---|
45 | <h2>Notes: </h2> |
---|
46 | <P>Jumbo90 is based on an earlier fortran 77 program called Jumbo77, which was itself based on an existing Java CML parser called JUMBO written by <I>Peter Murray-Rust</I>. Jumbo90 is now built in a modular fashion allowing output of basic XML, STMML and CML. The STMML layer builds on the XML. The CML layer, in turn, builds on the STMML layer. The base XML writing utilities are now provided by FLIB_XMLWRITE, a set of F90 modules written by <I>Alberto Garcia</I>.</P> |
---|
47 | |
---|
48 | |
---|
49 | <h2><li>Routines</li></h2> |
---|
50 | <h3>General routines</h3> |
---|
51 | <ol> |
---|
52 | <li><a href="#init">xml_OpenFile</a> - Mandatory Initialization routine </li> |
---|
53 | <li><a href="#close">xml_Close</a> - Mandatory finalization routine, closes channels, etc</li> |
---|
54 | <li><a href="#str">str</a> - utility to convert, floats and integers to character strings</li> |
---|
55 | </ol> |
---|
56 | |
---|
57 | <h3>XML routines</h3> |
---|
58 | <ol> |
---|
59 | <li><a href="#start">xml_NewElement</a> - writes an xml start tag</li> |
---|
60 | <li><a href="#attr">xml_AddAttribute</a> - adds an attribute to a tag</li> |
---|
61 | <li><a href="#text">xml_AddPcdata</a> - adds text to an xml element</li> |
---|
62 | <li><a href="#end">xml_EndElement</a> - writes an xml end tag</li> |
---|
63 | </ol> |
---|
64 | |
---|
65 | |
---|
66 | <h3>STMML routines</h3> |
---|
67 | <ol> |
---|
68 | <li><a href="#stmstart">stmAddStartTag</a></li> |
---|
69 | <li><a href="#stmsca">stmAddScalar</a></li> |
---|
70 | <li><a href="#stmarr">stmAddArray</a></li> |
---|
71 | <li><a href="#stmmat">stmAddMatrix</a></li> |
---|
72 | <li><a href="#stmtri">stmAddTriangle</a></li> |
---|
73 | <li><a href="#stmerr">stmError</a></li> |
---|
74 | <li><a href="#stmmsg">stmMessage</a></li> |
---|
75 | <li><a href="#stmwar">stmWarning</a></li> |
---|
76 | </ol> |
---|
77 | |
---|
78 | <h3>CMLCore routines</h3> |
---|
79 | <ol> |
---|
80 | <li><a href="#cmlmol">cmlAddMolecule</a> - adds a complete CML <molecule> element</li> |
---|
81 | <li><a href="#cmlato">cmlAddAtom</a> - adds a CML <atom> start tag</li> |
---|
82 | <li><a href="#cmlcoo">cmlAddCoordinates</a> - adds coordinate attributes to an <atom> tag</li> |
---|
83 | <li><a href="#cmlcry">cmlAddCrystal</a> - adds a complete CML <crystal> element</li> |
---|
84 | <li><a href="#cmlmet">cmlAddMetadata</a> - adds a complete CML <metadata> element</li> |
---|
85 | <li><a href="#cmllen">cmlAddLength</a>(length, id, atomRef1, atomRef2, fmt)</li> |
---|
86 | <li><a href="#cmlang">cmlAddAngle</a>(angle, id, atomRef1, atomRef2, atomRef3, fmt)</li> |
---|
87 | <li><a href="#cmltor">cmlAddTorsion</a>(torsion, id, atomRef1, atomRef2, atomRef3, atomRef4, fmt)</li> |
---|
88 | <li><a href="#cmleig">cmlAddEigenvalue</a>(n, dim, eigvec, eigval, id, title, dictRef, fmt)</li> |
---|
89 | </ol> |
---|
90 | |
---|
91 | <h3>CMLComa routines (Condensed Matter)</h3> |
---|
92 | <ol> |
---|
93 | <li><a href="#comalat">cmlAddLattice</a> - write a complete lattice element</li> |
---|
94 | <li><a href="#comapro">cmlAddProperty</a> - write a complete property element, containing scalar, array (vector) or matrix value (i.e. it has several interfaces)</li> |
---|
95 | <li><a href="#comapar">cmlAddParameter</a> - adds a complete CML <parameter> element</li> |
---|
96 | </ol> |
---|
97 | |
---|
98 | <h2><li>Subroutine Guide</li></h2> |
---|
99 | |
---|
100 | <!-- GENERAL ROUTINES --> |
---|
101 | <OL> |
---|
102 | <LI> |
---|
103 | <h4><a name="init">xml_OpenFile(filename, ind, xf)</a></h4> |
---|
104 | <table border="1" width="90%"> |
---|
105 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
106 | <tr><td>filename</td><td>xml filename</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
107 | <tr><td>ind</td><td>controls indentation of output</td><td>logical</td><td>yes</td><td>.true.</td></tr> |
---|
108 | <tr><td>xf</td><td>xml filename</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
109 | </table></li> |
---|
110 | </LI> |
---|
111 | <LI> |
---|
112 | <h4><a name="close">xml_Close(filehandle)</a></h4> |
---|
113 | <table border="1" width="90%"> |
---|
114 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
115 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
116 | </table></li> |
---|
117 | </LI> |
---|
118 | <LI> |
---|
119 | |
---|
120 | <h4><a name="str">function str(value, format)</a></h4> |
---|
121 | <table border="1" width="90%"> |
---|
122 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
123 | <tr><td>value</td><td>value to convert to string</td><td>real*8, real*4, integer</td><td>no</td><td> </td></tr> |
---|
124 | <tr><td>format</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>g22.12</td></tr> |
---|
125 | </table> |
---|
126 | <hr/> |
---|
127 | </LI> |
---|
128 | </OL> |
---|
129 | |
---|
130 | <!-- XML ROUTINES --> |
---|
131 | <OL> |
---|
132 | <LI> |
---|
133 | <h4><a name="start">xml_NewElement(xf, name)</a></h4> |
---|
134 | <table border="1" width="90%"> |
---|
135 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
136 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
137 | <tr><td>name</td><td>name of tag to add</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
138 | </table> |
---|
139 | </LI> |
---|
140 | <LI> |
---|
141 | <h4><a name="attr">xml_AddAttribute(xf, name, attname, value)</a></h4> |
---|
142 | <table border="1" width="90%"> |
---|
143 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
144 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
145 | <tr><td>name</td><td>name of tag</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
146 | <tr><td>attname</td><td>attribute name</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
147 | <tr><td>value</td><td>attribute value</td><td>character(len=*) | integer | real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
148 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
149 | </table> |
---|
150 | </LI> |
---|
151 | <LI> |
---|
152 | <h4><a name="text">xml_AddPcdata(xf, value)</a></h4> |
---|
153 | <table border="1" width="90%"> |
---|
154 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
155 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
156 | <tr><td>value</td><td>string to add</td><td>character(len=*) | integer | real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
157 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
158 | </table> |
---|
159 | </LI> |
---|
160 | <LI> |
---|
161 | <h4><a name="end">xml_EndElement(xf, name)</a></h4> |
---|
162 | <table border="1" width="90%"> |
---|
163 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
164 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
165 | <tr><td>name</td><td>name of element to close</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
166 | </table> |
---|
167 | </LI> |
---|
168 | </OL> |
---|
169 | <hr/> |
---|
170 | |
---|
171 | <!-- STMML ROUTINES --> |
---|
172 | <OL> |
---|
173 | <LI> |
---|
174 | <h4><a name="stmstart">stmAddStartTag(xf, name, id, title, dictref)</a></h4> |
---|
175 | <table border="1" width="90%"> |
---|
176 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
177 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
178 | <tr><td>name</td><td>tag name</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
179 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
180 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
181 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
182 | </table> |
---|
183 | </LI> |
---|
184 | <LI> |
---|
185 | <h4><a name="stmsca">stmAddScalar(xf, value, id, title, dictref, type, fmt)</a></h4> |
---|
186 | <table border="1" width="90%"> |
---|
187 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
188 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
189 | <tr><td>value</td><td>the scalar value</td><td>character(len=*) | integer | real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
190 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
191 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
192 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
193 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
194 | </table> |
---|
195 | </LI> |
---|
196 | <LI> |
---|
197 | <h4><a name="stmarr">stmAddArray(xf, nvalue, array, id, title, dictref, type|units, delim|fmt)</a></h4> |
---|
198 | <table border="1" width="90%"> |
---|
199 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
200 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
201 | <tr><td>nvalue</td><td>length of array</td><td>integer</td><td>no</td><td> </td></tr> |
---|
202 | <tr><td>array</td><td>the array</td><td>character(len=*) | integer | real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
203 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
204 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
205 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
206 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
207 | </table> |
---|
208 | </LI> |
---|
209 | <LI> |
---|
210 | <h4><a name="stmmat">stmAddMatrix(xf, nrows, ncols, dim, matrix, id, title, dictref, units, fmt)</a></h4> |
---|
211 | <table border="1" width="90%"> |
---|
212 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
213 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
214 | <tr><td>nrows</td><td>number of rows</td><td>integer</td><td>no</td><td> </td></tr> |
---|
215 | <tr><td>ncols</td><td>number of columns</td><td>integer</td><td>no</td><td> </td></tr> |
---|
216 | <tr><td>dim</td><td>fastest dimension</td><td>integer</td><td>no</td><td> </td></tr> |
---|
217 | <tr><td>matrix</td><td>the matrix</td><td>character(len=*) | integer | real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
218 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
219 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
220 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
221 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
222 | </table> |
---|
223 | </LI> |
---|
224 | <LI> |
---|
225 | <h4><a name="stmtri">stmAddTriangle(xf, nvalue, array, id, title, dictref, units, fmt)</a></h4> |
---|
226 | <table border="1" width="90%"> |
---|
227 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
228 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
229 | <tr><td>nvalue</td><td>length of array</td><td>integer</td><td>no</td><td> </td></tr> |
---|
230 | <tr><td>array</td><td>the array</td><td>character(len=*) | integer | real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
231 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
232 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
233 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
234 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
235 | </table> |
---|
236 | </LI> |
---|
237 | <LI> |
---|
238 | <h4><a name="stmerr">stmAddError(xf, msg, id, title, dictRef)</a></h4> |
---|
239 | <table border="1" width="90%"> |
---|
240 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
241 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
242 | <tr><td>msg</td><td>length of array</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
243 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
244 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
245 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
246 | </table> |
---|
247 | </LI> |
---|
248 | <LI> |
---|
249 | <h4><a name="stmmsg">stmAddMessage(xf, msg, id, title, dictRef)</a></h4> |
---|
250 | <table border="1" width="90%"> |
---|
251 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
252 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
253 | <tr><td>msg</td><td>length of array</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
254 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
255 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
256 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
257 | </table> |
---|
258 | </LI> |
---|
259 | <LI> |
---|
260 | <h4><a name="stmerr">stmAddWarning(xf, msg, id, title, dictRef)</a></h4> |
---|
261 | <table border="1" width="90%"> |
---|
262 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
263 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
264 | <tr><td>msg</td><td>length of array</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
265 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
266 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
267 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
268 | </table> |
---|
269 | </LI> |
---|
270 | </OL> |
---|
271 | <hr/> |
---|
272 | |
---|
273 | <!-- CML ROUTINES --> |
---|
274 | <OL> |
---|
275 | <LI> |
---|
276 | <h4><a name="cmlmol">cmlAddMolecule(xf, natoms, elements, coords, style, id, title, dictref, fmt)</a></h4> |
---|
277 | <table border="1" width="90%"> |
---|
278 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
279 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
280 | <tr><td>natoms</td><td>number of atoms</td><td>integer</td><td>no</td><td> </td></tr> |
---|
281 | <tr><td>elements(natoms)</td><td>list of atomic symbols</td><td>character(len=2)</td><td>no</td><td> </td></tr> |
---|
282 | <tr><td>coords(3, natoms)</td><td>atomic coordinates</td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
283 | <tr><td>style</td><td><a href="#style">CML output style</a> (x3 | xFrac | xyz3 | xyzFrac)</td><td>character(len=*)</td><td>yes</td><td>x3</td></tr> |
---|
284 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
285 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
286 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
287 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
288 | </table> |
---|
289 | </LI> |
---|
290 | <LI> |
---|
291 | <h4><a name="cmlato">cmlAddAtom(xf, elem, id, charge, hCount, occupancy, fmt)</a></h4> |
---|
292 | <table border="1" width="90%"> |
---|
293 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
294 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
295 | <tr><td>elem</td><td>atomic symbol</td><td>character(len=2)</td><td>yes</td><td> </td></tr> |
---|
296 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
297 | <tr><td>charge</td><td>formal charge</td><td>integer</td><td>no</td><td> </td></tr> |
---|
298 | <tr><td>hCount</td><td>hydrogen count</td><td>integer</td><td>no</td><td> </td></tr> |
---|
299 | <tr><td>occupancy</td><td>site occupancy</td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
300 | <tr><td>fmt</td><td>format for occupancy</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
301 | </table> |
---|
302 | </LI> |
---|
303 | <LI> |
---|
304 | <h4><a name="cmlcoo">cmlAddCoordinates(xf, x, y, z, style, fmt)</a></h4> |
---|
305 | <table border="1" width="90%"> |
---|
306 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
307 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
308 | <tr><td>x</td><td><i>x</i> coordinate in cartesian format</td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
309 | <tr><td>y</td><td><i>y</i> coordinate in cartesian format</td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
310 | <tr><td>z</td><td><i>z</i> coordinate in cartesian format</td><td>real*8 | real*4</td><td>yes</td><td> </td></tr> |
---|
311 | <tr><td>style</td><td><a href="#style">CML output style</a><br>(x3 | xFrac | xyz3 | xyzFrac | xy2)</td><td>character(len=*)</td><td>yes</td><td>x3</td></tr> |
---|
312 | <tr><td>fmt</td><td>format for coordinates</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
313 | </table> |
---|
314 | </LI> |
---|
315 | <LI> |
---|
316 | <h4><a name="cmlcry">cmlAddcrystal(xf, a, b, c, alpha, beta, gamma, id, title, dictref, lenunits, angunits, fmt)</a></h4> |
---|
317 | <table border="1" width="90%"> |
---|
318 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
319 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
320 | <tr><td>a</td><td>lattice parameter <i>a</i></td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
321 | <tr><td>b</td><td>lattice parameter <i>b</i></td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
322 | <tr><td>c</td><td>lattice parameter <i>c</i></td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
323 | <tr><td>alpha</td><td>lattice angle <i>alpha</i></td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
324 | <tr><td>beta</td><td>lattice angle <i>beta</i></td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
325 | <tr><td>gamma</td><td>lattice angle <i>gamma</i></td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
326 | <tr><td>lenunits</td><td>units for lattice parameters</td><td>character(len=*)</td><td>yes</td><td>angstrom</td></tr> |
---|
327 | <tr><td>angunits</td><td>units for lattice angles</td><td>character(len=*)</td><td>yes</td><td>degree</td></tr> |
---|
328 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
329 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
330 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
331 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
332 | </table> |
---|
333 | </LI> |
---|
334 | <li> |
---|
335 | <h4><a name="cmlmet">cmlAddMetadata(xf, name, content, conv)</a></h4> |
---|
336 | <table border="1" width="90%"> |
---|
337 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
338 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
339 | <tr><td>name</td><td>name (eg author)</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
340 | <tr><td>content</td><td>value (eg Jon Wakelin)</td><td>character(len=*)</td><td>no</td><td> </td></tr> |
---|
341 | <tr><td>conv</td><td>a convention</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
342 | </table> |
---|
343 | </LI> |
---|
344 | <LI> |
---|
345 | <h4><a name="comalat">cmlAddLattice(xf, cell, units, title, id, dictref, conv, lattType, spaceType)</a></h4> |
---|
346 | <table border="1" width="90%"> |
---|
347 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
348 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
349 | <tr><td>cell(3,3)</td><td>the lattice vectors</td><td>real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
350 | <tr><td>units</td><td>units for lattice vectors</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
351 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
352 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
353 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
354 | <tr><td>conv</td><td>a convention</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
355 | <tr><td>lattType</td><td>lattice type (primitive |full)</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
356 | <tr><td>spaceType</td><td>space type (real | reciprocal) </td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
357 | </table> |
---|
358 | </LI> |
---|
359 | <LI> |
---|
360 | <h4><a name="comapro">cmlAddProperty(xf, property, nvalues, ncols, nrows, dim, id, title, conv, dictref, ref, units, fmt)</a></h4> |
---|
361 | <table border="1" width="90%"> |
---|
362 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
363 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
364 | <tr><td>property</td><td>a scalar, array or matrix property. Yes it takes all three, but see next three arguments.</td><td>charcter(len=*) | integer | real*8 | real*4</td><td>no</td><td> </td></tr> |
---|
365 | <tr><td>nvalue</td><td>number of value for vector</td><td>integer</td><td>no if writing a vector</td><td> </td></tr> |
---|
366 | <tr><td>ncols</td><td>number of rows for matrix</td><td>integer</td><td>no if writing a matrix</td><td> </td></tr> |
---|
367 | <tr><td>nrows</td><td>number of rows for matrix</td><td>integer</td><td>no if writing a matrix</td><td> </td></tr> |
---|
368 | <tr><td>dim</td><td>number of the fastest growing dimension in the matrix</td><td>integer</td><td>yes</td><td> </td></tr> |
---|
369 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
370 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
371 | <tr><td>conv</td><td>a convention</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
372 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
373 | <tr><td>ref</td><td>refernce to an atom (via the atom 'id' attribute)</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
374 | <tr><td>units</td><td>units for the property</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
375 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
376 | </table> |
---|
377 | </LI> |
---|
378 | |
---|
379 | <LI> |
---|
380 | <h4><a name="comapar">cmlAddParameter(xf, value, name, id, title, conv, cons, dictref, ref, role, units, fmt)</a></h4> |
---|
381 | <table border="1" width="90%"> |
---|
382 | <tr><th width="20%">argument</th><th width="30%">role</th><th width="30%">type</th><th width="10%">optional</th><th width="10%">default</th></tr> |
---|
383 | <tr><td>xf</td><td>xml filehandle</td><td>type(xmlf_t)</td><td>no</td><td> </td></tr> |
---|
384 | <tr><td>value</td><td>the parameter</td><td>charcter(len=*) | integer | real*8 | real*4 | logical</td><td>no</td><td> </td></tr> |
---|
385 | <tr><td>id</td><td>unique id</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
386 | <tr><td>title</td><td>tag description</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
387 | <tr><td>conv</td><td>a convention</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
388 | <tr><td>cons</td><td>a constraint</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
389 | <tr><td>role</td><td>the role of the parameter</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
390 | <tr><td>dictref</td><td>dictionary reference</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
391 | <tr><td>ref</td><td>refernce to an atom (via the atom 'id' attribute)</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
392 | <tr><td>units</td><td>units for the parameter</td><td>character(len=*)</td><td>yes</td><td> </td></tr> |
---|
393 | <tr><td>fmt</td><td>format for reals</td><td>character(len=*)</td><td>yes</td><td>f8.3</td></tr> |
---|
394 | </table> |
---|
395 | </LI> |
---|
396 | |
---|
397 | <OL> |
---|
398 | |
---|
399 | <h4><a name="style">CML output styles for coordinates</a></h4> |
---|
400 | <pre> |
---|
401 | x3 = 3D Cartesian coordinates long format |
---|
402 | xyz3 = 3D Cartesian coordinates short format |
---|
403 | xFrac = 3D fractional coordinates long format |
---|
404 | xyzFrac = 3D fractional coordinates short format |
---|
405 | xy2 = 2d Cartesian coordinates long format |
---|
406 | </pre> |
---|
407 | </ol> |
---|
408 | </BODY> |
---|
409 | |
---|
410 | </HTML> |
---|