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
|
This file describes the extensions made for generating pictures with babel
and povray. This extensions are copyrighted by
Oliver Weichold (weichold@sas.upenn.edu)
and
Steffen Reith (streit@streit.cc)
This software is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This software is provided on an "as is" basis, and without warranty of any
kind, including but not limited to any implied warranty of merchantability
or fitness for a particular purpose.
1. Installation
---------------
The extension is tested for Linux, but should work with any flavour of
UNIX(TM).
Sorry: We did not test it for DOS/Windows, because we do _not_ use it.
(a) Install povray 3.1 or above (You _really_ need at least 3.1). See
http://www.povray.org/ for instructions, sources and binaries.
Please read the povray manual.
(b) Copy the file babel.inc to a place where povray can find it as
an include file.
If you have set up povray properly, please try
cat $POVINI | grep Library_Path=
for a hint.
(c) Compile babel
(d) Do _NOT_ forget: READ.ME files are not IGNORE.ME files :-(
But, as you are here, you seem to like readme files.
2. Usage
--------
The usage is quite simple. Supposing you have a mol2 file (probably generated
by Sybyl). You can convert this description of a molecule to a
povray file by typing:
babel -imol2 meer.mol2 -opov meer.inc
(The output-type 'pov' creates povray files. Of course, you can use any type
of file supported by babel as input.)
The generated file for povray contains a povray object, representing
your molecule. The name of the object is simply the name of the
output-file without extension (In the example above, you get
an object called 'meer').
Now you can use this object in your povray scene.
2.1 Modifiers & Variables
------------------------
At the moment, three types of models are supported. They are "Ball and Sticks",
"Space-Fill" and "Capped-Sticks". You have to "#declare" the desired type by
adding something like
#declare BAS = true //For Ball and Sticks (Default).
#declare SPF = true //For Space-Fill
#declare CST = true //For Capped-Sticks
to the scene description in your .pov file before you import the .inc file (see
below). If you don't select a type "Ball and Sticks" is the default.
You can do transparent molecules by adding
#declare TRANS = true
to your .pov file. Please note, that we do not use this feature very often, so
the transparent texture is not optimal (Feel free to improve it and send us
your improvement.)
Any time you convert a file to a povray description (.inc file) the center of
the molecule is calculated, too. The name of the center is always
'mol_name'_center
where 'mol_name' is the name of the generated povray file without
extension. Note that this vector is already mulitplied by -1. So you
can easily center the molecule to (0|0|0) by adding
'translate <mol_name>_center'.
to your .pov file.
2.2. Example
------------
Go to directory 'doc'. (These may have been moved if you are using a
binary package, like an RPM or .deb.) Here you find a file
'dioxin.mol2'. Convert it by typing:
babel -imol2 dioxin.mol2 -opov dioxin.inc
Now have a look at the file 'dioxin.inc'
As a povray scene we use the file dioxin.pov
---------------------------------------------------------------------
#include "colors.inc"
#include "skies.inc"
#declare BAS = true //We do a ball and sticks model
#declare SPF = false
#declare CST = false
#include "dioxin.inc" //Now we include the molecule
background{White}
sky_sphere{S_Cloud1}
//The molecule
object{
dioxin
translate dioxin_center //Translate to (0|0|0)
}
camera {
location <0,0,-12>
look_at <0,0,0>
}
light_source {<0,10,0>
color White
}
-------------------------------------------------------------------------
now you can render a picture by typing
x-povray +V +A +D0 +W320 +H200 +Q9 +I dioxin.pov
or
povray +V +A -D +W320 +H200 +Q9 +I dioxin.pov
at the unix shell. (Read the povray-manual or ask your povray admin for
the right povray command)
Now do a sticks model by changing
#declare BAS = true
to
#declare BAS = false
and
#declare CST = false
to
#declare CST = true
Render the new picture (you already know the right command). Now you
can do a spacefill-model (#declare SPF = true).
If you do not want to learn much about povray you can use 'dioxin.pov'
as a prototype. You only have to change the filename 'dioxin.inc', the
translate dioxin_center and the distance to the camera.
Note: Of course it is possible to have more than one molecule in one
povray scene. Just include all *.inc-files. You can also mix the
model types. Supposing, you want mol1 as a 'Ball and Sticks' and
mol2 as a 'Capped-Sticks'-model, you have to change the declarations to
#declare BAS = true
#declare SPF = false
#declare CST = false
#include "mol1.inc"
#declare BAS = false
#declare SPF = false
#declare CST = true
#include "mol2.inc"
3. Some pictures
------------------
See
http://www.streit.cc/
for some pictures.
Have fun,
Oliver & Steffen
P.S.: If you want to improve this file, feel free to do so. Please
send us your improvement :-)
|