File: file-formats.xml

package info (click to toggle)
apbs 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 38,840 kB
  • ctags: 7,893
  • sloc: ansic: 44,537; xml: 21,399; sh: 20,613; fortran: 17,796; yacc: 2,922; python: 2,804; makefile: 567; lex: 294; sed: 205; java: 134; awk: 26
file content (517 lines) | stat: -rw-r--r-- 19,807 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<appendix id="format-sect"> <title>File formats</title>

	<para>This section introduces some of the input and output file formats which
		are used by APBS.</para>

	<sect1 id="pqr-format"> <title>PQR biomolecular structure format</title>
		<para>
			The PQR format is the primary input format for biomolecular structure in
			APBS package.
		</para>

		<sect2 id="pqr-flat-format"> <title> PQR flat-file format</title>
			<para>
				This format is a modification of the 
				<ulink url="http://www.rcsb.org/pdb/info.html#File_Formats_and_Standards">PDB format</ulink>
				which allows users to add charge and radius parameters to existing PDB data
				while keeping it in a format amenable to visualization with standard
				molecular graphics programs.  The origins of the PQR format are somewhat
				uncretain, but has been used by several computational biology software
				programs, including MEAD and AutoDock.  UHBD uses a very similar format
				called QCD.
			</para>
			<para>
				APBS reads very loosely-formatted PQR files:  all fields are
				whitespace-delimited, thereby allowing coordinates which are larger/smaller
				than &plusmn; 999 &Aring;.  
			</para>
			<para>
				APBS reads data on a per-line basis from PQR files using the following
				format:
				<literallayout>
					<literal>Field_name</literal> <literal>Atom_number</literal> <literal>Atom_name</literal> <literal>Residue_name</literal> <replaceable>Chain_ID</replaceable> <literal>Residue_number</literal> <literal>X</literal> <literal>Y</literal> <literal>Z</literal> <literal>Charge</literal> <literal>Radius</literal>
				</literallayout>
				where the whitespace is the most important feature of this format.  The
				fields are:
				<variablelist>
					<varlistentry>
						<term> <literal>Field_name</literal> </term>
						<listitem>
							<para>A string which specifies the type of PQR entry and should
								either be <literal>ATOM</literal> or <literal>HETATM</literal> in
								order to be parsed by APBS.</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <literal>Atom_number</literal> </term>
						<listitem>
							<para>
								An integer which provides the atom index.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <literal>Atom_name</literal> </term>
						<listitem>
							<para>
								A string which provides the atom name.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <literal>Residue_name</literal> </term>
						<listitem>
							<para>
								A string which provides the residue name.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>Chain_ID</replaceable> </term>
						<listitem>
							<para>
								An optional string which provides the chain ID of the atom.
								<note>
									<para>NOTE:  Chain ID support is a new feature
										of APBS 0.5.0 and later versions.</para>
								</note>
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <literal>Residue_number</literal> </term>
						<listitem>
							<para>
								An integer which provides the residue index.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <literal>X Y Z</literal> </term>
						<listitem>
							<para>
								3 floats which provide the atomic coordiantes.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <literal>Charge</literal> </term>
						<listitem>
							<para>
								A float which provides the atomic charge (in electrons).
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <literal>Radius</literal> </term>
						<listitem>
							<para>
								A float which provides the atomic radius (in &Aring;).
							</para>
						</listitem>
					</varlistentry>
				</variablelist>
				Clearly, this format can deviate wildly from PDB, particularly when large
				coordinate values are used.  However, in order to maintain compatibility
				with most molecular graphics programs, the PDB2PQR utilities provided with
				apbs (see the <link linkend="parameterization">Parameterization
					section</link>) attempt to preserve the PDB format as much as possible.
			</para>

		</sect2>

		<sect2 id="pqr-xml-format"> <title>PQR XML Format </title> 
			<para> 
				The PQR XML format was designed to remediate some of the shortcomings
				of the flat-file format.  By use of XML, issues related to extra
				fields in the file or columns merging together can easily be remedied.
				Additionally, APBS will only parse the necessary information from the
				XML file and will ignore all other information, so users wishing to
				store extra data related to a residue or atom can do so inline without
				affecting APBS.
			</para>  

			<para> This data format has the following form:
				<programlisting>
					# <replaceable>Comments</replaceable>	
					<replaceable>&lt;roottag&gt;</replaceable>
					<replaceable>&nbsp;&nbsp;&lt;residue&gt;</replaceable>
					...
					<literal>&nbsp;&nbsp;&lt;atom&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;x&gt;</literal><replaceable>x</replaceable><literal>&lt;/x&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;y&gt;</literal><replaceable>y</replaceable><literal>&lt;/y&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;z&gt;</literal><replaceable>z</replaceable><literal>&lt;/z&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;charge&gt;</literal><replaceable>charge</replaceable><literal>&lt;/charge&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;radius&gt;</literal><replaceable>radius</replaceable><literal>&lt;/radius&gt;</literal>
					<literal>&nbsp;&nbsp;&lt;/atom&gt;</literal>
					...
					<replaceable>&nbsp;&nbsp;&lt;/residue&gt;</replaceable>
					...
					<replaceable>&lt;/roottag&gt;</replaceable>
				</programlisting>
			</para>
			<para>
				Note that the <literal>residue</literal> tag and its elements are
				completely optional - APBS only reads in atom data.  Fields such
				as residue name, chain ID, and other residue-specific data will
				be ignored.
			</para>
			<para>
				The variables in this example are:
				<variablelist>
					<varlistentry>
						<term> <replaceable>Comments</replaceable> </term>
						<listitem>              
							<para>Any number of comment lines, each line starting with the "#" symbol</para>
						</listitem>
					</varlistentry>
					<varlistentry>            
						<term> <replaceable>roottag</replaceable> </term>            
						<listitem>              
							<para>This is the root element of the XML file.  The value is not important to
								APBS - APBS simply checks that it is closed at the end of the file.</para> 
						</listitem>          
					</varlistentry>
					<varlistentry>
						<term> <replaceable>x</replaceable> </term>
						<listitem>               
							<para>A float giving the x-coordinate of the atom.</para>     
						</listitem>          
					</varlistentry>
					<varlistentry>
						<term> <replaceable>y</replaceable> </term>
						<listitem>               
							<para>A float giving the y-coordinate of the atom.</para>     
						</listitem>          
					</varlistentry>
					<varlistentry>
						<term> <replaceable>z</replaceable> </term>
						<listitem>               
							<para>A float giving the z-coordinate of the atom.</para>     
						</listitem>          
					</varlistentry>
					<varlistentry>
						<term> <replaceable>charge</replaceable> </term>
						<listitem>
							<para>A float giving the atomic charge (in electrons).</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>atomradius</replaceable> </term>
						<listitem>
							<para>A float giving the atomic Radius (in &Aring;).</para>
						</listitem>
					</varlistentry>
				</variablelist>
			</para>
		</sect2>

	</sect1>

	<sect1 id="param-format"> <title>Parameter file format</title>
		<para>APBS uses parameter files with the <command><link linkend="parm">READ parm</link></command>
			command. 
		</para>

		<sect2 id="parm-flat-format"> <title>Flat-file format</title>
			<para>The parameter file is a series of lines of the format:
				<literallayout>
					<replaceable>Residue_name</replaceable> <replaceable>Atom_name</replaceable> <replaceable>Charge</replaceable> <replaceable>Radius</replaceable> <replaceable>Epsilon</replaceable>
				</literallayout>
				where the whitespaces are important and denote separation between the
				fields.  The fields here are:
				<variablelist>
					<varlistentry>
						<term> <replaceable>Residue_name</replaceable> </term>
						<listitem>
							<para>A string giving the residue name, as provided in the PDB file
								to be parameterized.</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>Atom_name</replaceable> </term>
						<listitem>
							<para>A string giving the atom name, as provided in the PDB file to
								be parameterized.</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>Charge</replaceable> </term>
						<listitem>
							<para>A float giving the atomic charge (in electrons).</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>Radius</replaceable> </term>
						<listitem>
							<para>A float giving the atomic Radius (in &Aring;).</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>Epsilon</replaceable> </term>
						<listitem>
							<para>A float giving the Lennard-Jones well depth (in kJ/mol).  This is used for the calculation of
								WCA energies in apolar solvation energies and forces.  We assume that the Lennard-Jones potential
								is defined in the "AMBER style":
								<informalequation>
									<graphic fileref="images/lennard-jones.png"/>
								</informalequation>
							</para>
						</listitem>
					</varlistentry>
				</variablelist>
			</para>
		</sect2>

		<sect2 id="parm-xml-format"> <title>XML Parameter Format </title>
			<para> This data format has the following form:
				<programlisting>
					# <replaceable>Comments</replaceable>	
					<replaceable>&lt;ffname&gt;</replaceable>
					<literal>&nbsp;&nbsp;&lt;residue&gt;</literal>
					<literal>&nbsp;&nbsp;&lt;name&gt;</literal><replaceable>resname</replaceable><literal>&lt;/name&gt;</literal>
					<literal>&nbsp;&nbsp;&lt;atom&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;</literal><replaceable>atomname</replaceable><literal>&lt;/name&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;charge&gt;</literal><replaceable>atomcharge</replaceable><literal>&lt;/charge&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;radius&gt;</literal><replaceable>atomradius</replaceable><literal>&lt;/radius&gt;</literal>
					<literal>&nbsp;&nbsp;&nbsp;&nbsp;&lt;epsilon&gt;</literal><replaceable>atomepsilon</replaceable><literal>&lt;/epsilon&gt;</literal>
					<literal>&nbsp;&nbsp;&lt;/atom&gt;</literal>
					...
					<literal>&nbsp;&nbsp;&lt;/residue&gt;</literal>
					...
					<replaceable>&lt;/ffname&gt;</replaceable>
				</programlisting>
				The variables in this example are:
				<variablelist>
					<varlistentry>
						<term> <replaceable>Comments</replaceable> </term>
						<listitem>              
							<para>Any number of comment lines, each line starting with the "#" symbol</para>
						</listitem>
					</varlistentry>
					<varlistentry>            
						<term> <replaceable>ffname</replaceable> </term>            
						<listitem>              
							<para>The name of the forcefield.  This is the root element of the XML file.</para> 
						</listitem>          
					</varlistentry>
					<varlistentry>                        
						<term> <replaceable>resname</replaceable> </term>               	
						<listitem>
							<para>A string giving the residue name, as provided in the PDB file to be parameterized.</para>
						</listitem>          
					</varlistentry>
					<varlistentry>
						<term> <replaceable>atomname</replaceable> </term>
						<listitem>               
							<para>A string giving the atom name, as provided in the PDB file to be parameterized.</para>     
						</listitem>          
					</varlistentry>
					<varlistentry>
						<term> <replaceable>atomcharge</replaceable> </term>
						<listitem>
							<para>A float giving the atomic charge (in electrons).</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>atomradius</replaceable> </term>
						<listitem>
							<para>A float giving the atomic Radius (in &Aring;).</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>atomepsilon</replaceable> </term>
						<listitem>
							<para>A float giving the Lennard-Jones well depth (in kJ/mol).  This is used for the
								calculation of WCA energies in apolar solvation energies and forces.  We assume that the
								Lennard-Jones potential is defined in the "AMBER style": 
								<informalequation> <graphic fileref="images/lennard-jones.png"/> </informalequation>
							</para> 
						</listitem>
					</varlistentry>
				</variablelist>
			</para>
		</sect2>
	</sect1>

	<sect1 id="hb-format"> <title>Harwell-Boeing column-compressed matrix
			format</title>
		<para>This is the sparse matrix output format used by APBS for analyses of
			the matrix operators which are constructed during PB solution.  This
			format was implemented so matrix operators could by decomposed with
			SuperLU and ARPACK.
		</para>
		<important>
			<para>Details of the format are complicated; this section is under
				construction.  
			</para>
		</important>
	</sect1>

	<sect1 id="opendx-format"> <title>OpenDX scalar data format</title>

		<para>We output most discretized scalar data (e.g., potential,
			accessibility, etc.) from APBS in the data format used by the OpenDX
			software package
			(<ulink url="http://www.opendx.org">http://www.opendx.org</ulink>).  The
			OpenDX data format is very flexible; the following sections describe the
			application of this format for APBS multigrid and finite element
			datasets.
		</para>

		<sect2> <title>Multigrid</title>
			<para>
				This data format has the following form:
				<programlisting>
					# <replaceable>Comments</replaceable>
					<literal>object 1 class gridpositions counts</literal> <replaceable>nx ny nz</replaceable>
					<literal>origin</literal> <replaceable>xmin ymin zmin</replaceable>
					<literal>delta</literal> <replaceable>hx</replaceable> 0.0 0.0
					<literal>delta</literal> 0.0 <replaceable>hy</replaceable> 0.0 
					<literal>delta</literal> 0.0 0.0 <replaceable>hz</replaceable>
					<literal>object 2 class gridconnections counts</literal> <replaceable>nx ny nz</replaceable>
					<literal>object 3 class array type double rank 0 times</literal> <replaceable>n data follows</replaceable>
					<replaceable>u(0,0,0) u(0,0,1) u(0,0,2)</replaceable>
					...
					<replaceable>u(0,0,nz-3) u(0,0,nz-2) u(0,0,nz-1)</replaceable>
					<replaceable>u(0,1,0) u(0,1,1) u(0,1,2)</replaceable>
					...
					<replaceable>u(0,1,nz-3) u(0,1,nz-2) u(0,1,nz-1)</replaceable>
					...
					<replaceable>u(0,ny-1,nz-3) u(0,ny-1,nz-2) u(0,ny-1,nz-1)</replaceable>
					<replaceable>u(1,0,0) u(1,0,1) u(1,0,2)</replaceable>
					...
					<literal>attribute "dep" string "positions"</literal>
					<literal>object "regular positions regular connections" class field</literal>
					<literal>component "positions" value 1</literal>
					<literal>component "connections" value 2</literal>
					<literal>component "data" value 3</literal>
				</programlisting>
				The variables in this example are:
				<variablelist>
					<varlistentry>
						<term> <replaceable>Comments</replaceable> </term>
						<listitem>
							<para>Any number of comment lines, each line starting with the
								"#" symbol</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>nx ny nz</replaceable> </term>
						<listitem>
							<para>
								The number of grid points in the x-, y-, and z-directions.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry> 
						<term> <replaceable>xmin ymin zmin</replaceable> </term>
						<listitem>
							<para>
								The coordinates of the grid lower corner.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry> 
						<term> <replaceable>hx hy hz</replaceable> </term>
						<listitem>
							<para>
								The grid spacings in the x-, y-, and z-directions.
							</para>
						</listitem>
					</varlistentry>
					<varlistentry> 
						<term> <replaceable>n</replaceable> </term>
						<listitem>
							<para>
								The total number of grid points; 
								<replaceable>n</replaceable> =
								<replaceable>nx</replaceable> *
								<replaceable>ny</replaceable> *
								<replaceable>nz</replaceable> 
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>u(*,*,*)</replaceable> </term>
						<listitem>
							<para>
								The data values, ordered with the z-index increasing most
								quickly, followed by the y-index, and then the x-index.
							</para>
						</listitem>
					</varlistentry>
				</variablelist>
			</para>
		</sect2>

		<sect2> <title>Finite element</title>
			<para>For finite element solutions, the OpenDX format takes the following
				form:
				<programlisting>
					<literal>object 1 class array type float rank 1 shape 3 items</literal> <replaceable>N</replaceable>
					<replaceable>v1x v1y v1z</replaceable>
					<replaceable>v2x v2y v2z</replaceable>
					...
					<replaceable>vNx vNy vNz</replaceable>
					<literal>object 2 class array type int rank 1 shape 4 items</literal> <replaceable>M</replaceable>
					<replaceable>s1a s1b s1c s1d</replaceable>
					<replaceable>s2a s2b s2c s2d</replaceable>
					...
					<replaceable>sMa sMb sMc sMd</replaceable>
					<literal>attribute "element type" string "tetrahedra"</literal>
					<literal>object 3 class array type float rank 0 items</literal> <replaceable>N</replaceable>
					<replaceable>u1</replaceable>
					<replaceable>u2</replaceable>
					...
					<replaceable>uN</replaceable>
					<literal>attribute "dep" string "positions"</literal>
					<literal>object "irregular positions irregular connections" class field</literal>
					<literal>component "positions" value 1</literal>
					<literal>component "connections" value 2</literal>
					<literal>component "data" value 3</literal>
					<literal>end</literal>
				</programlisting>
				where the variables are:
				<variablelist>
					<varlistentry>
						<term> <replaceable>N</replaceable></term>
						<listitem>
							<para>Number of vertices</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>vix viy viz</replaceable></term>
						<listitem>
							<para>Coordinates of vertex <replaceable>i</replaceable></para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>M</replaceable></term>
						<listitem>
							<para>Number of simplices</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>sia sib sic sid</replaceable></term>
						<listitem>
							<para>
								IDs of vertices in simplex <replaceable>i</replaceable>
							</para>
						</listitem>
					</varlistentry>
					<varlistentry>
						<term> <replaceable>ui</replaceable></term>
						<listitem>
							<para>
								Data value associated with vertex <replaceable>i</replaceable>
							</para>
						</listitem>
					</varlistentry>
				</variablelist>
			</para>
		</sect2>

	</sect1>

</appendix>