-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvaspview.html
431 lines (431 loc) · 20.5 KB
/
vaspview.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<BASE HREF="http://vaspview.sourceforge.net/index.html">
<META NAME=GENERATOR CONTENT=Notepad>
<META NAME=KEYWORDS CONTENT="VASPView, VASP data viewer, VASP">
<META NAME=DESCRIPTION
CONTENT="A free, open source 3D viewer for molecular charge distributions.">
<META NAME=DISTRIBUTION CONTENT=GLOBAL>
<TITLE>VASP Data Viewer</TITLE>
</HEAD>
<BODY>
<H2 ALIGN=CENTER>VASP Data Viewer</H2>
<IMG SRC="vaspview1.jpg" WIDTH=601 HEIGHT=470 ALT="Screenshot">
<UL>
<LI><A HREF="#background">Background</A></LI>
<LI><A HREF="#instructions">Instructions</A></LI>
<LI><A HREF="#issues">Known Issues</A></LI>
<LI><A HREF="#acknowledge">Acknowledgements</A></LI>
<LI><A HREF="#download">Download</A></LI>
</UL>
<A NAME="background"><H3>Background</H3></A>
<P>
This is a scientific visualization package for examining output files
generated by the <A HREF="http://cms.mpi.univie.ac.at/vasp/">Vienna Ab-initio
Simulation Package</A>, a package for performing ab-initio quantum-mechanical
molecular dynamics using pseudopotentials and a plane wave basis set. The
project was initiated when a chemical engineering professor requested
assitance in visualizing output files produced by the above package. It
displays iso-surfaces and slices of a three-dimensional data set, along with
the atoms that make up the molecule the calculations were performed for, and
allows symbolic bonds to be inserted between them.
</P>
<P>
The source code is available for use in non-commerical products via the
<A HREF="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</A>.
The program was designed to be both reasonably portable and extensible. The
only system requirements are an ANSI C compiler,
<A HREF="http://www.opengl.org">OpenGL</A> 1.1 or later, and
<A HREF="http://reality.sgi.com/opengl/glut3/glut3.html">GLUT 3.6</A> or
later. The application has been tested under Windows NT 4.0 SP 5 and
FreeBSD 3.2, both on Intel processors. Although the program currently only
supports the VASP data file format, it should be relatively straightforward
to add support for additional file formats.
</P>
<A NAME="instructions"><H3>Instructions</H3></A>
<H4>Installation</H4>
<H5>Windows</H5>
<P>
If you are using a 32-bit Windows system (i.e., Windows 95, Windows 98,
Windows NT, or Windows 2000), simply download the
<A HREF="vaspview-1.05-win32-bin.zip">Win32 binaries</A> and extract them
into a separate directory (a free evaluation version of
<A HREF="http://www.winzip.com">WinZip</A> can extract the files for you).
If you are using a version of Windows 95 prior to OSR 2, you may need to
download
<A HREF="ftp://ftp.microsoft.com/softlib/MSLFILES/OPENGL95.EXE">OpenGL</A>
from Microsoft, which is required to run this program.
</P>
<P>
Once you have extracted the files, and installed OpenGL, if necessary, simply
double-click on <CODE>vaspview.exe</CODE> or type <CODE>vaspview</CODE> from
the command line, in the directory where you extracted it.
</P>
<H5>UNIX</H5>
<P>
If you are using a UNIX system (such as Linux, FreeBSD, etc.), you will have
to download the source code and compile it for your system. If you download
the <CODE>.zip</CODE> file instead of the <CODE>.tar.gz</CODE> file, make sure
you use the <CODE>-a</CODE> option when extracting the files, to force use of
the correct EOL sequence.
</P>
<P>
A Makefile is located in the <CODE>src</CODE> directory in the source archive.
Edit this Makefile so the <CODE>CINCLUDE</CODE> and <CODE>LIBS</CODE> variables
refer to the correct locations for include files and library files,
respectively, for your system. Then type
<PRE>
make all
</PRE>
to build the executable. It will be placed by default in a <CODE>bin</CODE>
directory in the main <CODE>vaspview</CODE> directory.
</P>
<H4>Opening a file</H4>
<P>
Type the name of the file you wish to open in the "Open File" text field, and
press <CODE><Enter></CODE> or click the "Open" button. A progress
indicator (or an error message) will be displayed in the status bar at the
bottom of the window.
</P>
<P>
Currently, there is no way to browse for a file from within the data viewer.
This is because there is no portable way to examine a computer's file system
in C.
</P>
<H4>Viewing the data</H4>
<IMG SRC="vaspview-data.jpg" WIDTH=228 HEIGHT=385 ALT="Data tab">
<P>
There are two ways to view portions of the data set: you can view all the data
values on a single plane, or slice, that cuts through the data set, or you can
view an iso-surface, a surface where all the data has the same value.
</P>
<P>
The slice may be oriented arbitrarily by changing two angles: the azimuthal
angle and the polar angle. These angles define the direction of a vector
perpendicular to the plane of the slice. Finally, the slice may be offset along
this vector, so that it can be positioned anywhere in the data set.
</P>
<P>
The controls to manipulate the slice are found on the "Data" tab. You may use
the sliders, or type in a value and press <CODE><Enter></CODE>.
Alternatively, you can move the slice directly. Click on the slice, or press
<CODE><Tab></CODE> until it's border is highlighted. Then you can use
the following keys to move the slice:
<DL>
<DT><CODE>Left, Right arrows</CODE></DT>
<DD>Change the azimuthal slice angle</DD>
<DT><CODE>Up, Down arrows</CODE></DT>
<DD>Change the polar slice angle</DD>
<DT><CODE>Page Up, Page Down</CODE></DT>
<DD>Change the slice offset</DD>
<DT><CODE>Home</CODE></DT>
<DD>Reset the slice angles and offset</DD>
<DT><CODE>End</CODE></DT>
<DD>Align the view to look directly at the slice</DD>
</DL>
You can also click and drag the slice to change its orientation.
</P>
<P>
You can also see the actual data value under the mouse as you move it over the
slice, by looking at the read-out at underneath the color legend. The X, Y and
Z coordinates listed are the integer coordinates of the actual position in the
data set that the mouse is pointing at, and are zero-based.
</P>
<P>
There are two parameters for the iso-surface. The first is the value of data
the surface should be drawn at. This will create a surface through all the
points in the data set that are equal to this value. Data points that surround
this value will be linearly interpolated to guess the true position of the
surface. Once again, you can specify the value either by moving the slider
control for it, or typing in a value and pressing <CODE><Enter></CODE>.
</P>
<P>
The second parameter is the detail level. This controls how much of the data
set is sampled when computing the iso-surface, and determines how many
polygons will be used to comprise the final surface. The "High" detail level
samples every point in the data set, and is as detailed as the surface can
get, but this may be very slow on some computers, or with large data sets. The
low detail level samples much less of the data set, and should be much faster,
though it will miss many of the small and medium features of the surface.
</P>
<H4>Viewing the atoms and bonds</H4>
<IMG SRC="vaspview-atoms.jpg" WIDTH=228 HEIGHT=385 ALT="Atoms tab">
<P>
You can also view the atoms that make up the data-set. Each type of atom is
assigned a color, so that all atoms of the same type are the same color. You
may also specify the radius of the atoms (though currently all atoms share the
same radius), by using the slider bar, or typing a number into the "Atom
radius" text field and pressing <CODE><Enter></CODE>.
</P>
<P>
You may want to hide some atoms (but not all of them), for a period of time.
There are several ways to do this. You can click on an atom to select it, or
enter it's number in the "Current Atom" text field, and press
<CODE><Enter></CODE>. You can also use the keyboard, by first clicking
on an atom, or using the <CODE><Tab></CODE> key until its color changes.
Then the left and right arrow keys will cycle through the atoms, including
those that are hidden (which will temporarily be drawn with a wire-frame
model). Once you have selected an atom, there are several ways to hide it
or make it visible again. You may right-click on the atom, which will
cause it to be replaced by a wire-frame sphere. If you right-click again, it
will become solid again, in case you made a mistake, but if you click
somewhere else, it will completely disappear. You may also use the
<CODE><Spacebar></CODE> key to toggle whether or not the current
atom is visible. Finally, you can use the "Hide Atom" or "Show Atom" button
on the "Atoms" tab. There is also a "Show All Atoms" button which
will make all hidden atoms visible again.
</P>
<P>
You may also add a bond from the currently selected atom to another atom.
First select an atom by left-clicking on it, then hold down the
<CODE>Ctrl</CODE> key and click on another atom. A bond will now be drawn
between the two atoms. You may also enter the numbers of each atom into the
"Bond from" and "Bond to" text fields, and the desired size of the bond, and
press <CODE><Enter></CODE> to add the bond. You can change the size of
a bond by selecting it, and then entering the new size in the "Bond size" text
field, or adjusting the slider. You may delete a bond by selecting it, and
pressing the <CODE><Backspace></CODE> or <CODE><Delete></CODE>
keys, or with the "Delete Bond" button.
</P>
<P>
Bonds will be saved in a special file with the same name as the data file you
are viewing, except with an ".aux" extension added. You do not need to do
anything special to save the bonds, it is done automatically as you edit them.
</P>
<H4>Changing the bounds</H4>
<IMG SRC="vaspview-bounds.jpg" WIDTH=228 HEIGHT=385 ALT="Bounds tab">
<P>
You can change the amount of the data set being viewed by changing the size of
the box surrounding it. If you make the box smaller, you can zoom in to
particular parts of the data without having to worry about the parts around
it. If you make the box larger, the data set will be repeated so you can see
how molecules with periodic boundary conditions appear.
</P>
<P>
You may change the position of any one of the sides of the box by moving the
appropriate slider in the "Bounds" tab, or by typing in a value and pressing
<CODE><Enter></CODE>. The default minimum value is zero, and the default
maximum value is one. Be warned that if you make the box very large,
performance may degrade from having to draw the data set up to twenty-seven
times over.
</P>
<P>
You can also change the size of the box with the keyboard. Press the
<CODE><Tab></CODE> key until one of the sides of the box is highlighted
in green, and then the following keys may be used to control the size of the
box:
<DL>
<DT><CODE>Left, Right arrows</CODE></DT>
<DD>Select a different side of the box to modify</DD>
<DT><CODE>Up, Down arrows, Page Up, Page Down</CODE></DT>
<DD>Increase or decrease the position of the current side of the box</DD>
<DT><CODE>Home</CODE></DT>
<DD>Move the current side of the box to its default position</DD>
<DT><CODE>End</CODE></DT>
<DD>Move the current side of the box to its furthest extent</DD>
</DL>
</P>
<P>
Finally, you can left-click somewhere on the background of the viewport, and
drag out a rectangle that will clip the box. While you are dragging, the
actual portion of the box you are selecting will be highlighted in green. If
you make a mistake, or want to back up, you can right-click on the background
to restore your previous view.
</P>
<H4>Changing the view</H4>
<IMG SRC="vaspview-view.jpg" WIDTH=228 HEIGHT=385 ALT="View tab">
<P>
There are several parameters which control how you are looking at the data
set. The first is the zoom factor. The smaller this number, the closer you are
to the point you are looking at. The larger, the farther away. You can set
this by using the "Zoom" slider on the "View" tab, or by typing a number into
the text field and pressing <CODE><Enter></CODE>.
</P>
<P>
The next set of parameters control the orientation of the data set. These are
three angles: yaw, pitch and roll. Each one controls a rotation about a
different axis, and together they can specify any orientation for the data
set. You can change them by using the sliders on the "View" tab, or by typing
in a number in their text fields, and pressing <CODE><Enter></CODE>.
However, it is usually much more convenient to drag the data set into the
orientation you want. You can do this by moving your mouse over one of the
edges of the box, or one of the coordinate axes, and clicking and dragging.
The data set will be rotated around the point you are looking at so that the
point you clicked on is always under your mouse.
</P>
<P>
The final set of parameters is the point you are looking at. By default, this
is the center of the data set. The point you are looking at appears in the
center of the viewport, and is the point the data set is rotated around when
you change the angles above. You can change this by using the sliders on the
"View" tab, or by typing in a number into the corresponding text fields, and
pressing <CODE><Enter></CODE>.
</P>
<P>
Finally, there are three special buttons provided on the "View" tab. The
first, "Reset Orientation," resets all three angles that control your
orientation to zero. The second, "Reset Position," will move the point you are
looking at back to the center of the data set. The third, "Align to Slice,"
will change your orientation so that you are looking directly at the slice.
</P>
<P>
All of these things may be controlled directly with the keyboard as well.
Either click on the background of the viewport, or press
<CODE><Tab></CODE> until the coordinate axes are highlighted in green,
and then you can use the following keys to control your view:
<DL>
<DT><CODE>Page Up, Page Down</CODE></DT>
<DD>Zoom in or out</DT>
<DT><CODE>Left, Right arrows</CODE></DT>
<DD>Rotate the box around the Y-axis</DD>
<DT><CODE>Up, Down arrows</CODE></DT>
<DD>Rotate the box around the X-axis</DD>
<DT><CODE><EM>Shift +</EM> Left, Right arrows</CODE></DT>
<DD>Rotate the box around the Z-axis</DD>
<DT><CODE>Home</CODE></DT>
<DD>Reset the orientation</DD>
<DT><CODE>End</CODE></DT>
<DD>Align the orientation with the slice</DD>
<DT><CODE><EM>Ctrl +</EM> Left, Right arrows</CODE></DT>
<DD>Move the point you are looking at left or right</DD>
<DT><CODE><EM>Ctrl +</EM> Up, Down arrows</CODE></DT>
<DD>Move the point you are looking at up or down</DD>
<DT><CODE><EM>Ctrl +</EM> Page Up, Page Down</CODE></DT>
<DD>Move the point you are looking at in or out</DD>
<DT><CODE><EM>Ctrl +</EM> Home</CODE></DT>
<DD>Reset the point you are looking at</DD>
</DL>
</P>
<H4>Miscellaneous options</H4>
<IMG SRC="vaspview-options.jpg" WIDTH=228 HEIGHT=385 ALT="Options tab">
<P>
There are several other options you can use to control how you view the data
set. The first is the "Data scale type," which controls how data values are
mapped into colors. There are two options, "Linear" and "Logarithmic." A
linear map simply scales the data into the range 0 to 1, and assigns a color
to each value in that range. The logarithmic map scales the data linearly into
the range 1 to <CODE>e</CODE><SUP>2</SUP>. Then the natural log of the
resulting value is taken, and divided by 2, to provide a number between 0 and
1, which is then assigned a color.
</P>
<P>
The next option, "Color scale type," determines what colors are used to
display the data values on the slice and to distinguish different types of
atoms. There are two options, "Rainbow" and "Grayscale." The rainbow scale
goes from blue for small values, through green, and ends up with red at
large values. The gray scale goes from black for low values to white for
high values. While a rainbow scale is often clearer, the gray scale may be
better for printing.
</P>
<P>
The next option, "Background color," controls what color is used as a backdrop
for the data set. There are two choices, white and black. Black often provides
better contrast, but white may be useful for printing.
</P>
<P>
The final option is the "Projection type." This controls whether or not the
data set is shown with 3D perspective, so you can judge depth information,
or if it is projected straight onto viewport (orthographic). While the first
often gives you a better idea of the relative positions of objects, the second
is useful when looking along an axis to see how things line up.
</P>
<H4>Saving and printing images</H4>
<P>
There no facility provided within this program to save or print images of a
data set. However, your computer may already provide you with the tools to do
this. If you are running Windows, you can use <CODE><Alt> +
<PrintScreen></CODE> to copy the contents of the current window to the
clipboard. You can then use one of the utilities provided in your
"Accessories" menu off your start bar to paste the window into an image to be
saved or printed. If you are using UNIX, the popular program
<A HREF="http://www.trilon.com/xv">XV</A> offers similar functionality, and is
shareware.
</P>
<A NAME="issues"><H3>Known Issues</H3></A>
<P>
This program can only read files ouput by VASP version 4.4.4 or later. Earlier
versions used fixed-format FORTRAN files, while later versions used free-format,
which is incompatible.
</P>
<P>
This program was written primarily for Windows, though it can be compiled and
run anywhere that supports OpenGL and the GL Utility Toolkit. As such, it can
only use the features of OpenGL 1.1, since this is the latest version shipping
with Windows as of the time of this writing. OpenGL 1.2 provides an additional
feature known as 3D texturing, which substantially improves the speed and
quality of the rendered slice. The data viewer can take advantage of this
feature, but only if it is compiled on a system that supports it. The Win32
binaries distributed here have not been compiled on such a system, and so if
you want to use it, you will have to recompile the program yourself. Some
systems claim to support 3D texturing, but I have been unable to get it to work
on them (some Linux machines and some SGI machines). If you experience this
problem, add the switch <CODE>-D__DS3_NO_3D_TEXTURES__</CODE> to the
<CODE>CFLAGS</CODE> variable in the Makefile under UNIX, or add
<CODE>__DS3_NO_3D_TEXTURES__</CODE> to the list at "Project / Settings /
C/C++ / General / Preprocessor definitions" under Windows.
</P>
<P>
The <CODE><Delete></CODE> key does not work under Windows. This is a bug
in the GL Utility Toolkit that will hopefully be addressed in future versions.
You can use the <CODE><Backspace></CODE> key instead.
</P>
<P>
The <CODE><EM>Shift</EM> + <Tab></CODE> key does not work under some
versions X-Windows. This is a bug in the GL Utility Toolkit that will hopefully
be addressed in future versions. This will prevent you from changing the
keyboard focus from component to component in the reverse order. You can use
any other modifier key (e.g. <CODE><EM>Ctrl</EM></CODE> or
<CODE><EM>Alt</EM></CODE>) instead.
</P>
<A NAME="acknowledge"><H3>Acknowledgements</H3></A>
<P>
I would like to offer special thanks to Dr. David Cox, in Chemical
Engineering at Virginia Tech. He gave me some valuable advice when trying out
the alpha versions of the viewer. I would also like to thank Dr. Doug Bowman,
in Computer Science at Virginia Tech, who gave me a few good ideas for the
direct manipulation of the data set.
</P>
<A NAME="download"><H3>Download</H3></A>
<P>
Binaries are availble for 32-bit Windows systems. The source code is available
under the
<A HREF="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</A>,
and includes an MSVC++ 5 project file and a Makefile (that may require manual
editing; if you want to write a more general Makefile, or just one for a
specific platform, feel free to send it to me). If you use this program, or
make modifications to the source, please
<A HREF="mailto:[email protected]?Subject=VASP Data Viewer">drop
me a line</A>.
</P>
<UL><LI>Current version: 1.05 (2001/08/19)</LI></UL>
<UL>
<LI><A HREF="vaspview-1.05-win32-bin.zip">Win32 Binaries</A> (~175K)</LI>
<LI>
<A HREF="vaspview-1.05-source.zip">Source Code (.zip format)</A> (~328K)
(includes Win32 binaries)
</LI>
<LI>
<A HREF="vaspview-1.05-source.tar.gz">Source Code (.tar.gz format)</A> (~294K)
(includes Win32 binaries)
</LI>
<LI><A HREF="elfcar">Sample data file</A> (~647K)</LI>
<LI><A HREF="elfcar.zip">Sample data file (.zip format)</A> (~114K)</LI>
<LI><A HREF="elfcar.tar.gz">Sample data file (.tar.gz format)</A> (~105K)</LI>
</UL>
<ADDRESS>
<HR>
<TABLE><TR>
<TD ALIGN=LEFT>
Comments or questsions? Send them to
<A HREF="mailto:[email protected]?Subject=VASP%20Data%20Viewer">[email protected]</A>
</TD>
<TD ALIGN=RIGHT>
<A HREF="http://sourceforge.net"><IMG
SRC="http://sourceforge.net/sflogo.php?group_id=1871&type=1"
WIDTH=88 HEIGHT=31 ALT="Sourceforge"></A>
</TD>
</TR></TABLE>
</ADDRESS>
</BODY>
</HTML>