File: node27.html

package info (click to toggle)
viewmol 2.4.1-18
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 7,300 kB
  • sloc: ansic: 30,727; python: 1,846; sh: 1,282; awk: 433; makefile: 374
file content (174 lines) | stat: -rw-r--r-- 8,862 bytes parent folder | download | duplicates (8)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--****************************************************************************
*                                                                              *
*                                   Viewmol                                    *
*                                                                              *
*                            N O D E 2 7 . H T M L                             *
*                                                                              *
*                    Copyright (c) Joerg-R. Hill, October 2003                 *
*                                                                              *
********************************************************************************
*-->
<html>
<head>
<title>10.9 The viewmol module</title>
<META NAME="description" CONTENT="10.9 The viewmol module">
<META NAME="keywords" CONTENT="viewmol">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="STYLESHEET" href="viewmol.css">
<link rel="first" href="viewmol.html">

</head>
<body>
<H2><A NAME="SECTION0001090000000000000000">
10.9 The <TT>viewmol</TT> module</A>
</H2>
<dl><dt><b><a name="l2h-72"><tt class="function">load</tt></a></b>(<var>filename</var>)
<dd>
Loads a molecule into V<SMALL>IEWMOL</SMALL>. <var>filename</var> has to be a string
containing the name (and path if necessary) of the file to load.
</dl>
<dl><dt><b><a name="l2h-73"><tt class="function">save</tt></a></b>(<var>molecule, filename, format</var>)
<dd>
Saves molecule <var>molecule</var> in the format <var>format</var> to file <var>filename</var>.
<var>molecule</var> has to be a molecule object, <var>filename</var> a string giving the
name of the file (including path, if appropriate) the molecule is to be saved
to, and <var>format</var> a string describing the format in which the molecule is
to be saved. <var>format</var> can be any of the strings given after the <code>output</code>
keyword in <code>viewmolrc</code> (currently <code>car</code>, <code>arc</code>, <code>mol</code>, or
<code>tm</code>).
</dl>
<dl><dt><b><a name="l2h-74"><tt class="function">delete</tt></a></b>(<var>molecule</var>)
<dd>
Deletes molecule <var>molecule</var>. <var>molecule</var> has to be a molecule object. Note:
Molecules cannot be deleted using Python's <code>del</code> operator since Python works
on V<SMALL>IEWMOL</SMALL>'s data structures.
</dl>
<dl><dt><b><a name="l2h-75"><tt class="function">getMolecules</tt></a></b>()
<dd>
Returns a list of the molecules loaded into V<SMALL>IEWMOL</SMALL>.
</dl>
<dl><dt><b><a name="l2h-76"><tt class="function">getLights</tt></a></b>()
<dd>
Returns a list of the available lights.
</dl>
<dl><dt><b><a name="l2h-77"><tt class="function">getLabels</tt></a></b>()
<dd>
Returns a list of all labels known to V<SMALL>IEWMOL</SMALL>.
</dl>
<dl><dt><b><a name="l2h-78"><tt class="function">model</tt></a></b>(<big>[</big><var>model</var><big>]</big>)
<dd>
Sets or returns the model used to display molecules. <var>model</var> has to be one
of the integer constants <code>WIREMODEL</code>, <code>STICKMODEL</code>, <code>BALLMODEL</code>, or
<code>CPKMODEL</code> defined in the <code>viewmol</code> module to set the model to
wire model, stick model, ball-and-stick model, and CPK model, respectively.
</dl>
<dl><dt><b><a name="l2h-79"><tt class="function">drawingMode</tt></a></b>(<big>[</big><var>mode</var><big>]</big>)
<dd>
Sets or returns the drawing mode for molecules. <var>mode</var> has to be one of
the integer constants <code>DOT</code>, <code>LINE</code>, or <code>SURFACE</code> defined in
the <code>viewmol</code> module to set the drawing mode correspondingly.
</dl>
<dl><dt><b><a name="l2h-80"><tt class="function">projection</tt></a></b>(<big>[</big><var>projection</var><big>]</big>)
<dd>
Sets or returns the projection. <var>projection</var> has to be one of the integer
constants <code>ORTHO</code> or <code>PERSPECTIVE</code> defined in the <code>viewmol</code> module.
</dl>
<dl><dt><b><a name="l2h-81"><tt class="function">sphereResolution</tt></a></b>(<big>[</big><var>resolution</var><big>]</big>)
<dd>
Sets or returns the resolution for spheres and cylinders. <var>resolution</var> has
to be an integer. Higher resolutions result in smoother looking spheres and
cylinders.
</dl>
<dl><dt><b><a name="l2h-82"><tt class="function">lineWidth</tt></a></b>(<big>[</big><var>width</var><big>]</big>)
<dd>
Sets or returns the line width for wire model displays. <var>width</var> has to be
an integer. If <var>width</var> is set to zero the line width is calculated based
on the size of the window.
</dl>
<dl><dt><b><a name="l2h-83"><tt class="function">groundColor</tt></a></b>(<big>[</big><var>red, green, blue</var><big>]</big>)
<dd>
Sets or returns the color of the ground displayed if the projection is set to
<code>PERSPECTIVE</code>. <var>red</var>, <var>green</var>, and <var>blue</var> are floats specifying
the red, green, and blue components of the ground color. They have to be between
0.0 and 1.0. If the ground color is retrieved, a tupel with the red, green, and
blue values is returned.
</dl>
<dl><dt><b><a name="l2h-84"><tt class="function">backgroundColor</tt></a></b>(<big>[</big><var>red, green, blue</var><big>]</big>)
<dd>
Sets or returns the color of the background. <var>red</var>, <var>green</var>, and <var>blue</var>
are floats specifying the red, green, and blue components of the background color.
They have to be between 0.0 and 1.0. If the background color is retrieved, a tupel
with the red, green, and blue values is returned.
</dl>
<dl><dt><b><a name="l2h-85"><tt class="function">labelAtoms</tt></a></b>(<var>status</var>)
<dd>
Specifies whether atoms should be labeled. <var>status</var> is an integer set to
one of the constants <code>ON</code> or <code>OFF</code> defined in the <code>viewmol</code> module.
</dl>
<dl><dt><b><a name="l2h-86"><tt class="function">saveDrawing</tt></a></b>(<var>format, filename</var>)
<dd>
Saves the drawing to file. <var>format</var> has to be one of the constants
<code>TIFF</code>, <code>PNG</code>, <code>HPGL</code>, <code>POSTSCRIPT</code>, or <code>RAYTRACER</code>
defined in the <code>viewmol</code> module, <var>filename</var> the name of the file
the drawing is to be saved to.
</dl>
<dl><dt><b><a name="l2h-87"><tt class="function">isosurface</tt></a></b>(<big>[</big><var>level</var><big>]</big>)
<dd>
Sets or returns which isosurface to display for wave function related drawings.
<var>level</var> has to be a double.
</dl>
<dl><dt><b><a name="l2h-88"><tt class="function">showThermodynamics</tt></a></b>(<big>[</big><var>select</var><big>]</big>)
<dd>
Displays the thermodynamics dialog. <var>select</var> is an integer specifying
which tab to display. This integer has to be either the integer constant
<code>REACTION</code> defined in the <code>viewmol</code> module or an integer between
1 and the number of molecule loaded. In the first case the reaction page
is displayed, in all other cases the page for the corresponding molecule
is shown.
</dl>
<dl><dt><b><a name="l2h-89"><tt class="function">redraw</tt></a></b>()
<dd>
Redraws the main window of V<SMALL>IEWMOL</SMALL>. Redraws are necessary to make changes
visible performed using other methods of the <code>viewmol</code> module.
</dl>
<dl><dt><b><a name="l2h-90"><tt class="function">getFramesPerSecond</tt></a></b>()
<dd>
Returns the drawing speed of the last redraw of V<SMALL>IEWMOL</SMALL>'s main window
in frames per second.
</dl>
<dl><dt><b><a name="l2h-91"><tt class="function">write</tt></a></b>(<var>string</var>)
<dd>
Write <var>string</var> to the Python message dialog.
</dl>
<dl><dt><b><a name="l2h-92"><tt class="function">registerMenuItem</tt></a></b>(<var>moduleName</var>)
<dd>
Add <var>moduleName</var> to the ``Run script" menu.
</dl>
<dl><dt><b><a name="l2h-93"><tt class="function">showWarnings</tt></a></b>(<var>warning</var>)
<dd>
Controls the display of warning messages. <var>warning</var> is an integer set to
one of the constants <code>ON</code> or <code>OFF</code> defined in the <code>viewmol</code> module.
If warnings are turned off no dialog boxes requiring user interaction are
displayed while a Python script is running.
</dl>
<dl><dt><b><a name="l2h-94"><tt class="function">getWindowSize</tt></a></b>()
<dd>
Returns a tupel containing the size of V<SMALL>IEWMOL</SMALL>'s main window in pixels.
The tupel consists of <var>(width, height)</var>.
</dl>
<dl><dt><b><a name="l2h-95"><tt class="function">quit</tt></a></b>()
<dd>
Quits V<SMALL>IEWMOL</SMALL>.
</dl>

<P>

<p><hr>
<ADDRESS>
<a href="mailto:joehill@users.sourceforge.net"><i>J&ouml;rg-R&uuml;diger Hill</i></a> Fri Oct 31 14:19:21 CET 2003
</ADDRESS>
</BODY>
</HTML>