http://packetstormsecurity.org/UNIX/admin/xscreensaver-3.30.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:42:45 +0000 (00:42 -0500)
committerZygo Blaxell <zblaxell@faye.furryterror.org>
Fri, 8 Feb 2013 17:53:41 +0000 (12:53 -0500)
-rw-r--r-- 1 zblaxell zblaxell 1581895 Mar 19  2001 xscreensaver-3.30.tar.gz
c6983aac7f1a1c0c8c78ea547774eed1ee489894  xscreensaver-3.30.tar.gz

75 files changed:
Makefile.in
README
configure
configure.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/demo-Gtk.c
driver/xscreensaver-command.man
driver/xscreensaver-demo.man
driver/xscreensaver.c
driver/xscreensaver.man
hacks/Makefile.in
hacks/compile_axp.com
hacks/compile_decc.com
hacks/glx/Makefile.in
hacks/glx/dangerball.c [new file with mode: 0644]
hacks/glx/gears.c
hacks/glx/gflux.c
hacks/glx/gltext.c
hacks/glx/gltext.man
hacks/glx/lament.c
hacks/glx/moebius.c
hacks/glx/molecule.c [new file with mode: 0644]
hacks/glx/molecule.man [new file with mode: 0644]
hacks/glx/pipes.c
hacks/glx/sierpinski3d.c
hacks/glx/starwars.c
hacks/glx/starwars.man
hacks/images/molecules/adenine.pdb [new file with mode: 0644]
hacks/images/molecules/adrenochrome.pdb [new file with mode: 0644]
hacks/images/molecules/bucky.pdb [new file with mode: 0644]
hacks/images/molecules/caffeine.pdb [new file with mode: 0644]
hacks/images/molecules/chlordecone.pdb [new file with mode: 0644]
hacks/images/molecules/cocaine.pdb [new file with mode: 0644]
hacks/images/molecules/codeine.pdb [new file with mode: 0644]
hacks/images/molecules/cyclohexane.pdb [new file with mode: 0644]
hacks/images/molecules/cytosine.pdb [new file with mode: 0644]
hacks/images/molecules/dna.pdb [new file with mode: 0644]
hacks/images/molecules/dodecahedrane.pdb [new file with mode: 0644]
hacks/images/molecules/dthc.pdb [new file with mode: 0644]
hacks/images/molecules/dynamite.pdb [new file with mode: 0644]
hacks/images/molecules/glycol.pdb [new file with mode: 0644]
hacks/images/molecules/guanine.pdb [new file with mode: 0644]
hacks/images/molecules/heroin.pdb [new file with mode: 0644]
hacks/images/molecules/hexahelicene.pdb [new file with mode: 0644]
hacks/images/molecules/ibuprofen.pdb [new file with mode: 0644]
hacks/images/molecules/lsd.pdb [new file with mode: 0644]
hacks/images/molecules/menthol.pdb [new file with mode: 0644]
hacks/images/molecules/mescaline.pdb [new file with mode: 0644]
hacks/images/molecules/methamphetamine.pdb [new file with mode: 0644]
hacks/images/molecules/morphine.pdb [new file with mode: 0644]
hacks/images/molecules/nicotine.pdb [new file with mode: 0644]
hacks/images/molecules/novocaine.pdb [new file with mode: 0644]
hacks/images/molecules/olestra.pdb [new file with mode: 0644]
hacks/images/molecules/penicillin.pdb [new file with mode: 0644]
hacks/images/molecules/sarin.pdb [new file with mode: 0644]
hacks/images/molecules/strychnine.pdb [new file with mode: 0644]
hacks/images/molecules/sucrose.pdb [new file with mode: 0644]
hacks/images/molecules/thalidomide.pdb [new file with mode: 0644]
hacks/images/molecules/thymine.pdb [new file with mode: 0644]
hacks/images/molecules/viagra.pdb [new file with mode: 0644]
hacks/images/molecules/vitaminb6.pdb [new file with mode: 0644]
hacks/images/molecules/vitaminc.pdb [new file with mode: 0644]
hacks/images/molecules/vx.pdb [new file with mode: 0644]
hacks/moire.c
hacks/rotzoomer.c [new file with mode: 0644]
hacks/rotzoomer.man [new file with mode: 0644]
hacks/screenhack.c
hacks/webcollage
setup.com
utils/version.h
utils/xshm.c
utils/xshm.h
xscreensaver.lsm
xscreensaver.spec

index 5cc087cb64bb3d2100b2fa56dc6dbf220c88bd24..9b19c23d026824baa24acb5b5275d3da3539c615 100644 (file)
@@ -13,10 +13,6 @@ TARFILES     = README README.VMS README.debugging INSTALL xscreensaver.lsm \
                  config.sub makevms.com screenblank.txt \
                  xscreensaver.lsm.sh xscreensaver.spec
 TAR            = tar
-COMPRESS       = gzip --verbose --best
-COMPRESS_EXT   = gz
-# COMPRESS     = compress
-# COMPRESS_EXT = Z
 
 MAKE_SUBDIR = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
 
@@ -75,10 +71,9 @@ tar:
       | sed \"s|^|$$subdir/|g;s| | $$subdir/|g\"                           \
       ` ";                                                                 \
     cd $$d ; done ;                                                        \
-  echo creating tar file $${NAME}.tar.$(COMPRESS_EXT)... ;                 \
-  $(TAR) -vchf -                                                           \
-    `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" `      \
-   | $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ;                          \
+  echo creating tar file $${NAME}.tar.gz... ;                              \
+  GZIP="-9v" $(TAR) -vchzf $${NAME}.tar.gz                                 \
+    `echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` ;            \
   rm $$NAME
 
 
diff --git a/README b/README
index 97da26dc4aca646fc24448ecaca2fcb64232c399..00eb36eda716e7fee1a8c304e49c041e1552c4fe 100644 (file)
--- a/README
+++ b/README
@@ -64,7 +64,7 @@ Along with the xscreensaver daemon itself, this package also includes
 numerous graphics hacks for use as screensavers.  There is nothing magic
 about these: they are just programs that draw on the root window.
 
-More than 100 such programs are included.  For details, see the xscreensaver
+More than 120 such programs are included.  For details, see the xscreensaver
 web page, or the enclosed manual pages.  There are also some helpful hints
 on customization in the xscreensaver app-defaults file (normally installed
 in /usr/lib/X11/app-defaults/XScreenSaver.)
@@ -74,6 +74,17 @@ http://www.jwz.org/xscreensaver/.
 
                               ============
 
+Changes since 3.29:   * New hacks, `molecule' `dangerball', and `rotzoomer'.
+                      * New version of `gflux'.
+                      * Made `gltext' able to display the current time.
+                      * Fixed a floating-point-precision problem in `gltext'
+                        that sometimes caused horizontal lines to vanish.
+                      * Removed the `-window-id' option from the hacks:
+                        it never worked right, and was unnecessary.
+                      * Made the `starwars' hack use thicker lines, antialias
+                        the text, and fade out at the far edge instead of just
+                        dropping off.
+                      * Fixed an SHM segment leak in `moire'.
 Changes since 3.28:   * Better rendering of the new logo.
                       * New hack, `gltext'.
                       * Added `-planetary' option to `gears', to draw a
index c53913c8e5b455daa4a7aa881f55d98a21d88732..efb116c36d0cbe2230fafaf8c9e1836cbde5b7cd 100755 (executable)
--- a/configure
+++ b/configure
@@ -10089,7 +10089,7 @@ if test "$do_dir_warning" = yes; then
   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
   echo "      will be installed in ${bindir}."
   echo ""
-  echo "      The various graphics demos (100+ different executables) will"
+  echo "      The various graphics demos (120+ different executables) will"
   echo "      also be installed in ${HACKDIR}."
   echo ""
   echo "      If you would prefer the demos to be installed elsewhere"
index 5e95dd60ec3c8faae440e967128eb3806a74e24d..c7a316c0df831a2556545d5a042285530f8842c1 100644 (file)
@@ -3023,7 +3023,7 @@ if test "$do_dir_warning" = yes; then
   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
   echo "      will be installed in ${bindir}."
   echo ""
-  echo "      The various graphics demos (100+ different executables) will"
+  echo "      The various graphics demos (120+ different executables) will"
   echo "      also be installed in ${HACKDIR}."
   echo ""
   echo "      If you would prefer the demos to be installed elsewhere"
index b735da39fd0949d51cf9dc21c600481dc7eab2e6..639da2cf1d2e6d86c2f005529d042c3424e89df2 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 3.29
-!                              13-Feb-2001
+!                              version 3.30
+!                              19-Mar-2001
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://www.jwz.org/xscreensaver/
                                xrayswarm -root                             \n\
 -             "Zoom (Fatbits)" zoom -root                                  \n\
               "Zoom (Lenses)"  zoom -root -lenses                          \n\
+                               rotzoomer -root                             \n\
+-         "RotZoomer (mobile)" rotzoomer -root -move                       \n\
                                whirlwindwarp -root                         \n\
   color:                       bubbles -root                               \n\
   default-n:                   webcollage -root                            \n\
 @GL_KLUDGE@ GL:                        stonerview -root                            \n\
 @GL_KLUDGE@ GL:                        starwars -root                              \n\
 @GL_KLUDGE@ GL:                        gltext -root                                \n\
+@GL_KLUDGE@ GL:        "GLText (clock)" gltext -text "%A%n%d %b %Y%n%r" -root      \n\
+@GL_KLUDGE@ GL:         "Molecule"             molecule -root                      \n\
+@GL_KLUDGE@ GL:         "Molecule (lumpy)"     molecule -root -no-bonds -no-labels \n\
+@GL_KLUDGE@ GL:                        dangerball -root                            \n\
                                                                              \
 -                              xdaliclock -root -builtin3 -cycle           \n\
 - default-n:                   xearth -nofork -nostars -ncolors 50           \
@@ -1239,6 +1245,11 @@ forcefields.  The strength of each forcefield changes                \
 continuously, and it is also switched on and off at random.          \
 By Paul 'Joey' Clark.
 
+*hacks.rotzoomer.name: RotZoomer
+*hacks.rotzoomer.documentation:                                      \
+Creates a collage of rotated and scaled portions of the              \
+screen. Written by Claudio Matsuoka.
+
 *hacks.stonerview.name: StonerView
 *hacks.stonerview.documentation:                                     \
 Chains of colorful squares dance around each other in complex spiral \
@@ -1256,6 +1267,16 @@ same name.  Written by Jamie Zawinski and Claudio Matauoka.
 Displays a few lines of text spinning around in a solid 3D font.     \
 Written by Jamie Zawinski.
 
+*hacks.molecule.documentation:                                       \
+Draws several different representations of molecules.  Some common   \
+molecules are built in, and it can also read PDB (Protein Data Base) \
+files as input.  Written by Jamie Zawinski.
+
+*hacks.dangerball.name: DangerBall
+*hacks.dangerball.documentation:                                     \
+Draws a ball that periodically extrudes many random spikes.  Ouch!   \
+Written by Jamie Zawinski.
+
 
 !=============================================================================
 !
index 6b69aade0c9915bf38fd4c7f29e0ab6a78a6b5df..e7f92322412ec470ce64d3710665536981e820d4 100644 (file)
                                xrayswarm -root                             \\n\
 -             \"Zoom (Fatbits)\"       zoom -root                                  \\n\
               \"Zoom (Lenses)\"        zoom -root -lenses                          \\n\
+                               rotzoomer -root                             \\n\
+-         \"RotZoomer (mobile)\" rotzoomer -root -move                     \\n\
                                whirlwindwarp -root                         \\n\
   color:                       bubbles -root                               \\n\
   default-n:                   webcollage -root                            \\n\
           GL:                  stonerview -root                            \\n\
           GL:                  starwars -root                              \\n\
           GL:                  gltext -root                                \\n\
+          GL:  \"GLText (clock)\" gltext -text \"%A%n%d %b %Y%n%r\" -root          \\n\
+          GL:   \"Molecule\"           molecule -root                      \\n\
+          GL:   \"Molecule (lumpy)\"   molecule -root -no-bonds -no-labels \\n\
+          GL:                  dangerball -root                            \\n\
                                                                              \
 -                              xdaliclock -root -builtin3 -cycle           \\n\
 - default-n:                   xearth -nofork -nostars -ncolors 50           \
@@ -928,6 +934,10 @@ Floating stars are acted upon by a mixture of simple 2D              \
 forcefields.  The strength of each forcefield changes                \
 continuously, and it is also switched on and off at random.          \
 By Paul 'Joey' Clark.",
+"*hacks.rotzoomer.name: RotZoomer",
+"*hacks.rotzoomer.documentation:                                      \
+Creates a collage of rotated and scaled portions of the              \
+screen. Written by Claudio Matsuoka.",
 "*hacks.stonerview.name: StonerView",
 "*hacks.stonerview.documentation:                                     \
 Chains of colorful squares dance around each other in complex spiral \
@@ -942,6 +952,14 @@ same name.  Written by Jamie Zawinski and Claudio Matauoka.",
 "*hacks.gltext.documentation:                                         \
 Displays a few lines of text spinning around in a solid 3D font.     \
 Written by Jamie Zawinski.",
+"*hacks.molecule.documentation:                                       \
+Draws several different representations of molecules.  Some common   \
+molecules are built in, and it can also read PDB (Protein Data Base) \
+files as input.  Written by Jamie Zawinski.",
+"*hacks.dangerball.name: DangerBall",
+"*hacks.dangerball.documentation:                                     \
+Draws a ball that periodically extrudes many random spikes.  Ouch!   \
+Written by Jamie Zawinski.",
 "*hacks.xdaliclock.name: XDaliClock",
 "*hacks.xdaliclock.documentation:                                      \
 XDaliClock draws a large digital clock, the numbers of which change by \
index a94ff1bd06658fb851bb8cac4c10a6c26322d832..6564748fce36886fc8ec7e800b2a4f9ace85d6c1 100644 (file)
@@ -1347,6 +1347,9 @@ populate_prefs_page (GtkWidget *top, prefs_pair *pair)
   gtk_toggle_button_set_active (
                    GTK_TOGGLE_BUTTON (name_to_widget (top, "capture_button")),
                    p->capture_stderr_p);
+  gtk_toggle_button_set_active (
+                   GTK_TOGGLE_BUTTON (name_to_widget (top, "splash_button")),
+                   p->splash_p);
 
   gtk_toggle_button_set_active (
                    GTK_TOGGLE_BUTTON (name_to_widget (top, "dpms_button")),
index 2bf8599c8def3fb56244eb40fe418874917d12a1..448f256aae918cd8185faa00ec6f11591d1125c0 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "13-Feb-2001 (3.29)" "X Version 11"
+.TH XScreenSaver 1 "19-Mar-2001 (3.30)" "X Version 11"
 .SH NAME
 xscreensaver-command - control a running xscreensaver process
 .SH SYNOPSIS
index c7fe54f56869d344ed72a1ed8a41bc3b82d57b9b..4ec05db4fe35575d4195696e1df5e8b4a279e45d 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "13-Feb-2001 (3.29)" "X Version 11"
+.TH XScreenSaver 1 "19-Mar-2001 (3.30)" "X Version 11"
 .SH NAME
 xscreensaver-demo - interactively control the background xscreensaver daemon
 .SH SYNOPSIS
index 93f05267429a575d64043d8e8480fe746e3c0ccb..641ccddace6851da837c3e13e478a7aaaaf9a165 100644 (file)
@@ -315,7 +315,7 @@ saver_ehandler (Display *dpy, XErrorEvent *error)
                    "#######################################"
                    "#######################################\n\n");
           fprintf (real_stderr,
-   "    If at all possible, please re-run xscreensaver with the command\ e\n"
+   "    If at all possible, please re-run xscreensaver with the command\n"
    "    line arguments `-sync -verbose -no-capture', and reproduce this\n"
    "    bug.  That will cause xscreensaver to dump a `core' file to the\n"
    "    current directory.  Please include the stack trace from that core\n"
index c08ed63b26b783c2b9e22271973e4200f07e4ba9..391f21849bc718563621a1f8d38998bf9312a7ae 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "13-Feb-2001 (3.29)" "X Version 11"
+.TH XScreenSaver 1 "19-Mar-2001 (3.30)" "X Version 11"
 .SH NAME
 xscreensaver - graphics hack and screen locker, launched when the user is idle
 .SH SYNOPSIS
@@ -1387,6 +1387,7 @@ http://www.jwz.org/xscreensaver/
 .BR xswarm (1),
 .BR xtacy (1),
 .BR xv (1),
+.BR chbg (1),
 .BR xwave (1).
 .SH COPYRIGHT
 Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
index 1e44d04c228b7ba165a8d87442f7c2202504d555..9e55906b2bbeb18ffb124c1c0644420c0eecc850 100644 (file)
@@ -87,7 +87,8 @@ SRCS          = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
                  squiral.c xflame.c wander.c spotlight.c critical.c \
                  phosphor.c xmatrix.c petri.c shadebobs.c xsublim.c ccurve.c \
                  blaster.c bumps.c ripples.c xteevee.c xspirograph.c \
-                 nerverot.c xrayswarm.c hyperball.c zoom.c whirlwindwarp.c
+                 nerverot.c xrayswarm.c hyperball.c zoom.c whirlwindwarp.c \
+                 rotzoomer.c
 SCRIPTS                = vidwhacker webcollage
 
 OBJS           = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
@@ -107,7 +108,8 @@ OBJS                = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  squiral.o xflame.o wander.o spotlight.o critical.o \
                  phosphor.o xmatrix.o petri.o shadebobs.o xsublim.o ccurve.o \
                  blaster.o bumps.o ripples.o xteevee.o xspirograph.o \
-                 nerverot.o xrayswarm.o hyperball.o zoom.o whirlwindwarp.o
+                 nerverot.o xrayswarm.o hyperball.o zoom.o whirlwindwarp.o \
+                 rotzoomer.o
 
 EXES           = attraction blitspin bouboule braid bubbles decayscreen deco \
                  drift flag flame forest vines galaxy grav greynetic halo \
@@ -121,7 +123,8 @@ EXES                = attraction blitspin bouboule braid bubbles decayscreen deco \
                  sonar demon loop t3d penetrate deluxe compass squiral \
                  xflame wander spotlight critical phosphor xmatrix petri \
                  shadebobs xsublim ccurve blaster bumps ripples xteevee \
-                 xspirograph nerverot xrayswarm hyperball zoom whirlwindwarp
+                 xspirograph nerverot xrayswarm hyperball zoom whirlwindwarp \
+                 rotzoomer
 
 HACK_OBJS_1    = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
                  $(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
@@ -150,7 +153,8 @@ MEN         = attraction.man blitspin.man bouboule.man braid.man \
                  sonar.man t3d.man squiral.man spotlight.man critical.man \
                  vidwhacker.man webcollage.man xsublim.man distort.man \
                  phosphor.man xmatrix.man xteevee.man xflame.man petri.man \
-                 nerverot.man zoom.man whirlwindwarp.man hyperball.man
+                 nerverot.man zoom.man whirlwindwarp.man hyperball.man \
+                 rotzoomer.man
 STAR           = *
 EXTRAS         = README Makefile.in xlock_23.h .gdbinit \
                  images/$(STAR).xbm \
@@ -160,6 +164,7 @@ EXTRAS              = README Makefile.in xlock_23.h .gdbinit \
                  images/noseguy/$(STAR).xbm \
                  images/noseguy/$(STAR).xpm \
                  images/jigsaw/$(STAR).xbm  \
+                 images/molecules/$(STAR).pdb
 
 VMSFILES       = compile_axp.com compile_decc.com link_axp.com link_decc.com \
                  vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
@@ -583,6 +588,9 @@ zoom:       zoom.o  $(HACK_OBJS) $(GRAB)
 whirlwindwarp: whirlwindwarp.o $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
+rotzoomer:     rotzoomer.o     $(HACK_OBJS) $(GRAB) $(SHM)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS) $(GRAB_LIBS)
+
 
 # The rules for those hacks which follow the `xlockmore' API.
 #
@@ -1832,4 +1840,14 @@ whirlwindwarp.o: $(UTILS_SRC)/colors.h
 whirlwindwarp.o: $(UTILS_SRC)/grabscreen.h
 whirlwindwarp.o: $(UTILS_SRC)/visual.h
 whirlwindwarp.o: $(UTILS_SRC)/erase.h
+rotzoomer.o: $(srcdir)/screenhack.h
+rotzoomer.o: ../config.h
+rotzoomer.o: $(UTILS_SRC)/yarandom.h
+rotzoomer.o: $(UTILS_SRC)/usleep.h
+rotzoomer.o: $(UTILS_SRC)/resources.h
+rotzoomer.o: $(UTILS_SRC)/hsv.h
+rotzoomer.o: $(UTILS_SRC)/colors.h
+rotzoomer.o: $(UTILS_SRC)/grabscreen.h
+rotzoomer.o: $(UTILS_SRC)/visual.h
+rotzoomer.o: $(UTILS_SRC)/xshm.h
 
index 2a30c2fcc07bb60cb9057234180a80deb09dadf9..71d6cdae79b561dc2f24589ab059e63520dbf577 100644 (file)
@@ -68,6 +68,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROCKS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RORSCHACH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTOR.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTZOOMER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCREENHACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SHADEBOBS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SIERPINSKI.C
index 2a30c2fcc07bb60cb9057234180a80deb09dadf9..71d6cdae79b561dc2f24589ab059e63520dbf577 100644 (file)
@@ -68,6 +68,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROCKS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RORSCHACH.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTOR.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTZOOMER.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCREENHACK.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SHADEBOBS.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SIERPINSKI.C
index ed78d3ebb581464a4951868f07b16be751420052..0fb600971a1070144ee93181775bb2b045b15afb 100644 (file)
@@ -76,7 +76,7 @@ SRCS          = xscreensaver-gl-helper.c \
                  extrusion-taper.c extrusion-twistoid.c sierpinski3d.c \
                  gflux.c stonerview.c stonerview-move.c stonerview-osc.c \
                  stonerview-view.c starwars.c glut_stroke.c glut_swidth.c \
-                 gltext.c
+                 gltext.c molecule.c dangerball.c
 
 OBJS           = xscreensaver-gl-helper.o \
                  atlantis.o b_draw.o b_lockglue.o b_sphere.o bubble3d.o \
@@ -90,11 +90,12 @@ OBJS                = xscreensaver-gl-helper.o \
                  extrusion-taper.o extrusion-twistoid.o sierpinski3d.o \
                  gflux.o stonerview.o stonerview-move.o stonerview-osc.o \
                  stonerview-view.o starwars.o glut_stroke.o glut_swidth.o \
-                 gltext.o
+                 gltext.o molecule.o dangerball.o
 
 GL_EXES_1      = cage gears moebius pipes sproingies stairs superquadrics \
                  morph3d rubik atlantis lament bubble3d glplanet pulsar \
-                 sierpinski3d gflux stonerview starwars gltext
+                 sierpinski3d gflux stonerview starwars gltext molecule \
+                 dangerball
 UTIL_EXES      = xscreensaver-gl-helper
 GL_EXES                = $(UTIL_EXES) $(GL_EXES_1)
 GLE_EXES       = extrusion
@@ -110,7 +111,7 @@ HACK_OBJS   = screenhack-gl.o xlock-gl.o $(HACK_BIN)/xlockmore.o \
 HDRS           = atlantis.h bubble3d.h buildlwo.h e_textures.h xpm-ximage.h \
                  stonerview-move.h stonerview-osc.h glutstroke.h glut_roman.h
 GL_MEN         = gflux.man lament.man starwars.man gltext.man \
-                 xscreensaver-gl-helper.man
+                 molecule.man xscreensaver-gl-helper.man
 MEN            = @GL_MEN@
 EXTRAS         = README Makefile.in
 
@@ -192,7 +193,7 @@ uninstall-man:
        done
 
 clean:
-       -rm -f *.o a.out core $(EXES)
+       -rm -f *.o a.out core $(EXES) molecules.h
 
 distclean: clean
        -rm -f Makefile TAGS *~ "#"*
@@ -208,7 +209,7 @@ depend:
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
 # to include only dependencies on files which are themselves a part of this
 # package.
-distdepend::
+distdepend:: molecules.h
        @echo updating dependencies in `pwd`/Makefile.in... ;               \
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
@@ -222,7 +223,8 @@ distdepend::
              -e 's@ \.\./@ $$(HACK_SRC)/@g'                                \
              -e 's@ \([^$$]\)@ $$(srcdir)/\1@g'                            \
              -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g'                       \
-             -e 's@ $$(HACK_SRC)/\(.*config.h\)@ ../\1@g' ;                \
+             -e 's@ $$(HACK_SRC)/\(.*config.h\)@ ../\1@g'                  \
+             -e 's@ $$(srcdir)/\(.*molecules.h\)@ \1@g' ;                  \
          echo ''                                                           \
        ) > /tmp/distdepend.$$$$ &&                                         \
        mv Makefile.in Makefile.in.bak &&                                   \
@@ -346,6 +348,9 @@ GLT_OBJS=gltext.o glut_stroke.o glut_swidth.o
 gltext:        $(GLT_OBJS) $(HACK_OBJS)
        $(CC_HACK) -o $@ $(GLT_OBJS) $(HACK_OBJS) $(HACK_LIBS)
 
+dangerball:    dangerball.o    $(HACK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(HACK_LIBS)
+
 # This one works differently (it's not xlock-like.)
 #
 STONER_OBJS=stonerview.o stonerview-move.o stonerview-osc.o stonerview-view.o \
@@ -353,6 +358,20 @@ STONER_OBJS=stonerview.o stonerview-move.o stonerview-osc.o stonerview-view.o \
 stonerview:    $(STONER_OBJS)
        $(CC_HACK) -o $@ $(STONER_OBJS) $(HACK_LIBS)
 
+molecules.h:
+       @tmp=molecules.h.$$$$ ;                                         \
+       rm -f $$tmp ;                                                   \
+       echo "building molecules.h from $(HACK_SRC)/images/molecules/*.pdb" ; \
+       for f in $(HACK_SRC)/images/molecules/*.pdb ; do                \
+         $(SHELL) $(UTILS_SRC)/ad2c < "$$f" |                          \
+           sed 's/",$$/\\n"/' >> $$tmp ;                               \
+         echo ',' >> $$tmp ;                                           \
+       done ;                                                          \
+       mv $$tmp molecules.h
+
+molecule:      molecule.o      $(HACK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(HACK_LIBS)
+
 
 ##############################################################################
 #
@@ -715,4 +734,31 @@ gltext.o: $(UTILS_SRC)/visual.h
 gltext.o: $(UTILS_SRC)/xshm.h
 gltext.o: $(srcdir)/glutstroke.h
 gltext.o: $(srcdir)/glut_roman.h
+molecule.o: $(HACK_SRC)/xlockmore.h
+molecule.o: ../../config.h
+molecule.o: $(HACK_SRC)/xlockmoreI.h
+molecule.o: $(HACK_SRC)/screenhack.h
+molecule.o: $(UTILS_SRC)/yarandom.h
+molecule.o: $(UTILS_SRC)/usleep.h
+molecule.o: $(UTILS_SRC)/resources.h
+molecule.o: $(UTILS_SRC)/hsv.h
+molecule.o: $(UTILS_SRC)/colors.h
+molecule.o: $(UTILS_SRC)/grabscreen.h
+molecule.o: $(UTILS_SRC)/visual.h
+molecule.o: $(UTILS_SRC)/xshm.h
+molecule.o: molecules.h
+dangerball.o: $(HACK_SRC)/xlockmore.h
+dangerball.o: ../../config.h
+dangerball.o: $(HACK_SRC)/xlockmoreI.h
+dangerball.o: $(HACK_SRC)/screenhack.h
+dangerball.o: $(UTILS_SRC)/yarandom.h
+dangerball.o: $(UTILS_SRC)/usleep.h
+dangerball.o: $(UTILS_SRC)/resources.h
+dangerball.o: $(UTILS_SRC)/hsv.h
+dangerball.o: $(UTILS_SRC)/colors.h
+dangerball.o: $(UTILS_SRC)/grabscreen.h
+dangerball.o: $(UTILS_SRC)/visual.h
+dangerball.o: $(UTILS_SRC)/xshm.h
+dangerball.o: $(srcdir)/glutstroke.h
+dangerball.o: $(srcdir)/glut_roman.h
 
diff --git a/hacks/glx/dangerball.c b/hacks/glx/dangerball.c
new file mode 100644 (file)
index 0000000..2dca4e0
--- /dev/null
@@ -0,0 +1,547 @@
+/* dangerball, Copyright (c) 2001 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+#include <X11/Intrinsic.h>
+
+extern XtAppContext app;
+
+#define PROGCLASS      "DangerBall"
+#define HACK_INIT      init_ball
+#define HACK_DRAW      draw_ball
+#define HACK_RESHAPE   reshape_ball
+#define sws_opts       xlockmore_opts
+
+#define DEF_SPIN        "True"
+#define DEF_WANDER      "True"
+#define DEF_SPEED       "0.05"
+
+#define DEFAULTS       "*delay:        30000       \n" \
+                       "*count:        30          \n" \
+                       "*showFPS:      False       \n" \
+                       "*wireframe:    False       \n" \
+                       "*speed:      " DEF_SPEED " \n" \
+                       "*spin:       " DEF_SPIN   "\n" \
+                       "*wander:     " DEF_WANDER "\n" \
+
+
+#define SPHERE_SLICES 32  /* how densely to render spheres */
+#define SPHERE_STACKS 16
+
+
+#define SPIKE_FACES  12   /* how densely to render spikes */
+
+
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#include "xlockmore.h"
+#include "colors.h"
+#include <ctype.h>
+
+#ifdef USE_GL /* whole file */
+
+#ifdef HAVE_UNAME
+# include <sys/utsname.h>
+#endif /* HAVE_UNAME */
+
+
+#include <GL/glu.h>
+#include "glutstroke.h"
+#include "glut_roman.h"
+#define GLUT_FONT (&glutStrokeRoman)
+
+
+typedef struct {
+  GLXContext *glx_context;
+
+  GLfloat rotx, roty, rotz;       /* current object rotation */
+  GLfloat dx, dy, dz;             /* current rotational velocity */
+  GLfloat ddx, ddy, ddz;          /* current rotational acceleration */
+  GLfloat d_max;                  /* max velocity */
+
+  GLuint ball_list;
+  GLuint spike_list;
+
+  GLfloat pos;
+  int *spikes;
+
+  int ncolors;
+  XColor *colors;
+  int ccolor;
+  int color_shift;
+
+} ball_configuration;
+
+static ball_configuration *bps = NULL;
+
+static char *do_spin;
+static GLfloat speed;
+static Bool do_wander;
+
+static XrmOptionDescRec opts[] = {
+  { "-spin",   ".spin",   XrmoptionNoArg, "True" },
+  { "+spin",   ".spin",   XrmoptionNoArg, "False" },
+  { "-speed",  ".speed",  XrmoptionSepArg, 0 },
+  { "-wander", ".wander", XrmoptionNoArg, "True" },
+  { "+wander", ".wander", XrmoptionNoArg, "False" }
+};
+
+static argtype vars[] = {
+  {(caddr_t *) &do_spin,   "spin",   "Spin",   DEF_SPIN,   t_Bool},
+  {(caddr_t *) &do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
+  {(caddr_t *) &speed,     "speed",  "Speed",  DEF_SPEED,  t_Float},
+};
+
+ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
+
+
+
+static void
+unit_spike (Bool wire)
+{
+  int i;
+  int faces = SPIKE_FACES;
+  GLfloat step = M_PI * 2 / faces;
+  GLfloat th;
+
+  glFrontFace(GL_CW);
+  glBegin(wire ? GL_LINE_STRIP : GL_TRIANGLE_FAN);
+
+  glNormal3f(0, 1, 0);
+  glVertex3f(0, 1, 0);
+  for (i = 0, th = 0; i <= faces; i++)
+    {
+      GLfloat x = cos (th);
+      GLfloat y = sin (th);
+      glNormal3f(x, 0, y);
+      glVertex3f(x, 0, y);
+      if (wire) glVertex3f(0, 1, 0);
+      th += step;
+    }
+  glEnd();
+}
+
+
+/* lifted from glplanet */
+/* Function for determining points on the surface of the sphere */
+static void
+parametric_sphere (float theta, float rho, GLfloat *vector)
+{
+  vector[0] = -sin(theta) * sin(rho);
+  vector[1] = cos(theta) * sin(rho);
+  vector[2] = cos(rho);
+}
+
+/* lifted from glplanet */
+static void
+unit_sphere (Bool wire)
+{
+  int stacks = SPHERE_STACKS;
+  int slices = SPHERE_SLICES;
+
+  int i, j;
+  float drho, dtheta;
+  float rho, theta;
+  GLfloat vector[3];
+  GLfloat ds, dt, t, s;
+
+  if (!wire)
+    glShadeModel(GL_SMOOTH);
+
+  /* Generate a sphere with quadrilaterals.
+   * Quad vertices are determined using a parametric sphere function.
+   * For fun, you could generate practically any parameteric surface and
+   * map an image onto it. 
+   */
+  drho = M_PI / stacks;
+  dtheta = 2.0 * M_PI / slices;
+  ds = 1.0 / slices;
+  dt = 1.0 / stacks;
+
+  glFrontFace(GL_CCW);
+  glBegin( wire ? GL_LINE_LOOP : GL_QUADS );
+
+  t = 0.0;
+  for (i=0; i < stacks; i++) {
+    rho = i * drho;
+    s = 0.0;
+    for (j=0; j < slices; j++) {
+      theta = j * dtheta;
+
+      glTexCoord2f (s,t);
+      parametric_sphere (theta, rho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta, rho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      glTexCoord2f (s,t+dt);
+      parametric_sphere (theta, rho+drho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta, rho+drho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      glTexCoord2f (s+ds,t+dt);
+      parametric_sphere (theta + dtheta, rho+drho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta + dtheta, rho+drho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      glTexCoord2f (s+ds, t);
+      parametric_sphere (theta + dtheta, rho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta + dtheta, rho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      s = s + ds;
+    }
+    t = t + dt;
+  }
+  glEnd();
+}
+
+
+
+/* Window management, etc
+ */
+void
+reshape_ball (ModeInfo *mi, int width, int height)
+{
+  GLfloat h = (GLfloat) height / (GLfloat) width;
+
+  glViewport (0, 0, (GLint) width, (GLint) height);
+
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+
+  gluPerspective( 30.0, 1/h, 1.0, 100.0 );
+  gluLookAt( 0.0, 0.0, 15.0,
+             0.0, 0.0, 0.0,
+             0.0, 1.0, 0.0);
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  glTranslatef(0.0, 0.0, -15.0);
+
+  glClear(GL_COLOR_BUFFER_BIT);
+}
+
+
+static void
+gl_init (ModeInfo *mi)
+{
+/*  ball_configuration *bp = &bps[MI_SCREEN(mi)]; */
+  int wire = MI_IS_WIREFRAME(mi);
+
+  static GLfloat pos[4] = {5.0, 5.0, 10.0, 1.0};
+
+  if (!wire)
+    {
+      glLightfv(GL_LIGHT0, GL_POSITION, pos);
+      glEnable(GL_CULL_FACE);
+      glEnable(GL_LIGHTING);
+      glEnable(GL_LIGHT0);
+      glEnable(GL_DEPTH_TEST);
+    }
+}
+
+
+/* lifted from lament.c */
+#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
+#define RANDSIGN() ((random() & 1) ? 1 : -1)
+
+static void
+rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
+{
+  double ppos = *pos;
+
+  /* tick position */
+  if (ppos < 0)
+    ppos = -(ppos + *v);
+  else
+    ppos += *v;
+
+  if (ppos > 1.0)
+    ppos -= 1.0;
+  else if (ppos < 0)
+    ppos += 1.0;
+
+  if (ppos < 0) abort();
+  if (ppos > 1.0) abort();
+  *pos = (*pos > 0 ? ppos : -ppos);
+
+  /* accelerate */
+  *v += *dv;
+
+  /* clamp velocity */
+  if (*v > max_v || *v < -max_v)
+    {
+      *dv = -*dv;
+    }
+  /* If it stops, start it going in the other direction. */
+  else if (*v < 0)
+    {
+      if (random() % 4)
+       {
+         *v = 0;
+
+         /* keep going in the same direction */
+         if (random() % 2)
+           *dv = 0;
+         else if (*dv < 0)
+           *dv = -*dv;
+       }
+      else
+       {
+         /* reverse gears */
+         *v = -*v;
+         *dv = -*dv;
+         *pos = -*pos;
+       }
+    }
+
+  /* Alter direction of rotational acceleration randomly. */
+  if (! (random() % 120))
+    *dv = -*dv;
+
+  /* Change acceleration very occasionally. */
+  if (! (random() % 200))
+    {
+      if (*dv == 0)
+       *dv = 0.00001;
+      else if (random() & 1)
+       *dv *= 1.2;
+      else
+       *dv *= 0.8;
+    }
+}
+
+
+static void
+randomize_spikes (ModeInfo *mi)
+{
+  ball_configuration *bp = &bps[MI_SCREEN(mi)];
+  int i;
+  bp->pos = 0;
+  for (i = 0; i < MI_COUNT(mi); i++)
+    {
+      bp->spikes[i*2]   = (random() % 360) - 180;
+      bp->spikes[i*2+1] = (random() % 180) - 90;
+    }
+
+# define ROT_SCALE 22
+  for (i = 0; i < MI_COUNT(mi) * 2; i++)
+    bp->spikes[i] = (bp->spikes[i] / ROT_SCALE) * ROT_SCALE;
+
+  if ((random() % 3) == 0)
+    bp->color_shift = random() % (bp->ncolors / 2);
+  else
+    bp->color_shift = 0;
+}
+
+static void
+draw_spikes (ModeInfo *mi)
+{
+  ball_configuration *bp = &bps[MI_SCREEN(mi)];
+  GLfloat diam = 0.2;
+  GLfloat pos = bp->pos;
+  int i;
+
+  if (pos < 0) pos = -pos;
+
+  pos = (asin (0.5 + pos/2) - 0.5) * 2;
+
+  for (i = 0; i < MI_COUNT(mi); i++)
+    {
+      glPushMatrix();
+      glRotatef(bp->spikes[i*2],   0, 1, 0);
+      glRotatef(bp->spikes[i*2+1], 0, 0, 1);
+      glTranslatef(0.7, 0, 0);
+      glRotatef(-90, 0, 0, 1);
+      glScalef (diam, pos, diam);
+      glCallList (bp->spike_list);
+      glPopMatrix();
+    }
+}
+
+
+static void
+move_spikes (ModeInfo *mi)
+{
+  ball_configuration *bp = &bps[MI_SCREEN(mi)];
+
+  if (bp->pos >= 0)            /* moving outward */
+    {
+      bp->pos += speed;
+      if (bp->pos >= 1)                /*  reverse gears at apex */
+        bp->pos = -1;
+    }
+  else                         /* moving inward */
+    {
+      bp->pos += speed;
+      if (bp->pos >= 0)                /*  stop at end */
+        randomize_spikes (mi);
+    }
+}
+
+
+void 
+init_ball (ModeInfo *mi)
+{
+  ball_configuration *bp;
+  int wire = MI_IS_WIREFRAME(mi);
+
+  if (!bps) {
+    bps = (ball_configuration *)
+      calloc (MI_NUM_SCREENS(mi), sizeof (ball_configuration));
+    if (!bps) {
+      fprintf(stderr, "%s: out of memory\n", progname);
+      exit(1);
+    }
+
+    bp = &bps[MI_SCREEN(mi)];
+  }
+
+  bp = &bps[MI_SCREEN(mi)];
+
+  if ((bp->glx_context = init_GL(mi)) != NULL) {
+    gl_init(mi);
+    reshape_ball (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+  }
+
+  bp->rotx = frand(1.0) * RANDSIGN();
+  bp->roty = frand(1.0) * RANDSIGN();
+  bp->rotz = frand(1.0) * RANDSIGN();
+
+  /* bell curve from 0-6 degrees, avg 3 */
+  bp->dx = (frand(2) + frand(2) + frand(2)) / (360/2);
+  bp->dy = (frand(2) + frand(2) + frand(2)) / (360/2);
+  bp->dz = (frand(2) + frand(2) + frand(2)) / (360/2);
+
+  bp->d_max = bp->dx * 2;
+
+  bp->ddx = 0.00006 + frand(0.00003);
+  bp->ddy = 0.00006 + frand(0.00003);
+  bp->ddz = 0.00006 + frand(0.00003);
+
+  bp->ncolors = 128;
+  bp->colors = (XColor *) calloc(bp->ncolors, sizeof(XColor));
+  make_smooth_colormap (0, 0, 0,
+                        bp->colors, &bp->ncolors,
+                        False, 0, False);
+
+  bp->spikes = (int *) calloc(MI_COUNT(mi), sizeof(*bp->spikes) * 2);
+
+  bp->ball_list = glGenLists (1);
+  bp->spike_list = glGenLists (1);
+
+  glNewList (bp->ball_list, GL_COMPILE);
+  unit_sphere (wire);
+  glEndList ();
+
+  glNewList (bp->spike_list, GL_COMPILE);
+  unit_spike (wire);
+  glEndList ();
+
+  randomize_spikes (mi);
+}
+
+
+void
+draw_ball (ModeInfo *mi)
+{
+  ball_configuration *bp = &bps[MI_SCREEN(mi)];
+  Display *dpy = MI_DISPLAY(mi);
+  Window window = MI_WINDOW(mi);
+  int c2;
+
+  static GLfloat color1[4] = {0.0, 0.0, 0.0, 1.0};
+  static GLfloat color2[4] = {0.0, 0.0, 0.0, 1.0};
+
+  if (!bp->glx_context)
+    return;
+
+  glShadeModel(GL_SMOOTH);
+
+  glEnable(GL_DEPTH_TEST);
+  glEnable(GL_NORMALIZE);
+  glEnable(GL_CULL_FACE);
+
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+  glPushMatrix ();
+
+  glScalef(1.1, 1.1, 1.1);
+
+  {
+    GLfloat x, y, z;
+
+    if (do_wander)
+      {
+        static int frame = 0;
+
+#       define SINOID(SCALE,SIZE) \
+        ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
+
+        x = SINOID(0.051, 8.0);
+        y = SINOID(0.037, 8.0);
+        z = SINOID(0.131, 13.0);
+        frame++;
+        glTranslatef(x, y, z);
+      }
+
+    if (do_spin)
+      {
+        x = bp->rotx;
+        y = bp->roty;
+        z = bp->rotz;
+        if (x < 0) x = 1 - (x + 1);
+        if (y < 0) y = 1 - (y + 1);
+        if (z < 0) z = 1 - (z + 1);
+
+        glRotatef(x * 360, 1.0, 0.0, 0.0);
+        glRotatef(y * 360, 0.0, 1.0, 0.0);
+        glRotatef(z * 360, 0.0, 0.0, 1.0);
+
+        rotate(&bp->rotx, &bp->dx, &bp->ddx, bp->d_max);
+        rotate(&bp->roty, &bp->dy, &bp->ddy, bp->d_max);
+        rotate(&bp->rotz, &bp->dz, &bp->ddz, bp->d_max);
+      }
+  }
+
+  color1[0] = bp->colors[bp->ccolor].red   / 65536.0;
+  color1[1] = bp->colors[bp->ccolor].green / 65536.0;
+  color1[2] = bp->colors[bp->ccolor].blue  / 65536.0;
+
+  c2 = (bp->ccolor + bp->color_shift) % bp->ncolors;
+  color2[0] = bp->colors[c2].red   / 65536.0;
+  color2[1] = bp->colors[c2].green / 65536.0;
+  color2[2] = bp->colors[c2].blue  / 65536.0;
+
+  bp->ccolor++;
+  if (bp->ccolor >= bp->ncolors) bp->ccolor = 0;
+
+  glScalef (2.0, 2.0, 2.0);
+
+  move_spikes (mi);
+
+  glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color1);
+  glCallList (bp->ball_list);
+
+  glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color2);
+  draw_spikes (mi);
+  glPopMatrix ();
+
+  if (mi->fps_p) do_fps (mi);
+  glFinish();
+
+  glXSwapBuffers(dpy, window);
+}
+
+#endif /* USE_GL */
index f97232bf4c624df34332a53ef32e3aa6a21a3890..954acd1752b690e367a238638dd24636182627a2 100644 (file)
@@ -88,6 +88,15 @@ ModStruct   gears_description =
 
 #endif
 
+#define SMOOTH_TUBE       /* whether to have smooth or faceted tubes */
+
+#ifdef SMOOTH_TUBE
+# define TUBE_FACES  20   /* how densely to render tubes */
+#else
+# define TUBE_FACES  6
+#endif
+
+
 typedef struct {
 
   GLfloat rotx, roty, rotz;       /* current object rotation */
@@ -336,80 +345,113 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
 }
 
 
-
 static void
-tube(GLfloat radius, GLfloat width, GLint facets, Bool wire)
+unit_tube (Bool wire)
 {
-  GLint i;
-  GLfloat da = 2.0 * M_PI / facets / 4.0;
-
+  int i;
+  int faces = TUBE_FACES;
+  GLfloat step = M_PI * 2 / faces;
+  GLfloat th;
+  int z = 0;
+
+  /* side walls
+   */
   glFrontFace(GL_CCW);
 
-  /* draw bottom of tube */
+# ifdef SMOOTH_TUBE
+  glBegin(wire ? GL_LINES : GL_QUAD_STRIP);
+# else
+  glBegin(wire ? GL_LINES : GL_QUADS);
+# endif
 
-  glShadeModel(GL_FLAT);
-  glNormal3f(0, 0, 1);
-  if (!wire)
+  for (i = 0, th = 0; i <= faces; i++)
     {
-      glBegin(GL_TRIANGLE_FAN);
-      glVertex3f(0, 0, width * 0.5);
-      for (i = 0; i <= facets; i++) {
-        GLfloat angle = i * 2.0 * M_PI / facets;
-        glVertex3f(radius * cos(angle), radius * sin(angle), width * 0.5);
-      }
-      glEnd();
+      GLfloat x = cos (th);
+      GLfloat y = sin (th);
+      glNormal3f(x, 0, y);
+      glVertex3f(x, 0.0, y);
+      glVertex3f(x, 1.0, y);
+      th += step;
+
+# ifndef SMOOTH_TUBE
+      x = cos (th);
+      y = sin (th);
+      glVertex3f(x, 1.0, y);
+      glVertex3f(x, 0.0, y);
+# endif
     }
+  glEnd();
 
-  /* draw top of tube */
-
-  glShadeModel(GL_FLAT);
-  glNormal3f(0, 0, -1);
-  glFrontFace(GL_CW);
-  if (!wire)
+  /* End caps
+   */
+  for (z = 0; z <= 1; z++)
     {
-      glBegin(GL_TRIANGLE_FAN);
-      glVertex3f(0, 0, -width * 0.5);
-      for (i = 0; i <= facets; i++) {
-        GLfloat angle = i * 2.0 * M_PI / facets;
-        glVertex3f(radius * cos(angle), radius * sin(angle), -width * 0.5);
-      }
+      glFrontFace(z == 0 ? GL_CCW : GL_CW);
+      glNormal3f(0, (z == 0 ? -1 : 1), 0);
+      glBegin(wire ? GL_LINE_LOOP : GL_TRIANGLE_FAN);
+      if (! wire) glVertex3f(0, z, 0);
+      for (i = 0, th = 0; i <= faces; i++)
+        {
+          GLfloat x = cos (th);
+          GLfloat y = sin (th);
+          glVertex3f(x, z, y);
+          th += step;
+        }
       glEnd();
     }
+}
 
-  /* draw side of tube */
-  glFrontFace(GL_CW);
-  glShadeModel(GL_SMOOTH);
 
-  if (!wire)
-    glBegin(GL_QUAD_STRIP);
+static void
+tube (GLfloat x1, GLfloat y1, GLfloat z1,
+      GLfloat x2, GLfloat y2, GLfloat z2,
+      GLfloat diameter, GLfloat cap_size,
+      Bool wire)
+{
+  GLfloat length, angle, a, b, c;
 
-  for (i = 0; i <= facets; i++) {
-    GLfloat angle = i * 2.0 * M_PI / facets;
-    
-    if (wire)
-      glBegin(GL_LINES);
+  if (diameter <= 0) abort();
 
-    glNormal3f(cos(angle), sin(angle), 0.0);
+  a = (x2 - x1);
+  b = (y2 - y1);
+  c = (z2 - z1);
 
-    glVertex3f(radius * cos(angle), radius * sin(angle), -width * 0.5);
-    glVertex3f(radius * cos(angle), radius * sin(angle), width * 0.5);
+  length = sqrt (a*a + b*b + c*c);
+  angle = acos (a / length);
 
-    if (wire) {
-      glVertex3f(radius * cos(angle), radius * sin(angle), -width * 0.5);
-      glVertex3f(radius * cos(angle + 4 * da), radius * sin(angle + 4 * da), -width * 0.5);
-      glVertex3f(radius * cos(angle), radius * sin(angle), width * 0.5);
-      glVertex3f(radius * cos(angle + 4 * da), radius * sin(angle + 4 * da), width * 0.5);
-      glEnd();
-    }
-  }
+  glPushMatrix();
+  glTranslatef(x1, y1, z1);
+  glScalef (length, length, length);
 
-  if (!wire)
-    glEnd();
+  if (c == 0 && b == 0)
+    glRotatef (angle / (M_PI / 180), 0, 1, 0);
+  else
+    glRotatef (angle / (M_PI / 180), 0, -c, b);
 
-  glFrontFace(GL_CCW);
+  glRotatef (-90, 0, 0, 1);
+  glScalef (diameter/length, 1, diameter/length);
+
+  /* extend the endpoints of the tube by the cap size in both directions */
+  if (cap_size != 0)
+    {
+      GLfloat c = cap_size/length;
+      glTranslatef (0, -c, 0);
+      glScalef (1, 1+c+c, 1);
+    }
+
+  unit_tube (wire);
+  glPopMatrix();
 }
 
 
+static void
+ctube (GLfloat diameter, GLfloat width, Bool wire)
+{
+  tube (0, 0,  width/2,
+        0, 0, -width/2,
+        diameter, 0, wire);
+}
+
 static void
 arm(GLfloat length,
     GLfloat width1, GLfloat height1,
@@ -785,21 +827,22 @@ pinit(ModeInfo * mi)
       glPushMatrix();
       glTranslatef(7.0, 0, 0);
       glRotatef(90, 0, 1, 0);
-      tube(0.5, 0.5, 10, wire);   /* nub 1 */
+
+      ctube(0.5, 0.5, wire);   /* nub 1 */
       glPopMatrix();
 
       glPushMatrix();
       glRotatef(120, 0, 0, 1);
       glTranslatef(7.0, 0, 0);
       glRotatef(90, 0, 1, 0);
-      tube(0.5, 0.5, 10, wire);   /* nub 2 */
+      ctube(0.5, 0.5, wire);   /* nub 2 */
       glPopMatrix();
 
       glPushMatrix();
       glRotatef(240, 0, 0, 1);
       glTranslatef(7.0, 0, 0);
       glRotatef(90, 0, 1, 0);
-      tube(0.5, 0.5, 10, wire);   /* nub 3 */
+      ctube(0.5, 0.5, wire);   /* nub 3 */
       glPopMatrix();
 
 
@@ -822,34 +865,33 @@ pinit(ModeInfo * mi)
       }
 
       glTranslatef(0, 0, 1.5);
-
-      tube(0.5, 10, 15, wire);       /* center axle */
+      ctube(0.5, 10, wire);       /* center axle */
 
       glPushMatrix();
       glTranslatef(0.0, 4.2, -1);
-      tube(0.5, 3, 15, wire);       /* axle 1 */
+      ctube(0.5, 3, wire);       /* axle 1 */
       glTranslatef(0, 0, 1.8);
-      tube(0.7, 0.7, 15, wire);
+      ctube(0.7, 0.7, wire);
       glPopMatrix();
 
       glPushMatrix();
       glRotatef(120, 0.0, 0.0, 1.0);
       glTranslatef(0.0, 4.2, -1);
-      tube(0.5, 3, 15, wire);       /* axle 2 */
+      ctube(0.5, 3, wire);       /* axle 2 */
       glTranslatef(0, 0, 1.8);
-      tube(0.7, 0.7, 15, wire);
+      ctube(0.7, 0.7, wire);
       glPopMatrix();
 
       glPushMatrix();
       glRotatef(240, 0.0, 0.0, 1.0);
       glTranslatef(0.0, 4.2, -1);
-      tube(0.5, 3, 15, wire);       /* axle 3 */
+      ctube(0.5, 3, wire);       /* axle 3 */
       glTranslatef(0, 0, 1.8);
-      tube(0.7, 0.7, 15, wire);
+      ctube(0.7, 0.7, wire);
       glPopMatrix();
 
       glTranslatef(0, 0, 1.5);      /* center disk */
-      tube(1.5, 2, 20, wire);
+      ctube(1.5, 2, wire);
 
       glPushMatrix();
       glRotatef(270, 0, 0, 1);
@@ -983,10 +1025,6 @@ init_gears(ModeInfo * mi)
     gp->ddy = 0.00006 + frand(0.00003);
     gp->ddz = 0.00006 + frand(0.00003);
 
-    gp->ddx = 0.00001;
-    gp->ddy = 0.00001;
-    gp->ddz = 0.00001;
-
        if ((gp->glx_context = init_GL(mi)) != NULL) {
                reshape_gears(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                pinit(mi);
index 23fce87c78301571bcdde8ecfbd8311e377ffeca..c1245f0ba62fd9410c2d1321f7e77d5a3b377ba1 100644 (file)
@@ -1,5 +1,4 @@
 /* -*- Mode: C; tab-width: 4 -*- emacs friendly */
-
 /* gflux - creates a fluctuating 3D grid 
  * requires OpenGL or MesaGL
  * 
@@ -34,6 +33,8 @@
  * 04 July 2000 : majour bug hunt, xscreensaver code rewritten
  * 08 July 2000 : texture mapping, rotation and zoom added
  * 21 July 2000 : cleaned up code from bug hunts, manpage written
+ * 24 November 2000 : fixed x co-ord calculation in solid - textured
+ * 05 March 2001 : put back non pnmlib code with #ifdefs
  */
 
 
@@ -55,7 +56,7 @@
                                                                                "*showFPS:      False   \n" \
                                         "*squares:      19      \n" \
                                                                                "*resolution:   0       \n" \
-                                        "*draw:         0       \n" \
+                                        "*draw:         2       \n" \
                                         "*flat:         0       \n" \
                                         "*speed:        0.05    \n" \
                                         "*rotationx:    0.01    \n" \
 # endif /* VMS */
 #endif
 
+#ifdef HAVE_PPM
+#include <ppm.h>
+#endif
+
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -141,7 +146,7 @@ static XrmOptionDescRec opts[] = {
 static argtype vars[] = {
     {(caddr_t *) & _squares, "squares", "Squares", "19", t_Int},
     {(caddr_t *) & _resolution, "resolution", "Resolution", "4", t_Int},
-    {(caddr_t *) & _draw, "draw", "Draw", "0", t_Int},
+    {(caddr_t *) & _draw, "draw", "Draw", "2", t_Int},
     {(caddr_t *) & _flat, "flat", "Flat", "0", t_Int},
     {(caddr_t *) & _speed, "speed", "Speed", "0.05", t_Float},
     {(caddr_t *) & _rotationx, "rotationx", "Rotationx", "0.01", t_Float},
@@ -196,8 +201,14 @@ typedef struct {
     GLfloat colour[3];
     int imageWidth;
     int imageHeight;
-    GLubyte *image;
-    GLuint texName;
+#ifdef HAVE_PPM
+       pixval imageMax;
+    pixel **image;
+#else
+       int imageMax;
+       GLubyte *image;
+#endif
+    GLint texName;
     void (*drawFunc)(void);
 } gfluxstruct;
 static gfluxstruct *gflux = NULL;
@@ -340,7 +351,51 @@ void release_gflux(ModeInfo * mi)
     FreeAllGL(mi);
 }
 
-/* loads several different types of PNM image from stdin */
+#ifdef HAVE_PPM
+
+/* load pnm from stdin using pnm libs */
+void loadTexture(void)
+{
+    FILE *file = stdin;
+       gflux->image = ppm_readppm( file, 
+                       &(gflux->imageHeight), &(gflux->imageWidth), &(gflux->imageMax) );
+}
+
+/* creates an image for texture mapping */
+void createTexture(void)
+{
+    int i,j,c;
+    pixel **result;
+
+       gflux->imageHeight = gflux->imageWidth = 8;
+
+       result = ppm_allocarray(gflux->imageHeight,gflux->imageWidth);
+    for(i=0;i<gflux->imageHeight;i++) {
+        for(j=0;j<gflux->imageWidth;j++) {
+            c = (((i)%2 ^ (j)%2) ? 100 : 200 );
+                       PPM_ASSIGN( result[i][j] , c, c, c );
+        }
+    }
+       gflux->image = result;
+}
+
+/* specifies image as texture */    
+void initTexture(void)
+{
+       glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+       glGenTextures(1, &gflux->texName);
+       glBindTexture(GL_TEXTURE_2D, gflux->texName);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+       glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, gflux->imageWidth,
+                       gflux->imageHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, *(gflux->image));
+       
+}
+
+#else /* HAVE_PPM FALSE */
+
 #define presult(A,B,C) (*(result+(A)*(gflux->imageWidth)*4+(B)*4+(C)))
 void loadTexture(void)
 {
@@ -369,7 +424,7 @@ void loadTexture(void)
 
     result = malloc(sizeof(GLubyte)*4*width*height);
     gflux->imageWidth = width;
-       gflux->imageHeight = height;
+    gflux->imageHeight = height;
 
     switch(ppmType) {
         case 2 :    /* ASCII grey */
@@ -385,7 +440,7 @@ void loadTexture(void)
         case 3 :    /* ASCII rgb */
             for(i=0;i<height;i++) {
                 for(j=0;j<width;j++) {
-                    fscanf(file,"%d %d %d",&red,&green,&blue);
+                   fscanf(file,"%d %d %d",&red,&green,&blue);
                     presult(j,i,0) = red;
                     presult(j,i,1) = green;
                     presult(j,i,2) = blue;
@@ -417,18 +472,17 @@ void loadTexture(void)
             }
         break;
     }
-       gflux->image = result;
+    gflux->image = result;
 }
 
-/* creates an image for texture mapping */
 void createTexture(void)
 {
     int i,j,c;
     GLubyte *result;
 
-       gflux->imageHeight = gflux->imageWidth = 8;
+    gflux->imageHeight = gflux->imageWidth = 8;
 
-       result = malloc(sizeof(GLubyte)*4*gflux->imageHeight*gflux->imageWidth);
+    result = malloc(sizeof(GLubyte)*4*gflux->imageHeight*gflux->imageWidth);
     for(i=0;i<gflux->imageHeight;i++) {
         for(j=0;j<gflux->imageWidth;j++) {
             c = (((i)%2 ^ (j)%2) ? 100 : 200 );
@@ -438,26 +492,27 @@ void createTexture(void)
             presult(i,j,3) = (GLubyte) 255;
         }
     }
-       gflux->image = result;
+    gflux->image = result;
 }
-#undef presult
 
-/* specifies image as texture */    
+/* specifies image as texture */
 void initTexture(void)
 {
-       glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-       glGenTextures(1, &gflux->texName);
-       glBindTexture(GL_TEXTURE_2D, gflux->texName);
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-    clear_gl_error();
-       glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, gflux->imageWidth,
-                       gflux->imageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, gflux->image);
-    check_gl_error("texture");
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glGenTextures(1, &gflux->texName);
+    glBindTexture(GL_TEXTURE_2D, gflux->texName);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, gflux->imageWidth,
+            gflux->imageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, gflux->image);
+
 }
 
+#undef presult
+#endif
+
 void initLighting(void)
 {
     static float ambientA[] = {0.0, 0.0, 0.0, 1.0};
@@ -506,6 +561,9 @@ void displayTexture(void)
     double dx = 2.0/((double)_squares);
     double dy = 2.0/((double)_squares);
 
+    double du = 2.0/((double)_squares);
+    double dv = 2.0/((double)_squares);
+
        glMatrixMode (GL_TEXTURE);
        glLoadIdentity ();
        glTranslatef(-1,-1,0);
@@ -522,10 +580,10 @@ void displayTexture(void)
        glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
        glBindTexture(GL_TEXTURE_2D, gflux->texName);
        glColor3f(0.5,0.5,0.5);
-
-    for(x=-1,u=0;x<=1;x+=dx,u+=dx) {
+    for(x=-1,u= 0;x<0.9999;x+=dx,u+=du) {
         glBegin(GL_QUAD_STRIP);
-        for(y=-1,v=0;y<=1;y+=dy,v+=dx) {
+        for(y=-1,v= 0;y<=1;y+=dy,v+=dv) {
             z = getGrid(x,y,time);
         /*  genColour(z);
             glColor3fv(gflux->colour);
@@ -540,7 +598,7 @@ void displayTexture(void)
             z = getGrid(x+dx,y,time);
         /*  genColour(z);
             glColor3fv(gflux->colour);
-        */  glTexCoord2f(u+dx,v);
+        */  glTexCoord2f(u+du,v);
             glNormal3f(
                 getGrid(x+dx+dx,y,time)-getGrid(x,y,time),
                 getGrid(x+dx,y+dy,time)-getGrid(x+dx,y-dy,time),
@@ -575,7 +633,7 @@ void displaySolid(void)
     glScalef(1,1,(GLfloat)_waveHeight);
     glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 
-    for(x=-1;x<=1;x+=dx) {
+    for(x=-1;x<0.9999;x+=dx) {
         glBegin(GL_QUAD_STRIP);
         for(y=-1;y<=1;y+=dy) {
             z = getGrid(x,y,time);
@@ -617,7 +675,7 @@ void displayLight(void)
     glScalef(1,1,(GLfloat)_waveHeight);
     glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 
-    for(x=-1;x<=1;x+=dx) {
+    for(x=-1;x<0.9999;x+=dx) {
         glBegin(GL_QUAD_STRIP);
         for(y=-1;y<=1;y+=dy) {
             z = getGrid(x,y,time);
index 07608ee4b7729dbaa2b70cae7ad8f44ad9bcb62e..03110fe882d7f6c2952d3e126ccb68c05c453d37 100644 (file)
@@ -20,17 +20,32 @@ extern XtAppContext app;
 #define sws_opts       xlockmore_opts
 
 #define DEF_TEXT        "(default)"
+#define DEF_SPIN        "XYZ"
+#define DEF_WANDER      "True"
+
+#define DEFAULTS       "*delay:        10000       \n" \
+                       "*showFPS:      False       \n" \
+                       "*wireframe:    False       \n" \
+                       "*spin:       " DEF_SPIN   "\n" \
+                       "*wander:     " DEF_WANDER "\n" \
+                       "*text:       " DEF_TEXT   "\n"
+
+
+#define SMOOTH_TUBE       /* whether to have smooth or faceted tubes */
+
+#ifdef SMOOTH_TUBE
+# define TUBE_FACES  12   /* how densely to render tubes */
+#else
+# define TUBE_FACES  8
+#endif
 
-#define DEFAULTS       "*delay:        10000     \n" \
-                       "*showFPS:      False     \n" \
-                       "*wireframe:    False     \n" \
-                       "*text:       " DEF_TEXT "\n"
 
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
 #include "xlockmore.h"
 #include "colors.h"
+#include <ctype.h>
 
 #ifdef USE_GL /* whole file */
 
@@ -59,18 +74,29 @@ typedef struct {
   XColor *colors;
   int ccolor;
 
+  Bool spin_x, spin_y, spin_z;
+  char *text;
+
 } text_configuration;
 
 static text_configuration *tps = NULL;
 
-static char *text;
+static char *text_fmt;
+static char *do_spin;
+static Bool do_wander;
 
 static XrmOptionDescRec opts[] = {
-  { "-text",   ".text",   XrmoptionSepArg, 0 }
+  { "-text",   ".text",   XrmoptionSepArg, 0 },
+  { "-spin",   ".spin",   XrmoptionSepArg, 0 },
+  { "+spin",   ".spin",   XrmoptionNoArg, "" },
+  { "-wander", ".wander", XrmoptionNoArg, "True" },
+  { "+wander", ".wander", XrmoptionNoArg, "False" }
 };
 
 static argtype vars[] = {
-  {(caddr_t *) &text, "text", "Text", DEF_TEXT, t_String},
+  {(caddr_t *) &text_fmt,  "text",   "Text",   DEF_TEXT,   t_String},
+  {(caddr_t *) &do_spin,   "spin",   "Spin",   DEF_SPIN,   t_String},
+  {(caddr_t *) &do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
 };
 
 ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -194,6 +220,65 @@ rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
 }
 
 
+static void
+parse_text (ModeInfo *mi)
+{
+  text_configuration *tp = &tps[MI_SCREEN(mi)];
+
+  if (tp->text) free (tp->text);
+
+  if (!text_fmt || !*text_fmt || !strcmp(text_fmt, "(default)"))
+    {
+# ifdef HAVE_UNAME
+      struct utsname uts;
+
+      if (uname (&uts) < 0)
+        {
+          tp->text = strdup("uname() failed");
+        }
+      else
+        {
+          char *s;
+          if ((s = strchr(uts.nodename, '.')))
+            *s = 0;
+          tp->text = (char *) malloc(strlen(uts.nodename) +
+                                     strlen(uts.sysname) +
+                                     strlen(uts.version) +
+                                     strlen(uts.release) + 10);
+#  ifdef _AIX
+          sprintf(tp->text, "%s\n%s %s.%s",
+                  uts.nodename, uts.sysname, uts.version, uts.release);
+#  else  /* !_AIX */
+          sprintf(tp->text, "%s\n%s %s",
+                  uts.nodename, uts.sysname, uts.release);
+#  endif /* !_AIX */
+        }
+# else /* !HAVE_UNAME */
+#  ifdef VMS
+      tp->text = strdup(getenv("SYS$NODE"));
+#  else
+      tp->text = strdup("*  *\n*  *  *\nxscreensaver\n*  *  *\n*  *");
+#  endif
+# endif        /* !HAVE_UNAME */
+    }
+  else if (!strchr (text_fmt, '%'))
+    {
+      tp->text = strdup (text_fmt);
+    }
+  else
+    {
+      time_t now = time ((time_t *) 0);
+      struct tm *tm = localtime (&now);
+      int L = strlen(text_fmt) + 100;
+      tp->text = (char *) malloc (L);
+      *tp->text = 0;
+      strftime (tp->text, L-1, text_fmt, tm);
+      if (!*tp->text)
+        sprintf (tp->text, "strftime error:\n%s", text_fmt);
+    }
+}
+
+
 void 
 init_text (ModeInfo *mi)
 {
@@ -232,51 +317,33 @@ init_text (ModeInfo *mi)
   tp->ddy = 0.00006 + frand(0.00003);
   tp->ddz = 0.00006 + frand(0.00003);
 
-  tp->ddx = 0.00001;
-  tp->ddy = 0.00001;
-  tp->ddz = 0.00001;
-
-  if (!text || !*text || !strcmp(text, "(default)"))
-    {
-# ifdef HAVE_UNAME
-      struct utsname uts;
-
-      if (uname (&uts) < 0)
-        {
-          text = strdup("uname() failed");
-        }
-      else
-        {
-          char *s;
-          if ((s = strchr(uts.nodename, '.')))
-            *s = 0;
-          text = (char *) malloc(strlen(uts.nodename) +
-                                 strlen(uts.sysname) +
-                                 strlen(uts.version) +
-                                 strlen(uts.release) + 10);
-#  ifdef _AIX
-          sprintf(text, "%s\n%s %s.%s",
-                  uts.nodename, uts.sysname, uts.version, uts.release);
-#  else  /* !_AIX */
-          sprintf(text, "%s\n%s %s",
-                  uts.nodename, uts.sysname, uts.release);
-#  endif /* !_AIX */
-        }
-# else /* !HAVE_UNAME */
-#  ifdef VMS
-      text = strdup(getenv("SYS$NODE"));
-#  else
-      text = strdup("*  *\n*  *  *\nxscreensaver\n*  *  *\n*  *");
-#  endif
-# endif        /* !HAVE_UNAME */
-    }
-
 
   tp->ncolors = 255;
   tp->colors = (XColor *) calloc(tp->ncolors, sizeof(XColor));
   make_smooth_colormap (0, 0, 0,
                         tp->colors, &tp->ncolors,
                         False, 0, False);
+
+  parse_text (mi);
+
+  {
+    char *s = do_spin;
+    while (*s)
+      {
+        if      (*s == 'x' || *s == 'X') tp->spin_x = 1;
+        else if (*s == 'y' || *s == 'Y') tp->spin_y = 1;
+        else if (*s == 'z' || *s == 'Z') tp->spin_z = 1;
+        else
+          {
+            fprintf (stderr,
+         "%s: spin must contain only the characters X, Y, or Z (not \"%s\")\n",
+                     progname, do_spin);
+            exit (1);
+          }
+        s++;
+      }
+  }
+
 }
 
 
@@ -284,89 +351,98 @@ static void
 unit_tube (Bool wire)
 {
   int i;
-  GLfloat d3 = 0.2075;
-
-  glPushMatrix();
-
-  if (!wire)
-    glShadeModel(GL_SMOOTH);
+  int faces = TUBE_FACES;
+  GLfloat step = M_PI * 2 / faces;
+  GLfloat th;
+  int z = 0;
 
+  /* side walls
+   */
   glFrontFace(GL_CCW);
 
-  for (i = 0; i < 8; i++)
+# ifdef SMOOTH_TUBE
+  glBegin(wire ? GL_LINES : GL_QUAD_STRIP);
+# else
+  glBegin(wire ? GL_LINES : GL_QUADS);
+# endif
+
+  for (i = 0, th = 0; i <= faces; i++)
     {
-      glNormal3f(1, 0, 0);
-      glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
-      glVertex3f(0.5, 0.0, -d3); glVertex3f(0.5, 1.0, -d3);
-      glVertex3f(0.5, 1.0,  d3); glVertex3f(0.5, 0.0,  d3);
-      glEnd();
-      glRotatef(45, 0, 1, 0);
+      GLfloat x = cos (th);
+      GLfloat y = sin (th);
+      glNormal3f(x, 0, y);
+      glVertex3f(x, 0.0, y);
+      glVertex3f(x, 1.0, y);
+      th += step;
+
+# ifndef SMOOTH_TUBE
+      x = cos (th);
+      y = sin (th);
+      glVertex3f(x, 1.0, y);
+      glVertex3f(x, 0.0, y);
+# endif
     }
+  glEnd();
 
-  if (! wire)
+  /* End caps
+   */
+  for (z = 0; z <= 1; z++)
     {
-      glNormal3f(0, -1, 0);
-      glBegin(GL_TRIANGLE_FAN);
-      glVertex3f(0, 0, 0);
-      glVertex3f(-d3,  0, -0.5); glVertex3f( d3,  0, -0.5);
-      glVertex3f( 0.5, 0, -d3);  glVertex3f( 0.5, 0,  d3);
-      glVertex3f( d3,  0,  0.5); glVertex3f(-d3,  0,  0.5);
-      glVertex3f(-0.5, 0,  d3);  glVertex3f(-0.5, 0, -d3);
-      glVertex3f(-d3,  0, -0.5); glVertex3f( d3,  0, -0.5);
-
-      glEnd();
-
-      glTranslatef(0, 1, 0);
-
-      glNormal3f(0, 1, 0);
-      glBegin(GL_TRIANGLE_FAN);
-      glVertex3f(0, 0, 0);
-      glVertex3f(-0.5, 0, -d3);  glVertex3f(-0.5, 0,  d3); 
-      glVertex3f(-d3,  0,  0.5); glVertex3f( d3,  0,  0.5); 
-      glVertex3f( 0.5, 0,  d3);  glVertex3f( 0.5, 0, -d3); 
-      glVertex3f( d3,  0, -0.5); glVertex3f(-d3,  0, -0.5); 
-      glVertex3f(-0.5, 0, -d3);  glVertex3f(-0.5, 0,  d3); 
+      glFrontFace(z == 0 ? GL_CCW : GL_CW);
+      glNormal3f(0, (z == 0 ? -1 : 1), 0);
+      glBegin(wire ? GL_LINE_LOOP : GL_TRIANGLE_FAN);
+      if (! wire) glVertex3f(0, z, 0);
+      for (i = 0, th = 0; i <= faces; i++)
+        {
+          GLfloat x = cos (th);
+          GLfloat y = sin (th);
+          glVertex3f(x, z, y);
+          th += step;
+        }
       glEnd();
     }
-
-  glPopMatrix();
 }
 
 
 static void
-tube (GLfloat x1, GLfloat y1, 
-      GLfloat x2, GLfloat y2,
-      GLfloat z,
-      GLfloat diameter,
+tube (GLfloat x1, GLfloat y1, GLfloat z1,
+      GLfloat x2, GLfloat y2, GLfloat z2,
+      GLfloat diameter, GLfloat cap_size,
       Bool wire)
 {
-  GLfloat length, rot;
+  GLfloat length, angle, a, b, c;
 
-  if (y1 == y2) y2 += 0.01;  /* waah... */
+  if (diameter <= 0) abort();
 
-  length = sqrt(((x2-x1)*(x2-x1)) +
-                ((y2-y1)*(y2-y1)));
+  a = (x2 - x1);
+  b = (y2 - y1);
+  c = (z2 - z1);
 
-  rot = (acos((x2-x1)/length)
-         / (M_PI / 180));
+  length = sqrt (a*a + b*b + c*c);
+  angle = acos (a / length);
 
-  if (rot < 0 || rot > 180) abort();
-  if (y1 <= y2) rot = -rot;
+  glPushMatrix();
+  glTranslatef(x1, y1, z1);
+  glScalef (length, length, length);
 
-  rot = 180-rot;
+  if (c == 0 && b == 0)
+    glRotatef (angle / (M_PI / 180), 0, 1, 0);
+  else
+    glRotatef (angle / (M_PI / 180), 0, -c, b);
 
-  if (diameter < 0) abort();
-  if (length < 0) abort();
+  glRotatef (-90, 0, 0, 1);
+  glScalef (diameter/length, 1, diameter/length);
 
-  glPushMatrix();
+  /* extend the endpoints of the tube by the cap size in both directions */
+  if (cap_size != 0)
+    {
+      GLfloat c = cap_size/length;
+      glTranslatef (0, -c, 0);
+      glScalef (1, 1+c+c, 1);
+    }
 
-  glTranslatef(x1, y1, z);
-  glRotatef(rot+90, 0, 0, 1);
-  glTranslatef(0, -diameter/8, 0);
-  glScalef (diameter, length+diameter/4, diameter);
   unit_tube (wire);
   glPopMatrix();
-  
 }
 
 
@@ -374,7 +450,7 @@ tube (GLfloat x1, GLfloat y1,
 static int
 fill_character (GLUTstrokeFont font, int c, Bool wire)
 {
-  int tube_width = 20;
+  GLfloat tube_width = 10;
 
   const StrokeCharRec *ch;
   const StrokeRec *stroke;
@@ -396,7 +472,11 @@ fill_character (GLUTstrokeFont font, int c, Bool wire)
              j > 0; j--, coord++)
           {
             if (j != stroke->num_coords)
-              tube (lx, ly, coord->x, coord->y, 0, tube_width, wire);
+              tube (lx, ly, 0,
+                    coord->x, coord->y, 0,
+                    tube_width,
+                    tube_width * 0.15,
+                    wire);
             lx = coord->x;
             ly = coord->y;
           }
@@ -462,25 +542,34 @@ fill_string (const char *string, Bool wire)
       {
         int line_w = 0;
         const char *s2;
+        const char *lstart = start;
+        const char *lend = s;
 
-        for (s2 = start; s2 < s; s2++)
+        /* strip off whitespace at beginning and end of line
+           (since we're centering.) */
+        while (lend > lstart && isspace(lend[-1]))
+          lend--;
+        while (lstart < lend && isspace(*lstart))
+          lstart++;
+
+        for (s2 = lstart; s2 < lend; s2++)
           line_w += glutStrokeWidth (GLUT_FONT, *s2);
 
         x = (-ow/2) + ((ow-line_w)/2);
-        while (start < s)
+        for (s2 = lstart; s2 < lend; s2++)
           {
             glPushMatrix();
             glTranslatef(x, y, 0);
-            off = fill_character (GLUT_FONT, *start, wire);
+            off = fill_character (GLUT_FONT, *s2, wire);
             x += off;
             glPopMatrix();
-            start++;
           }
+
         start = s+1;
 
         y -= line_height;
-        s++;
         if (*s == 0) break;
+        s++;
       }
     else
       s++;
@@ -501,6 +590,15 @@ draw_text (ModeInfo *mi)
   if (!tp->glx_context)
     return;
 
+  if (strchr (text_fmt, '%'))
+    {
+      static time_t last_update = -1;
+      time_t now = time ((time_t *) 0);
+      if (now != last_update) /* do it once a second */
+        parse_text (mi);
+      last_update = now;
+    }
+
   glShadeModel(GL_SMOOTH);
 
   glEnable(GL_DEPTH_TEST);
@@ -514,31 +612,39 @@ draw_text (ModeInfo *mi)
   glScalef(1.1, 1.1, 1.1);
 
   {
-    static int frame = 0;
     GLfloat x, y, z;
 
-#   define SINOID(SCALE,SIZE) \
-      ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
-    x = SINOID(0.031, 9.0);
-    y = SINOID(0.023, 9.0);
-    z = SINOID(0.017, 9.0);
-    frame++;
-    glTranslatef(x, y, z);
-
-    x = tp->rotx;
-    y = tp->roty;
-    z = tp->rotz;
-    if (x < 0) x = 1 - (x + 1);
-    if (y < 0) y = 1 - (y + 1);
-    if (z < 0) z = 1 - (z + 1);
-
-    glRotatef(x * 360, 1.0, 0.0, 0.0);
-    glRotatef(y * 360, 0.0, 1.0, 0.0);
-    glRotatef(z * 360, 0.0, 0.0, 1.0);
-
-    rotate(&tp->rotx, &tp->dx, &tp->ddx, tp->d_max);
-    rotate(&tp->roty, &tp->dy, &tp->ddy, tp->d_max);
-    rotate(&tp->rotz, &tp->dz, &tp->ddz, tp->d_max);
+    if (do_wander)
+      {
+        static int frame = 0;
+
+#       define SINOID(SCALE,SIZE) \
+        ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
+
+        x = SINOID(0.031, 9.0);
+        y = SINOID(0.023, 9.0);
+        z = SINOID(0.017, 9.0);
+        frame++;
+        glTranslatef(x, y, z);
+      }
+
+    if (tp->spin_x || tp->spin_y || tp->spin_z)
+      {
+        x = tp->rotx;
+        y = tp->roty;
+        z = tp->rotz;
+        if (x < 0) x = 1 - (x + 1);
+        if (y < 0) y = 1 - (y + 1);
+        if (z < 0) z = 1 - (z + 1);
+
+        if (tp->spin_x) glRotatef(x * 360, 1.0, 0.0, 0.0);
+        if (tp->spin_y) glRotatef(y * 360, 0.0, 1.0, 0.0);
+        if (tp->spin_z) glRotatef(z * 360, 0.0, 0.0, 1.0);
+
+        rotate(&tp->rotx, &tp->dx, &tp->ddx, tp->d_max);
+        rotate(&tp->roty, &tp->dy, &tp->ddy, tp->d_max);
+        rotate(&tp->rotz, &tp->dz, &tp->ddz, tp->d_max);
+      }
   }
 
   glColor4fv (white);
@@ -552,7 +658,8 @@ draw_text (ModeInfo *mi)
   glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, color);
 
   glScalef(0.01, 0.01, 0.01);
-  fill_string(text, wire);
+
+  fill_string(tp->text, wire);
 
   glPopMatrix ();
 
index 3e4e2a68a16f9f2546606cd6d718952ecf4411f3..846699c153df97a191dc51fd5a68c13b268c872a 100644 (file)
@@ -1,3 +1,16 @@
+.de EX         \"Begin example
+.ne 5
+.if n .sp 1
+.if t .sp .5
+.nf
+.in +.5i
+..
+.de EE
+.fi
+.in -.5i
+.if n .sp 1
+.if t .sp .5
+..
 .TH XScreenSaver 1 "25-Jul-98" "X Version 11"
 .SH NAME
 gltext - draws text spinning around in 3D
@@ -6,6 +19,9 @@ gltext - draws text spinning around in 3D
 [\-display \fIhost:display.screen\fP] [\-window] [\-root]
 [\-visual \fIvisual\fP] [\-delay \fImicroseconds\fP] [\-fps]
 [\-text \fIstring\fP]
+[\-wander] [\-no-wander]
+[\-spin \fIaxes\fP]
+[\-no-spin]
 .SH DESCRIPTION
 The \fIgltext\fP program draws some text spinning around in 3D, using
 a font that appears to be made of solid tubes.  
@@ -29,11 +45,41 @@ or the id number (decimal or hex) of a specific visual.
 .B \-text \fIstring\fP
 The text to display.  This may contain newlines, but it shouldn't be
 very long.  The default is to display the machine name and OS version.
+
+This may also be a format string acceptable to
+.BR date (1)
+and
+.BR strftime (3) ,
+in which case, it will be updated once a second.  So to make this
+program display a spinning digital clock, you could do this:
+.EX
+gltext -text "%A%n%d %b %Y%n%l:%M:%S %p"
+.EE
+To include a literal `%', you must double it: `%%'.
+
+See the man page for
+.BR strftime (3)
+for more details.
 .TP 8
 .B \-fps
 Display a running tally of how many frames per second are being rendered.
 In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
 your GL performance.
+.TP 8
+.B \-wander
+Move the text around the screen.  This is the default.
+.TP 8
+.B \-no\-wander
+Keep the text centered on the screen.
+.TP 8
+.B \-spin
+Which axes around which the text should spin.  The default is "XYZ",
+meaning rotate it freely in space.  "\fB\-spin Z\fP" would rotate the
+text in the plane of the screen while not rotating it into or out
+of the screen; etc.
+.TP 8
+.B \-no\-spin
+Don't spin the text at all: the same as \fB\-spin ""\fP.
 .SH ENVIRONMENT
 .PP
 .TP 8
index 67d0a7dfd70eb96412d80c338519d1bc5d6b9d8b..8d5fe8c29b8300b97d0ebe14ca8367bf7ffe658a 100644 (file)
@@ -2102,10 +2102,6 @@ init_lament(ModeInfo *mi)
   lc->ddy = 0.00006 + frand(0.00003);
   lc->ddz = 0.00006 + frand(0.00003);
 
-  lc->ddx = 0.00001;
-  lc->ddy = 0.00001;
-  lc->ddz = 0.00001;
-
   lc->type = LAMENT_BOX;
   lc->anim_pause = 300 + (random() % 100);
 
index bb08482006fd548d15f9a43d34f3ed300f1f8f61..3f4dc35115f093e0901fbf51e00e074f125cbca8 100644 (file)
@@ -725,10 +725,6 @@ init_moebius(ModeInfo * mi)
     mp->ddy = 0.00006 + frand(0.00003);
     mp->ddz = 0.00006 + frand(0.00003);
 
-    mp->ddx = 0.00001;
-    mp->ddy = 0.00001;
-    mp->ddz = 0.00001;
-
        if ((mp->glx_context = init_GL(mi)) != NULL) {
 
                reshape_moebius(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
diff --git a/hacks/glx/molecule.c b/hacks/glx/molecule.c
new file mode 100644 (file)
index 0000000..a65e918
--- /dev/null
@@ -0,0 +1,1553 @@
+/* molecule, Copyright (c) 2001 Jamie Zawinski <jwz@jwz.org>
+ * Draws molecules, based on coordinates from PDB (Protein Data Base) files.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ */
+
+
+/* Documentation on the PDB file format:
+   http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html
+
+   Good source of PDB files:
+   http://www.sci.ouc.bc.ca/chem/molecule/molecule.html
+
+   TO DO:
+
+     - I'm not sure the text labels are being done in the best way;
+       they are sometimes, but not always, occluded by spheres that
+       pass in front of them. 
+ */
+
+#include <X11/Intrinsic.h>
+
+#define PROGCLASS      "Molecule"
+#define HACK_INIT      init_molecule
+#define HACK_DRAW      draw_molecule
+#define HACK_RESHAPE   reshape_molecule
+#define molecule_opts  xlockmore_opts
+
+#define DEF_TIMEOUT     "20"
+#define DEF_SPIN        "XYZ"
+#define DEF_WANDER      "False"
+#define DEF_LABELS      "True"
+#define DEF_TITLES      "True"
+#define DEF_ATOMS       "True"
+#define DEF_BONDS       "True"
+#define DEF_BBOX        "False"
+#define DEF_MOLECULE    "(default)"
+
+#define DEFAULTS       "*delay:        10000         \n" \
+                       "*timeout:    " DEF_TIMEOUT  "\n" \
+                       "*showFPS:      False         \n" \
+                       "*wireframe:    False         \n" \
+                       "*molecule:   " DEF_MOLECULE "\n" \
+                       "*spin:       " DEF_SPIN     "\n" \
+                       "*wander:     " DEF_WANDER   "\n" \
+                       "*labels:     " DEF_LABELS   "\n" \
+                       "*atoms:      " DEF_ATOMS    "\n" \
+                       "*bonds:      " DEF_BONDS    "\n" \
+                       "*bbox:       " DEF_BBOX     "\n" \
+                       "*atomFont:   -*-times-bold-r-normal-*-240-*\n" \
+                       "*titleFont:  -*-times-bold-r-normal-*-180-*\n" \
+                       "*noLabelThreshold:    30     \n" \
+                       "*wireframeThreshold:  150    \n" \
+
+
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#include "xlockmore.h"
+#include "colors.h"
+
+#ifdef USE_GL /* whole file */
+
+#include <ctype.h>
+#include <GL/glu.h>
+
+
+#define SPHERE_SLICES 16  /* how densely to render spheres */
+#define SPHERE_STACKS 10
+
+
+#define SMOOTH_TUBE       /* whether to have smooth or faceted tubes */
+
+#ifdef SMOOTH_TUBE
+# define TUBE_FACES  12   /* how densely to render tubes */
+#else
+# define TUBE_FACES  8
+#endif
+
+static int scale_down;
+#define SPHERE_SLICES_2  7
+#define SPHERE_STACKS_2  4
+#define TUBE_FACES_2     3
+
+
+const char * const builtin_pdb_data[] = {
+# include "molecules.h"
+};
+
+
+typedef struct {
+  const char *name;
+  GLfloat size, size2;
+  const char *color;
+  const char *text_color;
+  GLfloat gl_color[8];
+} atom_data;
+
+
+/* These are the traditional colors used to render these atoms,
+   and their approximate size in angstroms.
+ */
+static atom_data all_atom_data[] = {
+  { "H",    1.17,  0,  "White",           "Grey70",        { 0, }},
+  { "C",    1.75,  0,  "Grey60",          "White",         { 0, }},
+  { "N",    1.55,  0,  "LightSteelBlue3", "SlateBlue1",    { 0, }},
+  { "O",    1.40,  0,  "Red",             "LightPink",     { 0, }},
+  { "P",    1.28,  0,  "MediumPurple",    "PaleVioletRed", { 0, }},
+  { "S",    1.80,  0,  "Yellow4",         "Yellow1",       { 0, }},
+  { "bond", 0,     0,  "Grey70",          "Yellow1",       { 0, }},
+  { "*",    1.40,  0,  "Green4",          "LightGreen",    { 0, }}
+};
+
+
+typedef struct {
+  int id;              /* sequence number in the PDB file */
+  const char *label;   /* The atom name */
+  GLfloat x, y, z;     /* position in 3-space (angstroms) */
+  atom_data *data;     /* computed: which style of atom this is */
+} molecule_atom;
+
+typedef struct {
+  int from, to;                /* atom sequence numbers */
+  int strength;                /* how many bonds are between these two atoms */
+} molecule_bond;
+
+
+typedef struct {
+  const char *label;           /* description of this compound */
+  int natoms, atoms_size;
+  int nbonds, bonds_size;
+  molecule_atom *atoms;
+  molecule_bond *bonds;
+} molecule;
+
+
+typedef struct {
+  GLXContext *glx_context;
+
+  GLfloat rotx, roty, rotz;       /* current object rotation */
+  GLfloat dx, dy, dz;             /* current rotational velocity */
+  GLfloat ddx, ddy, ddz;          /* current rotational acceleration */
+  GLfloat d_max;                  /* max velocity */
+
+  Bool spin_x, spin_y, spin_z;
+
+  GLfloat molecule_size;          /* max dimension of molecule bounding box */
+
+  GLfloat no_label_threshold;     /* Things happen when molecules are huge */
+  GLfloat wireframe_threshold;
+
+  int which;                      /* which of the molecules is being shown */
+  int nmolecules;
+  molecule *molecules;
+
+  GLuint molecule_dlist;
+
+  XFontStruct *xfont1, *xfont2;
+  GLuint font1_dlist, font2_dlist;
+
+} molecule_configuration;
+
+
+static molecule_configuration *mcs = NULL;
+
+static int timeout;
+static char *molecule_str;
+static char *do_spin;
+static Bool do_wander;
+static Bool do_titles;
+static Bool do_labels;
+static Bool do_atoms;
+static Bool do_bonds;
+static Bool do_bbox;
+
+static Bool orig_do_labels, orig_do_bonds, orig_wire; /* saved to reset */
+
+
+static XrmOptionDescRec opts[] = {
+  { "-molecule", ".molecule", XrmoptionSepArg, 0 },
+  { "-timeout",".timeout",XrmoptionSepArg, 0 },
+  { "-spin",   ".spin",   XrmoptionSepArg, 0 },
+  { "+spin",   ".spin",   XrmoptionNoArg, "" },
+  { "-wander", ".wander", XrmoptionNoArg, "True" },
+  { "+wander", ".wander", XrmoptionNoArg, "False" },
+  { "-labels", ".labels", XrmoptionNoArg, "True" },
+  { "+labels", ".labels", XrmoptionNoArg, "False" },
+  { "-atoms",  ".atoms",  XrmoptionNoArg, "True" },
+  { "+atoms",  ".atoms",  XrmoptionNoArg, "False" },
+  { "-bonds",  ".bonds",  XrmoptionNoArg, "True" },
+  { "+bonds",  ".bonds",  XrmoptionNoArg, "False" },
+  { "-bbox",   ".bbox",  XrmoptionNoArg, "True" },
+  { "+bbox",   ".bbox",  XrmoptionNoArg, "False" },
+};
+
+static argtype vars[] = {
+  {(caddr_t *) &molecule_str, "molecule",   "Molecule", DEF_MOLECULE,t_String},
+  {(caddr_t *) &timeout,   "timeout","Seconds",DEF_TIMEOUT,t_Int},
+  {(caddr_t *) &do_spin,   "spin",   "Spin",   DEF_SPIN,   t_String},
+  {(caddr_t *) &do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
+  {(caddr_t *) &do_labels, "labels", "Labels", DEF_LABELS, t_Bool},
+  {(caddr_t *) &do_titles, "titles", "Titles", DEF_TITLES, t_Bool},
+  {(caddr_t *) &do_atoms,  "atoms",  "Atoms",  DEF_ATOMS,  t_Bool},
+  {(caddr_t *) &do_bonds,  "bonds",  "Bonds",  DEF_BONDS,  t_Bool},
+  {(caddr_t *) &do_bbox,   "bbox",   "BBox",   DEF_BBOX,   t_Bool},
+};
+
+ModeSpecOpt molecule_opts = {countof(opts), opts, countof(vars), vars, NULL};
+
+
+
+\f
+/* shapes */
+
+static void
+unit_tube (Bool wire)
+{
+  int i;
+  int faces = (scale_down ? TUBE_FACES_2 : TUBE_FACES);
+  GLfloat step = M_PI * 2 / faces;
+  GLfloat th;
+  int z = 0;
+
+  /* side walls
+   */
+  glFrontFace(GL_CCW);
+
+# ifdef SMOOTH_TUBE
+  glBegin(wire ? GL_LINES : GL_QUAD_STRIP);
+# else
+  glBegin(wire ? GL_LINES : GL_QUADS);
+# endif
+
+  for (i = 0, th = 0; i <= faces; i++)
+    {
+      GLfloat x = cos (th);
+      GLfloat y = sin (th);
+      glNormal3f(x, 0, y);
+      glVertex3f(x, 0.0, y);
+      glVertex3f(x, 1.0, y);
+      th += step;
+
+# ifndef SMOOTH_TUBE
+      x = cos (th);
+      y = sin (th);
+      glVertex3f(x, 1.0, y);
+      glVertex3f(x, 0.0, y);
+# endif
+    }
+  glEnd();
+
+  /* End caps
+   */
+  for (z = 0; z <= 1; z++)
+    {
+      glFrontFace(z == 0 ? GL_CCW : GL_CW);
+      glNormal3f(0, (z == 0 ? -1 : 1), 0);
+      glBegin(wire ? GL_LINE_LOOP : GL_TRIANGLE_FAN);
+      if (! wire) glVertex3f(0, z, 0);
+      for (i = 0, th = 0; i <= faces; i++)
+        {
+          GLfloat x = cos (th);
+          GLfloat y = sin (th);
+          glVertex3f(x, z, y);
+          th += step;
+        }
+      glEnd();
+    }
+}
+
+
+static void
+tube (GLfloat x1, GLfloat y1, GLfloat z1,
+      GLfloat x2, GLfloat y2, GLfloat z2,
+      GLfloat diameter, GLfloat cap_size,
+      Bool wire)
+{
+  GLfloat length, angle, a, b, c;
+
+  if (diameter <= 0) abort();
+
+  a = (x2 - x1);
+  b = (y2 - y1);
+  c = (z2 - z1);
+
+  length = sqrt (a*a + b*b + c*c);
+  angle = acos (a / length);
+
+  glPushMatrix();
+  glTranslatef(x1, y1, z1);
+  glScalef (length, length, length);
+
+  if (c == 0 && b == 0)
+    glRotatef (angle / (M_PI / 180), 0, 1, 0);
+  else
+    glRotatef (angle / (M_PI / 180), 0, -c, b);
+
+  glRotatef (-90, 0, 0, 1);
+  glScalef (diameter/length, 1, diameter/length);
+
+  /* extend the endpoints of the tube by the cap size in both directions */
+  if (cap_size != 0)
+    {
+      GLfloat c = cap_size/length;
+      glTranslatef (0, -c, 0);
+      glScalef (1, 1+c+c, 1);
+    }
+
+  unit_tube (wire);
+  glPopMatrix();
+}
+
+
+/* lifted from glplanet */
+/* Function for determining points on the surface of the sphere */
+static void
+parametric_sphere (float theta, float rho, GLfloat *vector)
+{
+  vector[0] = -sin(theta) * sin(rho);
+  vector[1] = cos(theta) * sin(rho);
+  vector[2] = cos(rho);
+}
+
+/* lifted from glplanet */
+static void
+unit_sphere (Bool wire)
+{
+  int stacks = (scale_down ? SPHERE_STACKS_2 : SPHERE_STACKS);
+  int slices = (scale_down ? SPHERE_SLICES_2 : SPHERE_SLICES);
+
+  int i, j;
+  float drho, dtheta;
+  float rho, theta;
+  GLfloat vector[3];
+  GLfloat ds, dt, t, s;
+
+  if (!do_bonds && !scale_down)  /* if balls are bigger, be smoother... */
+    slices *= 2, stacks *= 2;
+
+  if (!wire)
+    glShadeModel(GL_SMOOTH);
+
+  /* Generate a sphere with quadrilaterals.
+   * Quad vertices are determined using a parametric sphere function.
+   * For fun, you could generate practically any parameteric surface and
+   * map an image onto it. 
+   */
+  drho = M_PI / stacks;
+  dtheta = 2.0 * M_PI / slices;
+  ds = 1.0 / slices;
+  dt = 1.0 / stacks;
+
+  glFrontFace(GL_CCW);
+  glBegin( wire ? GL_LINE_LOOP : GL_QUADS );
+
+  t = 0.0;
+  for (i=0; i < stacks; i++) {
+    rho = i * drho;
+    s = 0.0;
+    for (j=0; j < slices; j++) {
+      theta = j * dtheta;
+
+      glTexCoord2f (s,t);
+      parametric_sphere (theta, rho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta, rho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      glTexCoord2f (s,t+dt);
+      parametric_sphere (theta, rho+drho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta, rho+drho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      glTexCoord2f (s+ds,t+dt);
+      parametric_sphere (theta + dtheta, rho+drho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta + dtheta, rho+drho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      glTexCoord2f (s+ds, t);
+      parametric_sphere (theta + dtheta, rho, vector);
+      glNormal3fv (vector);
+      parametric_sphere (theta + dtheta, rho, vector);
+      glVertex3f (vector[0], vector[1], vector[2]);
+
+      s = s + ds;
+    }
+    t = t + dt;
+  }
+  glEnd();
+}
+
+
+static void
+sphere (GLfloat x, GLfloat y, GLfloat z, GLfloat diameter, Bool wire)
+{
+  glPushMatrix ();
+  glTranslatef (x, y, z);
+  glScalef (diameter, diameter, diameter);
+  unit_sphere (wire);
+  glPopMatrix ();
+}
+
+
+static void
+load_font (ModeInfo *mi, char *res, XFontStruct **fontP, GLuint *dlistP)
+{
+  const char *font = get_string_resource (res, "Font");
+  XFontStruct *f;
+  Font id;
+  int first, last;
+
+  if (!font) font = "-*-times-bold-r-normal-*-180-*";
+
+  f = XLoadQueryFont(mi->dpy, font);
+  if (!f) f = XLoadQueryFont(mi->dpy, "fixed");
+
+  id = f->fid;
+  first = f->min_char_or_byte2;
+  last = f->max_char_or_byte2;
+  
+  clear_gl_error ();
+  *dlistP = glGenLists ((GLuint) last+1);
+  check_gl_error ("glGenLists");
+  glXUseXFont(id, first, last-first+1, *dlistP + first);
+  check_gl_error ("glXUseXFont");
+
+  *fontP = f;
+}
+
+
+static void
+load_fonts (ModeInfo *mi)
+{
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+  load_font (mi, "atomFont",  &mc->xfont1, &mc->font1_dlist);
+  load_font (mi, "titleFont", &mc->xfont2, &mc->font2_dlist);
+}
+
+
+static int
+string_width (XFontStruct *f, const char *c)
+{
+  int w = 0;
+  while (*c)
+    {
+      int cc = *((unsigned char *) c);
+      w += (f->per_char
+            ? f->per_char[cc-f->min_char_or_byte2].rbearing
+            : f->min_bounds.rbearing);
+      c++;
+    }
+  return w;
+}
+
+
+static atom_data *
+get_atom_data (const char *atom_name)
+{
+  int i;
+  atom_data *d = 0;
+  char *n = strdup (atom_name);
+  char *n2 = n;
+  int L;
+
+  while (!isalpha(*n)) n++;
+  L = strlen(n);
+  while (L > 0 && !isalpha(n[L-1]))
+    n[--L] = 0;
+
+  for (i = 0; i < countof(all_atom_data); i++)
+    {
+      d = &all_atom_data[i];
+      if (!strcmp (n, all_atom_data[i].name))
+        break;
+    }
+
+  free (n2);
+  return d;
+}
+
+
+static void
+set_atom_color (ModeInfo *mi, molecule_atom *a, Bool font_p)
+{
+  atom_data *d;
+  GLfloat *gl_color;
+
+  if (a)
+    d = a->data;
+  else
+    {
+      static atom_data *def_data = 0;
+      if (!def_data) def_data = get_atom_data ("bond");
+      d = def_data;
+    }
+
+  gl_color = (!font_p ? d->gl_color : (d->gl_color + 4));
+
+  if (gl_color[3] == 0)
+    {
+      const char *string = !font_p ? d->color : d->text_color;
+      XColor xcolor;
+      if (!XParseColor (mi->dpy, mi->xgwa.colormap, string, &xcolor))
+        {
+          fprintf (stderr, "%s: unparsable color in %s: %s\n", progname,
+                   (a ? a->label : d->name), string);
+          exit (1);
+        }
+
+      gl_color[0] = xcolor.red   / 65536.0;
+      gl_color[1] = xcolor.green / 65536.0;
+      gl_color[2] = xcolor.blue  / 65536.0;
+      gl_color[3] = 1.0;
+    }
+  
+  if (font_p)
+    glColor3f (gl_color[0], gl_color[1], gl_color[2]);
+  else
+    glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gl_color);
+}
+
+
+static GLfloat
+atom_size (molecule_atom *a)
+{
+  if (do_bonds)
+    {
+      if (a->data->size2 == 0)
+        {
+          /* let the molecules have the same relative sizes, but scale
+             them to a smaller range, so that the bond-tubes are
+             actually visible...
+           */
+          GLfloat bot = 0.4;
+          GLfloat top = 0.6;
+          GLfloat min = 1.17;
+          GLfloat max = 1.80;
+          GLfloat ratio = (a->data->size - min) / (max - min);
+          a->data->size2 = bot + (ratio * (top - bot));
+        }
+      return a->data->size2;
+    }
+  else
+    return a->data->size;
+}
+
+
+static molecule_atom *
+get_atom (molecule_atom *atoms, int natoms, int id)
+{
+  int i;
+
+  /* quick short-circuit */
+  if (id < natoms)
+    {
+      if (atoms[id].id == id)
+        return &atoms[id];
+      if (id > 0 && atoms[id-1].id == id)
+        return &atoms[id-1];
+      if (id < natoms-1 && atoms[id+1].id == id)
+        return &atoms[id+1];
+    }
+
+  for (i = 0; i < natoms; i++)
+    if (id == atoms[i].id)
+      return &atoms[i];
+
+  fprintf (stderr, "%s: no atom %d\n", progname, id);
+  abort();
+}
+
+
+static void
+molecule_bounding_box (ModeInfo *mi,
+                       GLfloat *x1, GLfloat *y1, GLfloat *z1,
+                       GLfloat *x2, GLfloat *y2, GLfloat *z2)
+{
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+  molecule *m = &mc->molecules[mc->which];
+  int i;
+
+  if (m->natoms == 0)
+    {
+      *x1 = *y1 = *z1 = *x2 = *y2 = *z2 = 0;
+    }
+  else
+    {
+      *x1 = *x2 = m->atoms[0].x;
+      *y1 = *y2 = m->atoms[0].y;
+      *z1 = *z2 = m->atoms[0].z;
+    }
+
+  for (i = 1; i < m->natoms; i++)
+    {
+      if (m->atoms[i].x < *x1) *x1 = m->atoms[i].x;
+      if (m->atoms[i].y < *y1) *y1 = m->atoms[i].y;
+      if (m->atoms[i].z < *z1) *z1 = m->atoms[i].z;
+
+      if (m->atoms[i].x > *x2) *x2 = m->atoms[i].x;
+      if (m->atoms[i].y > *y2) *y2 = m->atoms[i].y;
+      if (m->atoms[i].z > *z2) *z2 = m->atoms[i].z;
+    }
+
+  *x1 -= 1;
+  *y1 -= 1;
+  *z1 -= 1;
+  *x2 += 1;
+  *y2 += 1;
+  *z2 += 1;
+}
+
+
+static void
+draw_bounding_box (ModeInfo *mi)
+{
+  static GLfloat c1[4] = { 0.2, 0.2, 0.6, 1.0 };
+  static GLfloat c2[4] = { 1.0, 0.0, 0.0, 1.0 };
+  int wire = MI_IS_WIREFRAME(mi);
+  GLfloat x1, y1, z1, x2, y2, z2;
+  molecule_bounding_box (mi, &x1, &y1, &z1, &x2, &y2, &z2);
+
+  glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, c1);
+  glFrontFace(GL_CCW);
+
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glNormal3f(0, 1, 0);
+  glVertex3f(x1, y1, z1); glVertex3f(x1, y1, z2);
+  glVertex3f(x2, y1, z2); glVertex3f(x2, y1, z1);
+  glEnd();
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glNormal3f(0, -1, 0);
+  glVertex3f(x2, y2, z1); glVertex3f(x2, y2, z2);
+  glVertex3f(x1, y2, z2); glVertex3f(x1, y2, z1);
+  glEnd();
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glNormal3f(0, 0, 1);
+  glVertex3f(x1, y1, z1); glVertex3f(x2, y1, z1);
+  glVertex3f(x2, y2, z1); glVertex3f(x1, y2, z1);
+  glEnd();
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glNormal3f(0, 0, -1);
+  glVertex3f(x1, y2, z2); glVertex3f(x2, y2, z2);
+  glVertex3f(x2, y1, z2); glVertex3f(x1, y1, z2);
+  glEnd();
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glNormal3f(1, 0, 0);
+  glVertex3f(x1, y2, z1); glVertex3f(x1, y2, z2);
+  glVertex3f(x1, y1, z2); glVertex3f(x1, y1, z1);
+  glEnd();
+  glBegin(wire ? GL_LINE_LOOP : GL_QUADS);
+  glNormal3f(-1, 0, 0);
+  glVertex3f(x2, y1, z1); glVertex3f(x2, y1, z2);
+  glVertex3f(x2, y2, z2); glVertex3f(x2, y2, z1);
+  glEnd();
+
+  glPushAttrib (GL_LIGHTING);
+  glDisable (GL_LIGHTING);
+
+  glColor3f (c2[0], c2[1], c2[2]);
+  glBegin(GL_LINES);
+  if (x1 > 0) x1 = 0; if (x2 < 0) x2 = 0;
+  if (y1 > 0) y1 = 0; if (y2 < 0) y2 = 0;
+  if (z1 > 0) z1 = 0; if (z2 < 0) z2 = 0;
+  glVertex3f(x1, 0,  0);  glVertex3f(x2, 0,  0); 
+  glVertex3f(0 , y1, 0);  glVertex3f(0,  y2, 0); 
+  glVertex3f(0,  0,  z1); glVertex3f(0,  0,  z2); 
+  glEnd();
+
+  glPopAttrib();
+}
+
+
+/* Since PDB files don't always have the molecule centered around the
+   origin, and since some molecules are pretty large, scale and/or
+   translate so that the whole molecule is visible in the window.
+ */
+static void
+ensure_bounding_box_visible (ModeInfo *mi)
+{
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+
+  GLfloat x1, y1, z1, x2, y2, z2;
+  GLfloat w, h, d;
+  GLfloat size;
+  GLfloat max_size = 10;  /* don't bother scaling down if the molecule
+                             is already smaller than this */
+
+  molecule_bounding_box (mi, &x1, &y1, &z1, &x2, &y2, &z2);
+  w = x2-x1;
+  h = y2-y1;
+  d = z2-z1;
+
+  size = (w > h ? w : h);
+  size = (size > d ? size : d);
+
+  mc->molecule_size = size;
+
+  scale_down = 0;
+
+  if (size > max_size)
+    {
+      GLfloat scale = max_size / size;
+      glScalef (scale, scale, scale);
+
+      scale_down = scale < 0.3;
+    }
+
+  glTranslatef (-(x1 + w/2),
+                -(y1 + h/2),
+                -(z1 + d/2));
+}
+
+
+static void
+print_title_string (ModeInfo *mi, const char *string,
+                    GLfloat x, GLfloat y, GLfloat line_height)
+{
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+  
+  y -= line_height;
+
+  glPushAttrib (GL_LIGHTING | GL_DEPTH_TEST);
+  glDisable (GL_LIGHTING);
+  glDisable (GL_DEPTH_TEST);
+  {
+    glMatrixMode(GL_PROJECTION);
+    glPushMatrix();
+    {
+      glLoadIdentity();
+
+      glMatrixMode(GL_MODELVIEW);
+      glPushMatrix();
+      {
+        int i;
+        glLoadIdentity();
+
+        gluOrtho2D (0, mi->xgwa.width, 0, mi->xgwa.height);
+
+        set_atom_color (mi, 0, True);
+
+        glRasterPos2f (x, y);
+        for (i = 0; i < strlen(string); i++)
+          {
+            char c = string[i];
+            if (c == '\n')
+              glRasterPos2f (x, (y -= line_height));
+            else
+              glCallList (mc->font2_dlist + (int)(c));
+          }
+      }
+      glPopMatrix();
+    }
+    glMatrixMode(GL_PROJECTION);
+    glPopMatrix();
+  }
+  glPopAttrib();
+
+  glMatrixMode(GL_MODELVIEW);
+}
+
+
+/* Constructs the GL shapes of the current molecule
+ */
+static void
+build_molecule (ModeInfo *mi)
+{
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+  int wire = MI_IS_WIREFRAME(mi);
+  int i;
+
+  molecule *m = &mc->molecules[mc->which];
+
+  if (wire)
+    {
+      glDisable(GL_CULL_FACE);
+      glDisable(GL_LIGHTING);
+      glDisable(GL_LIGHT0);
+      glDisable(GL_DEPTH_TEST);
+      glDisable(GL_NORMALIZE);
+      glDisable(GL_CULL_FACE);
+    }
+  else
+    {
+      glEnable(GL_CULL_FACE);
+      glEnable(GL_LIGHTING);
+      glEnable(GL_LIGHT0);
+      glEnable(GL_DEPTH_TEST);
+      glEnable(GL_NORMALIZE);
+      glEnable(GL_CULL_FACE);
+    }
+
+  if (!wire)
+    set_atom_color (mi, 0, False);
+
+  if (do_bonds)
+    for (i = 0; i < m->nbonds; i++)
+      {
+        molecule_bond *b = &m->bonds[i];
+        molecule_atom *from = get_atom (m->atoms, m->natoms, b->from);
+        molecule_atom *to   = get_atom (m->atoms, m->natoms, b->to);
+
+        if (wire)
+          {
+            glBegin(GL_LINES);
+            glVertex3f(from->x, from->y, from->z);
+            glVertex3f(to->x,   to->y,   to->z);
+            glEnd();
+          }
+        else
+          {
+            GLfloat thickness = 0.07 * b->strength;
+            GLfloat cap_size = 0.03;
+            if (thickness > 0.3)
+              thickness = 0.3;
+            tube (from->x, from->y, from->z,
+                  to->x,   to->y,   to->z,
+                  thickness, cap_size, wire);
+          }
+      }
+
+  for (i = 0; i < m->natoms; i++)
+    {
+      molecule_atom *a = &m->atoms[i];
+      int i;
+
+      if (!wire && do_atoms)
+        {
+          GLfloat size = atom_size (a);
+          set_atom_color (mi, a, False);
+          sphere (a->x, a->y, a->z, size, wire);
+        }
+
+      if (do_labels)
+        {
+          glPushAttrib (GL_LIGHTING | GL_DEPTH_TEST);
+          glDisable (GL_LIGHTING);
+          glDisable (GL_DEPTH_TEST);
+
+          if (!wire)
+            set_atom_color (mi, a, True);
+
+          glRasterPos3f (a->x, a->y, a->z);
+
+          {
+            GLdouble mm[17], pm[17];
+            GLint vp[5];
+            GLdouble wx=-1, wy=-1, wz=-1;
+            glGetDoublev (GL_MODELVIEW_MATRIX, mm);
+            glGetDoublev (GL_PROJECTION_MATRIX, pm);
+            glGetIntegerv (GL_VIEWPORT, vp);
+
+            /* Convert 3D coordinates to window coordinates */
+            gluProject (a->x, a->y, a->z, mm, pm, vp, &wx, &wy, &wz);
+
+            /* Fudge the window coordinates to center the string */
+            wx -= string_width (mc->xfont1, a->label) / 2;
+            wy -= mc->xfont1->descent;
+
+            /* Convert new window coordinates back to 3D coordinates */
+            gluUnProject (wx, wy, wz, mm, pm, vp, &wx, &wy, &wz);
+            glRasterPos3f (wx, wy, wz);
+          }
+
+          for (i = 0; i < strlen(a->label); i++)
+            glCallList (mc->font1_dlist + (int)(a->label[i]));
+
+          glPopAttrib();
+        }
+    }
+
+  if (do_bbox)
+    draw_bounding_box (mi);
+
+  if (do_titles && m->label && *m->label)
+    print_title_string (mi, m->label,
+                        10, mi->xgwa.height - 10,
+                        mc->xfont2->ascent + mc->xfont2->descent);
+}
+
+
+\f
+/* loading */
+
+static void
+push_atom (molecule *m,
+           int id, const char *label,
+           GLfloat x, GLfloat y, GLfloat z)
+{
+  m->natoms++;
+  if (m->atoms_size < m->natoms)
+    {
+      m->atoms_size += 20;
+      m->atoms = (molecule_atom *) realloc (m->atoms,
+                                            m->atoms_size * sizeof(*m->atoms));
+    }
+  m->atoms[m->natoms-1].id = id;
+  m->atoms[m->natoms-1].label = label;
+  m->atoms[m->natoms-1].x = x;
+  m->atoms[m->natoms-1].y = y;
+  m->atoms[m->natoms-1].z = z;
+  m->atoms[m->natoms-1].data = get_atom_data (label);
+}
+
+
+static void
+push_bond (molecule *m, int from, int to)
+{
+  int i;
+
+  for (i = 0; i < m->nbonds; i++)
+    if ((m->bonds[i].from == from && m->bonds[i].to   == to) ||
+        (m->bonds[i].to   == from && m->bonds[i].from == to))
+      {
+        m->bonds[i].strength++;
+        return;
+      }
+
+  m->nbonds++;
+  if (m->bonds_size < m->nbonds)
+    {
+      m->bonds_size += 20;
+      m->bonds = (molecule_bond *) realloc (m->bonds,
+                                            m->bonds_size * sizeof(*m->bonds));
+    }
+  m->bonds[m->nbonds-1].from = from;
+  m->bonds[m->nbonds-1].to = to;
+  m->bonds[m->nbonds-1].strength = 1;
+}
+
+
+
+/* This function is crap.
+ */
+static void
+parse_pdb_data (molecule *m, const char *data, const char *filename, int line)
+{
+  const char *s = data;
+  char *ss;
+  while (*s)
+    {
+      if ((!m->label || !*m->label) &&
+          (!strncmp (s, "HEADER", 6) || !strncmp (s, "COMPND", 6)))
+        {
+          char *name = calloc (1, 100);
+          char *n2 = name;
+          int L = strlen(s);
+          if (L > 99) L = 99;
+
+          strncpy (n2, s, L);
+          n2 += 7;
+          while (isspace(*n2)) n2++;
+
+          ss = strchr (n2, '\n');
+          if (ss) *ss = 0;
+          ss = strchr (n2, '\r');
+          if (ss) *ss = 0;
+
+          ss = n2+strlen(n2)-1;
+          while (isspace(*ss) && ss > n2)
+            *ss-- = 0;
+
+          if (strlen (n2) > 4 &&
+              !strcmp (n2 + strlen(n2) - 4, ".pdb"))
+            n2[strlen(n2)-4] = 0;
+
+          if (m->label) free ((char *) m->label);
+          m->label = strdup (n2);
+          free (name);
+        }
+      else if (!strncmp (s, "TITLE ", 6) ||
+               !strncmp (s, "HEADER", 6) ||
+               !strncmp (s, "COMPND", 6) ||
+               !strncmp (s, "AUTHOR", 6) ||
+               !strncmp (s, "REVDAT", 6) ||
+               !strncmp (s, "SOURCE", 6) ||
+               !strncmp (s, "EXPDTA", 6) ||
+               !strncmp (s, "JRNL  ", 6) ||
+               !strncmp (s, "REMARK", 6) ||
+               !strncmp (s, "SEQRES", 6) ||
+               !strncmp (s, "HET   ", 6) ||
+               !strncmp (s, "FORMUL", 6) ||
+               !strncmp (s, "CRYST1", 6) ||
+               !strncmp (s, "ORIGX1", 6) ||
+               !strncmp (s, "ORIGX2", 6) ||
+               !strncmp (s, "ORIGX3", 6) ||
+               !strncmp (s, "SCALE1", 6) ||
+               !strncmp (s, "SCALE2", 6) ||
+               !strncmp (s, "SCALE3", 6) ||
+               !strncmp (s, "MASTER", 6) ||
+               !strncmp (s, "KEYWDS", 6) ||
+               !strncmp (s, "DBREF ", 6) ||
+               !strncmp (s, "HETNAM", 6) ||
+               !strncmp (s, "HETSYN", 6) ||
+               !strncmp (s, "HELIX ", 6) ||
+               !strncmp (s, "LINK  ", 6) ||
+               !strncmp (s, "MTRIX1", 6) ||
+               !strncmp (s, "MTRIX2", 6) ||
+               !strncmp (s, "MTRIX3", 6) ||
+               !strncmp (s, "SHEET ", 6) ||
+               !strncmp (s, "CISPEP", 6) ||
+               !strncmp (s, "GENERATED BY", 12) ||
+               !strncmp (s, "TER ", 4) ||
+               !strncmp (s, "END ", 4) ||
+               !strncmp (s, "TER\n", 4) ||
+               !strncmp (s, "END\n", 4) ||
+               !strncmp (s, "\n", 1))
+        /* ignored. */
+        ;
+      else if (!strncmp (s, "ATOM   ", 7))
+        {
+          int id;
+          char *name = (char *) calloc (1, 4);
+          GLfloat x = -999, y = -999, z = -999;
+
+          sscanf (s+7, " %d ", &id);
+
+          strncpy (name, s+12, 3);
+          while (isspace(*name)) name++;
+          ss = name + strlen(name)-1;
+          while (isspace(*ss) && ss > name)
+            *ss-- = 0;
+          sscanf (s + 32, " %f %f %f ", &x, &y, &z);
+/*
+          fprintf (stderr, "%s: %s: %d: atom: %d \"%s\" %9.4f %9.4f %9.4f\n",
+                   progname, filename, line,
+                   id, name, x, y, z);
+*/
+          push_atom (m, id, name, x, y, z);
+        }
+      else if (!strncmp (s, "HETATM ", 7))
+        {
+          int id;
+          char *name = (char *) calloc (1, 4);
+          GLfloat x = -999, y = -999, z = -999;
+
+          sscanf (s+7, " %d ", &id);
+
+          strncpy (name, s+12, 3);
+          while (isspace(*name)) name++;
+          ss = name + strlen(name)-1;
+          while (isspace(*ss) && ss > name)
+            *ss-- = 0;
+          sscanf (s + 30, " %f %f %f ", &x, &y, &z);
+/*
+          fprintf (stderr, "%s: %s: %d: atom: %d \"%s\" %9.4f %9.4f %9.4f\n",
+                   progname, filename, line,
+                   id, name, x, y, z);
+*/
+          push_atom (m, id, name, x, y, z);
+        }
+      else if (!strncmp (s, "CONECT ", 7))
+        {
+          int atoms[11];
+          int i = sscanf (s + 8, " %d %d %d %d %d %d %d %d %d %d %d ",
+                          &atoms[0], &atoms[1], &atoms[2], &atoms[3], 
+                          &atoms[4], &atoms[5], &atoms[6], &atoms[7], 
+                          &atoms[8], &atoms[9], &atoms[10], &atoms[11]);
+          int j;
+          for (j = 1; j < i; j++)
+            if (atoms[j] > 0)
+              {
+/*
+                fprintf (stderr, "%s: %s: %d: bond: %d %d\n",
+                         progname, filename, line, atoms[0], atoms[j]);
+*/
+                push_bond (m, atoms[0], atoms[j]);
+              }
+        }
+      else
+        {
+          char *s1 = strdup (s);
+          for (ss = s1; *ss && *ss != '\n'; ss++)
+            ;
+          *ss = 0;
+          fprintf (stderr, "%s: %s: %d: unrecognised line: %s\n",
+                   progname, filename, line, s1);
+        }
+
+      while (*s && *s != '\n')
+        s++;
+      if (*s == '\n')
+        s++;
+      line++;
+    }
+}
+
+
+static void
+parse_pdb_file (molecule *m, const char *name)
+{
+  FILE *in;
+  int buf_size = 40960;
+  char *buf;
+  int line = 1;
+
+  in = fopen(name, "r");
+  if (!in)
+    {
+      char *buf = (char *) malloc(1024 + strlen(name));
+      sprintf(buf, "%s: error reading \"%s\"", progname, name);
+      perror(buf);
+      exit (1);
+    }
+
+  buf = (char *) malloc (buf_size);
+
+  while (fgets (buf, buf_size-1, in))
+    {
+      char *s;
+      for (s = buf; *s; s++)
+        if (*s == '\r') *s = '\n';
+      parse_pdb_data (m, buf, name, line++);
+    }
+
+  free (buf);
+  fclose (in);
+
+  if (!m->natoms)
+    {
+      fprintf (stderr, "%s: file %s contains no atomic coordinates!\n",
+               progname, name);
+      exit (1);
+    }
+
+  if (!m->nbonds && do_bonds)
+    {
+      fprintf (stderr, "%s: warning: file %s contains no atomic bond info.\n",
+               progname, name);
+      do_bonds = 0;
+    }
+}
+
+
+static void
+generate_molecule_formula (molecule *m)
+{
+  char *buf = (char *) malloc (m->natoms * 10);
+  char *s = buf;
+  int i;
+  struct { char *atom; int count; } counts[200];
+  memset (counts, 0, sizeof(counts));
+  *s = 0;
+  for (i = 0; i < m->natoms; i++)
+    {
+      int j = 0;
+      char *a = (char *) m->atoms[i].label;
+      char *e;
+      while (!isalpha(*a)) a++;
+      a = strdup (a);
+      for (e = a; isalpha(*e); e++);
+      *e = 0;
+      while (counts[j].atom && !!strcmp(a, counts[j].atom))
+        j++;
+      if (counts[j].atom)
+        free (a);
+      else
+        counts[j].atom = a;
+      counts[j].count++;
+    }
+
+  i = 0;
+  while (counts[i].atom)
+    {
+      strcat (s, counts[i].atom);
+      free (counts[i].atom);
+      s += strlen (s);
+      if (counts[i].count > 1)
+        sprintf (s, "(%d)", counts[i].count);
+      s += strlen (s);
+      i++;
+    }
+
+  if (!m->label) m->label = strdup("");
+  s = (char *) malloc (strlen (m->label) + strlen (buf) + 2);
+  strcpy (s, m->label);
+  strcat (s, "\n");
+  strcat (s, buf);
+  free ((char *) m->label);
+  free (buf);
+  m->label = s;
+}
+
+static void
+insert_vertical_whitespace (char *string)
+{
+  while (*string)
+    {
+      if ((string[0] == ',' ||
+           string[0] == ';' ||
+           string[0] == ':') &&
+          string[1] == ' ')
+        string[0] = ' ', string[1] = '\n';
+      string++;
+    }
+}
+
+
+/* Construct the molecule data from either: the builtins; or from
+   the (one) .pdb file specified with -molecule.
+ */
+static void
+load_molecules (ModeInfo *mi)
+{
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+  int wire = MI_IS_WIREFRAME(mi);
+
+  if (!molecule_str || !*molecule_str ||
+      !strcmp(molecule_str, "(default)"))      /* do the builtins */
+    {
+      int i;
+      mc->nmolecules = countof(builtin_pdb_data);
+      mc->molecules = (molecule *) calloc (sizeof (molecule), mc->nmolecules);
+      for (i = 0; i < mc->nmolecules; i++)
+        {
+          char name[100];
+          sprintf (name, "<builtin-%d>", i);
+          parse_pdb_data (&mc->molecules[i], builtin_pdb_data[i], name, 1);
+          generate_molecule_formula (&mc->molecules[i]);
+          insert_vertical_whitespace ((char *) mc->molecules[i].label);
+        }
+    }
+  else                                         /* Load a file */
+    {
+      int i = 0;
+      mc->nmolecules = 1;
+      mc->molecules = (molecule *) calloc (sizeof (molecule), mc->nmolecules);
+      parse_pdb_file (&mc->molecules[i], molecule_str);
+      generate_molecule_formula (&mc->molecules[i]);
+      insert_vertical_whitespace ((char *) mc->molecules[i].label);
+
+      if ((wire || !do_atoms) &&
+          !do_labels &&
+          mc->molecules[i].nbonds == 0)
+        {
+          /* If we're not drawing atoms (e.g., wireframe mode), and
+             there is no bond info, then make sure labels are turned on,
+             or we'll be looking at a black screen... */
+          fprintf (stderr, "%s: no bonds: turning -label on.\n", progname);
+          do_labels = 1;
+        }
+    }
+}
+
+
+\f
+/* Window management, etc
+ */
+void
+reshape_molecule (ModeInfo *mi, int width, int height)
+{
+  GLfloat h = (GLfloat) height / (GLfloat) width;
+
+  glViewport (0, 0, (GLint) width, (GLint) height);
+
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+
+  gluPerspective( 30.0, 1/h, 1.0, 100.0 );
+  gluLookAt( 0.0, 0.0, 15.0,
+             0.0, 0.0, 0.0,
+             0.0, 1.0, 0.0);
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  glTranslatef(0.0, 0.0, -15.0);
+
+  glClear(GL_COLOR_BUFFER_BIT);
+}
+
+
+static void
+gl_init (ModeInfo *mi)
+{
+  static GLfloat pos[4] = {5.0, 5.0, 10.0, 1.0};
+  glLightfv(GL_LIGHT0, GL_POSITION, pos);
+
+  orig_do_labels = do_labels;
+  orig_do_bonds = do_bonds;
+  orig_wire = MI_IS_WIREFRAME(mi);
+}
+
+
+/* lifted from lament.c */
+#define RAND(n) ((long) ((random() & 0x7fffffff) % ((long) (n))))
+#define RANDSIGN() ((random() & 1) ? 1 : -1)
+
+static void
+rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
+{
+  double ppos = *pos;
+
+  /* tick position */
+  if (ppos < 0)
+    ppos = -(ppos + *v);
+  else
+    ppos += *v;
+
+  if (ppos > 1.0)
+    ppos -= 1.0;
+  else if (ppos < 0)
+    ppos += 1.0;
+
+  if (ppos < 0) abort();
+  if (ppos > 1.0) abort();
+  *pos = (*pos > 0 ? ppos : -ppos);
+
+  /* accelerate */
+  *v += *dv;
+
+  /* clamp velocity */
+  if (*v > max_v || *v < -max_v)
+    {
+      *dv = -*dv;
+    }
+  /* If it stops, start it going in the other direction. */
+  else if (*v < 0)
+    {
+      if (random() % 4)
+       {
+         *v = 0;
+
+         /* keep going in the same direction */
+         if (random() % 2)
+           *dv = 0;
+         else if (*dv < 0)
+           *dv = -*dv;
+       }
+      else
+       {
+         /* reverse gears */
+         *v = -*v;
+         *dv = -*dv;
+         *pos = -*pos;
+       }
+    }
+
+  /* Alter direction of rotational acceleration randomly. */
+  if (! (random() % 120))
+    *dv = -*dv;
+
+  /* Change acceleration very occasionally. */
+  if (! (random() % 200))
+    {
+      if (*dv == 0)
+       *dv = 0.00001;
+      else if (random() & 1)
+       *dv *= 1.2;
+      else
+       *dv *= 0.8;
+    }
+}
+
+
+static void
+startup_blurb (ModeInfo *mi)
+{
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+  const char *s = "Constructing molecules...";
+  print_title_string (mi, s,
+                      mi->xgwa.width - (string_width (mc->xfont2, s) + 40),
+                      10 + mc->xfont2->ascent + mc->xfont2->descent,
+                      mc->xfont2->ascent + mc->xfont2->descent);
+  glFinish();
+  glXSwapBuffers(MI_DISPLAY(mi), MI_WINDOW(mi));
+}
+
+void 
+init_molecule (ModeInfo *mi)
+{
+  molecule_configuration *mc;
+  int wire;
+
+  if (!mcs) {
+    mcs = (molecule_configuration *)
+      calloc (MI_NUM_SCREENS(mi), sizeof (molecule_configuration));
+    if (!mcs) {
+      fprintf(stderr, "%s: out of memory\n", progname);
+      exit(1);
+    }
+  }
+
+  mc = &mcs[MI_SCREEN(mi)];
+
+  if ((mc->glx_context = init_GL(mi)) != NULL) {
+    gl_init(mi);
+    reshape_molecule (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+  }
+
+  load_fonts (mi);
+  startup_blurb (mi);
+
+  wire = MI_IS_WIREFRAME(mi);
+
+  mc->rotx = frand(1.0) * RANDSIGN();
+  mc->roty = frand(1.0) * RANDSIGN();
+  mc->rotz = frand(1.0) * RANDSIGN();
+
+  /* bell curve from 0-6 degrees, avg 3 */
+  mc->dx = (frand(1) + frand(1) + frand(1)) / (360/2);
+  mc->dy = (frand(1) + frand(1) + frand(1)) / (360/2);
+  mc->dz = (frand(1) + frand(1) + frand(1)) / (360/2);
+
+  mc->d_max = mc->dx * 2;
+
+  mc->ddx = 0.00006 + frand(0.00003);
+  mc->ddy = 0.00006 + frand(0.00003);
+  mc->ddz = 0.00006 + frand(0.00003);
+
+  {
+    char *s = do_spin;
+    while (*s)
+      {
+        if      (*s == 'x' || *s == 'X') mc->spin_x = 1;
+        else if (*s == 'y' || *s == 'Y') mc->spin_y = 1;
+        else if (*s == 'z' || *s == 'Z') mc->spin_z = 1;
+        else
+          {
+            fprintf (stderr,
+         "%s: spin must contain only the characters X, Y, or Z (not \"%s\")\n",
+                     progname, do_spin);
+            exit (1);
+          }
+        s++;
+      }
+  }
+
+  mc->molecule_dlist = glGenLists(1);
+
+  load_molecules (mi);
+  mc->which = random() % mc->nmolecules;
+
+  mc->no_label_threshold = get_float_resource ("noLabelThreshold",
+                                               "NoLabelThreshold");
+  mc->wireframe_threshold = get_float_resource ("wireframeThreshold",
+                                                "WireframeThreshold");
+
+  if (wire)
+    do_bonds = 1;
+}
+
+
+void
+draw_molecule (ModeInfo *mi)
+{
+  static time_t last = 0;
+  time_t now = time ((time_t *) 0);
+
+  molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
+  Display *dpy = MI_DISPLAY(mi);
+  Window window = MI_WINDOW(mi);
+
+  if (!mc->glx_context)
+    return;
+
+  if (last + timeout <= now)   /* randomize molecules every -timeout seconds */
+    {
+      if (mc->nmolecules == 1)
+        {
+          if (last != 0) goto SKIP;
+          mc->which = 0;
+        }
+      else if (last == 0)
+        {
+          mc->which = random() % mc->nmolecules;
+        }
+      else
+        {
+          int n = mc->which;
+          while (n == mc->which)
+            n = random() % mc->nmolecules;
+          mc->which = n;
+        }
+
+      last = now;
+
+
+      glNewList (mc->molecule_dlist, GL_COMPILE);
+      ensure_bounding_box_visible (mi);
+
+      do_labels = orig_do_labels;
+      do_bonds = orig_do_bonds;
+      MI_IS_WIREFRAME(mi) = orig_wire;
+
+      if (mc->molecule_size > mc->no_label_threshold)
+        do_labels = 0;
+      if (mc->molecule_size > mc->wireframe_threshold)
+        MI_IS_WIREFRAME(mi) = 1;
+
+      if (MI_IS_WIREFRAME(mi))
+        do_bonds = 1;
+
+      build_molecule (mi);
+      glEndList();
+    }
+ SKIP:
+
+  glPushMatrix ();
+  glScalef(1.1, 1.1, 1.1);
+
+  {
+    GLfloat x, y, z;
+
+    if (do_wander)
+      {
+        static int frame = 0;
+
+#       define SINOID(SCALE,SIZE) \
+        ((((1 + sin((frame * (SCALE)) / 2 * M_PI)) / 2.0) * (SIZE)) - (SIZE)/2)
+
+        x = SINOID(0.031, 9.0);
+        y = SINOID(0.023, 9.0);
+        z = SINOID(0.017, 9.0);
+        frame++;
+        glTranslatef(x, y, z);
+      }
+
+    if (mc->spin_x || mc->spin_y || mc->spin_z)
+      {
+        x = mc->rotx;
+        y = mc->roty;
+        z = mc->rotz;
+        if (x < 0) x = 1 - (x + 1);
+        if (y < 0) y = 1 - (y + 1);
+        if (z < 0) z = 1 - (z + 1);
+
+        if (mc->spin_x) glRotatef(x * 360, 1.0, 0.0, 0.0);
+        if (mc->spin_y) glRotatef(y * 360, 0.0, 1.0, 0.0);
+        if (mc->spin_z) glRotatef(z * 360, 0.0, 0.0, 1.0);
+
+        rotate(&mc->rotx, &mc->dx, &mc->ddx, mc->d_max);
+        rotate(&mc->roty, &mc->dy, &mc->ddy, mc->d_max);
+        rotate(&mc->rotz, &mc->dz, &mc->ddz, mc->d_max);
+      }
+  }
+
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+  glCallList (mc->molecule_dlist);
+  glPopMatrix ();
+
+  if (mi->fps_p) do_fps (mi);
+  glFinish();
+
+  glXSwapBuffers(dpy, window);
+}
+
+#endif /* USE_GL */
diff --git a/hacks/glx/molecule.man b/hacks/glx/molecule.man
new file mode 100644 (file)
index 0000000..4903654
--- /dev/null
@@ -0,0 +1,154 @@
+.de EX         \"Begin example
+.ne 5
+.if n .sp 1
+.if t .sp .5
+.nf
+.in +.5i
+..
+.de EE
+.fi
+.in -.5i
+.if n .sp 1
+.if t .sp .5
+..
+.TH XScreenSaver 1 "13-Mar-01" "X Version 11"
+.SH NAME
+molecule - draws 3D moleclear structures
+.SH SYNOPSIS
+.B gltext
+[\-display \fIhost:display.screen\fP] [\-window] [\-root]
+[\-visual \fIvisual\fP] [\-delay \fImicroseconds\fP] [\-fps]
+[\-wander] [\-no-wander]
+[\-spin \fIaxes\fP]
+[\-no-spin]
+[\-wire]
+[\-timeout \fIseconds\fP]
+[\-labels] [\-no-labels]
+[\-titles] [\-no-titles]
+[\-atoms] [\-no-atoms]
+[\-bonds] [\-no-bonds]
+[\-molecule \fIfilename\fP]
+.SH DESCRIPTION
+The \fImolecule\fP program draws several different representations of
+molecules.  Some common molecules are built in, and it can read PDB
+(Protein Data Base) files as input.
+.SH OPTIONS
+.I molecule
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-fps
+Display a running tally of how many frames per second are being rendered.
+In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
+your GL performance.
+.TP 8
+.B \-wander
+Move the molecules around the screen.
+.TP 8
+.B \-no\-wander
+Keep the molecule centered on the screen.  This is the default.
+.TP 8
+.B \-spin
+Which axes around which the molecule should spin.  The default is "XYZ",
+meaning rotate it freely in space.  "\fB\-spin Z\fP" would rotate the
+molecule in the plane of the screen while not rotating it into or out
+of the screen; etc.
+.TP 8
+.B \-no\-spin
+Don't spin it at all: the same as \fB\-spin ""\fP.
+.TP 8
+.B \-labels
+Draw labels on the atoms (or the spot where the atoms would be.)
+This is the default.
+.TP 8
+.B \-no\-labels
+Do not draw labels on the atoms.
+.TP 8
+.B \-titles
+Print the name of the molecule and its chemical formula at the top of
+the screen.
+.TP 8
+.B \-no\-titles
+Do not print the molecule name.
+.TP 8
+.B \-atoms
+Represent the atoms as shaded spheres of appropriate sizes.
+This is the default.
+.TP 8
+.B \-no\-atoms
+Do not draw spheres for the atoms: only draw bond lines.
+.TP 8
+.B \-bonds
+Represent the atomic bonds as solid tubes of appropriate thicknesses.
+This is the default.
+.TP 8
+.B \-no\-bonds
+Do not draw the bonds: instead, make the spheres for the atoms be
+larger, for a "space-filling" representation of the molecule.
+.TP 8
+.B \-wire
+Draw a wireframe rendition of the molecule: this will consist only of
+single-pixel lines for the bonds, and text labels where the atoms go.
+This will be very fast.
+.TP 8
+.B \-timeout \fIseconds\fP
+When using the built-in data set, change to a new molecule every
+this-many seconds.  Default is 20 seconds.
+.TP 8
+.B \-molecule \fIfilename\fP
+Instead of using the built-in molecules, read one from the given file.
+This file must be in PDB (Protein Data Base) format.  (Note that it's
+not uncommon for PDB files to contain only the atoms, with no (or
+little) information about the atomic bonds.)
+.PP
+When the molecule is too large (bigger than about 30 angstroms from
+side to side), the \fI\-label\fP option will be automatically turned
+off, because otherwise, the labels would overlap and completely obscure
+the display.
+
+When the molecule is around 150 angstroms from side to side, wireframe
+mode will be turned on (because otherwise it would be too slow.)
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.PP
+Documentation on the PDB file format:
+.EX
+http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html
+.EE
+A good source of PDB files:
+.EX
+http://www.sci.ouc.bc.ca/chem/molecule/molecule.html
+.EE
+.SH COPYRIGHT
+Copyright \(co 2001 by Jamie Zawinski.
+Permission to use, copy, modify, distribute, and sell this software and
+its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation.  No representations are made about the
+suitability of this software for any purpose.  It is provided "as is"
+without express or implied warranty.
+.SH AUTHOR
+Jamie Zawinski <jwz@jwz.org>
index 6a001d1831ba8088aaef127e411cf483294bb59e..9d81200967abf0a7daf049bf97a3b14f805d15da 100644 (file)
@@ -60,6 +60,7 @@ static const char sccsid[] = "@(#)pipes.c     4.07 97/11/24 xlockmore";
                                        "*count:                2       \n"                     \
                                        "*cycles:               5       \n"                     \
                                        "*size:                 500     \n"                     \
+                       "*showFPS:      False   \n"                 \
                                        "*fisheye:              True    \n"                     \
                                        "*tightturns:   False   \n"                     \
                                        "*rotatepipes:  True    \n"
@@ -113,11 +114,7 @@ ModeSpecOpt pipes_opts =
 #ifdef USE_MODULES
 ModStruct   pipes_description =
 {"pipes", "init_pipes", "draw_pipes", "release_pipes",
-#if defined( MESA ) && defined( SLOW )
  "draw_pipes",
-#else
- "change_pipes",
-#endif
  "change_pipes", NULL, &pipes_opts,
  1000, 2, 5, 500, 4, 1.0, "",
  "Shows a selfbuilding pipe system", 0, NULL};
@@ -145,9 +142,8 @@ ModStruct   pipes_description =
 /*************************************************************************/
 
 typedef struct {
-#if defined( MESA ) && defined( SLOW )
        int         flip;
-#endif
+
        GLint       WindH, WindW;
        int         Cells[HCELLS][VCELLS][HCELLS];
        int         usedcolors[DEFINEDCOLORS];
@@ -502,6 +498,8 @@ reshape_pipes(ModeInfo * mi, int width, int height)
        /*glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 15.0); */
        gluPerspective(65.0, (GLfloat) width / (GLfloat) height, 0.1, 20.0);
        glMatrixMode(GL_MODELVIEW);
+
+  glClear(GL_COLOR_BUFFER_BIT);
 }
 
 static void
@@ -696,13 +694,6 @@ draw_pipes(ModeInfo * mi)
        if (!pp->glx_context)
                return;
 
-       glXMakeCurrent(display, window, *(pp->glx_context));
-
-#if defined( MESA ) && defined( SLOW )
-       glDrawBuffer(GL_BACK);
-#else
-       glDrawBuffer(GL_FRONT);
-#endif
        glPushMatrix();
 
        glTranslatef(0.0, 0.0, fisheye ? -3.8 : -4.8);
@@ -733,9 +724,7 @@ draw_pipes(ModeInfo * mi)
                glTranslatef((pp->PX - 16) / 3.0 * 4.0, (pp->PY - 12) / 3.0 * 4.0, (pp->PZ - 16) / 3.0 * 4.0);
                /* Finish the system with another sphere */
                mySphere(0.6);
-#if defined( MESA ) && defined( SLOW )
-               glXSwapBuffers(display, window);
-#endif
+
                glPopMatrix();
 
                /* If the maximum number of system was drawn, restart (clearing the screen), */
@@ -971,11 +960,9 @@ draw_pipes(ModeInfo * mi)
 
        glFlush();
 
-#if defined( MESA ) && defined( SLOW )
-       pp->flip = !pp->flip;
-       if (pp->flip)
-               glXSwapBuffers(display, window);
-#endif
+    glXSwapBuffers(display, window);
+
+    if (mi->fps_p) do_fps (mi);
 }
 
 void
index 8e946659b9a8f6dc6f51290290b991c88818c1a0..eb4e50a19d5d2bfe635028ad326c075e025d2cbd 100644 (file)
@@ -533,7 +533,6 @@ rotate(GLfloat *pos, GLfloat *v, GLfloat *dv, GLfloat max_v)
 void
 init_gasket(ModeInfo *mi)
 {
-  Bool wireframe_p = MI_IS_WIREFRAME(mi);
   int           screen = MI_SCREEN(mi);
   gasketstruct *gp;
 
@@ -562,11 +561,6 @@ init_gasket(ModeInfo *mi)
   gp->ddy = 0.00006 + frand(0.00003);
   gp->ddz = 0.00006 + frand(0.00003);
 
-  gp->ddx = 0.00001;
-  gp->ddy = 0.00001;
-  gp->ddz = 0.00001;
-
-
   gp->ncolors = 255;
   gp->colors = (XColor *) calloc(gp->ncolors, sizeof(XColor));
   make_smooth_colormap (0, 0, 0,
index d29c37d8818f717784d69382cbc4a8c6227c5250..a6d5745caccce1c48704d5acb95cd1bef773cb81 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * starwars, Copyright (c) 1998-2001 Jamie Zawinski <jwz@jwz.org> and
- * Claudio Matauoka <claudio@helllabs.org>
+ * Claudio Matsuoka <claudio@helllabs.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -29,6 +29,8 @@
  *           20010124 jwz       Rewrote large sections to add the ability to
  *                              run a subprocess, customization of the font
  *                              size and other parameters, etc.
+ *           20010224 jepler@mail.inetnebr.com  made the lines be anti-aliased,
+ *                              made the text fade to black at the end.
  */
 
 #include <X11/Intrinsic.h>
@@ -42,19 +44,26 @@ extern XtAppContext app;
 #define sws_opts       xlockmore_opts
 
 #define DEF_PROGRAM    ZIPPY_PROGRAM
-#define DEF_LINES      "500"
+#define DEF_LINES      "125"
 #define DEF_STEPS      "35"
 #define DEF_SPIN       "0.03"
 #define DEF_FONT_SIZE  "-1"
 #define DEF_COLUMNS    "-1"
 #define DEF_WRAP       "True"
 #define DEF_ALIGN      "Center"
+#define DEF_SMOOTH     "True"
+#define DEF_THICK      "True"
+#define DEF_FADE       "True"
 
 #define TAB_WIDTH        8
 
 #define BASE_FONT_SIZE    18 /* magic */
 #define BASE_FONT_COLUMNS 80 /* magic */
 
+#define MAX_THICK_LINES   25
+#define FONT_WEIGHT       14
+#define KEEP_ASPECT
+#undef DEBUG
 
 #define DEFAULTS       "*delay:        40000 \n"                    \
                        "*showFPS:      False \n"                    \
@@ -63,6 +72,9 @@ extern XtAppContext app;
                        "*lines:        " DEF_LINES             "\n" \
                        "*spin:         " DEF_SPIN              "\n" \
                        "*steps:        " DEF_STEPS             "\n" \
+                        "*smooth:       " DEF_SMOOTH            "\n" \
+                        "*thick:        " DEF_THICK             "\n" \
+                        "*fade:         " DEF_FADE              "\n" \
                        "*starwars.fontSize: " DEF_FONT_SIZE    "\n" \
                        "*starwars.columns:  " DEF_COLUMNS      "\n" \
                        "*starwars.lineWrap: " DEF_WRAP         "\n" \
@@ -101,6 +113,9 @@ typedef struct {
   double font_scale;
   double intra_line_scroll;
 
+  int line_pixel_height;
+  GLfloat line_thickness;
+
 } sws_configuration;
 
 
@@ -113,6 +128,9 @@ static float star_spin;
 static float font_size;
 static int target_columns;
 static int wrap_p;
+static int smooth_p;
+static int thick_p;
+static int fade_p;
 static char *alignment_str;
 static int alignment;
 
@@ -123,6 +141,12 @@ static XrmOptionDescRec opts[] = {
   {"-spin",      ".starwars.spin",     XrmoptionSepArg, (caddr_t) 0 },
   {"-size",     ".starwars.fontSize", XrmoptionSepArg, (caddr_t) 0 },
   {"-columns",  ".starwars.columns",  XrmoptionSepArg, (caddr_t) 0 },
+  {"-smooth",    ".starwars.smooth",   XrmoptionNoArg,  (caddr_t) "True" },
+  {"-no-smooth", ".starwars.smooth",   XrmoptionNoArg,  (caddr_t) "False" },
+  {"-thick",     ".starwars.thick",    XrmoptionNoArg,  (caddr_t) "True" },
+  {"-no-thick",  ".starwars.thick",    XrmoptionNoArg,  (caddr_t) "False" },
+  {"-fade",      ".starwars.fade",     XrmoptionNoArg,  (caddr_t) "True" },
+  {"-no-fade",   ".starwars.fade",     XrmoptionNoArg,  (caddr_t) "False" },
   {"-wrap",     ".starwars.lineWrap", XrmoptionNoArg,  (caddr_t) "True" },
   {"-no-wrap",  ".starwars.lineWrap", XrmoptionNoArg,  (caddr_t) "False" },
   {"-nowrap",   ".starwars.lineWrap", XrmoptionNoArg,  (caddr_t) "False" },
@@ -140,6 +164,9 @@ static argtype vars[] = {
   {(caddr_t *) &target_columns, "columns", "Integer", DEF_COLUMNS, t_Int},
   {(caddr_t *) &wrap_p,         "lineWrap","Boolean", DEF_COLUMNS, t_Bool},
   {(caddr_t *) &alignment_str,  "alignment","Alignment",DEF_ALIGN, t_String},
+  {(caddr_t *) &smooth_p,       "smooth",  "Boolean", DEF_SMOOTH,  t_Bool},
+  {(caddr_t *) &thick_p,        "thick",   "Boolean", DEF_THICK,   t_Bool},
+  {(caddr_t *) &fade_p,         "fade",    "Boolean", DEF_FADE,    t_Bool},
 };
 
 ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -151,6 +178,7 @@ ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
 static char *
 untabify (const char *string)
 {
+  const char *ostring = string;
   char *result = (char *) malloc ((strlen(string) * 8) + 1);
   char *out = result;
   int col = 0;
@@ -169,6 +197,11 @@ untabify (const char *string)
           *out++ = *string++;
           col = 0;
         }
+      else if (*string == '\010')    /* backspace */
+        {
+          if (string > ostring)
+            out--, string++;
+        }
       else
         {
           *out++ = *string++;
@@ -176,9 +209,30 @@ untabify (const char *string)
         }
     }
   *out = 0;
+
   return result;
 }
 
+static void
+strip (char *s, Bool leading, Bool trailing)
+{
+  int L = strlen(s);
+  if (trailing)
+    while (L > 0 && (s[L-1] == ' ' || s[L-1] == '\t'))
+      s[L--] = 0;
+  if (leading)
+    {
+      char *s2 = s;
+      while (*s2 == ' ' || *s2 == '\t')
+        s2++;
+      if (s == s2)
+        return;
+      while (*s2)
+        *s++ = *s2++;
+      *s = 0;
+    }
+}
+
 
 \f
 /* Subprocess.
@@ -316,6 +370,8 @@ get_more_lines (sws_configuration *sc)
           {
             char *t = sc->lines[sc->total_lines];
             char *ut = untabify (t);
+            strip (ut, (alignment == 0), 1); /* if centering, strip
+                                                leading whitespace too */
             sc->lines[sc->total_lines] = ut;
             free (t);
           }
@@ -355,45 +411,40 @@ draw_string (int x, int y, const char *s)
   if (!s || !*s) return;
   glPushMatrix ();
   glTranslatef (x, y, 0);
+
   while (*s)
     glutStrokeCharacter (GLUT_FONT, *s++);
   glPopMatrix ();
 }
 
 
-#if 0
+#ifdef DEBUG
 static void
 grid (double width, double height, double spacing, double z)
 {
   double x, y;
   for (y = 0; y <= height/2; y += spacing)
     {
-      glBegin(GL_LINE_LOOP);
+      glBegin(GL_LINES);
       glVertex3f(-width/2,  y, z);
       glVertex3f( width/2,  y, z);
-      glEnd();
-      glBegin(GL_LINE_LOOP);
       glVertex3f(-width/2, -y, z);
       glVertex3f( width/2, -y, z);
       glEnd();
     }
   for (x = 0; x <= width/2; x += spacing)
     {
-      glBegin(GL_LINE_LOOP);
+      glBegin(GL_LINES);
       glVertex3f( x, -height/2, z);
       glVertex3f( x,  height/2, z);
-      glEnd();
-      glBegin(GL_LINE_LOOP);
       glVertex3f(-x, -height/2, z);
       glVertex3f(-x,  height/2, z);
       glEnd();
     }
 
-  glBegin(GL_LINE_LOOP);
+  glBegin(GL_LINES);
   glVertex3f(-width, 0, z);
   glVertex3f( width, 0, z);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
   glVertex3f(0, -height, z);
   glVertex3f(0,  height, z);
   glEnd();
@@ -428,24 +479,21 @@ box (double width, double height, double depth)
   glEnd();
 
   glEnd();
-  glBegin(GL_LINE_LOOP);
+  glBegin(GL_LINES);
   glVertex3f(-width/2,   height/2,  depth/2);
   glVertex3f(-width/2,  -height/2, -depth/2);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
+
   glVertex3f( width/2,   height/2,  depth/2);
   glVertex3f( width/2,  -height/2, -depth/2);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
+
   glVertex3f(-width/2,  -height/2,  depth/2);
   glVertex3f(-width/2,   height/2, -depth/2);
-  glEnd();
-  glBegin(GL_LINE_LOOP);
+
   glVertex3f( width/2,  -height/2,  depth/2);
   glVertex3f( width/2,   height/2, -depth/2);
   glEnd();
 }
-#endif /* 0 */
+#endif /* DEBUG */
 
 
 /* Window management, etc
@@ -454,29 +502,87 @@ void
 reshape_sws (ModeInfo *mi, int width, int height)
 {
   sws_configuration *sc = &scs[MI_SCREEN(mi)];
-  static Bool stars_done = False;
 
-  glViewport (0, 0, (GLint) width, (GLint) height);
-  if (!stars_done)
-    {
-      int i;
-      int nstars = width * height / 320;
-      glDeleteLists (sc->star_list, 1);
-      sc->star_list = glGenLists (1);
-      glNewList (sc->star_list, GL_COMPILE);
-      glBegin (GL_POINTS);
-      for (i = 0; i < nstars; i++)
-        {
-          GLfloat c = 0.6 + 0.3 * random() / RAND_MAX;
-          glColor3f (c, c, c);
-          glVertex3f (2 * width  * (0.5 - 1.0 * random() / RAND_MAX),
-                      2 * height * (0.5 - 1.0 * random() / RAND_MAX),
-                      0.0);
-        }
-      glEnd ();
-      glEndList ();
-      stars_done = True;
-    }
+  /* Set up matrices for perspective text display
+   */
+  {
+    GLfloat desired_aspect = (GLfloat) 3/4;
+    int w = mi->xgwa.width;
+    int h = mi->xgwa.height;
+
+#ifdef KEEP_ASPECT
+    h = w * desired_aspect;
+#endif
+
+    glMatrixMode (GL_PROJECTION);
+    glViewport (0, 0, w, h);
+
+    glMatrixMode (GL_MODELVIEW);
+    glLoadIdentity ();
+    gluPerspective (80.0, 1/desired_aspect, 10, 500000);
+    gluLookAt (0.0, 0.0, 4600.0,
+               0.0, 0.0, 0.0,
+               0.0, 1.0, 0.0);
+    glRotatef (-60.0, 1.0, 0.0, 0.0);
+
+    /* The above gives us an arena where the bottom edge of the screen is
+       represented by the line (-2100,-3140,0) - ( 2100,-3140,0). */
+
+    /* Now let's move the origin to the front of the screen. */
+    glTranslatef (0.0, -3140, 0.0);
+
+    /* And then let's scale so that the bottom of the screen is 1.0 wide. */
+    glScalef (4200, 4200, 4200);
+  }
+
+
+  /* Construct stars (number of stars is dependent on size of screen) */
+  {
+    int i;
+    int nstars = width * height / 320;
+    glDeleteLists (sc->star_list, 1);
+    sc->star_list = glGenLists (1);
+    glNewList (sc->star_list, GL_COMPILE);
+    glBegin (GL_POINTS);
+    for (i = 0; i < nstars; i++)
+      {
+        GLfloat c = 0.6 + 0.3 * random() / RAND_MAX;
+        glColor3f (c, c, c);
+        glVertex3f (2 * width  * (0.5 - 1.0 * random() / RAND_MAX),
+                    2 * height * (0.5 - 1.0 * random() / RAND_MAX),
+                    0.0);
+      }
+    glEnd ();
+    glEndList ();
+  }
+
+
+  /* Compute the height in pixels of the line at the bottom of the screen. */
+  {
+    GLdouble mm[17], pm[17];
+    GLint vp[5];
+    GLfloat x = 0.5, y1 = 0, z = 0;
+    GLfloat y2 = sc->line_height;
+    GLdouble wx=-1, wy1=-1, wy2=-1, wz=-1;
+
+    glGetDoublev (GL_MODELVIEW_MATRIX, mm);
+    glGetDoublev (GL_PROJECTION_MATRIX, pm);
+    glGetIntegerv (GL_VIEWPORT, vp);
+    gluProject (x, y1, z, mm, pm, vp, &wx, &wy1, &wz);
+    gluProject (x, y2, z, mm, pm, vp, &wx, &wy2, &wz);
+    sc->line_pixel_height = (wy2 - wy1);
+    glLineWidth (1);
+  }
+
+  /* Compute the best looking line thickness for the bottom line.
+   */
+  if (!thick_p)
+    sc->line_thickness = 1.0;
+  else
+    sc->line_thickness = (GLfloat) sc->line_pixel_height / FONT_WEIGHT;
+
+  if (sc->line_thickness < 1.2)
+    sc->line_thickness = 1.0;
 }
 
 
@@ -487,11 +593,17 @@ gl_init (ModeInfo *mi)
 
   program = get_string_resource ("program", "Program");
 
-  glMatrixMode (GL_MODELVIEW);
-
   glDisable (GL_LIGHTING);
   glDisable (GL_DEPTH_TEST);
 
+  if (smooth_p) 
+    {
+      glEnable (GL_LINE_SMOOTH);
+      glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
+      glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 
+      glEnable (GL_BLEND);
+    }
+
   sc->text_list = glGenLists (1);
   glNewList (sc->text_list, GL_COMPILE);
   glEndList ();
@@ -499,6 +611,8 @@ gl_init (ModeInfo *mi)
   sc->star_list = glGenLists (1);
   glNewList (sc->star_list, GL_COMPILE);
   glEndList ();
+
+  sc->line_thickness = 1.0;
 }
 
 
@@ -575,6 +689,32 @@ init_sws (ModeInfo *mi)
 }
 
 
+static void
+draw_stars (ModeInfo *mi)
+{
+  sws_configuration *sc = &scs[MI_SCREEN(mi)];
+
+  glMatrixMode (GL_PROJECTION);
+  glPushMatrix ();
+  {
+    glLoadIdentity ();
+
+    glMatrixMode (GL_MODELVIEW);
+    glPushMatrix ();
+    {
+      glLoadIdentity ();
+      glOrtho (-0.5 * MI_WIDTH(mi),  0.5 * MI_WIDTH(mi),
+               -0.5 * MI_HEIGHT(mi), 0.5 * MI_HEIGHT(mi),
+               -100.0, 100.0);
+      glRotatef (sc->star_theta, 0.0, 0.0, 1.0);
+      glCallList (sc->star_list);
+    }
+    glPopMatrix ();
+  }
+  glMatrixMode (GL_PROJECTION);
+  glPopMatrix ();
+}
+
 void
 draw_sws (ModeInfo *mi)
 {
@@ -594,33 +734,20 @@ draw_sws (ModeInfo *mi)
 
   glClear (GL_COLOR_BUFFER_BIT);
 
-  glPushMatrix ();
+  draw_stars (mi);
 
-  glMatrixMode (GL_PROJECTION);
-  glLoadIdentity ();
-  glOrtho (-0.5 * MI_WIDTH(mi),  0.5 * MI_WIDTH(mi),
-           -0.5 * MI_HEIGHT(mi), 0.5 * MI_HEIGHT(mi),
-           -100.0, 100.0);
-  glRotatef (sc->star_theta, 0.0, 0.0, 1.0);
-  glCallList (sc->star_list);
-
-  glLoadIdentity ();
-  gluPerspective (80.0, 4.0/3.0, 10, 500000);
   glMatrixMode (GL_MODELVIEW);
-  gluLookAt (0.0, 0.0, 4600.0,
-             0.0, 0.0, 0.0,
-             0.0, 1.0, 0.0);
-
-  glRotatef (-60.0, 1.0, 0.0, 0.0);
-
-  /* The above gives us an arena where the bottom edge of the screen is
-     represented by the line (-2100,-3140,0) - ( 2100,-3140,0). */
-
-  /* Now let's move the origin to the front of the screen. */
-  glTranslatef (0.0, -3140, 0.0);
+  glPushMatrix ();
 
-  /* And then let's scale so that the bottom of the screen is 1.0 wide. */
-  glScalef (4200, 4200, 4200);
+#ifdef DEBUG
+  glColor3f (0.4, 0.4, 0.4);
+  glLineWidth (1);
+  glTranslatef(0, 1, 0);
+  box (1, 1, 1);
+  glTranslatef(0, -1, 0);
+  box (1, 1, 1);
+  grid (1, 1, sc->line_height, 0);
+#endif /* DEBUG */
 
   /* Scroll to current position */
   glTranslatef (0.0, sc->intra_line_scroll, 0.0);
@@ -669,19 +796,45 @@ draw_sws (ModeInfo *mi)
                        * sc->line_height);
           double xoff = 0;
           char *line = sc->lines[i];
-#if 0
+#ifdef DEBUG
           char n[20];
           sprintf(n, "%d:", i);
           draw_string (x / sc->font_scale, y / sc->font_scale, n);
-#endif
+#endif /* DEBUG */
           if (!line || !*line)
             continue;
 
+          if (sc->line_thickness != 1)
+            {
+              int max_thick_lines = MAX_THICK_LINES;
+              GLfloat thinnest_line = 1.0;
+              GLfloat thickest_line = sc->line_thickness;
+              GLfloat range = thickest_line - thinnest_line;
+              GLfloat thickness;
+
+              int j = sc->total_lines - i - 1;
+
+              if (j > max_thick_lines)
+                thickness = thinnest_line;
+              else
+                thickness = (thinnest_line +
+                             (range * ((max_thick_lines - j) /
+                                       (GLfloat) max_thick_lines)));
+
+              glLineWidth (thickness);
+            }
+
           if (alignment >= 0)
             xoff = 1.0 - (glutStrokeLength(GLUT_FONT, line) * sc->font_scale);
           if (alignment == 0)
             xoff /= 2;
 
+          if (fade_p)
+            {
+              double factor = 1.0 * i / sc->total_lines;
+              glColor3f (factor, factor, 0.5 * factor);
+            }
+
           draw_string ((x + xoff) / sc->font_scale, y / sc->font_scale, line);
         }
       glPopMatrix ();
index 8b52ae7d9476535ff2ab1e30d835f8ece29407a7..f2a83b6e66c0b9ca3e30c2bc95d8e037ddbef80b 100644 (file)
@@ -27,6 +27,8 @@ starwars - draws a perspective text crawl, like at the beginning of the movie
 [\-spin \fIfloat\fP]
 [\-steps \fIinteger\fP]
 [\-delay \fIusecs\fP]
+[\-no-smooth]
+[\-no-thick]
 .SH DESCRIPTION
 The \fIstarwars\fP program runs another program to generate a stream of
 text, then animates that text receeding into the background at an angle,
@@ -100,7 +102,7 @@ The default is centered.
 .TP 8
 .B \-lines \fIinteger\fP
 How many lines should be allowed to be on the screen before they fall off
-the end.  The default is 500.
+the end.  The default is 125.
 .TP 8
 .B \-spin \fIfloat\fP
 The star field on the background slowly rotates.  This is how fast.
@@ -117,6 +119,15 @@ The delay between steps of the animation; default is 40000 (1/25th second.)
 Display a running tally of how many frames per second are being rendered.
 In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
 your GL performance.
+.TP 8
+.B \-no\-smooth
+Turn off anti-aliasing of the lines used to draw the font.
+This will make the text blockier, but may improve performance.
+.TP 8
+.B \-no\-thick
+Turn off use of thick lines for the characters that are close to the
+foreground.  This will make the text appear unnaturally skinny, but 
+may improve performance.
 .SH ENVIRONMENT
 .PP
 .TP 8
@@ -130,7 +141,7 @@ stored in the RESOURCE_MANAGER property.
 .BR X (1),
 .BR xscreensaver (1)
 .SH COPYRIGHT
-Copyright \(co 1998-2001 by Jamie Zawinski and Claudio Matauoka.
+Copyright \(co 1998-2001 by Jamie Zawinski and Claudio Matsuoka.
 Permission to use, copy, modify, distribute, and sell this software and
 its documentation for any purpose is hereby granted without fee,
 provided that the above copyright notice appear in all copies and that
diff --git a/hacks/images/molecules/adenine.pdb b/hacks/images/molecules/adenine.pdb
new file mode 100644 (file)
index 0000000..354056c
--- /dev/null
@@ -0,0 +1,37 @@
+HEADER    Adenine: Vitamin B4; Purine base nucleotide
+COMPND    jb09aden
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Mon Sep 18 15:35:27 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.394   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.084   1.211   0.000  1.00  0.00 
+HETATM    4  N           1       1.337   2.342  -0.002  1.00  0.00 
+HETATM    5  C           1      -0.017   2.313  -0.003  1.00  0.00 
+HETATM    6  N           1      -0.710   1.149  -0.001  1.00  0.00 
+HETATM    7  N           1      -0.391  -1.291   0.006  1.00  0.00 
+HETATM    8  C           1       0.731  -2.049   0.010  1.00  0.00 
+HETATM    9  N           1       1.843  -1.276   0.007  1.00  0.00 
+HETATM   10  N           1       3.485   1.257   0.004  1.00  0.00 
+HETATM   11  H           1      -0.567   3.254  -0.004  1.00  0.00 
+HETATM   12  H           1      -1.347  -1.630   0.010  1.00  0.00 
+HETATM   13  H           1       0.738  -3.139   0.017  1.00  0.00 
+HETATM   14  H           1       3.799   2.220  -0.037  1.00  0.00 
+HETATM   15  H           1       3.839   0.818   0.847  1.00  0.00 
+CONECT    1    2    2    6    7
+CONECT    2    1    1    3    9
+CONECT    3    2    4    4   10
+CONECT    4    3    3    5
+CONECT    5    4    6    6   11
+CONECT    6    1    5    5
+CONECT    7    1    8   12
+CONECT    8    7    9    9   13
+CONECT    9    2    8    8
+CONECT   10    3   14   15
+CONECT   11    5
+CONECT   12    7
+CONECT   13    8
+CONECT   14   10
+CONECT   15   10
+MASTER        0    0    0    0    0    0    0    0   15    0   15    0
+END
diff --git a/hacks/images/molecules/adrenochrome.pdb b/hacks/images/molecules/adrenochrome.pdb
new file mode 100644 (file)
index 0000000..c4cbef2
--- /dev/null
@@ -0,0 +1,55 @@
+HEADER    Adrenochrome: a nerve cell transmission inhibitor, and hallucinogen
+COMPND    adrenochrome
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Tue Aug 29 08:56:34 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.400   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.056   1.235   0.000  1.00  0.00 
+HETATM    4  C           1       1.351   2.436  -0.011  1.00  0.00 
+HETATM    5  C           1      -0.047   2.437  -0.027  1.00  0.00 
+HETATM    6  C           1      -0.714   1.206  -0.013  1.00  0.00 
+HETATM    7  O           1      -0.597  -1.046  -0.002  1.00  0.00 
+HETATM    8  O           1      -1.918   1.181  -0.023  1.00  0.00 
+HETATM    9  N           1       2.243   3.571  -0.065  1.00  0.00 
+HETATM   10  C           1       1.825   4.648   0.846  1.00  0.00 
+HETATM   11  C           1       3.553   3.011   0.321  1.00  0.00 
+HETATM   12  C           1       3.538   1.506  -0.050  1.00  0.00 
+HETATM   13  H           1       4.088   0.906   0.675  1.00  0.00 
+HETATM   14  O           1       4.023   1.295  -1.381  1.00  0.00 
+HETATM   15  H           1       1.962  -0.934  -0.006  1.00  0.00 
+HETATM   16  H           1      -0.608   3.370  -0.059  1.00  0.00 
+HETATM   17  H           1       1.674   4.250   1.849  1.00  0.00 
+HETATM   18  H           1       0.895   5.089   0.489  1.00  0.00 
+HETATM   19  H           1       2.596   5.418   0.873  1.00  0.00 
+HETATM   20  H           1       3.683   3.101   1.400  1.00  0.00 
+HETATM   21  H           1       4.364   3.531  -0.190  1.00  0.00 
+HETATM   22  H           1       4.963   1.501  -1.423  1.00  0.00 
+CONECT    1    2    6    7
+CONECT    1    7
+CONECT    2    1    3   15
+CONECT    2    3
+CONECT    3    2    4   12
+CONECT    4    3    5    9
+CONECT    4    5
+CONECT    5    4    6   16
+CONECT    6    1    5    8
+CONECT    6    8
+CONECT    7    1
+CONECT    8    6
+CONECT    9    4   10   11
+CONECT   10    9   17   18   19
+CONECT   11    9   12   20   21
+CONECT   12    3   11   13   14
+CONECT   13   12
+CONECT   14   12   22
+CONECT   15    2
+CONECT   16    5
+CONECT   17   10
+CONECT   18   10
+CONECT   19   10
+CONECT   20   11
+CONECT   21   11
+CONECT   22   14
+MASTER        0    0    0    0    0    0    0    0   22    0   22    0
+END
diff --git a/hacks/images/molecules/bucky.pdb b/hacks/images/molecules/bucky.pdb
new file mode 100644 (file)
index 0000000..30f5b1f
--- /dev/null
@@ -0,0 +1,156 @@
+HEADER    Buckminsterfullerine: Bucky Ball
+COMPND    bucky
+AUTHOR
+GENERATED BY SYMAPPS 1.0
+ATOM      1  C                   0.994   0.523  -3.137
+ATOM      2  C                   0.418  -0.689  -3.232
+ATOM      3  C                   1.239  -1.587  -2.654
+ATOM      4  C                   2.172   0.376  -2.500
+ATOM      5  C                   2.323  -0.928  -2.202
+ATOM      6  C                   1.297  -2.968  -0.779
+ATOM      7  C                   0.727  -2.610  -1.946
+ATOM      8  C                  -0.608  -2.733  -1.813
+ATOM      9  C                  -0.863  -3.172  -0.565
+ATOM     10  C                   0.315  -3.321   0.074
+ATOM     11  C                  -1.429  -1.836  -2.393
+ATOM     12  C                  -0.916  -0.814  -3.106
+ATOM     13  C                  -1.675   0.277  -2.878
+ATOM     14  C                  -2.657  -0.070  -2.024
+ATOM     15  C                  -2.506  -1.376  -1.724
+ATOM     16  C                  -1.096   1.488  -2.779
+ATOM     17  C                   0.239   1.614  -2.915
+ATOM     18  C                   0.658   2.557  -2.049
+ATOM     19  C                  -0.417   3.018  -1.381
+ATOM     20  C                  -1.503   2.359  -1.834
+ATOM     21  C                   1.833   2.405  -1.409
+ATOM     22  C                   2.596   1.319  -1.640
+ATOM     23  C                   3.167   0.957  -0.474
+ATOM     24  C                   2.760   1.823   0.475
+ATOM     25  C                   1.935   2.717  -0.104
+ATOM     26  C                   3.314  -0.348  -0.175
+ATOM     27  C                   2.899  -1.293  -1.041
+ATOM     28  C                   2.384  -2.314  -0.328
+ATOM     29  C                   2.486  -2.003   0.979
+ATOM     30  C                   3.063  -0.788   1.074
+ATOM     31  C                  -2.321   0.938   2.198
+ATOM     32  C                  -1.237   1.597   2.651
+ATOM     33  C                  -0.417   0.699   3.231
+ATOM     34  C                  -2.170  -0.366   2.497
+ATOM     35  C                  -0.993  -0.514   3.135
+ATOM     36  C                   1.671  -0.268   2.871
+ATOM     37  C                   0.916   0.824   3.104
+ATOM     38  C                   1.430   1.846   2.390
+ATOM     39  C                   2.506   1.386   1.722
+ATOM     40  C                   2.653   0.079   2.018
+ATOM     41  C                   0.609   2.745   1.813
+ATOM     42  C                  -0.727   2.622   1.945
+ATOM     43  C                  -1.298   2.984   0.779
+ATOM     44  C                  -0.315   3.332  -0.075
+ATOM     45  C                   0.863   3.183   0.564
+ATOM     46  C                  -2.378   2.321   0.325
+ATOM     47  C                  -2.896   1.302   1.038
+ATOM     48  C                  -3.315   0.358   0.172
+ATOM     49  C                  -3.062   0.797  -1.076
+ATOM     50  C                  -2.485   2.012  -0.982
+ATOM     51  C                  -3.159  -0.945   0.470
+ATOM     52  C                  -2.593  -1.310   1.637
+ATOM     53  C                  -1.837  -2.402   1.409
+ATOM     54  C                  -1.939  -2.714   0.103
+ATOM     55  C                  -2.759  -1.815  -0.477
+ATOM     56  C                  -0.658  -2.546   2.045
+ATOM     57  C                  -0.238  -1.605   2.914
+ATOM     58  C                   1.097  -1.482   2.780
+ATOM     59  C                   1.503  -2.349   1.832
+ATOM     60  C                   0.418  -3.010   1.379
+CONECT   21   25
+CONECT   26   27
+CONECT    2    3
+CONECT    1    4
+CONECT    7    8
+CONECT    8    9
+CONECT    9   10
+CONECT   27   28
+CONECT   28   29
+CONECT   29   30
+CONECT   26   30
+CONECT    6   10
+CONECT   11   12
+CONECT    3    7
+CONECT    8   11
+CONECT    3    5
+CONECT    1   17
+CONECT    5   27
+CONECT   12   13
+CONECT   13   14
+CONECT   14   15
+CONECT   11   15
+CONECT   16   17
+CONECT    6   28
+CONECT    4    5
+CONECT   18   21
+CONECT    1    2
+CONECT    4   22
+CONECT   17   18
+CONECT   18   19
+CONECT   19   20
+CONECT   16   20
+CONECT   21   22
+CONECT   23   26
+CONECT    6    7
+CONECT    2   12
+CONECT   13   16
+CONECT   22   23
+CONECT   23   24
+CONECT   24   25
+CONECT   36   40
+CONECT   41   42
+CONECT   33   37
+CONECT   38   41
+CONECT   33   35
+CONECT   31   47
+CONECT   35   57
+CONECT   42   43
+CONECT   43   44
+CONECT   44   45
+CONECT   41   45
+CONECT   46   47
+CONECT   36   58
+CONECT   34   35
+CONECT   48   51
+CONECT   31   32
+CONECT   34   52
+CONECT   47   48
+CONECT   48   49
+CONECT   49   50
+CONECT   46   50
+CONECT   51   52
+CONECT   53   56
+CONECT   36   37
+CONECT   32   42
+CONECT   43   46
+CONECT   52   53
+CONECT   53   54
+CONECT   54   55
+CONECT   51   55
+CONECT   56   57
+CONECT   32   33
+CONECT   31   34
+CONECT   37   38
+CONECT   38   39
+CONECT   39   40
+CONECT   57   58
+CONECT   58   59
+CONECT   59   60
+CONECT   56   60
+CONECT   10   60
+CONECT   29   59
+CONECT   30   40
+CONECT   24   39
+CONECT    9   54
+CONECT   15   55
+CONECT   14   49
+CONECT   20   50
+CONECT   19   44
+CONECT   25   45
+MASTER        0    0    0    0    0    0    0    0   60    0    0    0
+END
diff --git a/hacks/images/molecules/caffeine.pdb b/hacks/images/molecules/caffeine.pdb
new file mode 100644 (file)
index 0000000..830e75e
--- /dev/null
@@ -0,0 +1,54 @@
+HEADER    Caffeine: Trimethylxanthine; a cardiac stimulant and diuretic
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep 29 14:53:27 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.392   0.000   0.000  1.00  0.00 
+HETATM    3  N           1       2.076   1.164   0.000  1.00  0.00 
+HETATM    4  C           1       1.373   2.321  -0.003  1.00  0.00 
+HETATM    5  O           1       1.978   3.365  -0.017  1.00  0.00 
+HETATM    6  N           1       0.017   2.344   0.003  1.00  0.00 
+HETATM    7  C           1      -0.710   1.202   0.002  1.00  0.00 
+HETATM    8  O           1      -1.915   1.218  -0.006  1.00  0.00 
+HETATM    9  N           1      -0.404  -1.287  -0.019  1.00  0.00 
+HETATM   10  N           1       1.830  -1.279  -0.020  1.00  0.00 
+HETATM   11  C           1       0.715  -2.048  -0.031  1.00  0.00 
+HETATM   12  C           1      -1.795  -1.761  -0.044  1.00  0.00 
+HETATM   13  C           1       3.546   1.178  -0.016  1.00  0.00 
+HETATM   14  C           1      -0.690   3.634  -0.013  1.00  0.00 
+HETATM   15  H           1       0.720  -3.138  -0.055  1.00  0.00 
+HETATM   16  H           1      -1.813  -2.850  -0.090  1.00  0.00 
+HETATM   17  H           1      -2.307  -1.428   0.860  1.00  0.00 
+HETATM   18  H           1      -2.302  -1.352  -0.918  1.00  0.00 
+HETATM   19  H           1       3.894   1.455  -1.011  1.00  0.00 
+HETATM   20  H           1       3.929   0.190   0.239  1.00  0.00 
+HETATM   21  H           1       3.911   1.904   0.710  1.00  0.00 
+HETATM   22  H           1      -1.557   3.583   0.645  1.00  0.00 
+HETATM   23  H           1      -0.027   4.428   0.329  1.00  0.00 
+HETATM   24  H           1      -1.020   3.851  -1.029  1.00  0.00 
+CONECT    1    2    2    7    9
+CONECT    2    1    1    3   10
+CONECT    3    2    4   13
+CONECT    4    3    5    5    6
+CONECT    5    4    4
+CONECT    6    4    7   14
+CONECT    7    1    6    8    8
+CONECT    8    7    7
+CONECT    9    1   11   12
+CONECT   10    2   11   11
+CONECT   11    9   10   10   15
+CONECT   12    9   16   17   18
+CONECT   13    3   19   20   21
+CONECT   14    6   22   23   24
+CONECT   15   11
+CONECT   16   12
+CONECT   17   12
+CONECT   18   12
+CONECT   19   13
+CONECT   20   13
+CONECT   21   13
+CONECT   22   14
+CONECT   23   14
+CONECT   24   14
+MASTER        0    0    0    0    0    0    0    0   24    0   24    0
+END
diff --git a/hacks/images/molecules/chlordecone.pdb b/hacks/images/molecules/chlordecone.pdb
new file mode 100644 (file)
index 0000000..c49e754
--- /dev/null
@@ -0,0 +1,49 @@
+HEADER    Chlordecone: Kepone, an insecticide and fungicide
+COMPND    al1113
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Tue Aug 29 17:54:52 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  O           1       1.206   0.000   0.000  1.00  0.00 
+HETATM    3  C           1      -0.741   1.303   0.000  1.00  0.00 
+HETATM    4  C           1      -0.875   1.738  -1.482  1.00  0.00 
+HETATM    5  C           1      -0.879   0.377  -2.249  1.00  0.00 
+HETATM    6  C           1      -0.745  -0.666  -1.117  1.00  0.00 
+HETATM    7  C           1      -2.247   0.958  -0.112  1.00  0.00 
+HETATM    8  C           1      -2.380   1.999  -1.247  1.00  0.00 
+HETATM    9  C           1      -2.237  -0.385  -0.887  1.00  0.00 
+HETATM   10  C           1      -2.379   0.045  -2.350  1.00  0.00 
+HETATM   11  C           1      -3.162   1.358  -2.394  1.00  0.00 
+HETATM   12 Cl           1       0.142   3.061  -2.080  1.00  0.00 
+HETATM   13 Cl           1      -0.299   2.574   1.159  1.00  0.00 
+HETATM   14 Cl           1      -2.803   3.653  -0.734  1.00  0.00 
+HETATM   15 Cl           1      -3.272   1.132   1.330  1.00  0.00 
+HETATM   16 Cl           1      -3.275  -1.723  -0.285  1.00  0.00 
+HETATM   17 Cl           1      -4.883   1.128  -1.986  1.00  0.00 
+HETATM   18 Cl           1      -2.936   2.229  -3.931  1.00  0.00 
+HETATM   19 Cl           1      -2.805  -1.246  -3.509  1.00  0.00 
+HETATM   20 Cl           1       0.141   0.211  -3.696  1.00  0.00 
+HETATM   21 Cl           1      -0.301  -2.317  -1.612  1.00  0.00 
+CONECT    1    2    2    3    6
+CONECT    2    1    1
+CONECT    3    1    4    7   13
+CONECT    4    3    5    8   12
+CONECT    5    4    6   10   20
+CONECT    6    1    5    9   21
+CONECT    7    3    8    9   15
+CONECT    8    4    7   11   14
+CONECT    9    6    7   10   16
+CONECT   10    5    9   11   19
+CONECT   11    8   10   17   18
+CONECT   12    4
+CONECT   13    3
+CONECT   14    8
+CONECT   15    7
+CONECT   16    9
+CONECT   17   11
+CONECT   18   11
+CONECT   19   10
+CONECT   20    5
+CONECT   21    6
+MASTER        0    0    0    0    0    0    0    0   21    0   21    0
+END
diff --git a/hacks/images/molecules/cocaine.pdb b/hacks/images/molecules/cocaine.pdb
new file mode 100644 (file)
index 0000000..30c826f
--- /dev/null
@@ -0,0 +1,93 @@
+HEADER    Cocaine: Carboxylicacid methyl ester, an anesthetic
+COMPND    al3078
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.399   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.099   1.211   0.000  1.00  0.00 
+HETATM    4  C           1       1.400   2.423  -0.002  1.00  0.00 
+HETATM    5  C           1       0.001   2.423  -0.007  1.00  0.00 
+HETATM    6  C           1      -0.700   1.213  -0.005  1.00  0.00 
+HETATM    7  C           1      -2.156   1.218  -0.022  1.00  0.00 
+HETATM    8  O           1      -2.759   0.175  -0.044  1.00  0.00 
+HETATM    9  O           1      -2.806   2.379  -0.075  1.00  0.00 
+HETATM   10  C           1      -4.168   2.239   0.272  1.00  0.00 
+HETATM   11  C           1      -4.872   3.590   0.031  1.00  0.00 
+HETATM   12  C           1      -4.061   4.678   0.674  1.00  0.00 
+HETATM   13  O           1      -4.560   5.346   1.542  1.00  0.00 
+HETATM   14  O           1      -2.741   4.690   0.497  1.00  0.00 
+HETATM   15  C           1      -2.091   5.352   1.560  1.00  0.00 
+HETATM   16  C           1      -6.281   3.587   0.659  1.00  0.00 
+HETATM   17  N           1      -6.101   3.424   2.109  1.00  0.00 
+HETATM   18  C           1      -7.084   2.348   0.212  1.00  0.00 
+HETATM   19  C           1      -6.737   1.277   1.267  1.00  0.00 
+HETATM   20  C           1      -5.765   1.998   2.226  1.00  0.00 
+HETATM   21  C           1      -4.304   1.831   1.755  1.00  0.00 
+HETATM   22  C           1      -7.322   3.768   2.857  1.00  0.00 
+HETATM   23  H           1      -0.544  -0.944  -0.002  1.00  0.00 
+HETATM   24  H           1       1.944  -0.944   0.000  1.00  0.00 
+HETATM   25  H           1       3.189   1.211   0.001  1.00  0.00 
+HETATM   26  H           1       1.945   3.367  -0.004  1.00  0.00 
+HETATM   27  H           1      -0.544   3.368  -0.019  1.00  0.00 
+HETATM   28  H           1      -4.624   1.481  -0.363  1.00  0.00 
+HETATM   29  H           1      -4.942   3.777  -1.041  1.00  0.00 
+HETATM   30  H           1      -2.425   6.389   1.609  1.00  0.00 
+HETATM   31  H           1      -2.320   4.851   2.501  1.00  0.00 
+HETATM   32  H           1      -1.014   5.330   1.395  1.00  0.00 
+HETATM   33  H           1      -6.802   4.513   0.416  1.00  0.00 
+HETATM   34  H           1      -6.806   2.035  -0.795  1.00  0.00 
+HETATM   35  H           1      -8.152   2.564   0.250  1.00  0.00 
+HETATM   36  H           1      -6.275   0.397   0.819  1.00  0.00 
+HETATM   37  H           1      -7.641   0.988   1.803  1.00  0.00 
+HETATM   38  H           1      -5.872   1.638   3.249  1.00  0.00 
+HETATM   39  H           1      -3.995   0.793   1.881  1.00  0.00 
+HETATM   40  H           1      -3.664   2.470   2.364  1.00  0.00 
+HETATM   41  H           1      -8.166   3.167   2.523  1.00  0.00 
+HETATM   42  H           1      -7.551   4.823   2.706  1.00  0.00 
+HETATM   43  H           1      -7.155   3.591   3.920  1.00  0.00 
+CONECT    1    2    2    6   23
+CONECT    2    1    1    3   24
+CONECT    3    2    4    4   25
+CONECT    4    3    3    5   26
+CONECT    5    4    6    6   27
+CONECT    6    1    5    5    7
+CONECT    7    6    8    8    9
+CONECT    8    7    7
+CONECT    9    7   10
+CONECT   10    9   11   21   28
+CONECT   11   10   12   16   29
+CONECT   12   11   13   13   14
+CONECT   13   12   12
+CONECT   14   12   15
+CONECT   15   14   30   31   32
+CONECT   16   11   17   18   33
+CONECT   17   16   20   22
+CONECT   18   16   19   34   35
+CONECT   19   18   20   36   37
+CONECT   20   17   19   21   38
+CONECT   21   10   20   39   40
+CONECT   22   17   41   42   43
+CONECT   23    1
+CONECT   24    2
+CONECT   25    3
+CONECT   26    4
+CONECT   27    5
+CONECT   28   10
+CONECT   29   11
+CONECT   30   15
+CONECT   31   15
+CONECT   32   15
+CONECT   33   16
+CONECT   34   18
+CONECT   35   18
+CONECT   36   19
+CONECT   37   19
+CONECT   38   20
+CONECT   39   21
+CONECT   40   21
+CONECT   41   22
+CONECT   42   22
+CONECT   43   22
+MASTER        0    0    0    0    0    0    0    0   43    0   43    0
+END
diff --git a/hacks/images/molecules/codeine.pdb b/hacks/images/molecules/codeine.pdb
new file mode 100644 (file)
index 0000000..36a79fa
--- /dev/null
@@ -0,0 +1,93 @@
+HEADER    Methylmorphine: Codeine, a cough reflex inhibitor
+COMPND    al3083
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.400   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.107   1.211   0.000  1.00  0.00 
+HETATM    4  C           1       1.445   2.445  -0.038  1.00  0.00 
+HETATM    5  C           1       0.048   2.457   0.012  1.00  0.00 
+HETATM    6  C           1      -0.629   1.242   0.047  1.00  0.00 
+HETATM    7  C           1      -2.076   1.497  -0.256  1.00  0.00 
+HETATM    8  C           1      -2.718   0.335  -1.023  1.00  0.00 
+HETATM    9  C           1      -2.362  -0.955  -0.251  1.00  0.00 
+HETATM   10  C           1      -0.830  -1.234  -0.281  1.00  0.00 
+HETATM   11  C           1      -1.864   2.827  -1.015  1.00  0.00 
+HETATM   12  C           1      -2.785   1.642   1.099  1.00  0.00 
+HETATM   13  C           1      -2.549   0.335   1.888  1.00  0.00 
+HETATM   14  N           1      -2.944  -0.846   1.100  1.00  0.00 
+HETATM   15  C           1      -2.815  -2.080   1.892  1.00  0.00 
+HETATM   16  H           1      -3.800   0.464  -1.011  1.00  0.00 
+HETATM   17  C           1      -2.286   0.268  -2.470  1.00  0.00 
+HETATM   18  C           1      -2.002   1.392  -3.142  1.00  0.00 
+HETATM   19  C           1      -1.354   2.572  -2.453  1.00  0.00 
+HETATM   20  H           1      -2.774   3.428  -1.022  1.00  0.00 
+HETATM   21  O           1      -0.789   3.474  -0.352  1.00  0.00 
+HETATM   22  H           1      -1.514   3.472  -3.047  1.00  0.00 
+HETATM   23  O           1       0.051   2.305  -2.404  1.00  0.00 
+HETATM   24  O           1       2.148   3.606  -0.170  1.00  0.00 
+HETATM   25  H           1       1.942  -0.944  -0.064  1.00  0.00 
+HETATM   26  H           1       3.196   1.191  -0.044  1.00  0.00 
+HETATM   27  H           1      -2.856  -1.789  -0.750  1.00  0.00 
+HETATM   28  H           1      -0.570  -1.581  -1.281  1.00  0.00 
+HETATM   29  H           1      -0.575  -2.018   0.429  1.00  0.00 
+HETATM   30  H           1      -3.852   1.800   0.945  1.00  0.00 
+HETATM   31  H           1      -2.368   2.484   1.653  1.00  0.00 
+HETATM   32  H           1      -3.143   0.370   2.801  1.00  0.00 
+HETATM   33  H           1      -1.498   0.252   2.165  1.00  0.00 
+HETATM   34  H           1      -3.495  -2.034   2.743  1.00  0.00 
+HETATM   35  H           1      -1.796  -2.189   2.261  1.00  0.00 
+HETATM   36  H           1      -3.075  -2.943   1.279  1.00  0.00 
+HETATM   37  H           1      -2.526  -0.630  -3.039  1.00  0.00 
+HETATM   38  H           1      -1.938   1.338  -4.229  1.00  0.00 
+HETATM   39  H           1       0.396   2.184  -3.295  1.00  0.00 
+HETATM   40  C           1       2.068   4.090  -1.493  1.00  0.00 
+HETATM   41  H           1       2.413   3.325  -2.189  1.00  0.00 
+HETATM   42  H           1       1.038   4.360  -1.728  1.00  0.00 
+HETATM   43  H           1       2.699   4.974  -1.590  1.00  0.00 
+CONECT    1    2    2    6   10
+CONECT    2    1    1    3   25
+CONECT    3    2    4    4   26
+CONECT    4    3    3    5   24
+CONECT    5    4    6    6   21
+CONECT    6    1    5    5    7
+CONECT    7    6    8   11   12
+CONECT    8    7    9   16   17
+CONECT    9    8   10   14   27
+CONECT   10    1    9   28   29
+CONECT   11    7   19   20   21
+CONECT   12    7   13   30   31
+CONECT   13   12   14   32   33
+CONECT   14    9   13   15
+CONECT   15   14   34   35   36
+CONECT   16    8
+CONECT   17    8   18   18   37
+CONECT   18   17   17   19   38
+CONECT   19   11   18   22   23
+CONECT   20   11
+CONECT   21    5   11
+CONECT   22   19
+CONECT   23   19   39
+CONECT   24    4   40
+CONECT   25    2
+CONECT   26    3
+CONECT   27    9
+CONECT   28   10
+CONECT   29   10
+CONECT   30   12
+CONECT   31   12
+CONECT   32   13
+CONECT   33   13
+CONECT   34   15
+CONECT   35   15
+CONECT   36   15
+CONECT   37   17
+CONECT   38   18
+CONECT   39   23
+CONECT   40   24   41   42   43
+CONECT   41   40
+CONECT   42   40
+CONECT   43   40
+MASTER        0    0    0    0    0    0    0    0   43    0   43    0
+END
diff --git a/hacks/images/molecules/cyclohexane.pdb b/hacks/images/molecules/cyclohexane.pdb
new file mode 100644 (file)
index 0000000..db7b5f0
--- /dev/null
@@ -0,0 +1,151 @@
+HEADER    Cyclohexane: 1,2,3,4,5,6-hexaisopropylcyclohexane
+COMPND    al3063
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Sun Sep  3 10:20:00 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.565   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.185   1.436   0.000  1.00  0.00 
+HETATM    4  C           1       1.565   2.409   1.058  1.00  0.00 
+HETATM    5  C           1       0.011   2.333   1.199  1.00  0.00 
+HETATM    6  C           1      -0.636   0.914   1.102  1.00  0.00 
+HETATM    7  C           1       2.238  -0.920   1.062  1.00  0.00 
+HETATM    8  C           1       3.676  -1.279   0.632  1.00  0.00 
+HETATM    9  C           1       1.540  -2.282   1.218  1.00  0.00 
+HETATM   10  C           1       2.217   2.309   2.471  1.00  0.00 
+HETATM   11  C           1       1.987   3.605   3.278  1.00  0.00 
+HETATM   12  C           1       3.745   2.126   2.455  1.00  0.00 
+HETATM   13  C           1      -0.726   0.166   2.473  1.00  0.00 
+HETATM   14  C           1      -1.806  -0.942   2.413  1.00  0.00 
+HETATM   15  C           1      -1.162   1.048   3.662  1.00  0.00 
+HETATM   16  C           1      -0.814   3.472   0.513  1.00  0.00 
+HETATM   17  C           1      -0.477   3.821  -0.947  1.00  0.00 
+HETATM   18  C           1      -0.663   4.782   1.320  1.00  0.00 
+HETATM   19  C           1      -0.573   0.185  -1.439  1.00  0.00 
+HETATM   20  C           1      -2.077   0.514  -1.474  1.00  0.00 
+HETATM   21  C           1      -0.420  -1.124  -2.240  1.00  0.00 
+HETATM   22  C           1       2.365   2.070  -1.423  1.00  0.00 
+HETATM   23  C           1       3.380   3.248  -1.378  1.00  0.00 
+HETATM   24  C           1       2.947   1.067  -2.454  1.00  0.00 
+HETATM   25  H           1      -0.308  -1.011   0.219  1.00  0.00 
+HETATM   26  H           1       1.866  -0.481  -0.919  1.00  0.00 
+HETATM   27  H           1       3.219   1.312   0.276  1.00  0.00 
+HETATM   28  H           1       1.800   3.418   0.741  1.00  0.00 
+HETATM   29  H           1      -0.171   2.602   2.221  1.00  0.00 
+HETATM   30  H           1      -1.683   1.071   0.864  1.00  0.00 
+HETATM   31  H           1       2.274  -0.432   2.031  1.00  0.00 
+HETATM   32  H           1       4.296  -0.395   0.523  1.00  0.00 
+HETATM   33  H           1       3.659  -1.819  -0.314  1.00  0.00 
+HETATM   34  H           1       4.129  -1.913   1.395  1.00  0.00 
+HETATM   35  H           1       1.366  -2.731   0.241  1.00  0.00 
+HETATM   36  H           1       0.598  -2.162   1.743  1.00  0.00 
+HETATM   37  H           1       2.167  -2.946   1.814  1.00  0.00 
+HETATM   38  H           1       1.784   1.476   3.021  1.00  0.00 
+HETATM   39  H           1       0.931   3.795   3.446  1.00  0.00 
+HETATM   40  H           1       2.426   4.454   2.754  1.00  0.00 
+HETATM   41  H           1       2.462   3.505   4.254  1.00  0.00 
+HETATM   42  H           1       4.206   2.819   1.750  1.00  0.00 
+HETATM   43  H           1       3.992   1.100   2.194  1.00  0.00 
+HETATM   44  H           1       4.144   2.311   3.452  1.00  0.00 
+HETATM   45  H           1       0.232  -0.273   2.732  1.00  0.00 
+HETATM   46  H           1      -1.609  -1.663   1.627  1.00  0.00 
+HETATM   47  H           1      -2.784  -0.492   2.238  1.00  0.00 
+HETATM   48  H           1      -1.828  -1.479   3.361  1.00  0.00 
+HETATM   49  H           1      -1.986   1.697   3.365  1.00  0.00 
+HETATM   50  H           1      -0.323   1.642   4.019  1.00  0.00 
+HETATM   51  H           1      -1.487   0.415   4.488  1.00  0.00 
+HETATM   52  H           1      -1.870   3.206   0.555  1.00  0.00 
+HETATM   53  H           1      -0.618   2.957  -1.586  1.00  0.00 
+HETATM   54  H           1       0.544   4.192  -1.014  1.00  0.00 
+HETATM   55  H           1      -1.151   4.606  -1.289  1.00  0.00 
+HETATM   56  H           1       0.380   5.094   1.338  1.00  0.00 
+HETATM   57  H           1      -1.015   4.632   2.341  1.00  0.00 
+HETATM   58  H           1      -1.262   5.567   0.860  1.00  0.00 
+HETATM   59  H           1      -0.035   0.957  -1.972  1.00  0.00 
+HETATM   60  H           1      -2.246   1.523  -1.106  1.00  0.00 
+HETATM   61  H           1      -2.630  -0.201  -0.864  1.00  0.00 
+HETATM   62  H           1      -2.439   0.465  -2.501  1.00  0.00 
+HETATM   63  H           1      -0.991  -1.924  -1.768  1.00  0.00 
+HETATM   64  H           1       0.625  -1.418  -2.300  1.00  0.00 
+HETATM   65  H           1      -0.791  -0.971  -3.254  1.00  0.00 
+HETATM   66  H           1       1.430   2.438  -1.818  1.00  0.00 
+HETATM   67  H           1       4.327   2.902  -0.962  1.00  0.00 
+HETATM   68  H           1       3.011   4.079  -0.782  1.00  0.00 
+HETATM   69  H           1       3.557   3.619  -2.388  1.00  0.00 
+HETATM   70  H           1       2.183   0.367  -2.790  1.00  0.00 
+HETATM   71  H           1       3.780   0.521  -2.010  1.00  0.00 
+HETATM   72  H           1       3.306   1.606  -3.330  1.00  0.00 
+CONECT    1    2    6   19   25
+CONECT    2    1    3    7   26
+CONECT    3    2    4   22   27
+CONECT    4    3    5   10   28
+CONECT    5    4    6   16   29
+CONECT    6    1    5   13   30
+CONECT    7    2    8    9   31
+CONECT    8    7   32   33   34
+CONECT    9    7   35   36   37
+CONECT   10    4   11   12   38
+CONECT   11   10   39   40   41
+CONECT   12   10   42   43   44
+CONECT   13    6   14   15   45
+CONECT   14   13   46   47   48
+CONECT   15   13   49   50   51
+CONECT   16    5   17   18   52
+CONECT   17   16   53   54   55
+CONECT   18   16   56   57   58
+CONECT   19    1   20   21   59
+CONECT   20   19   60   61   62
+CONECT   21   19   63   64   65
+CONECT   22    3   23   24   66
+CONECT   23   22   67   68   69
+CONECT   24   22   70   71   72
+CONECT   25    1
+CONECT   26    2
+CONECT   27    3
+CONECT   28    4
+CONECT   29    5
+CONECT   30    6
+CONECT   31    7
+CONECT   32    8
+CONECT   33    8
+CONECT   34    8
+CONECT   35    9
+CONECT   36    9
+CONECT   37    9
+CONECT   38   10
+CONECT   39   11
+CONECT   40   11
+CONECT   41   11
+CONECT   42   12
+CONECT   43   12
+CONECT   44   12
+CONECT   45   13
+CONECT   46   14
+CONECT   47   14
+CONECT   48   14
+CONECT   49   15
+CONECT   50   15
+CONECT   51   15
+CONECT   52   16
+CONECT   53   17
+CONECT   54   17
+CONECT   55   17
+CONECT   56   18
+CONECT   57   18
+CONECT   58   18
+CONECT   59   19
+CONECT   60   20
+CONECT   61   20
+CONECT   62   20
+CONECT   63   21
+CONECT   64   21
+CONECT   65   21
+CONECT   66   22
+CONECT   67   23
+CONECT   68   23
+CONECT   69   23
+CONECT   70   24
+CONECT   71   24
+CONECT   72   24
+MASTER        0    0    0    0    0    0    0    0   72    0   72    0
+END
diff --git a/hacks/images/molecules/cytosine.pdb b/hacks/images/molecules/cytosine.pdb
new file mode 100644 (file)
index 0000000..e703179
--- /dev/null
@@ -0,0 +1,33 @@
+HEADER    Cytosine: Pyrimidine base nucleotide
+COMPND    jb09cyto
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep 29 12:35:29 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.398   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.070   1.227   0.000  1.00  0.00 
+HETATM    4  N           1       1.356   2.375   0.001  1.00  0.00 
+HETATM    5  C           1       0.004   2.350   0.002  1.00  0.00 
+HETATM    6  N           1      -0.667   1.176   0.001  1.00  0.00 
+HETATM    7  O           1      -0.611   3.389   0.004  1.00  0.00 
+HETATM    8  N           1       3.477   1.271   0.003  1.00  0.00 
+HETATM    9  H           1      -0.548  -0.942   0.000  1.00  0.00 
+HETATM   10  H           1       1.954  -0.938   0.001  1.00  0.00 
+HETATM   11  H           1      -1.681   1.178   0.002  1.00  0.00 
+HETATM   12  H           1       3.791   2.109   0.480  1.00  0.00 
+HETATM   13  H           1       3.844   0.453   0.477  1.00  0.00 
+CONECT    1    2    2    6    9
+CONECT    2    1    1    3   10
+CONECT    3    2    4    4    8
+CONECT    4    3    3    5
+CONECT    5    4    6    7    7
+CONECT    6    1    5   11
+CONECT    7    5    5
+CONECT    8    3   12   13
+CONECT    9    1
+CONECT   10    2
+CONECT   11    6
+CONECT   12    8
+CONECT   13    8
+MASTER        0    0    0    0    0    0    0    0   13    0   13    0
+END
diff --git a/hacks/images/molecules/dna.pdb b/hacks/images/molecules/dna.pdb
new file mode 100644 (file)
index 0000000..2788e2c
--- /dev/null
@@ -0,0 +1,973 @@
+HEADER    DNA: Deoxyribonucleic acid
+ATOM      1  O   ???     1       4.674  19.391 -10.106
+ATOM      2  C   ???     1       4.459  17.981  -9.876
+ATOM      3  C   ???     1       5.288  17.571  -8.673
+ATOM      4  O   ???     1       4.895  17.956  -7.317
+ATOM      5  C   ???     1       5.700  16.166  -8.515
+ATOM      6  O   ???     1       6.993  16.174  -7.868
+ATOM      7  C   ???     1       4.606  15.591  -7.605
+ATOM      8  C   ???     1       4.489  16.741  -6.607
+ATOM      9  N   ???     1       3.143  16.925  -5.903
+ATOM     10  C   ???     1       3.127  17.319  -4.578
+ATOM     11  O   ???     1       4.173  17.497  -3.993
+ATOM     12  N   ???     1       1.955  17.554  -3.958
+ATOM     13  C   ???     1       0.773  17.466  -4.621
+ATOM     14  N   ???     1      -0.393  17.691  -3.955
+ATOM     15  C   ???     1       0.722  17.134  -5.985
+ATOM     16  C   ???     1       1.945  16.843  -6.625
+ATOM     17  P   ???     1       7.833  14.873  -7.879
+ATOM     18  O   ???     1       6.913  13.703  -8.299
+ATOM     19  O   ???     1       9.116  15.075  -8.639
+ATOM     20  O   ???     1       8.137  14.505  -6.390
+ATOM     21  C   ???     1       9.093  15.196  -5.586
+ATOM     22  C   ???     1       8.913  14.574  -4.231
+ATOM     23  O   ???     1       7.518  14.735  -3.865
+ATOM     24  C   ???     1       9.081  13.086  -4.262
+ATOM     25  O   ???     1      10.078  12.703  -3.397
+ATOM     26  C   ???     1       7.686  12.473  -4.029
+ATOM     27  C   ???     1       7.063  13.543  -3.201
+ATOM     28  N   ???     1       5.563  13.566  -3.134
+ATOM     29  C   ???     1       4.657  13.394  -4.141
+ATOM     30  N   ???     1       3.380  13.664  -3.752
+ATOM     31  C   ???     1       3.485  14.024  -2.465
+ATOM     32  C   ???     1       2.474  14.525  -1.574
+ATOM     33  O   ???     1       1.309  14.806  -1.867
+ATOM     34  N   ???     1       2.958  14.808  -0.289
+ATOM     35  C   ???     1       4.279  14.700   0.121
+ATOM     36  N   ???     1       4.596  14.961   1.424
+ATOM     37  N   ???     1       5.242  14.292  -0.749
+ATOM     38  C   ???     1       4.801  13.971  -2.035
+ATOM     39  P   ???     1      10.462  11.185  -3.172
+ATOM     40  O   ???     1       9.914  10.272  -4.247
+ATOM     41  O   ???     1      11.949  11.216  -2.975
+ATOM     42  O   ???     1       9.792  10.862  -1.765
+ATOM     43  C   ???     1      10.265  11.478  -0.528
+ATOM     44  C   ???     1       9.204  11.248   0.526
+ATOM     45  O   ???     1       7.918  11.627   0.016
+ATOM     46  C   ???     1       9.052   9.838   1.036
+ATOM     47  O   ???     1       9.614   9.642   2.306
+ATOM     48  C   ???     1       7.597   9.524   0.982
+ATOM     49  C   ???     1       6.965  10.887   0.744
+ATOM     50  N   ???     1       5.832  10.810  -0.183
+ATOM     51  C   ???     1       4.534  11.009   0.257
+ATOM     52  O   ???     1       4.306  11.269   1.440
+ATOM     53  N   ???     1       3.534  10.905  -0.642
+ATOM     54  C   ???     1       3.770  10.552  -1.926
+ATOM     55  N   ???     1       2.773  10.591  -2.855
+ATOM     56  C   ???     1       5.043  10.250  -2.374
+ATOM     57  C   ???     1       6.091  10.396  -1.479
+ATOM     58  P   ???     1       9.660   8.226   2.989
+ATOM     59  O   ???     1       9.518   7.127   1.928
+ATOM     60  O   ???     1      10.794   8.089   3.999
+ATOM     61  O   ???     1       8.355   8.291   3.834
+ATOM     62  C   ???     1       8.139   9.269   4.865
+ATOM     63  C   ???     1       6.937   8.745   5.644
+ATOM     64  O   ???     1       5.814   8.819   4.753
+ATOM     65  C   ???     1       6.948   7.295   6.225
+ATOM     66  O   ???     1       6.417   7.199   7.512
+ATOM     67  C   ???     1       6.148   6.464   5.250
+ATOM     68  C   ???     1       5.222   7.503   4.599
+ATOM     69  N   ???     1       4.918   7.267   3.140
+ATOM     70  C   ???     1       5.599   6.623   2.107
+ATOM     71  N   ???     1       4.919   6.594   0.951
+ATOM     72  C   ???     1       3.772   7.259   1.254
+ATOM     73  C   ???     1       2.598   7.558   0.439
+ATOM     74  O   ???     1       2.404   7.232  -0.737
+ATOM     75  N   ???     1       1.575   8.214   1.141
+ATOM     76  C   ???     1       1.613   8.566   2.471
+ATOM     77  N   ???     1       0.502   9.125   3.046
+ATOM     78  N   ???     1       2.702   8.309   3.210
+ATOM     79  C   ???     1       3.753   7.669   2.570
+ATOM     80  P   ???     1       6.301   5.803   8.277
+ATOM     81  O   ???     1       6.480   4.589   7.476
+ATOM     82  O   ???     1       7.156   5.937   9.499
+ATOM     83  O   ???     1       4.740   5.694   8.620
+ATOM     84  C   ???     1       3.911   6.858   8.929
+ATOM     85  C   ???     1       2.515   6.690   8.311
+ATOM     86  O   ???     1       2.653   6.561   6.911
+ATOM     87  C   ???     1       1.684   5.487   8.712
+ATOM     88  O   ???     1       0.539   5.815   9.516
+ATOM     89  C   ???     1       1.353   4.792   7.399
+ATOM     90  C   ???     1       1.556   5.869   6.393
+ATOM     91  N   ???     1       1.967   5.365   5.052
+ATOM     92  C   ???     1       3.193   4.822   4.658
+ATOM     93  N   ???     1       3.258   4.448   3.362
+ATOM     94  C   ???     1       2.043   4.779   2.883
+ATOM     95  C   ???     1       1.417   4.673   1.562
+ATOM     96  N   ???     1       2.034   4.100   0.514
+ATOM     97  N   ???     1       0.156   5.177   1.374
+ATOM     98  C   ???     1      -0.498   5.699   2.441
+ATOM     99  N   ???     1      -0.077   5.807   3.720
+ATOM    100  C   ???     1       1.230   5.336   3.901
+ATOM    101  P   ???     1      -0.488   4.701  10.028
+ATOM    102  O   ???     1       0.013   3.297  10.287
+ATOM    103  O   ???     1      -1.183   5.233  11.229
+ATOM    104  O   ???     1      -1.483   4.559   8.784
+ATOM    105  C   ???     1      -2.385   5.609   8.332
+ATOM    106  C   ???     1      -3.291   4.910   7.309
+ATOM    107  O   ???     1      -2.610   4.636   6.060
+ATOM    108  C   ???     1      -3.923   3.568   7.700
+ATOM    109  O   ???     1      -5.162   3.352   7.126
+ATOM    110  C   ???     1      -2.961   2.582   7.123
+ATOM    111  C   ???     1      -2.754   3.200   5.763
+ATOM    112  N   ???     1      -1.583   2.605   5.066
+ATOM    113  C   ???     1      -0.368   2.242   5.588
+ATOM    114  N   ???     1       0.486   1.776   4.665
+ATOM    115  C   ???     1      -0.189   1.878   3.525
+ATOM    116  C   ???     1       0.183   1.571   2.180
+ATOM    117  N   ???     1       1.377   0.958   1.920
+ATOM    118  N   ???     1      -0.730   1.786   1.174
+ATOM    119  C   ???     1      -1.964   2.218   1.475
+ATOM    120  N   ???     1      -2.439   2.500   2.716
+ATOM    121  C   ???     1      -1.479   2.331   3.718
+ATOM    122  P   ???     1      -5.924   1.982   7.353
+ATOM    123  O   ???     1      -5.172   0.938   8.012
+ATOM    124  O   ???     1      -7.186   2.593   7.897
+ATOM    125  O   ???     1      -6.252   1.347   5.938
+ATOM    126  C   ???     1      -6.944   2.135   4.921
+ATOM    127  C   ???     1      -6.715   1.372   3.651
+ATOM    128  O   ???     1      -5.286   1.133   3.458
+ATOM    129  C   ???     1      -7.407   0.057   3.644
+ATOM    130  O   ???     1      -8.489   0.026   2.771
+ATOM    131  C   ???     1      -6.310  -0.990   3.438
+ATOM    132  C   ???     1      -5.156  -0.150   2.865
+ATOM    133  N   ???     1      -3.757  -0.647   3.037
+ATOM    134  C   ???     1      -2.979  -0.923   1.905
+ATOM    135  O   ???     1      -3.374  -0.727   0.747
+ATOM    136  N   ???     1      -1.687  -1.340   2.116
+ATOM    137  C   ???     1      -1.144  -1.494   3.381
+ATOM    138  O   ???     1       0.074  -1.754   3.445
+ATOM    139  C   ???     1      -1.948  -1.227   4.501
+ATOM    140  C   ???     1      -1.422  -1.319   5.892
+ATOM    141  C   ???     1      -3.248  -0.795   4.314
+ATOM    142  P   ???     1      -9.378  -1.306   2.603
+ATOM    143  O   ???     1      -9.127  -2.221   3.726
+ATOM    144  O   ???     1     -10.818  -1.001   2.258
+ATOM    145  O   ???     1      -8.753  -2.007   1.349
+ATOM    146  C   ???     1      -8.460  -1.252   0.127
+ATOM    147  C   ???     1      -7.623  -2.192  -0.688
+ATOM    148  O   ???     1      -6.477  -2.562   0.073
+ATOM    149  C   ???     1      -8.255  -3.511  -1.016
+ATOM    150  O   ???     1      -8.724  -3.527  -2.285
+ATOM    151  C   ???     1      -7.224  -4.587  -0.757
+ATOM    152  C   ???     1      -6.004  -3.753  -0.494
+ATOM    153  N   ???     1      -4.890  -4.263   0.346
+ATOM    154  C   ???     1      -3.627  -4.303  -0.238
+ATOM    155  O   ???     1      -3.413  -4.052  -1.439
+ATOM    156  N   ???     1      -2.559  -4.547   0.575
+ATOM    157  C   ???     1      -2.672  -4.694   1.927
+ATOM    158  O   ???     1      -1.603  -4.845   2.510
+ATOM    159  C   ???     1      -3.962  -4.607   2.537
+ATOM    160  C   ???     1      -4.169  -4.666   4.067
+ATOM    161  C   ???     1      -5.072  -4.416   1.690
+ATOM    162  P   ???     1      -9.083  -4.896  -2.982
+ATOM    163  O   ???     1      -9.692  -5.915  -2.114
+ATOM    164  O   ???     1      -9.784  -4.333  -4.195
+ATOM    165  O   ???     1      -7.769  -5.544  -3.501
+ATOM    166  C   ???     1      -6.988  -4.787  -4.548
+ATOM    167  C   ???     1      -5.787  -5.605  -4.680
+ATOM    168  O   ???     1      -5.186  -5.816  -3.381
+ATOM    169  C   ???     1      -6.160  -6.983  -5.172
+ATOM    170  O   ???     1      -5.775  -7.049  -6.554
+ATOM    171  C   ???     1      -5.475  -7.989  -4.170
+ATOM    172  C   ???     1      -4.470  -7.095  -3.471
+ATOM    173  N   ???     1      -4.143  -7.481  -2.064
+ATOM    174  C   ???     1      -2.880  -7.900  -1.674
+ATOM    175  O   ???     1      -1.981  -8.028  -2.497
+ATOM    176  N   ???     1      -2.644  -8.106  -0.357
+ATOM    177  C   ???     1      -3.593  -7.906   0.580
+ATOM    178  N   ???     1      -3.294  -8.029   1.897
+ATOM    179  C   ???     1      -4.887  -7.515   0.234
+ATOM    180  C   ???     1      -5.144  -7.290  -1.118
+ATOM    181  P   ???     1      -6.271  -8.185  -7.504
+ATOM    182  O   ???     1      -7.612  -8.682  -7.077
+ATOM    183  O   ???     1      -6.109  -7.701  -8.887
+ATOM    184  O   ???     1      -5.255  -9.348  -7.127
+ATOM    185  C   ???     1      -3.864  -9.233  -7.443
+ATOM    186  C   ???     1      -3.265 -10.503  -6.982
+ATOM    187  O   ???     1      -3.388 -10.408  -5.569
+ATOM    188  C   ???     1      -3.913 -11.848  -7.400
+ATOM    189  O   ???     1      -2.906 -12.861  -7.541
+ATOM    190  C   ???     1      -4.865 -12.134  -6.218
+ATOM    191  C   ???     1      -3.937 -11.700  -5.115
+ATOM    192  N   ???     1      -4.370 -11.653  -3.684
+ATOM    193  C   ???     1      -5.572 -11.359  -3.092
+ATOM    194  N   ???     1      -5.502 -11.208  -1.750
+ATOM    195  C   ???     1      -4.184 -11.405  -1.464
+ATOM    196  C   ???     1      -3.484 -11.398  -0.187
+ATOM    197  O   ???     1      -3.973 -11.294   0.939
+ATOM    198  N   ???     1      -2.117 -11.651  -0.293
+ATOM    199  C   ???     1      -1.432 -11.934  -1.458
+ATOM    200  N   ???     1      -0.114 -12.247  -1.341
+ATOM    201  N   ???     1      -2.059 -11.968  -2.664
+ATOM    202  C   ???     1      -3.452 -11.687  -2.620
+ATOM    203  P   ???     1      -2.430 -13.413  -8.952
+ATOM    204  O   ???     1      -3.259 -14.642  -9.185
+ATOM    205  O   ???     1      -2.433 -12.356 -10.046
+ATOM    206  O   ???     1      -0.882 -13.756  -8.697
+ATOM    207  C   ???     1       0.079 -12.685  -8.383
+ATOM    208  C   ???     1       1.266 -13.194  -7.564
+ATOM    209  O   ???     1       0.999 -13.349  -6.166
+ATOM    210  C   ???     1       1.851 -14.504  -7.958
+ATOM    211  O   ???     1       3.274 -14.536  -7.758
+ATOM    212  C   ???     1       1.034 -15.479  -7.076
+ATOM    213  C   ???     1       1.061 -14.732  -5.783
+ATOM    214  N   ???     1       0.018 -15.063  -4.744
+ATOM    215  C   ???     1       0.371 -15.193  -3.394
+ATOM    216  O   ???     1       1.555 -15.059  -3.043
+ATOM    217  N   ???     1      -0.605 -15.422  -2.469
+ATOM    218  C   ???     1      -1.903 -15.490  -2.823
+ATOM    219  N   ???     1      -2.850 -15.626  -1.852
+ATOM    220  C   ???     1      -2.311 -15.339  -4.167
+ATOM    221  C   ???     1      -1.315 -15.115  -5.135
+ATOM    222  P   ???     1       4.029 -15.922  -7.818
+ATOM    223  O   ???     1       3.416 -16.861  -8.809
+ATOM    224  O   ???     1       5.487 -15.559  -8.011
+ATOM    225  O   ???     1       3.714 -16.639  -6.402
+ATOM    226  C   ???     1       4.699 -16.656  -5.290
+ATOM    227  C   ???     1       4.464 -17.877  -4.385
+ATOM    228  O   ???     1       3.153 -17.818  -3.885
+ATOM    229  C   ???     1       4.685 -19.342  -4.849
+ATOM    230  O   ???     1       5.420 -20.114  -3.884
+ATOM    231  C   ???     1       3.295 -19.890  -5.050
+ATOM    232  C   ???     1       2.531 -19.057  -4.020
+ATOM    233  N   ???     1       1.056 -18.734  -4.183
+ATOM    234  C   ???     1       0.273 -18.422  -5.264
+ATOM    235  N   ???     1      -1.031 -18.317  -4.953
+ATOM    236  C   ???     1      -1.093 -18.575  -3.620
+ATOM    237  C   ???     1      -2.226 -18.671  -2.719
+ATOM    238  O   ???     1      -3.418 -18.578  -2.959
+ATOM    239  N   ???     1      -1.866 -18.877  -1.414
+ATOM    240  C   ???     1      -0.581 -18.991  -0.915
+ATOM    241  N   ???     1      -0.396 -19.286   0.409
+ATOM    242  N   ???     1       0.472 -18.926  -1.725
+ATOM    243  C   ???     1       0.163 -18.734  -3.100
+ATOM    244  O   ???     1      -6.680 -19.825   7.699
+ATOM    245  C   ???     1      -6.306 -20.194   6.315
+ATOM    246  C   ???     1      -5.053 -19.445   5.920
+ATOM    247  O   ???     1      -4.418 -19.699   4.659
+ATOM    248  C   ???     1      -4.994 -17.972   6.135
+ATOM    249  O   ???     1      -3.710 -17.604   6.687
+ATOM    250  C   ???     1      -5.163 -17.510   4.681
+ATOM    251  C   ???     1      -4.498 -18.548   3.817
+ATOM    252  N   ???     1      -5.087 -18.713   2.382
+ATOM    253  C   ???     1      -4.235 -18.653   1.283
+ATOM    254  O   ???     1      -3.023 -18.634   1.498
+ATOM    255  N   ???     1      -4.753 -18.618   0.009
+ATOM    256  C   ???     1      -6.087 -18.707  -0.208
+ATOM    257  N   ???     1      -6.569 -18.815  -1.491
+ATOM    258  C   ???     1      -6.991 -18.809   0.869
+ATOM    259  C   ???     1      -6.468 -18.783   2.177
+ATOM    260  P   ???     1      -3.519 -16.827   8.069
+ATOM    261  O   ???     1      -4.231 -15.537   8.035
+ATOM    262  O   ???     1      -3.821 -17.708   9.240
+ATOM    263  O   ???     1      -1.956 -16.549   8.073
+ATOM    264  C   ???     1      -0.947 -17.650   8.003
+ATOM    265  C   ???     1       0.325 -17.111   7.352
+ATOM    266  O   ???     1       0.066 -17.132   5.962
+ATOM    267  C   ???     1       0.613 -15.669   7.661
+ATOM    268  O   ???     1       1.856 -15.388   8.203
+ATOM    269  C   ???     1       0.265 -14.853   6.465
+ATOM    270  C   ???     1       0.285 -15.854   5.380
+ATOM    271  N   ???     1      -0.824 -15.536   4.452
+ATOM    272  C   ???     1      -2.113 -15.141   4.752
+ATOM    273  N   ???     1      -2.810 -14.728   3.684
+ATOM    274  C   ???     1      -1.957 -14.896   2.652
+ATOM    275  C   ???     1      -2.142 -14.574   1.260
+ATOM    276  O   ???     1      -3.179 -14.132   0.774
+ATOM    277  N   ???     1      -1.001 -14.804   0.451
+ATOM    278  C   ???     1       0.192 -15.336   0.902
+ATOM    279  N   ???     1       1.184 -15.515   0.002
+ATOM    280  N   ???     1       0.382 -15.672   2.205
+ATOM    281  C   ???     1      -0.729 -15.444   3.059
+ATOM    282  P   ???     1       2.293 -13.866   8.376
+ATOM    283  O   ???     1       1.086 -13.042   8.626
+ATOM    284  O   ???     1       3.396 -13.816   9.377
+ATOM    285  O   ???     1       2.922 -13.420   7.025
+ATOM    286  C   ???     1       4.007 -14.108   6.407
+ATOM    287  C   ???     1       4.054 -13.498   5.013
+ATOM    288  O   ???     1       2.780 -13.607   4.393
+ATOM    289  C   ???     1       4.326 -12.019   4.962
+ATOM    290  O   ???     1       5.715 -11.793   5.178
+ATOM    291  C   ???     1       3.795 -11.615   3.565
+ATOM    292  C   ???     1       2.647 -12.603   3.423
+ATOM    293  N   ???     1       1.244 -12.133   3.536
+ATOM    294  C   ???     1       0.427 -12.102   2.410
+ATOM    295  O   ???     1       0.835 -12.492   1.323
+ATOM    296  N   ???     1      -0.850 -11.713   2.533
+ATOM    297  C   ???     1      -1.391 -11.421   3.723
+ATOM    298  N   ???     1      -2.628 -10.831   3.762
+ATOM    299  C   ???     1      -0.649 -11.574   4.913
+ATOM    300  C   ???     1       0.708 -11.938   4.796
+ATOM    301  P   ???     1       6.336 -10.366   5.128
+ATOM    302  O   ???     1       5.449  -9.428   5.909
+ATOM    303  O   ???     1       7.745 -10.482   5.620
+ATOM    304  O   ???     1       6.290 -10.020   3.569
+ATOM    305  C   ???     1       7.055 -10.811   2.615
+ATOM    306  C   ???     1       6.734 -10.308   1.217
+ATOM    307  O   ???     1       5.297 -10.192   1.100
+ATOM    308  C   ???     1       7.286  -8.975   0.718
+ATOM    309  O   ???     1       7.393  -8.945  -0.714
+ATOM    310  C   ???     1       6.225  -7.973   1.221
+ATOM    311  C   ???     1       4.974  -8.794   0.845
+ATOM    312  N   ???     1       3.773  -8.455   1.602
+ATOM    313  C   ???     1       3.640  -7.981   2.890
+ATOM    314  N   ???     1       2.384  -7.801   3.240
+ATOM    315  C   ???     1       1.667  -8.192   2.129
+ATOM    316  C   ???     1       0.216  -8.383   1.898
+ATOM    317  O   ???     1      -0.692  -8.327   2.724
+ATOM    318  N   ???     1      -0.115  -8.589   0.569
+ATOM    319  C   ???     1       0.807  -8.696  -0.461
+ATOM    320  N   ???     1       0.345  -8.866  -1.749
+ATOM    321  N   ???     1       2.149  -8.691  -0.209
+ATOM    322  C   ???     1       2.524  -8.455   1.086
+ATOM    323  P   ???     1       7.575  -7.564  -1.471
+ATOM    324  O   ???     1       7.955  -6.449  -0.479
+ATOM    325  O   ???     1       8.741  -7.728  -2.458
+ATOM    326  O   ???     1       6.254  -7.373  -2.307
+ATOM    327  C   ???     1       6.024  -8.272  -3.442
+ATOM    328  C   ???     1       5.019  -7.727  -4.455
+ATOM    329  O   ???     1       3.633  -7.467  -4.002
+ATOM    330  C   ???     1       5.448  -6.462  -5.147
+ATOM    331  O   ???     1       5.043  -6.461  -6.529
+ATOM    332  C   ???     1       4.765  -5.380  -4.322
+ATOM    333  C   ???     1       3.522  -6.055  -3.759
+ATOM    334  N   ???     1       3.349  -5.765  -2.284
+ATOM    335  C   ???     1       4.280  -5.485  -1.291
+ATOM    336  N   ???     1       3.718  -5.218  -0.101
+ATOM    337  C   ???     1       2.389  -5.311  -0.337
+ATOM    338  C   ???     1       1.210  -5.068   0.470
+ATOM    339  N   ???     1       1.297  -4.554   1.713
+ATOM    340  N   ???     1      -0.018  -5.382  -0.038
+ATOM    341  C   ???     1      -0.107  -5.816  -1.309
+ATOM    342  N   ???     1       0.900  -5.988  -2.198
+ATOM    343  C   ???     1       2.136  -5.713  -1.640
+ATOM    344  P   ???     1       4.958  -5.104  -7.365
+ATOM    345  O   ???     1       5.978  -4.099  -6.859
+ATOM    346  O   ???     1       5.021  -5.615  -8.756
+ATOM    347  O   ???     1       3.560  -4.533  -7.033
+ATOM    348  C   ???     1       2.362  -5.321  -7.154
+ATOM    349  C   ???     1       1.273  -4.376  -6.720
+ATOM    350  O   ???     1       1.389  -4.141  -5.316
+ATOM    351  C   ???     1       1.322  -2.993  -7.366
+ATOM    352  O   ???     1       0.329  -2.831  -8.391
+ATOM    353  C   ???     1       1.333  -1.991  -6.194
+ATOM    354  C   ???     1       0.897  -2.852  -5.006
+ATOM    355  N   ???     1       1.537  -2.528  -3.709
+ATOM    356  C   ???     1       2.863  -2.388  -3.374
+ATOM    357  N   ???     1       3.059  -2.100  -2.081
+ATOM    358  C   ???     1       1.825  -2.100  -1.562
+ATOM    359  C   ???     1       1.312  -1.785  -0.242
+ATOM    360  N   ???     1       2.105  -1.419   0.792
+ATOM    361  N   ???     1      -0.035  -1.681  -0.088
+ATOM    362  C   ???     1      -0.863  -1.975  -1.112
+ATOM    363  N   ???     1      -0.516  -2.341  -2.360
+ATOM    364  C   ???     1       0.871  -2.352  -2.537
+ATOM    365  P   ???     1       0.096  -1.455  -9.141
+ATOM    366  O   ???     1       1.403  -0.827  -9.454
+ATOM    367  O   ???     1      -0.784  -1.681 -10.328
+ATOM    368  O   ???     1      -0.708  -0.618  -8.042
+ATOM    369  C   ???     1      -2.026  -1.063  -7.621
+ATOM    370  C   ???     1      -2.460  -0.283  -6.398
+ATOM    371  O   ???     1      -1.482  -0.424  -5.323
+ATOM    372  C   ???     1      -2.702   1.209  -6.627
+ATOM    373  O   ???     1      -4.034   1.463  -6.980
+ATOM    374  C   ???     1      -2.262   1.804  -5.316
+ATOM    375  C   ???     1      -1.039   0.909  -5.075
+ATOM    376  N   ???     1      -0.210   0.993  -3.836
+ATOM    377  C   ???     1      -0.736   1.017  -2.546
+ATOM    378  O   ???     1      -1.957   0.851  -2.314
+ATOM    379  N   ???     1       0.164   1.108  -1.498
+ATOM    380  C   ???     1       1.538   1.199  -1.677
+ATOM    381  O   ???     1       2.250   1.226  -0.672
+ATOM    382  C   ???     1       2.054   1.179  -2.992
+ATOM    383  C   ???     1       3.521   1.367  -3.242
+ATOM    384  C   ???     1       1.153   1.065  -4.071
+ATOM    385  P   ???     1      -4.609   2.928  -7.269
+ATOM    386  O   ???     1      -3.623   3.841  -7.848
+ATOM    387  O   ???     1      -5.862   2.588  -8.032
+ATOM    388  O   ???     1      -4.884   3.503  -5.838
+ATOM    389  C   ???     1      -5.822   2.805  -4.954
+ATOM    390  C   ???     1      -5.829   3.570  -3.680
+ATOM    391  O   ???     1      -4.506   3.511  -3.227
+ATOM    392  C   ???     1      -6.172   5.046  -3.735
+ATOM    393  O   ???     1      -7.441   5.291  -3.123
+ATOM    394  C   ???     1      -5.006   5.747  -3.052
+ATOM    395  C   ???     1      -4.274   4.597  -2.370
+ATOM    396  N   ???     1      -2.767   4.703  -2.324
+ATOM    397  C   ???     1      -2.085   4.842  -1.117
+ATOM    398  O   ???     1      -2.678   5.024  -0.043
+ATOM    399  N   ???     1      -0.697   4.808  -1.172
+ATOM    400  C   ???     1       0.014   4.669  -2.366
+ATOM    401  O   ???     1       1.237   4.636  -2.312
+ATOM    402  C   ???     1      -0.682   4.595  -3.576
+ATOM    403  C   ???     1       0.027   4.511  -4.924
+ATOM    404  C   ???     1      -2.079   4.607  -3.526
+ATOM    405  P   ???     1      -8.018   6.766  -2.948
+ATOM    406  O   ???     1      -7.635   7.566  -4.152
+ATOM    407  O   ???     1      -9.476   6.706  -2.680
+ATOM    408  O   ???     1      -7.320   7.281  -1.652
+ATOM    409  C   ???     1      -7.634   6.745  -0.332
+ATOM    410  C   ???     1      -6.740   7.536   0.578
+ATOM    411  O   ???     1      -5.356   7.300   0.129
+ATOM    412  C   ???     1      -6.992   9.072   0.483
+ATOM    413  O   ???     1      -7.500   9.642   1.681
+ATOM    414  C   ???     1      -5.648   9.640   0.010
+ATOM    415  C   ???     1      -4.683   8.515   0.475
+ATOM    416  N   ???     1      -3.379   8.489  -0.149
+ATOM    417  C   ???     1      -2.166   8.504   0.541
+ATOM    418  O   ???     1      -2.158   8.517   1.779
+ATOM    419  N   ???     1      -1.010   8.423  -0.184
+ATOM    420  C   ???     1      -1.042   8.316  -1.562
+ATOM    421  N   ???     1       0.083   8.179  -2.370
+ATOM    422  C   ???     1      -2.249   8.284  -2.244
+ATOM    423  C   ???     1      -3.426   8.372  -1.520
+ATOM    424  P   ???     1      -8.072  11.149   1.769
+ATOM    425  O   ???     1      -8.359  11.946   0.569
+ATOM    426  O   ???     1      -9.253  11.131   2.697
+ATOM    427  O   ???     1      -6.842  11.901   2.427
+ATOM    428  C   ???     1      -6.195  11.442   3.679
+ATOM    429  C   ???     1      -4.912  12.282   3.817
+ATOM    430  O   ???     1      -3.876  11.994   2.873
+ATOM    431  C   ???     1      -5.090  13.728   3.629
+ATOM    432  O   ???     1      -4.492  14.502   4.643
+ATOM    433  C   ???     1      -4.542  14.026   2.249
+ATOM    434  C   ???     1      -3.391  13.126   2.230
+ATOM    435  N   ???     1      -2.856  12.707   0.897
+ATOM    436  C   ???     1      -3.473  12.442  -0.319
+ATOM    437  N   ???     1      -2.637  12.015  -1.293
+ATOM    438  C   ???     1      -1.436  12.007  -0.688
+ATOM    439  C   ???     1      -0.127  11.608  -1.179
+ATOM    440  O   ???     1       0.172  11.212  -2.291
+ATOM    441  N   ???     1       0.874  11.683  -0.204
+ATOM    442  C   ???     1       0.686  12.119   1.100
+ATOM    443  N   ???     1       1.749  12.103   1.939
+ATOM    444  N   ???     1      -0.519  12.555   1.528
+ATOM    445  C   ???     1      -1.544  12.446   0.633
+ATOM    446  P   ???     1      -5.127  15.894   4.858
+ATOM    447  O   ???     1      -5.425  16.629   3.561
+ATOM    448  O   ???     1      -6.250  15.527   5.754
+ATOM    449  O   ???     1      -4.002  16.793   5.584
+ATOM    450  C   ???     1      -3.238  16.255   6.678
+ATOM    451  C   ???     1      -1.830  16.039   6.216
+ATOM    452  O   ???     1      -1.871  15.509   4.883
+ATOM    453  C   ???     1      -0.873  17.253   6.173
+ATOM    454  O   ???     1      -0.153  17.520   7.416
+ATOM    455  C   ???     1       0.090  16.942   5.027
+ATOM    456  C   ???     1      -0.595  15.819   4.260
+ATOM    457  N   ???     1      -0.730  16.057   2.785
+ATOM    458  C   ???     1       0.227  15.578   1.903
+ATOM    459  O   ???     1       1.293  15.046   2.291
+ATOM    460  N   ???     1      -0.055  15.614   0.600
+ATOM    461  C   ???     1      -1.197  16.106   0.107
+ATOM    462  N   ???     1      -1.457  15.971  -1.213
+ATOM    463  C   ???     1      -2.157  16.670   0.937
+ATOM    464  C   ???     1      -1.890  16.634   2.320
+ATOM    465  P   ???     1       0.085  19.035   7.891
+ATOM    466  O   ???     1      -1.103  19.918   7.465
+ATOM    467  O   ???     1       0.455  19.118   9.333
+ATOM    468  O   ???     1       1.304  19.503   6.967
+ATOM    469  C   ???     1       2.588  19.092   7.215
+ATOM    470  C   ???     1       3.346  19.369   5.986
+ATOM    471  O   ???     1       2.968  18.509   4.924
+ATOM    472  C   ???     1       3.325  20.751   5.383
+ATOM    473  O   ???     1       3.907  21.749   6.266
+ATOM    474  C   ???     1       4.203  20.393   4.162
+ATOM    475  C   ???     1       3.516  19.074   3.711
+ATOM    476  N   ???     1       2.407  19.227   2.697
+ATOM    477  C   ???     1       1.165  19.783   2.799
+ATOM    478  N   ???     1       0.472  19.784   1.639
+ATOM    479  C   ???     1       1.290  19.206   0.763
+ATOM    480  C   ???     1       1.097  18.852  -0.624
+ATOM    481  O   ???     1       0.123  18.893  -1.321
+ATOM    482  N   ???     1       2.227  18.334  -1.206
+ATOM    483  C   ???     1       3.438  18.092  -0.570
+ATOM    484  N   ???     1       4.500  17.628  -1.280
+ATOM    485  N   ???     1       3.571  18.322   0.734
+ATOM    486  C   ???     1       2.483  18.897   1.373
+CONECT    1    2
+CONECT    2    1    3
+CONECT    3    2    4    5
+CONECT    4    3    8
+CONECT    5    3    6    7
+CONECT    6    5   17
+CONECT    7    5    8
+CONECT    8    4    7    9
+CONECT    9    8   10   16
+CONECT   10    9   11   12
+CONECT   11   10
+CONECT   12   10   13
+CONECT   13   12   14   15
+CONECT   14   13
+CONECT   15   13   16
+CONECT   16    9   15
+CONECT   17    6   18   19   20
+CONECT   18   17
+CONECT   19   17
+CONECT   20   17   21
+CONECT   21   20   22
+CONECT   22   21   23   24
+CONECT   23   22   27
+CONECT   24   22   25   26
+CONECT   25   24   39
+CONECT   26   24   27
+CONECT   27   23   26   28
+CONECT   28   27   29   38
+CONECT   29   28   30
+CONECT   30   29   31
+CONECT   31   30   32   38
+CONECT   32   31   33   34
+CONECT   33   32
+CONECT   34   32   35
+CONECT   35   34   36   37
+CONECT   36   35
+CONECT   37   35   38
+CONECT   38   28   31   37
+CONECT   39   25   40   41   42
+CONECT   40   39
+CONECT   41   39
+CONECT   42   39   43
+CONECT   43   42   44
+CONECT   44   43   45   46
+CONECT   45   44   49
+CONECT   46   44   47   48
+CONECT   47   46   58
+CONECT   48   46   49
+CONECT   49   45   48   50
+CONECT   50   49   51   57
+CONECT   51   50   52   53
+CONECT   52   51
+CONECT   53   51   54
+CONECT   54   53   55   56
+CONECT   55   54
+CONECT   56   54   57
+CONECT   57   50   56
+CONECT   58   47   59   60   61
+CONECT   59   58
+CONECT   60   58
+CONECT   61   58   62
+CONECT   62   61   63
+CONECT   63   62   64   65
+CONECT   64   63   68
+CONECT   65   63   66   67
+CONECT   66   65   80
+CONECT   67   65   68
+CONECT   68   64   67   69
+CONECT   69   68   70   79
+CONECT   70   69   71
+CONECT   71   70   72
+CONECT   72   71   73   79
+CONECT   73   72   74   75
+CONECT   74   73
+CONECT   75   73   76
+CONECT   76   75   77   78
+CONECT   77   76
+CONECT   78   76   79
+CONECT   79   69   72   78
+CONECT   80   66   81   82   83
+CONECT   81   80
+CONECT   82   80
+CONECT   83   80   84
+CONECT   84   83   85
+CONECT   85   84   86   87
+CONECT   86   85   90
+CONECT   87   85   88   89
+CONECT   88   87  101
+CONECT   89   87   90
+CONECT   90   86   89   91
+CONECT   91   90   92  100
+CONECT   92   91   93
+CONECT   93   92   94
+CONECT   94   93   95  100
+CONECT   95   94   96   97
+CONECT   96   95
+CONECT   97   95   98
+CONECT   98   97   99
+CONECT   99   98  100
+CONECT  100   91   94   99
+CONECT  101   88  102  103  104
+CONECT  102  101
+CONECT  103  101
+CONECT  104  101  105
+CONECT  105  104  106
+CONECT  106  105  107  108
+CONECT  107  106  111
+CONECT  108  106  109  110
+CONECT  109  108  122
+CONECT  110  108  111
+CONECT  111  107  110  112
+CONECT  112  111  113  121
+CONECT  113  112  114
+CONECT  114  113  115
+CONECT  115  114  116  121
+CONECT  116  115  117  118
+CONECT  117  116
+CONECT  118  116  119
+CONECT  119  118  120
+CONECT  120  119  121
+CONECT  121  112  115  120
+CONECT  122  109  123  124  125
+CONECT  123  122
+CONECT  124  122
+CONECT  125  122  126
+CONECT  126  125  127
+CONECT  127  126  128  129
+CONECT  128  127  132
+CONECT  129  127  130  131
+CONECT  130  129  142
+CONECT  131  129  132
+CONECT  132  128  131  133
+CONECT  133  132  134  141
+CONECT  134  133  135  136
+CONECT  135  134
+CONECT  136  134  137
+CONECT  137  136  138  139
+CONECT  138  137
+CONECT  139  137  140  141
+CONECT  140  139
+CONECT  141  133  139
+CONECT  142  130  143  145
+CONECT  143  142
+CONECT  145  142  146
+CONECT  146  145  147
+CONECT  147  146  148  149
+CONECT  148  147  152
+CONECT  149  147  150  151
+CONECT  150  149  162
+CONECT  151  149  152
+CONECT  152  148  151  153
+CONECT  153  152  154  161
+CONECT  154  153  155  156
+CONECT  155  154
+CONECT  156  154  157
+CONECT  157  156  158  159
+CONECT  158  157
+CONECT  159  157  160  161
+CONECT  160  159
+CONECT  161  153  159
+CONECT  162  150  163  164  165
+CONECT  163  162
+CONECT  164  162
+CONECT  165  162  166
+CONECT  166  165  167
+CONECT  167  166  168  169
+CONECT  168  167  172
+CONECT  169  167  170  171
+CONECT  170  169  181
+CONECT  171  169  172
+CONECT  172  168  171  173
+CONECT  173  172  174  180
+CONECT  174  173  175  176
+CONECT  175  174
+CONECT  176  174  177
+CONECT  177  176  178  179
+CONECT  178  177
+CONECT  179  177  180
+CONECT  180  173  179
+CONECT  181  170  182  183  184
+CONECT  182  181
+CONECT  183  181
+CONECT  184  181  185
+CONECT  185  184  186
+CONECT  186  185  187  188
+CONECT  187  186  191
+CONECT  188  186  189  190
+CONECT  189  188  203
+CONECT  190  188  191
+CONECT  191  187  190  192
+CONECT  192  191  193  202
+CONECT  193  192  194
+CONECT  194  193  195
+CONECT  195  194  196  202
+CONECT  196  195  197  198
+CONECT  197  196
+CONECT  198  196  199
+CONECT  199  198  200  201
+CONECT  200  199
+CONECT  201  199  202
+CONECT  202  192  195  201
+CONECT  203  189  204  205  206
+CONECT  204  203
+CONECT  205  203
+CONECT  206  203  207
+CONECT  207  206  208
+CONECT  208  207  209  210
+CONECT  209  208  213
+CONECT  210  208  211  212
+CONECT  211  210  222
+CONECT  212  210  213
+CONECT  213  209  212  214
+CONECT  214  213  215  221
+CONECT  215  214  216  217
+CONECT  216  215
+CONECT  217  215  218
+CONECT  218  217  219  220
+CONECT  219  218
+CONECT  220  218  221
+CONECT  221  214  220
+CONECT  222  211  223  224  225
+CONECT  223  222
+CONECT  224  222
+CONECT  225  222  226
+CONECT  226  225  227
+CONECT  227  226  228  229
+CONECT  228  227  232
+CONECT  229  227  230  231
+CONECT  230  229
+CONECT  231  229  232
+CONECT  232  228  231  233
+CONECT  233  232  234  243
+CONECT  234  233  235
+CONECT  235  234  236
+CONECT  236  235  237  243
+CONECT  237  236  238  239
+CONECT  238  237
+CONECT  239  237  240
+CONECT  240  239  241  242
+CONECT  241  240
+CONECT  242  240  243
+CONECT  243  233  236  242
+CONECT  244  245
+CONECT  245  244  246
+CONECT  246  245  247  248
+CONECT  247  246  251
+CONECT  248  246  249  250
+CONECT  249  248  260
+CONECT  250  248  251
+CONECT  251  247  250  252
+CONECT  252  251  253  259
+CONECT  253  252  254  255
+CONECT  254  253
+CONECT  255  253  256
+CONECT  256  255  257  258
+CONECT  257  256
+CONECT  258  256  259
+CONECT  259  252  258
+CONECT  260  249  261  262  263
+CONECT  261  260
+CONECT  262  260
+CONECT  263  260  264
+CONECT  264  263  265
+CONECT  265  264  266  267
+CONECT  266  265  270
+CONECT  267  265  268  269
+CONECT  268  267  282
+CONECT  269  267  270
+CONECT  270  266  269  271
+CONECT  271  270  272  281
+CONECT  272  271  273
+CONECT  273  272  274
+CONECT  274  273  275  281
+CONECT  275  274  276  277
+CONECT  276  275
+CONECT  277  275  278
+CONECT  278  277  279  280
+CONECT  279  278
+CONECT  280  278  281
+CONECT  281  271  274  280
+CONECT  282  268  283  284  285
+CONECT  283  282
+CONECT  284  282
+CONECT  285  282  286
+CONECT  286  285  287
+CONECT  287  286  288  289
+CONECT  288  287  292
+CONECT  289  287  290  291
+CONECT  290  289  301
+CONECT  291  289  292
+CONECT  292  288  291  293
+CONECT  293  292  294  300
+CONECT  294  293  295  296
+CONECT  295  294
+CONECT  296  294  297
+CONECT  297  296  298  299
+CONECT  298  297
+CONECT  299  297  300
+CONECT  300  293  299
+CONECT  301  290  302  303  304
+CONECT  302  301
+CONECT  303  301
+CONECT  304  301  305
+CONECT  305  304  306
+CONECT  306  305  307  308
+CONECT  307  306  311
+CONECT  308  306  309  310
+CONECT  309  308  323
+CONECT  310  308  311
+CONECT  311  307  310  312
+CONECT  312  311  313  322
+CONECT  313  312  314
+CONECT  314  313  315
+CONECT  315  314  316  322
+CONECT  316  315  317  318
+CONECT  317  316
+CONECT  318  316  319
+CONECT  319  318  320  321
+CONECT  320  319
+CONECT  321  319  322
+CONECT  322  312  315  321
+CONECT  323  309  324  325  326
+CONECT  324  323
+CONECT  325  323
+CONECT  326  323  327
+CONECT  327  326  328
+CONECT  328  327  329  330
+CONECT  329  328  333
+CONECT  330  328  331  332
+CONECT  331  330  344
+CONECT  332  330  333
+CONECT  333  329  332  334
+CONECT  334  333  335  343
+CONECT  335  334  336
+CONECT  336  335  337
+CONECT  337  336  338  343
+CONECT  338  337  339  340
+CONECT  339  338
+CONECT  340  338  341
+CONECT  341  340  342
+CONECT  342  341  343
+CONECT  343  334  337  342
+CONECT  344  331  345  346  347
+CONECT  345  344
+CONECT  346  344
+CONECT  347  344  348
+CONECT  348  347  349
+CONECT  349  348  350  351
+CONECT  350  349  354
+CONECT  351  349  352  353
+CONECT  352  351  365
+CONECT  353  351  354
+CONECT  354  350  353  355
+CONECT  355  354  356  364
+CONECT  356  355  357
+CONECT  357  356  358
+CONECT  358  357  359  364
+CONECT  359  358  360  361
+CONECT  360  359
+CONECT  361  359  362
+CONECT  362  361  363
+CONECT  363  362  364
+CONECT  364  355  358  363
+CONECT  365  352  366  367  368
+CONECT  366  365
+CONECT  367  365
+CONECT  368  365  369
+CONECT  369  368  370
+CONECT  370  369  371  372
+CONECT  371  370  375
+CONECT  372  370  373  374
+CONECT  373  372  385
+CONECT  374  372  375
+CONECT  375  371  374  376
+CONECT  376  375  377  384
+CONECT  377  376  378  379
+CONECT  378  377
+CONECT  379  377  380
+CONECT  380  379  381  382
+CONECT  381  380
+CONECT  382  380  383  384
+CONECT  383  382
+CONECT  384  376  382
+CONECT  385  373  386  387  388
+CONECT  386  385
+CONECT  387  385
+CONECT  388  385  389
+CONECT  389  388  390
+CONECT  390  389  391  392
+CONECT  391  390  395
+CONECT  392  390  393  394
+CONECT  393  392  405
+CONECT  394  392  395
+CONECT  395  391  394  396
+CONECT  396  395  397  404
+CONECT  397  396  398  399
+CONECT  398  397
+CONECT  399  397  400
+CONECT  400  399  401  402
+CONECT  401  400
+CONECT  402  400  403  404
+CONECT  403  402
+CONECT  404  396  402
+CONECT  405  393  406  407  408
+CONECT  406  405
+CONECT  407  405
+CONECT  408  405  409
+CONECT  409  408  410
+CONECT  410  409  411  412
+CONECT  411  410  415
+CONECT  412  410  413  414
+CONECT  413  412  424
+CONECT  414  412  415
+CONECT  415  411  414  416
+CONECT  416  415  417  423
+CONECT  417  416  418  419
+CONECT  418  417
+CONECT  419  417  420
+CONECT  420  419  421  422
+CONECT  421  420
+CONECT  422  420  423
+CONECT  423  416  422
+CONECT  424  413  425  426  427
+CONECT  425  424
+CONECT  426  424
+CONECT  427  424  428
+CONECT  428  427  429
+CONECT  429  428  430  431
+CONECT  430  429  434
+CONECT  431  429  432  433
+CONECT  432  431  446
+CONECT  433  431  434
+CONECT  434  430  433  435
+CONECT  435  434  436  445
+CONECT  436  435  437
+CONECT  437  436  438
+CONECT  438  437  439  445
+CONECT  439  438  440  441
+CONECT  440  439
+CONECT  441  439  442
+CONECT  442  441  443  444
+CONECT  443  442
+CONECT  444  442  445
+CONECT  445  435  438  444
+CONECT  446  432  447  448  449
+CONECT  447  446
+CONECT  448  446
+CONECT  449  446  450
+CONECT  450  449  451
+CONECT  451  450  452  453
+CONECT  452  451  456
+CONECT  453  451  454  455
+CONECT  454  453  465
+CONECT  455  453  456
+CONECT  456  452  455  457
+CONECT  457  456  458  464
+CONECT  458  457  459  460
+CONECT  459  458
+CONECT  460  458  461
+CONECT  461  460  462  463
+CONECT  462  461
+CONECT  463  461  464
+CONECT  464  457  463
+CONECT  465  454  466  467  468
+CONECT  466  465
+CONECT  467  465
+CONECT  468  465  469
+CONECT  469  468  470
+CONECT  470  469  471  472
+CONECT  471  470  475
+CONECT  472  470  473  474
+CONECT  473  472
+CONECT  474  472  475
+CONECT  475  471  474  476
+CONECT  476  475  477  486
+CONECT  477  476  478
+CONECT  478  477  479
+CONECT  479  478  480  486
+CONECT  480  479  481  482
+CONECT  481  480
+CONECT  482  480  483
+CONECT  483  482  484  485
+CONECT  484  483
+CONECT  485  483  486
+CONECT  486  476  479  485
+END
diff --git a/hacks/images/molecules/dodecahedrane.pdb b/hacks/images/molecules/dodecahedrane.pdb
new file mode 100644 (file)
index 0000000..94b2d2f
--- /dev/null
@@ -0,0 +1,87 @@
+HEADER    Dodecahedrane
+COMPND    al3056
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Sun Sep  3 10:20:00 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.540   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.016   1.465   0.000  1.00  0.00 
+HETATM    4  C           1       0.771   2.369   0.000  1.00  0.00 
+HETATM    5  C           1      -0.476   1.465   0.000  1.00  0.00 
+HETATM    6  C           1      -0.476  -0.655   1.309  1.00  0.00 
+HETATM    7  C           1      -1.246   0.404   2.118  1.00  0.00 
+HETATM    8  C           1      -1.246   1.714   1.309  1.00  0.00 
+HETATM    9  C           1      -0.476   2.774   2.119  1.00  0.00 
+HETATM   10  C           1       0.770   3.179   1.310  1.00  0.00 
+HETATM   11  C           1       2.016   2.774   2.120  1.00  0.00 
+HETATM   12  C           1       2.786   1.715   1.310  1.00  0.00 
+HETATM   13  C           1       2.785   0.405   2.120  1.00  0.00 
+HETATM   14  C           1       2.016  -0.655   1.310  1.00  0.00 
+HETATM   15  C           1       0.769  -1.059   2.118  1.00  0.00 
+HETATM   16  C           1       0.770  -0.250   3.428  1.00  0.00 
+HETATM   17  C           1      -0.476   0.655   3.428  1.00  0.00 
+HETATM   18  C           1       2.015   0.656   3.429  1.00  0.00 
+HETATM   19  C           1       0.000   2.119   3.428  1.00  0.00 
+HETATM   20  C           1       1.539   2.119   3.428  1.00  0.00 
+HETATM   21  H           1      -0.389  -0.536  -0.866  1.00  0.00 
+HETATM   22  H           1       1.929  -0.535  -0.866  1.00  0.00 
+HETATM   23  H           1       2.645   1.669  -0.866  1.00  0.00 
+HETATM   24  H           1       0.771   3.031  -0.867  1.00  0.00 
+HETATM   25  H           1      -1.105   1.670  -0.867  1.00  0.00 
+HETATM   26  H           1      -1.105  -1.521   1.105  1.00  0.00 
+HETATM   27  H           1      -2.264   0.073   2.321  1.00  0.00 
+HETATM   28  H           1      -2.264   2.044   1.104  1.00  0.00 
+HETATM   29  H           1      -1.105   3.639   2.324  1.00  0.00 
+HETATM   30  H           1       0.771   4.249   1.105  1.00  0.00 
+HETATM   31  H           1       2.645   3.640   2.327  1.00  0.00 
+HETATM   32  H           1       3.804   2.046   1.106  1.00  0.00 
+HETATM   33  H           1       3.803   0.073   2.325  1.00  0.00 
+HETATM   34  H           1       2.645  -1.522   1.106  1.00  0.00 
+HETATM   35  H           1       0.769  -2.130   2.322  1.00  0.00 
+HETATM   36  H           1       0.771  -0.912   4.294  1.00  0.00 
+HETATM   37  H           1      -1.106   0.451   4.294  1.00  0.00 
+HETATM   38  H           1       2.644   0.453   4.295  1.00  0.00 
+HETATM   39  H           1      -0.387   2.655   4.295  1.00  0.00 
+HETATM   40  H           1       1.928   2.654   4.295  1.00  0.00 
+CONECT    1    2    5    6   21
+CONECT    2    1    3   14   22
+CONECT    3    2    4   12   23
+CONECT    4    3    5   10   24
+CONECT    5    1    4    8   25
+CONECT    6    1    7   15   26
+CONECT    7    6    8   17   27
+CONECT    8    5    7    9   28
+CONECT    9    8   10   19   29
+CONECT   10    4    9   11   30
+CONECT   11   10   12   20   31
+CONECT   12    3   11   13   32
+CONECT   13   12   14   18   33
+CONECT   14    2   13   15   34
+CONECT   15    6   14   16   35
+CONECT   16   15   17   18   36
+CONECT   17    7   16   19   37
+CONECT   18   13   16   20   38
+CONECT   19    9   17   20   39
+CONECT   20   11   18   19   40
+CONECT   21    1
+CONECT   22    2
+CONECT   23    3
+CONECT   24    4
+CONECT   25    5
+CONECT   26    6
+CONECT   27    7
+CONECT   28    8
+CONECT   29    9
+CONECT   30   10
+CONECT   31   11
+CONECT   32   12
+CONECT   33   13
+CONECT   34   14
+CONECT   35   15
+CONECT   36   16
+CONECT   37   17
+CONECT   38   18
+CONECT   39   19
+CONECT   40   20
+MASTER        0    0    0    0    0    0    0    0   40    0   40    0
+END
diff --git a/hacks/images/molecules/dthc.pdb b/hacks/images/molecules/dthc.pdb
new file mode 100644 (file)
index 0000000..d8688ac
--- /dev/null
@@ -0,0 +1,107 @@
+HEADER    Tetrahydrocannabinol: Delta 9-THC, an hallucinogen
+ATOM      1  O   UNK     0      -1.791  -1.420   0.434
+ATOM      2  C   UNK     0      -0.536  -1.012   0.033
+ATOM      3  C   UNK     0       0.565  -1.346   0.828
+ATOM      4  C   UNK     0       1.855  -0.978   0.446
+ATOM      5  C   UNK     0       2.038  -0.295  -0.757
+ATOM      6  C   UNK     0       0.940   0.052  -1.556
+ATOM      7  C   UNK     0      -0.363  -0.272  -1.148
+ATOM      8  C   UNK     0      -1.599   0.113  -1.985
+ATOM      9  C   UNK     0      -1.568   1.523  -2.537
+ATOM     10  C   UNK     0      -2.681   2.231  -2.781
+ATOM     11  C   UNK     0      -4.068   1.708  -2.479
+ATOM     12  C   UNK     0      -4.085   0.222  -2.091
+ATOM     13  C   UNK     0      -2.892  -0.061  -1.162
+ATOM     14  C   UNK     0      -2.908  -1.421  -0.435
+ATOM     15  O   UNK     0       1.151   0.702  -2.747
+ATOM     16  C   UNK     0      -2.610   3.628  -3.338
+ATOM     17  C   UNK     0      -2.824  -2.642  -1.364
+ATOM     18  C   UNK     0      -4.125  -1.570   0.485
+ATOM     19  C   UNK     0       3.056  -1.332   1.325
+ATOM     20  C   UNK     0       3.365  -0.156   2.260
+ATOM     21  C   UNK     0       4.569  -0.467   3.158
+ATOM     22  C   UNK     0       4.872   0.726   4.074
+ATOM     23  C   UNK     0       6.079   0.425   4.969
+ATOM     24  H   UNK     0       0.400  -1.896   1.747
+ATOM     25  H   UNK     0      -1.626  -0.566  -2.849
+ATOM     26  H   UNK     0      -4.720   1.866  -3.352
+ATOM     27  H   UNK     0      -4.004  -0.399  -2.997
+ATOM     28  H   UNK     0       2.079   0.837  -2.898
+ATOM     29  H   UNK     0      -3.163   4.315  -2.681
+ATOM     30  H   UNK     0      -2.839  -3.562  -0.762
+ATOM     31  H   UNK     0      -3.995  -2.460   1.119
+ATOM     32  H   UNK     0      -4.210  -0.687   1.134
+ATOM     33  H   UNK     0       2.828  -2.232   1.917
+ATOM     34  H   UNK     0       2.480   0.048   2.884
+ATOM     35  H   UNK     0       4.349  -1.356   3.772
+ATOM     36  H   UNK     0       3.994   0.938   4.706
+ATOM     37  H   UNK     0       6.286   1.290   5.618
+ATOM     38  H   UNK     0       3.036  -0.022  -1.076
+ATOM     39  H   UNK     0      -0.602   1.973  -2.755
+ATOM     40  H   UNK     0      -5.037  -0.005  -1.590
+ATOM     41  H   UNK     0      -2.881   0.709  -0.374
+ATOM     42  H   UNK     0      -1.565   3.966  -3.407
+ATOM     43  H   UNK     0      -3.058   3.644  -4.342
+ATOM     44  H   UNK     0      -1.884  -2.619  -1.933
+ATOM     45  H   UNK     0      -3.674  -2.652  -2.061
+ATOM     46  H   UNK     0      -5.048  -1.683  -0.102
+ATOM     47  H   UNK     0       3.928  -1.546   0.687
+ATOM     48  H   UNK     0       3.578   0.739   1.654
+ATOM     49  H   UNK     0       5.449  -0.681   2.531
+ATOM     50  H   UNK     0       5.086   1.616   3.462
+ATOM     51  H   UNK     0       5.873  -0.453   5.600
+ATOM     52  H   UNK     0       6.967   0.224   4.351
+ATOM     53  H   UNK     0      -4.467   2.295  -1.638
+CONECT    1    2   14
+CONECT    2    1    3    7
+CONECT    3    2    4   24
+CONECT    4    3    5   19
+CONECT    5    4    6   38
+CONECT    6    5    7   15
+CONECT    7    2    6    8
+CONECT    8    7    9   13   25
+CONECT    9    8   10   39
+CONECT   10    9   11   16
+CONECT   11   10   12   26   53
+CONECT   12   11   27   40   13
+CONECT   13    8   12   41   14
+CONECT   14    1   13   17   18
+CONECT   15    6   28
+CONECT   16   10   29   42   43
+CONECT   17   14   30   44   45
+CONECT   18   14   31   32   46
+CONECT   19    4   20   33   47
+CONECT   20   19   21   34   48
+CONECT   21   20   22   35   49
+CONECT   22   21   23   36   50
+CONECT   23   22   37   51   52
+CONECT   24    3
+CONECT   25    8
+CONECT   26   11
+CONECT   27   12
+CONECT   28   15
+CONECT   29   16
+CONECT   30   17
+CONECT   31   18
+CONECT   32   18
+CONECT   33   19
+CONECT   34   20
+CONECT   35   21
+CONECT   36   22
+CONECT   37   23
+CONECT   38    5
+CONECT   39    9
+CONECT   40   12
+CONECT   41   13
+CONECT   42   16
+CONECT   43   16
+CONECT   44   17
+CONECT   45   17
+CONECT   46   18
+CONECT   47   19
+CONECT   48   20
+CONECT   49   21
+CONECT   50   22
+CONECT   51   23
+CONECT   52   23
+CONECT   53   11
diff --git a/hacks/images/molecules/dynamite.pdb b/hacks/images/molecules/dynamite.pdb
new file mode 100644 (file)
index 0000000..b16dc64
--- /dev/null
@@ -0,0 +1,47 @@
+HEADER    Trinitroglycerin: Dynamite, an explosive
+COMPND    jb09trin
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Tue Sep 19 21:46:02 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.540   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.063   1.449   0.000  1.00  0.00 
+HETATM    4  O           1       3.467   1.429   0.127  1.00  0.00 
+HETATM    5  N           1       4.015   2.776  -0.152  1.00  0.00 
+HETATM    6  O           1       4.998   3.268   0.635  1.00  0.00 
+HETATM    7  O           1       3.773   3.351  -1.351  1.00  0.00 
+HETATM    8  O           1       2.004  -0.755   1.098  1.00  0.00 
+HETATM    9  N           1       2.641  -0.291   2.107  1.00  0.00 
+HETATM   10  O           1       3.090  -1.154   3.047  1.00  0.00 
+HETATM   11  O           1       2.879   1.030   2.268  1.00  0.00 
+HETATM   12  O           1      -0.458  -1.330  -0.079  1.00  0.00 
+HETATM   13  N           1      -1.911  -1.339  -0.361  1.00  0.00 
+HETATM   14  O           1      -2.745  -2.029   0.450  1.00  0.00 
+HETATM   15  O           1      -2.357  -0.902  -1.560  1.00  0.00 
+HETATM   16  H           1      -0.365   0.561  -0.860  1.00  0.00 
+HETATM   17  H           1      -0.369   0.458   0.918  1.00  0.00 
+HETATM   18  H           1       1.886  -0.486  -0.912  1.00  0.00 
+HETATM   19  H           1       1.620   2.013   0.821  1.00  0.00 
+HETATM   20  H           1       1.793   1.925  -0.943  1.00  0.00 
+CONECT    1    2   12   16   17
+CONECT    2    1    3    8   18
+CONECT    3    2    4   19   20
+CONECT    4    3    5
+CONECT    5    4    6    7
+CONECT    6    5
+CONECT    7    5
+CONECT    8    2    9
+CONECT    9    8   10   11
+CONECT   10    9
+CONECT   11    9
+CONECT   12    1   13
+CONECT   13   12   14   15
+CONECT   14   13
+CONECT   15   13
+CONECT   16    1
+CONECT   17    1
+CONECT   18    2
+CONECT   19    3
+CONECT   20    3
+MASTER        0    0    0    0    0    0    0    0   20    0   20    0
+END
diff --git a/hacks/images/molecules/glycol.pdb b/hacks/images/molecules/glycol.pdb
new file mode 100644 (file)
index 0000000..202d0e1
--- /dev/null
@@ -0,0 +1,27 @@
+HEADER    Ethylene Glycol: Ethane-1,2-diol, Anti-freeze
+COMPND    al2034
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Tue Aug 29 17:54:52 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.542   0.000   0.000  1.00  0.00 
+HETATM    3  O           1       2.027   1.347   0.000  1.00  0.00 
+HETATM    4  O           1      -0.485  -1.347  -0.041  1.00  0.00 
+HETATM    5  H           1      -0.360   0.537  -0.878  1.00  0.00 
+HETATM    6  H           1      -0.367   0.494   0.900  1.00  0.00 
+HETATM    7  H           1       1.902  -0.512  -0.893  1.00  0.00 
+HETATM    8  H           1       1.908  -0.520   0.885  1.00  0.00 
+HETATM    9  H           1       1.743   1.800   0.802  1.00  0.00 
+HETATM   10  H           1      -0.202  -1.823   0.747  1.00  0.00 
+CONECT    1    2    4    5    6
+CONECT    2    1    3    7    8
+CONECT    3    2    9
+CONECT    4    1   10
+CONECT    5    1
+CONECT    6    1
+CONECT    7    2
+CONECT    8    2
+CONECT    9    3
+CONECT   10    4
+MASTER        0    0    0    0    0    0    0    0   10    0   10    0
+END
diff --git a/hacks/images/molecules/guanine.pdb b/hacks/images/molecules/guanine.pdb
new file mode 100644 (file)
index 0000000..229b654
--- /dev/null
@@ -0,0 +1,39 @@
+HEADER    Guanine: Purine base nucleotide
+COMPND    jb09guan
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Tue Sep 19 21:46:02 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.392   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.082   1.215   0.000  1.00  0.00 
+HETATM    4  N           1       1.339   2.346  -0.001  1.00  0.00 
+HETATM    5  C           1      -0.017   2.313  -0.003  1.00  0.00 
+HETATM    6  N           1      -0.709   1.149  -0.003  1.00  0.00 
+HETATM    7  N           1      -0.392  -1.291  -0.028  1.00  0.00 
+HETATM    8  C           1       0.730  -2.047  -0.044  1.00  0.00 
+HETATM    9  N           1       1.842  -1.275  -0.028  1.00  0.00 
+HETATM   10  O           1       3.285   1.253  -0.010  1.00  0.00 
+HETATM   11  N           1      -0.723   3.523  -0.019  1.00  0.00 
+HETATM   12  H           1       1.811   3.244  -0.007  1.00  0.00 
+HETATM   13  H           1      -1.347  -1.629  -0.048  1.00  0.00 
+HETATM   14  H           1       0.738  -3.137  -0.077  1.00  0.00 
+HETATM   15  H           1      -1.640   3.377  -0.427  1.00  0.00 
+HETATM   16  H           1      -0.213   4.205  -0.570  1.00  0.00 
+CONECT    1    2    2    6    7
+CONECT    2    1    1    3    9
+CONECT    3    2    4   10   10
+CONECT    4    3    5   12
+CONECT    5    4    6    6   11
+CONECT    6    1    5    5
+CONECT    7    1    8   13
+CONECT    8    7    9    9   14
+CONECT    9    2    8    8
+CONECT   10    3    3
+CONECT   11    5   15   16
+CONECT   12    4
+CONECT   13    7
+CONECT   14    8
+CONECT   15   11
+CONECT   16   11
+MASTER        0    0    0    0    0    0    0    0   16    0   16    0
+END
diff --git a/hacks/images/molecules/heroin.pdb b/hacks/images/molecules/heroin.pdb
new file mode 100644 (file)
index 0000000..ddb4014
--- /dev/null
@@ -0,0 +1,107 @@
+HEADER    Diacetylmorphine: Heroin, an opiate
+COMPND    al3084
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.400   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.108   1.210   0.000  1.00  0.00 
+HETATM    4  C           1       1.452   2.447  -0.065  1.00  0.00 
+HETATM    5  C           1       0.055   2.457  -0.018  1.00  0.00 
+HETATM    6  C           1      -0.624   1.244   0.041  1.00  0.00 
+HETATM    7  C           1      -2.081   1.501  -0.201  1.00  0.00 
+HETATM    8  C           1      -2.725   0.343  -0.973  1.00  0.00 
+HETATM    9  C           1      -2.367  -0.953  -0.210  1.00  0.00 
+HETATM   10  C           1      -0.836  -1.236  -0.253  1.00  0.00 
+HETATM   11  C           1      -1.913   2.852  -0.934  1.00  0.00 
+HETATM   12  C           1      -2.752   1.623   1.177  1.00  0.00 
+HETATM   13  C           1      -2.503   0.306   1.943  1.00  0.00 
+HETATM   14  N           1      -2.936  -0.856   1.147  1.00  0.00 
+HETATM   15  C           1      -2.820  -2.103   1.920  1.00  0.00 
+HETATM   16  H           1      -3.807   0.473  -0.972  1.00  0.00 
+HETATM   17  C           1      -2.256   0.283  -2.408  1.00  0.00 
+HETATM   18  C           1      -1.948   1.398  -3.085  1.00  0.00 
+HETATM   19  C           1      -1.494   2.675  -2.413  1.00  0.00 
+HETATM   20  H           1      -2.820   3.452  -0.859  1.00  0.00 
+HETATM   21  O           1      -0.799   3.480  -0.318  1.00  0.00 
+HETATM   22  H           1      -1.885   3.520  -2.982  1.00  0.00 
+HETATM   23  O           1      -0.083   2.674  -2.462  1.00  0.00 
+HETATM   24  O           1       2.142   3.620  -0.142  1.00  0.00 
+HETATM   25  H           1       1.942  -0.945  -0.044  1.00  0.00 
+HETATM   26  H           1       3.198   1.180  -0.006  1.00  0.00 
+HETATM   27  H           1      -2.866  -1.782  -0.712  1.00  0.00 
+HETATM   28  H           1      -0.588  -1.599  -1.250  1.00  0.00 
+HETATM   29  H           1      -0.574  -2.010   0.465  1.00  0.00 
+HETATM   30  H           1      -3.823   1.785   1.052  1.00  0.00 
+HETATM   31  H           1      -2.320   2.456   1.731  1.00  0.00 
+HETATM   32  H           1      -3.068   0.334   2.874  1.00  0.00 
+HETATM   33  H           1      -1.444   0.211   2.184  1.00  0.00 
+HETATM   34  H           1      -3.492  -2.057   2.778  1.00  0.00 
+HETATM   35  H           1      -1.799  -2.234   2.280  1.00  0.00 
+HETATM   36  H           1      -3.099  -2.953   1.298  1.00  0.00 
+HETATM   37  H           1      -2.414  -0.639  -2.967  1.00  0.00 
+HETATM   38  H           1      -1.797   1.313  -4.161  1.00  0.00 
+HETATM   39  C           1       3.076   3.567  -1.091  1.00  0.00 
+HETATM   40  O           1       2.786   3.826  -2.230  1.00  0.00 
+HETATM   41  C           1       4.523   3.509  -0.695  1.00  0.00 
+HETATM   42  H           1       5.012   2.691  -1.224  1.00  0.00 
+HETATM   43  H           1       4.600   3.345   0.380  1.00  0.00 
+HETATM   44  H           1       5.008   4.450  -0.954  1.00  0.00 
+HETATM   45  C           1       0.390   3.733  -3.117  1.00  0.00 
+HETATM   46  O           1       0.845   3.595  -4.223  1.00  0.00 
+HETATM   47  C           1       0.417   5.083  -2.459  1.00  0.00 
+HETATM   48  H           1       1.199   5.692  -2.913  1.00  0.00 
+HETATM   49  H           1       0.619   4.970  -1.395  1.00  0.00 
+HETATM   50  H           1      -0.547   5.574  -2.594  1.00  0.00 
+CONECT    1    2    2    6   10
+CONECT    2    1    1    3   25
+CONECT    3    2    4    4   26
+CONECT    4    3    3    5   24
+CONECT    5    4    6    6   21
+CONECT    6    1    5    5    7
+CONECT    7    6    8   11   12
+CONECT    8    7    9   16   17
+CONECT    9    8   10   14   27
+CONECT   10    1    9   28   29
+CONECT   11    7   19   20   21
+CONECT   12    7   13   30   31
+CONECT   13   12   14   32   33
+CONECT   14    9   13   15
+CONECT   15   14   34   35   36
+CONECT   16    8
+CONECT   17    8   18   18   37
+CONECT   18   17   17   19   38
+CONECT   19   11   18   22   23
+CONECT   20   11
+CONECT   21    5   11
+CONECT   22   19
+CONECT   23   19   45
+CONECT   24    4   39
+CONECT   25    2
+CONECT   26    3
+CONECT   27    9
+CONECT   28   10
+CONECT   29   10
+CONECT   30   12
+CONECT   31   12
+CONECT   32   13
+CONECT   33   13
+CONECT   34   15
+CONECT   35   15
+CONECT   36   15
+CONECT   37   17
+CONECT   38   18
+CONECT   39   24   40   40   41
+CONECT   40   39   39
+CONECT   41   39   42   43   44
+CONECT   42   41
+CONECT   43   41
+CONECT   44   41
+CONECT   45   23   46   46   47
+CONECT   46   45   45
+CONECT   47   45   48   49   50
+CONECT   48   47
+CONECT   49   47
+CONECT   50   47
+MASTER        0    0    0    0    0    0    0    0   50    0   50    0
+END
diff --git a/hacks/images/molecules/hexahelicene.pdb b/hacks/images/molecules/hexahelicene.pdb
new file mode 100644 (file)
index 0000000..52162c5
--- /dev/null
@@ -0,0 +1,90 @@
+COMPND    Hexahelicene
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.404   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.104   1.206   0.000  1.00  0.00 
+HETATM    4  C           1       1.402   2.413  -0.064  1.00  0.00 
+HETATM    5  C           1       0.002   2.407  -0.063  1.00  0.00 
+HETATM    6  C           1      -0.705   1.209   0.071  1.00  0.00 
+HETATM    7  C           1      -2.102   1.180   0.220  1.00  0.00 
+HETATM    8  C           1      -2.847   2.295   0.643  1.00  0.00 
+HETATM    9  C           1      -4.192   2.360   0.266  1.00  0.00 
+HETATM   10  C           1      -4.858   1.229  -0.190  1.00  0.00 
+HETATM   11  C           1      -4.166   0.012  -0.273  1.00  0.00 
+HETATM   12  C           1      -2.782  -0.001  -0.086  1.00  0.00 
+HETATM   13  C           1      -2.082  -1.204  -0.224  1.00  0.00 
+HETATM   14  C           1      -0.685  -1.210  -0.107  1.00  0.00 
+HETATM   15  C           1      -2.318   3.332   1.420  1.00  0.00 
+HETATM   16  C           1      -1.206   3.177   2.264  1.00  0.00 
+HETATM   17  C           1      -0.519   4.289   2.729  1.00  0.00 
+HETATM   18  C           1      -1.052   5.582   2.503  1.00  0.00 
+HETATM   19  C           1      -2.286   5.716   1.895  1.00  0.00 
+HETATM   20  C           1      -2.936   4.583   1.371  1.00  0.00 
+HETATM   21  C           1      -4.216   4.717   0.815  1.00  0.00 
+HETATM   22  C           1      -4.881   3.585   0.350  1.00  0.00 
+HETATM   23  C           1      -0.789   1.905   2.707  1.00  0.00 
+HETATM   24  C           1       0.400   1.759   3.421  1.00  0.00 
+HETATM   25  C           1       1.155   2.887   3.765  1.00  0.00 
+HETATM   26  C           1       0.669   4.165   3.443  1.00  0.00 
+HETATM   27  H           1       1.945  -0.947  -0.019  1.00  0.00 
+HETATM   28  H           1       3.191   1.206  -0.002  1.00  0.00 
+HETATM   29  H           1       1.942   3.359  -0.131  1.00  0.00 
+HETATM   30  H           1      -0.523   3.350  -0.198  1.00  0.00 
+HETATM   31  H           1      -5.918   1.264  -0.433  1.00  0.00 
+HETATM   32  H           1      -4.698  -0.901  -0.555  1.00  0.00 
+HETATM   33  H           1      -2.617  -2.140  -0.409  1.00  0.00 
+HETATM   34  H           1      -0.142  -2.150  -0.180  1.00  0.00 
+HETATM   35  H           1      -0.520   6.457   2.886  1.00  0.00 
+HETATM   36  H           1      -2.751   6.690   1.806  1.00  0.00 
+HETATM   37  H           1      -4.715   5.680   0.815  1.00  0.00 
+HETATM   38  H           1      -5.917   3.654   0.008  1.00  0.00 
+HETATM   39  H           1      -1.407   1.021   2.524  1.00  0.00 
+HETATM   40  H           1       0.734   0.774   3.725  1.00  0.00 
+HETATM   41  H           1       2.090   2.777   4.328  1.00  0.00 
+HETATM   42  H           1       1.225   5.042   3.772  1.00  0.00 
+CONECT    1    2    2    6   14
+CONECT    2    1    1    3   27
+CONECT    3    2    4    4   28
+CONECT    4    3    3    5   29
+CONECT    5    4    6    6   30
+CONECT    6    1    5    5    7
+CONECT    7    6    8    8   12
+CONECT    8    7    7    9   15
+CONECT    9    8   10   10   22
+CONECT   10    9    9   11   31
+CONECT   11   10   12   12   32
+CONECT   12    7   11   11   13
+CONECT   13   12   14   14   33
+CONECT   14    1   13   13   34
+CONECT   15    8   16   16   20
+CONECT   16   15   15   17   23
+CONECT   17   16   18   18   26
+CONECT   18   17   17   19   35
+CONECT   19   18   20   20   36
+CONECT   20   15   19   19   21
+CONECT   21   20   22   22   37
+CONECT   22    9   21   21   38
+CONECT   23   16   24   24   39
+CONECT   24   23   23   25   40
+CONECT   25   24   26   26   41
+CONECT   26   17   25   25   42
+CONECT   27    2
+CONECT   28    3
+CONECT   29    4
+CONECT   30    5
+CONECT   31   10
+CONECT   32   11
+CONECT   33   13
+CONECT   34   14
+CONECT   35   18
+CONECT   36   19
+CONECT   37   21
+CONECT   38   22
+CONECT   39   23
+CONECT   40   24
+CONECT   41   25
+CONECT   42   26
+MASTER        0    0    0    0    0    0    0    0   42    0   42    0
+END
diff --git a/hacks/images/molecules/ibuprofen.pdb b/hacks/images/molecules/ibuprofen.pdb
new file mode 100644 (file)
index 0000000..48d3dba
--- /dev/null
@@ -0,0 +1,72 @@
+HEADER    Ibuprofen: Advil/Motrin, an anti-inflammatory
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.399   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.098   1.212   0.000  1.00  0.00 
+HETATM    4  C           1       1.391   2.419   0.004  1.00  0.00 
+HETATM    5  C           1      -0.008   2.417   0.005  1.00  0.00 
+HETATM    6  C           1      -0.712   1.206  -0.003  1.00  0.00 
+HETATM    7  C           1      -2.224   1.136  -0.009  1.00  0.00 
+HETATM    8  C           1      -2.900   2.504  -0.232  1.00  0.00 
+HETATM    9  C           1       3.611   1.210  -0.042  1.00  0.00 
+HETATM   10  C           1       4.094   0.909  -1.477  1.00  0.00 
+HETATM   11  C           1       5.635   0.868  -1.503  1.00  0.00 
+HETATM   12  C           1       3.590   1.996  -2.450  1.00  0.00 
+HETATM   13  C           1      -2.686   0.573   1.305  1.00  0.00 
+HETATM   14  O           1      -3.846   0.297   1.466  1.00  0.00 
+HETATM   15  O           1      -1.792   0.321   2.277  1.00  0.00 
+HETATM   16  H           1      -0.539  -0.948  -0.004  1.00  0.00 
+HETATM   17  H           1       1.943  -0.945  -0.009  1.00  0.00 
+HETATM   18  H           1       1.930   3.366  -0.006  1.00  0.00 
+HETATM   19  H           1      -0.533   3.371   0.004  1.00  0.00 
+HETATM   20  H           1      -2.536   0.461  -0.807  1.00  0.00 
+HETATM   21  H           1      -2.546   2.944  -1.165  1.00  0.00 
+HETATM   22  H           1      -2.676   3.171   0.600  1.00  0.00 
+HETATM   23  H           1      -3.980   2.365  -0.292  1.00  0.00 
+HETATM   24  H           1       3.986   0.442   0.635  1.00  0.00 
+HETATM   25  H           1       3.990   2.181   0.277  1.00  0.00 
+HETATM   26  H           1       3.707  -0.061  -1.792  1.00  0.00 
+HETATM   27  H           1       5.991   0.094  -0.823  1.00  0.00 
+HETATM   28  H           1       6.034   1.834  -1.192  1.00  0.00 
+HETATM   29  H           1       5.978   0.645  -2.513  1.00  0.00 
+HETATM   30  H           1       3.941   2.975  -2.122  1.00  0.00 
+HETATM   31  H           1       2.500   1.993  -2.477  1.00  0.00 
+HETATM   32  H           1       3.970   1.793  -3.451  1.00  0.00 
+HETATM   33  H           1      -1.689  -0.648   2.383  1.00  0.00 
+CONECT    1    2    2    6   16
+CONECT    2    1    1    3   17
+CONECT    3    2    4    4    9
+CONECT    4    3    3    5   18
+CONECT    5    4    6    6   19
+CONECT    6    1    5    5    7
+CONECT    7    6    8   13   20
+CONECT    8    7   21   22   23
+CONECT    9    3   10   24   25
+CONECT   10    9   11   12   26
+CONECT   11   10   27   28   29
+CONECT   12   10   30   31   32
+CONECT   13    7   14   14   15
+CONECT   14   13   13
+CONECT   15   13   33
+CONECT   16    1
+CONECT   17    2
+CONECT   18    4
+CONECT   19    5
+CONECT   20    7
+CONECT   21    8
+CONECT   22    8
+CONECT   23    8
+CONECT   24    9
+CONECT   25    9
+CONECT   26   10
+CONECT   27   11
+CONECT   28   11
+CONECT   29   11
+CONECT   30   12
+CONECT   31   12
+CONECT   32   12
+CONECT   33   15
+MASTER        0    0    0    0    0    0    0    0   33    0   33    0
+END
diff --git a/hacks/images/molecules/lsd.pdb b/hacks/images/molecules/lsd.pdb
new file mode 100644 (file)
index 0000000..7d24830
--- /dev/null
@@ -0,0 +1,104 @@
+HEADER    Lysergic acid diethylamide, a potent hallucinogen
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.397   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.012   1.258   0.000  1.00  0.00 
+HETATM    4  C           1       1.246   2.433  -0.052  1.00  0.00 
+HETATM    5  C           1      -0.155   2.405  -0.125  1.00  0.00 
+HETATM    6  C           1      -0.773   1.155  -0.096  1.00  0.00 
+HETATM    7  N           1      -2.065   0.769  -0.378  1.00  0.00 
+HETATM    8  C           1      -2.092  -0.602  -0.503  1.00  0.00 
+HETATM    9  C           1      -0.810  -1.103  -0.242  1.00  0.00 
+HETATM   10  C           1      -0.159  -2.415  -0.700  1.00  0.00 
+HETATM   11  C           1       1.178  -2.555   0.075  1.00  0.00 
+HETATM   12  C           1       2.056  -1.321  -0.019  1.00  0.00 
+HETATM   13  H           1       0.916  -2.675   1.126  1.00  0.00 
+HETATM   14  N           1       1.899  -3.768  -0.346  1.00  0.00 
+HETATM   15  C           1       3.394  -1.430   0.057  1.00  0.00 
+HETATM   16  C           1       4.101  -2.765   0.134  1.00  0.00 
+HETATM   17  C           1       3.115  -3.899   0.470  1.00  0.00 
+HETATM   18  H           1       4.565  -2.960  -0.830  1.00  0.00 
+HETATM   19  C           1       5.121  -2.704   1.237  1.00  0.00 
+HETATM   20  O           1       4.720  -2.413   2.335  1.00  0.00 
+HETATM   21  N           1       6.434  -3.000   1.089  1.00  0.00 
+HETATM   22  C           1       7.305  -2.925   2.274  1.00  0.00 
+HETATM   23  C           1       7.755  -4.340   2.686  1.00  0.00 
+HETATM   24  C           1       7.047  -3.307  -0.215  1.00  0.00 
+HETATM   25  C           1       6.736  -4.755  -0.646  1.00  0.00 
+HETATM   26  H           1       3.094   1.350   0.014  1.00  0.00 
+HETATM   27  H           1       1.757   3.398  -0.079  1.00  0.00 
+HETATM   28  H           1      -0.732   3.319  -0.249  1.00  0.00 
+HETATM   29  H           1      -2.858   1.432  -0.658  1.00  0.00 
+HETATM   30  H           1      -2.917  -1.177  -0.924  1.00  0.00 
+HETATM   31  H           1       0.025  -2.349  -1.772  1.00  0.00 
+HETATM   32  H           1      -0.811  -3.260  -0.484  1.00  0.00 
+HETATM   33  H           1       4.015  -0.538   0.044  1.00  0.00 
+HETATM   34  H           1       2.844  -3.840   1.524  1.00  0.00 
+HETATM   35  H           1       3.586  -4.865   0.286  1.00  0.00 
+HETATM   36  H           1       6.768  -2.468   3.105  1.00  0.00 
+HETATM   37  H           1       8.181  -2.318   2.047  1.00  0.00 
+HETATM   38  H           1       8.376  -4.772   1.903  1.00  0.00 
+HETATM   39  H           1       6.879  -4.969   2.844  1.00  0.00 
+HETATM   40  H           1       8.332  -4.283   3.609  1.00  0.00 
+HETATM   41  H           1       8.129  -3.199  -0.132  1.00  0.00 
+HETATM   42  H           1       6.693  -2.606  -0.971  1.00  0.00 
+HETATM   43  H           1       5.663  -4.894  -0.765  1.00  0.00 
+HETATM   44  H           1       7.103  -5.451   0.107  1.00  0.00 
+HETATM   45  H           1       7.230  -4.962  -1.595  1.00  0.00 
+HETATM   46  C           1       2.198  -3.813  -1.786  1.00  0.00 
+HETATM   47  H           1       2.586  -2.854  -2.128  1.00  0.00 
+HETATM   48  H           1       1.292  -4.053  -2.342  1.00  0.00 
+HETATM   49  H           1       2.936  -4.591  -1.982  1.00  0.00 
+CONECT    1    2    2    6    9
+CONECT    2    1    1    3   12
+CONECT    3    2    4    4   26
+CONECT    4    3    3    5   27
+CONECT    5    4    6    6   28
+CONECT    6    1    5    5    7
+CONECT    7    6    8   29
+CONECT    8    7    9    9   30
+CONECT    9    1    8    8   10
+CONECT   10    9   11   31   32
+CONECT   11   10   12   13   14
+CONECT   12    2   11   15   15
+CONECT   13   11
+CONECT   14   11   17   46
+CONECT   15   12   12   16   33
+CONECT   16   15   17   18   19
+CONECT   17   14   16   34   35
+CONECT   18   16
+CONECT   19   16   20   20   21
+CONECT   20   19   19
+CONECT   21   19   22   24
+CONECT   22   21   23   36   37
+CONECT   23   22   38   39   40
+CONECT   24   21   25   41   42
+CONECT   25   24   43   44   45
+CONECT   26    3
+CONECT   27    4
+CONECT   28    5
+CONECT   29    7
+CONECT   30    8
+CONECT   31   10
+CONECT   32   10
+CONECT   33   15
+CONECT   34   17
+CONECT   35   17
+CONECT   36   22
+CONECT   37   22
+CONECT   38   23
+CONECT   39   23
+CONECT   40   23
+CONECT   41   24
+CONECT   42   24
+CONECT   43   25
+CONECT   44   25
+CONECT   45   25
+CONECT   46   14   47   48   49
+CONECT   47   46
+CONECT   48   46
+CONECT   49   46
+MASTER        0    0    0    0    0    0    0    0   49    0   49    0
+END
diff --git a/hacks/images/molecules/menthol.pdb b/hacks/images/molecules/menthol.pdb
new file mode 100644 (file)
index 0000000..c418688
--- /dev/null
@@ -0,0 +1,69 @@
+HEADER    Menthol: Mentha arvensis oil
+COMPND    menthol
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  O           1       1.431   0.000   0.000  1.00  0.00 
+HETATM    3  C           1      -0.501   1.458   0.000  1.00  0.00 
+HETATM    4  C           1      -2.042   1.485  -0.004  1.00  0.00 
+HETATM    5  C           1      -2.576   0.746   1.240  1.00  0.00 
+HETATM    6  C           1      -2.072  -0.710   1.236  1.00  0.00 
+HETATM    7  C           1      -0.528  -0.726   1.258  1.00  0.00 
+HETATM    8  C           1      -0.005  -2.181   1.381  1.00  0.00 
+HETATM    9  C           1       1.486  -2.197   1.780  1.00  0.00 
+HETATM   10  C           1      -0.183  -2.997   0.081  1.00  0.00 
+HETATM   11  C           1      -2.539   2.945   0.003  1.00  0.00 
+HETATM   12  H           1      -0.367  -0.497  -0.898  1.00  0.00 
+HETATM   13  H           1       1.761   0.410  -0.806  1.00  0.00 
+HETATM   14  H           1      -0.129   1.968  -0.889  1.00  0.00 
+HETATM   15  H           1      -0.127   1.969   0.888  1.00  0.00 
+HETATM   16  H           1      -2.409   0.987  -0.903  1.00  0.00 
+HETATM   17  H           1      -3.666   0.750   1.224  1.00  0.00 
+HETATM   18  H           1      -2.229   1.249   2.142  1.00  0.00 
+HETATM   19  H           1      -2.440  -1.211   0.342  1.00  0.00 
+HETATM   20  H           1      -2.455  -1.222   2.119  1.00  0.00 
+HETATM   21  H           1      -0.200  -0.175   2.139  1.00  0.00 
+HETATM   22  H           1      -0.565  -2.673   2.176  1.00  0.00 
+HETATM   23  H           1       1.633  -1.600   2.680  1.00  0.00 
+HETATM   24  H           1       2.100  -1.796   0.975  1.00  0.00 
+HETATM   25  H           1       1.794  -3.223   1.980  1.00  0.00 
+HETATM   26  H           1       0.434  -2.578  -0.713  1.00  0.00 
+HETATM   27  H           1      -1.228  -2.993  -0.228  1.00  0.00 
+HETATM   28  H           1       0.127  -4.026   0.261  1.00  0.00 
+HETATM   29  H           1      -2.165   3.462  -0.880  1.00  0.00 
+HETATM   30  H           1      -2.178   3.451   0.898  1.00  0.00 
+HETATM   31  H           1      -3.629   2.960  -0.005  1.00  0.00 
+CONECT    1    2    3    7   12
+CONECT    2    1   13
+CONECT    3    1    4   14   15
+CONECT    4    3    5   11   16
+CONECT    5    4    6   17   18
+CONECT    6    5    7   19   20
+CONECT    7    1    6    8   21
+CONECT    8    7    9   10   22
+CONECT    9    8   23   24   25
+CONECT   10    8   26   27   28
+CONECT   11    4   29   30   31
+CONECT   12    1
+CONECT   13    2
+CONECT   14    3
+CONECT   15    3
+CONECT   16    4
+CONECT   17    5
+CONECT   18    5
+CONECT   19    6
+CONECT   20    6
+CONECT   21    7
+CONECT   22    8
+CONECT   23    9
+CONECT   24    9
+CONECT   25    9
+CONECT   26   10
+CONECT   27   10
+CONECT   28   10
+CONECT   29   11
+CONECT   30   11
+CONECT   31   11
+MASTER        0    0    0    0    0    0    0    0   31    0   31    0
+END
diff --git a/hacks/images/molecules/mescaline.pdb b/hacks/images/molecules/mescaline.pdb
new file mode 100644 (file)
index 0000000..7143a22
--- /dev/null
@@ -0,0 +1,71 @@
+HEADER    Mescaline: Peyote, an hallucinogen
+COMPND    jb12mesc
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Sep 20 16:26:54 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.398   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.098   1.213   0.000  1.00  0.00 
+HETATM    4  C           1       1.399   2.424  -0.005  1.00  0.00 
+HETATM    5  C           1      -0.001   2.422   0.013  1.00  0.00 
+HETATM    6  C           1      -0.700   1.211   0.014  1.00  0.00 
+HETATM    7  O           1      -2.062   1.209   0.026  1.00  0.00 
+HETATM    8  C           1      -2.564   1.047  -1.282  1.00  0.00 
+HETATM    9  O           1      -0.682  -1.180  -0.024  1.00  0.00 
+HETATM   10  C           1      -0.867  -1.664   1.288  1.00  0.00 
+HETATM   11  O           1       2.078  -1.180  -0.002  1.00  0.00 
+HETATM   12  C           1       2.225  -1.657  -1.321  1.00  0.00 
+HETATM   13  C           1       2.154   3.735  -0.007  1.00  0.00 
+HETATM   14  C           1       2.388   4.190   1.447  1.00  0.00 
+HETATM   15  N           1       3.124   5.464   1.464  1.00  0.00 
+HETATM   16  H           1       3.188   1.207   0.000  1.00  0.00 
+HETATM   17  H           1      -0.549   3.364   0.023  1.00  0.00 
+HETATM   18  H           1      -2.231   0.093  -1.690  1.00  0.00 
+HETATM   19  H           1      -2.208   1.859  -1.916  1.00  0.00 
+HETATM   20  H           1      -3.653   1.064  -1.252  1.00  0.00 
+HETATM   21  H           1      -1.432  -0.938   1.873  1.00  0.00 
+HETATM   22  H           1       0.101  -1.837   1.758  1.00  0.00 
+HETATM   23  H           1      -1.419  -2.603   1.248  1.00  0.00 
+HETATM   24  H           1       2.775  -0.929  -1.917  1.00  0.00 
+HETATM   25  H           1       1.244  -1.825  -1.765  1.00  0.00 
+HETATM   26  H           1       2.777  -2.597  -1.303  1.00  0.00 
+HETATM   27  H           1       1.574   4.490  -0.538  1.00  0.00 
+HETATM   28  H           1       3.114   3.603  -0.507  1.00  0.00 
+HETATM   29  H           1       2.966   3.432   1.976  1.00  0.00 
+HETATM   30  H           1       1.427   4.321   1.944  1.00  0.00 
+HETATM   31  H           1       2.590   6.179   0.982  1.00  0.00 
+HETATM   32  H           1       4.024   5.350   1.012  1.00  0.00 
+CONECT    1    2    2    6    9
+CONECT    2    1    1    3   11
+CONECT    3    2    4    4   16
+CONECT    4    3    3    5   13
+CONECT    5    4    6    6   17
+CONECT    6    1    5    5    7
+CONECT    7    6    8
+CONECT    8    7   18   19   20
+CONECT    9    1   10
+CONECT   10    9   21   22   23
+CONECT   11    2   12
+CONECT   12   11   24   25   26
+CONECT   13    4   14   27   28
+CONECT   14   13   15   29   30
+CONECT   15   14   31   32
+CONECT   16    3
+CONECT   17    5
+CONECT   18    8
+CONECT   19    8
+CONECT   20    8
+CONECT   21   10
+CONECT   22   10
+CONECT   23   10
+CONECT   24   12
+CONECT   25   12
+CONECT   26   12
+CONECT   27   13
+CONECT   28   13
+CONECT   29   14
+CONECT   30   14
+CONECT   31   15
+CONECT   32   15
+MASTER        0    0    0    0    0    0    0    0   32    0   32    0
+END
diff --git a/hacks/images/molecules/methamphetamine.pdb b/hacks/images/molecules/methamphetamine.pdb
new file mode 100644 (file)
index 0000000..0cf567d
--- /dev/null
@@ -0,0 +1,88 @@
+HEADER    Methamphetamine: D-Desoxyephedrine
+ORIGX1      1.000000  0.000000  0.000000        0.00000
+ORIGX2      0.000000  1.000000  0.000000        0.00000
+ORIGX3      0.000000  0.000000  1.000000        0.00000
+SCALE1      0.100000  0.000000  0.000000        0.00000
+SCALE2      0.000000  0.100000  0.000000        0.00000
+SCALE3      0.000000  0.000000  0.100000        0.00000
+ATOM      1  C           1       0.729   4.473  -1.914  1.00  0.00
+ATOM      2  C           1      -0.451   3.821  -2.014  1.00  0.00
+ATOM      3  C           1      -0.995   3.421  -3.398  1.00  0.00
+ATOM      4  C           1      -0.293   3.722  -4.513  1.00  0.00
+ATOM      5  C           1       1.052   4.465  -4.399  1.00  0.00
+ATOM      6  C           1       1.529   4.816  -3.184  1.00  0.00
+ATOM      7  H           1       1.115   4.756  -0.934  1.00  0.00
+ATOM      8  C           1      -1.251   3.478  -0.743  1.00  0.00
+ATOM      9  H           1      -1.947   2.896  -3.478  1.00  0.00
+ATOM     10  H           1      -0.678   3.440  -5.492  1.00  0.00
+ATOM     11  H           1       1.618   4.708  -5.298  1.00  0.00
+ATOM     12  H           1       2.481   5.342  -3.104  1.00  0.00
+ATOM     13  C           1      -0.489   3.986   0.496  1.00  0.00
+ATOM     14  N           1      -1.279   3.647   1.750  1.00  0.00
+ATOM     15  H           1      -1.378   2.398  -0.674  1.00  0.00
+ATOM     19  H           1      -2.229   3.957  -0.790  1.00  0.00
+ATOM     20  H           1       0.489   3.507   0.542  1.00  0.00
+ATOM     21  C           1      -0.310   5.512   0.398  1.00  0.00
+ATOM     22  H           1      -1.403   2.587   1.817  1.00  0.00
+ATOM     23  C           1      -0.528   4.148   2.972  1.00  0.00
+ATOM     24  H           1      -0.401   5.229   2.903  1.00  0.00
+ATOM     25  H           1       0.451   3.670   3.019  1.00  0.00
+ATOM     26  H           1      -1.094   3.905   3.871  1.00  0.00
+ATOM     27  H           1       0.229   5.871   1.275  1.00  0.00
+ATOM     28  H           1      -1.288   5.991   0.352  1.00  0.00
+ATOM     29  H           1       0.256   5.755  -0.501  1.00  0.00
+TER      30
+CONECT    1    2                                                                
+CONECT    2    1                                                                
+CONECT    2    3                                                                
+CONECT    3    2                                                                
+CONECT    3    4                                                                
+CONECT    4    3                                                                
+CONECT    4    5                                                                
+CONECT    5    4                                                                
+CONECT    5    6                                                                
+CONECT    6    5                                                                
+CONECT    6    1                                                                
+CONECT    1    6                                                                
+CONECT    1    7                                                                
+CONECT    7    1                                                                
+CONECT    2    8                                                                
+CONECT    8    2                                                                
+CONECT    3    9                                                                
+CONECT    9    3                                                                
+CONECT    4   10                                                                
+CONECT   10    4                                                                
+CONECT    5   11                                                                
+CONECT   11    5                                                                
+CONECT    6   12                                                                
+CONECT   12    6                                                                
+CONECT    8   13                                                                
+CONECT   13    8                                                                
+CONECT   13   14                                                                
+CONECT   14   13                                                                
+CONECT    8   15                                                                
+CONECT   15    8                                                                
+CONECT    8   19                                                                
+CONECT   19    8                                                                
+CONECT   13   20                                                                
+CONECT   20   13                                                                
+CONECT   13   21                                                                
+CONECT   21   13                                                                
+CONECT   14   22                                                                
+CONECT   22   14                                                                
+CONECT   14   23                                                                
+CONECT   23   14                                                                
+CONECT   23   24                                                                
+CONECT   24   23                                                                
+CONECT   23   25                                                                
+CONECT   25   23                                                                
+CONECT   23   26                                                                
+CONECT   26   23                                                                
+CONECT   21   27                                                                
+CONECT   27   21                                                                
+CONECT   21   28                                                                
+CONECT   28   21                                                                
+CONECT   21   29                                                                
+CONECT   29   21                                                                
+MASTER        0    0    0    0    0    0    0    6   26    1   52    0
+END
diff --git a/hacks/images/molecules/morphine.pdb b/hacks/images/molecules/morphine.pdb
new file mode 100644 (file)
index 0000000..57ae154
--- /dev/null
@@ -0,0 +1,87 @@
+HEADER    Morphine, an opiate
+COMPND    al3058
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.400   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.106   1.211   0.000  1.00  0.00 
+HETATM    4  C           1       1.444   2.446  -0.039  1.00  0.00 
+HETATM    5  C           1       0.047   2.458   0.013  1.00  0.00 
+HETATM    6  C           1      -0.629   1.243   0.051  1.00  0.00 
+HETATM    7  C           1      -2.081   1.500  -0.228  1.00  0.00 
+HETATM    8  C           1      -2.727   0.342  -0.999  1.00  0.00 
+HETATM    9  C           1      -2.363  -0.953  -0.239  1.00  0.00 
+HETATM   10  C           1      -0.832  -1.231  -0.285  1.00  0.00 
+HETATM   11  C           1      -1.885   2.839  -0.975  1.00  0.00 
+HETATM   12  C           1      -2.772   1.631   1.137  1.00  0.00 
+HETATM   13  C           1      -2.525   0.318   1.912  1.00  0.00 
+HETATM   14  N           1      -2.930  -0.855   1.119  1.00  0.00 
+HETATM   15  C           1      -2.790  -2.096   1.899  1.00  0.00 
+HETATM   16  H           1      -3.810   0.470  -0.978  1.00  0.00 
+HETATM   17  C           1      -2.300   0.287  -2.447  1.00  0.00 
+HETATM   18  C           1      -2.022   1.415  -3.116  1.00  0.00 
+HETATM   19  C           1      -1.406   2.612  -2.428  1.00  0.00 
+HETATM   20  H           1      -2.795   3.439  -0.953  1.00  0.00 
+HETATM   21  O           1      -0.796   3.478  -0.328  1.00  0.00 
+HETATM   22  H           1      -1.616   3.510  -3.009  1.00  0.00 
+HETATM   23  O           1       0.011   2.407  -2.414  1.00  0.00 
+HETATM   24  O           1       2.143   3.606  -0.184  1.00  0.00 
+HETATM   25  H           1       1.942  -0.943  -0.066  1.00  0.00 
+HETATM   26  H           1       3.195   1.192  -0.045  1.00  0.00 
+HETATM   27  H           1      -2.861  -1.784  -0.739  1.00  0.00 
+HETATM   28  H           1      -0.580  -1.568  -1.291  1.00  0.00 
+HETATM   29  H           1      -0.568  -2.021   0.414  1.00  0.00 
+HETATM   30  H           1      -3.842   1.788   0.997  1.00  0.00 
+HETATM   31  H           1      -2.350   2.469   1.692  1.00  0.00 
+HETATM   32  H           1      -3.107   0.346   2.833  1.00  0.00 
+HETATM   33  H           1      -1.471   0.235   2.174  1.00  0.00 
+HETATM   34  H           1      -3.461  -2.058   2.757  1.00  0.00 
+HETATM   35  H           1      -1.767  -2.205   2.257  1.00  0.00 
+HETATM   36  H           1      -3.054  -2.955   1.282  1.00  0.00 
+HETATM   37  H           1      -2.529  -0.612  -3.019  1.00  0.00 
+HETATM   38  H           1      -1.956   1.362  -4.203  1.00  0.00 
+HETATM   39  H           1       0.343   2.320  -3.313  1.00  0.00 
+HETATM   40  H           1       2.435   3.917   0.680  1.00  0.00 
+CONECT    1    2    2    6   10
+CONECT    2    1    1    3   25
+CONECT    3    2    4    4   26
+CONECT    4    3    3    5   24
+CONECT    5    4    6    6   21
+CONECT    6    1    5    5    7
+CONECT    7    6    8   11   12
+CONECT    8    7    9   16   17
+CONECT    9    8   10   14   27
+CONECT   10    1    9   28   29
+CONECT   11    7   19   20   21
+CONECT   12    7   13   30   31
+CONECT   13   12   14   32   33
+CONECT   14    9   13   15
+CONECT   15   14   34   35   36
+CONECT   16    8
+CONECT   17    8   18   18   37
+CONECT   18   17   17   19   38
+CONECT   19   11   18   22   23
+CONECT   20   11
+CONECT   21    5   11
+CONECT   22   19
+CONECT   23   19   39
+CONECT   24    4   40
+CONECT   25    2
+CONECT   26    3
+CONECT   27    9
+CONECT   28   10
+CONECT   29   10
+CONECT   30   12
+CONECT   31   12
+CONECT   32   13
+CONECT   33   13
+CONECT   34   15
+CONECT   35   15
+CONECT   36   15
+CONECT   37   17
+CONECT   38   18
+CONECT   39   23
+CONECT   40   24
+MASTER        0    0    0    0    0    0    0    0   40    0   40    0
+END
diff --git a/hacks/images/molecules/nicotine.pdb b/hacks/images/molecules/nicotine.pdb
new file mode 100644 (file)
index 0000000..d429efe
--- /dev/null
@@ -0,0 +1,59 @@
+HEADER    Nicotine, an insecticide
+COMPND    nicotine
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.400   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.082   1.223   0.000  1.00  0.00 
+HETATM    4  C           1       1.361   2.420  -0.060  1.00  0.00 
+HETATM    5  C           1      -0.037   2.388  -0.103  1.00  0.00 
+HETATM    6  N           1      -0.698   1.182  -0.064  1.00  0.00 
+HETATM    7  C           1       2.135  -1.320   0.103  1.00  0.00 
+HETATM    8  H           1      -0.543  -0.944   0.043  1.00  0.00 
+HETATM    9  H           1       3.168   1.256   0.062  1.00  0.00 
+HETATM   10  H           1       1.886   3.375  -0.067  1.00  0.00 
+HETATM   11  H           1      -0.604   3.318  -0.148  1.00  0.00 
+HETATM   12  H           1       2.087  -1.661   1.139  1.00  0.00 
+HETATM   13  N           1       1.561  -2.374  -0.749  1.00  0.00 
+HETATM   14  C           1       3.616  -1.255  -0.318  1.00  0.00 
+HETATM   15  C           1       3.943  -2.708  -0.713  1.00  0.00 
+HETATM   16  C           1       2.580  -3.434  -0.690  1.00  0.00 
+HETATM   17  C           1       1.359  -1.946  -2.144  1.00  0.00 
+HETATM   18  H           1       4.247  -0.910   0.502  1.00  0.00 
+HETATM   19  H           1       3.736  -0.608  -1.187  1.00  0.00 
+HETATM   20  H           1       4.627  -3.166   0.001  1.00  0.00 
+HETATM   21  H           1       4.371  -2.732  -1.715  1.00  0.00 
+HETATM   22  H           1       2.475  -3.968   0.255  1.00  0.00 
+HETATM   23  H           1       2.490  -4.135  -1.520  1.00  0.00 
+HETATM   24  H           1       2.299  -1.632  -2.594  1.00  0.00 
+HETATM   25  H           1       0.648  -1.122  -2.190  1.00  0.00 
+HETATM   26  H           1       0.956  -2.781  -2.717  1.00  0.00 
+CONECT    1    2    2    6    8
+CONECT    2    1    1    3    7
+CONECT    3    2    4    4    9
+CONECT    4    3    3    5   10
+CONECT    5    4    6    6   11
+CONECT    6    1    5    5
+CONECT    7    2   12   13   14
+CONECT    8    1
+CONECT    9    3
+CONECT   10    4
+CONECT   11    5
+CONECT   12    7
+CONECT   13    7   16   17
+CONECT   14    7   15   18   19
+CONECT   15   14   16   20   21
+CONECT   16   13   15   22   23
+CONECT   17   13   24   25   26
+CONECT   18   14
+CONECT   19   14
+CONECT   20   15
+CONECT   21   15
+CONECT   22   16
+CONECT   23   16
+CONECT   24   17
+CONECT   25   17
+CONECT   26   17
+MASTER        0    0    0    0    0    0    0    0   26    0   26    0
+END
diff --git a/hacks/images/molecules/novocaine.pdb b/hacks/images/molecules/novocaine.pdb
new file mode 100644 (file)
index 0000000..0051f05
--- /dev/null
@@ -0,0 +1,81 @@
+HEADER    Procaine: Novocaine, a local anesthetic
+COMPND    al3080
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.399   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.099   1.211   0.000  1.00  0.00 
+HETATM    4  C           1       1.398   2.422   0.001  1.00  0.00 
+HETATM    5  C           1      -0.001   2.421   0.002  1.00  0.00 
+HETATM    6  C           1      -0.702   1.211   0.002  1.00  0.00 
+HETATM    7  N           1      -2.104   1.210   0.003  1.00  0.00 
+HETATM    8  C           1       3.511   1.212   0.000  1.00  0.00 
+HETATM    9  O           1       4.107   2.255  -0.002  1.00  0.00 
+HETATM   10  O           1       4.172   0.056   0.011  1.00  0.00 
+HETATM   11  C           1       5.562   0.269   0.112  1.00  0.00 
+HETATM   12  C           1       6.275  -1.096   0.162  1.00  0.00 
+HETATM   13  H           1      -0.542  -0.946   0.000  1.00  0.00 
+HETATM   14  H           1       1.942  -0.945  -0.001  1.00  0.00 
+HETATM   15  H           1       1.940   3.368   0.001  1.00  0.00 
+HETATM   16  H           1      -0.544   3.367   0.004  1.00  0.00 
+HETATM   17  H           1      -2.613   0.334   0.002  1.00  0.00 
+HETATM   18  H           1       5.776   0.831   1.021  1.00  0.00 
+HETATM   19  H           1       5.912   0.827  -0.758  1.00  0.00 
+HETATM   20  H           1       5.949  -1.682  -0.697  1.00  0.00 
+HETATM   21  H           1       5.984  -1.614   1.076  1.00  0.00 
+HETATM   22  N           1       7.741  -0.935   0.107  1.00  0.00 
+HETATM   23  C           1       8.433  -2.206  -0.184  1.00  0.00 
+HETATM   24  C           1       8.171  -3.279   0.896  1.00  0.00 
+HETATM   25  C           1       8.301  -0.239   1.281  1.00  0.00 
+HETATM   26  C           1       8.683   1.204   0.891  1.00  0.00 
+HETATM   27  H           1      -2.613   2.087   0.004  1.00  0.00 
+HETATM   28  H           1       9.505  -2.021  -0.249  1.00  0.00 
+HETATM   29  H           1       8.091  -2.587  -1.146  1.00  0.00 
+HETATM   30  H           1       7.118  -3.559   0.896  1.00  0.00 
+HETATM   31  H           1       8.444  -2.898   1.879  1.00  0.00 
+HETATM   32  H           1       8.770  -4.162   0.675  1.00  0.00 
+HETATM   33  H           1       9.205  -0.743   1.624  1.00  0.00 
+HETATM   34  H           1       7.579  -0.223   2.098  1.00  0.00 
+HETATM   35  H           1       7.804   1.747   0.546  1.00  0.00 
+HETATM   36  H           1       9.424   1.176   0.092  1.00  0.00 
+HETATM   37  H           1       9.105   1.714   1.757  1.00  0.00 
+CONECT    1    2    2    6   13
+CONECT    2    1    1    3   14
+CONECT    3    2    4    4    8
+CONECT    4    3    3    5   15
+CONECT    5    4    6    6   16
+CONECT    6    1    5    5    7
+CONECT    7    6   17   27
+CONECT    8    3    9    9   10
+CONECT    9    8    8
+CONECT   10    8   11
+CONECT   11   10   12   18   19
+CONECT   12   11   20   21   22
+CONECT   13    1
+CONECT   14    2
+CONECT   15    4
+CONECT   16    5
+CONECT   17    7
+CONECT   18   11
+CONECT   19   11
+CONECT   20   12
+CONECT   21   12
+CONECT   22   12   23   25
+CONECT   23   22   24   28   29
+CONECT   24   23   30   31   32
+CONECT   25   22   26   33   34
+CONECT   26   25   35   36   37
+CONECT   27    7
+CONECT   28   23
+CONECT   29   23
+CONECT   30   24
+CONECT   31   24
+CONECT   32   24
+CONECT   33   25
+CONECT   34   25
+CONECT   35   26
+CONECT   36   26
+CONECT   37   26
+MASTER        0    0    0    0    0    0    0    0   37    0   37    0
+END
diff --git a/hacks/images/molecules/olestra.pdb b/hacks/images/molecules/olestra.pdb
new file mode 100644 (file)
index 0000000..b155d2f
--- /dev/null
@@ -0,0 +1,913 @@
+HEADER    Sucrose octaoleate: Olestra-like non-hydrolyzing fat
+COMPND    jb15oles
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Sep 20 16:26:54 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.543   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.023   1.465   0.000  1.00  0.00 
+HETATM    4  C           1       1.448   2.115   1.276  1.00  0.00 
+HETATM    5  C           1      -0.094   1.986   1.258  1.00  0.00 
+HETATM    6  O           1      -0.446   0.620   1.189  1.00  0.00 
+HETATM    7  O           1      -0.682   2.630   0.148  1.00  0.00 
+HETATM    8  C           1      -0.713   4.011  -0.142  1.00  0.00 
+HETATM    9  C           1      -1.600   4.135  -1.401  1.00  0.00 
+HETATM   10  C           1      -1.324   4.924   0.946  1.00  0.00 
+HETATM   11  O           1       0.576   4.533  -0.389  1.00  0.00 
+HETATM   12  C           1       0.436   5.938  -0.395  1.00  0.00 
+HETATM   13  C           1      -0.617   6.269   0.681  1.00  0.00 
+HETATM   14  C           1       1.756   6.671  -0.084  1.00  0.00 
+HETATM   15  O           1       2.227   6.278   1.183  1.00  0.00 
+HETATM   16  O           1      -1.499   7.264   0.209  1.00  0.00 
+HETATM   17  O           1      -1.029   4.475   2.250  1.00  0.00 
+HETATM   18  O           1      -1.000   3.465  -2.486  1.00  0.00 
+HETATM   19  C           1      -0.514  -1.457  -0.089  1.00  0.00 
+HETATM   20  O           1      -1.922  -1.490   0.008  1.00  0.00 
+HETATM   21  O           1       2.044  -0.707  -1.115  1.00  0.00 
+HETATM   22  O           1       3.434   1.488  -0.024  1.00  0.00 
+HETATM   23  O           1       1.870   3.459   1.361  1.00  0.00 
+HETATM   24  C           1      -2.482  -2.432  -0.753  1.00  0.00 
+HETATM   25  O           1      -3.315  -2.099  -1.556  1.00  0.00 
+HETATM   26  C           1      -2.336  -3.895  -0.434  1.00  0.00 
+HETATM   27  C           1      -3.583  -4.668  -0.927  1.00  0.00 
+HETATM   28  C           1      -3.416  -6.194  -0.736  1.00  0.00 
+HETATM   29  C           1      -4.686  -6.939  -1.212  1.00  0.00 
+HETATM   30  C           1      -4.492  -8.472  -1.146  1.00  0.00 
+HETATM   31  C           1      -5.779  -9.194  -1.608  1.00  0.00 
+HETATM   32  C           1      -5.580 -10.727  -1.651  1.00  0.00 
+HETATM   33  C           1      -6.868 -11.389  -2.094  1.00  0.00 
+HETATM   34  C           1      -6.933 -12.683  -2.447  1.00  0.00 
+HETATM   35  C           1      -5.725 -13.593  -2.433  1.00  0.00 
+HETATM   36  C           1      -6.164 -15.030  -2.794  1.00  0.00 
+HETATM   37  C           1      -4.957 -15.993  -2.791  1.00  0.00 
+HETATM   38  C           1      -5.423 -17.419  -3.153  1.00  0.00 
+HETATM   39  C           1      -4.225 -18.393  -3.146  1.00  0.00 
+HETATM   40  C           1      -4.700 -19.818  -3.505  1.00  0.00 
+HETATM   41  C           1       3.344  -0.983  -0.999  1.00  0.00 
+HETATM   42  O           1       4.098  -0.665  -1.882  1.00  0.00 
+HETATM   43  C           1       3.844  -1.849   0.124  1.00  0.00 
+HETATM   44  C           1       5.081  -2.680  -0.284  1.00  0.00 
+HETATM   45  C           1       5.532  -3.506   0.946  1.00  0.00 
+HETATM   46  C           1       6.768  -4.378   0.668  1.00  0.00 
+HETATM   47  C           1       7.108  -5.157   1.969  1.00  0.00 
+HETATM   48  C           1       8.283  -6.109   1.808  1.00  0.00 
+HETATM   49  C           1       8.489  -6.845   3.177  1.00  0.00 
+HETATM   50  C           1       9.603  -7.867   3.101  1.00  0.00 
+HETATM   51  C           1       9.838  -8.686   4.139  1.00  0.00 
+HETATM   52  C           1       8.989  -8.622   5.392  1.00  0.00 
+HETATM   53  C           1       9.509  -9.601   6.463  1.00  0.00 
+HETATM   54  C           1       8.612  -9.509   7.718  1.00  0.00 
+HETATM   55  C           1       9.090 -10.491   8.808  1.00  0.00 
+HETATM   56  C           1       8.155 -10.395  10.033  1.00  0.00 
+HETATM   57  C           1       8.599 -11.385  11.130  1.00  0.00 
+HETATM   58  C           1       3.954   2.643   0.391  1.00  0.00 
+HETATM   59  O           1       4.364   2.722   1.520  1.00  0.00 
+HETATM   60  C           1       3.833   3.903  -0.422  1.00  0.00 
+HETATM   61  C           1       5.113   4.138  -1.254  1.00  0.00 
+HETATM   62  C           1       5.001   5.470  -2.030  1.00  0.00 
+HETATM   63  C           1       6.274   5.721  -2.868  1.00  0.00 
+HETATM   64  C           1       6.142   7.042  -3.658  1.00  0.00 
+HETATM   65  C           1       7.424   7.302  -4.480  1.00  0.00 
+HETATM   66  C           1       7.292   8.604  -5.302  1.00  0.00 
+HETATM   67  C           1       8.567   8.842  -6.080  1.00  0.00 
+HETATM   68  C           1       8.673   9.819  -6.994  1.00  0.00 
+HETATM   69  C           1       7.518  10.739  -7.321  1.00  0.00 
+HETATM   70  C           1       7.962  11.764  -8.388  1.00  0.00 
+HETATM   71  C           1       6.793  12.704  -8.749  1.00  0.00 
+HETATM   72  C           1       7.240  13.712  -9.829  1.00  0.00 
+HETATM   73  C           1       6.069  14.649 -10.192  1.00  0.00 
+HETATM   74  C           1       6.510  15.654 -11.277  1.00  0.00 
+HETATM   75  C           1       1.563   4.034   2.524  1.00  0.00 
+HETATM   76  O           1       0.994   5.094   2.507  1.00  0.00 
+HETATM   77  C           1       2.204   3.624   3.820  1.00  0.00 
+HETATM   78  C           1       1.081   3.461   4.864  1.00  0.00 
+HETATM   79  C           1       1.646   2.985   6.219  1.00  0.00 
+HETATM   80  C           1       0.495   2.893   7.242  1.00  0.00 
+HETATM   81  C           1       0.991   2.293   8.574  1.00  0.00 
+HETATM   82  C           1      -0.180   2.239   9.577  1.00  0.00 
+HETATM   83  C           1       0.252   1.529  10.878  1.00  0.00 
+HETATM   84  C           1      -0.909   1.516  11.848  1.00  0.00 
+HETATM   85  C           1      -1.007   0.609  12.832  1.00  0.00 
+HETATM   86  C           1       0.023  -0.485  13.013  1.00  0.00 
+HETATM   87  C           1      -0.255  -1.246  14.326  1.00  0.00 
+HETATM   88  C           1       0.758  -2.396  14.494  1.00  0.00 
+HETATM   89  C           1       0.465  -3.168  15.798  1.00  0.00 
+HETATM   90  C           1       1.443  -4.352  15.937  1.00  0.00 
+HETATM   91  C           1       1.138  -5.136  17.229  1.00  0.00 
+HETATM   92  C           1      -1.640   3.717  -3.628  1.00  0.00 
+HETATM   93  O           1      -1.012   4.078  -4.590  1.00  0.00 
+HETATM   94  C           1      -3.121   3.488  -3.752  1.00  0.00 
+HETATM   95  C           1      -3.553   3.549  -5.232  1.00  0.00 
+HETATM   96  C           1      -5.083   3.368  -5.331  1.00  0.00 
+HETATM   97  C           1      -5.545   3.449  -6.801  1.00  0.00 
+HETATM   98  C           1      -7.080   3.295  -6.870  1.00  0.00 
+HETATM   99  C           1      -7.563   3.372  -8.334  1.00  0.00 
+HETATM  100  C           1      -9.099   3.230  -8.385  1.00  0.00 
+HETATM  101  C           1      -9.579   3.302  -9.818  1.00  0.00 
+HETATM  102  C           1     -10.886   3.239 -10.119  1.00  0.00 
+HETATM  103  C           1     -11.934   3.095  -9.037  1.00  0.00 
+HETATM  104  C           1     -13.340   3.036  -9.669  1.00  0.00 
+HETATM  105  C           1     -14.403   2.883  -8.561  1.00  0.00 
+HETATM  106  C           1     -15.815   2.830  -9.181  1.00  0.00 
+HETATM  107  C           1     -16.867   2.668  -8.064  1.00  0.00 
+HETATM  108  C           1     -18.283   2.619  -8.671  1.00  0.00 
+HETATM  109  C           1      -2.001   7.975   1.218  1.00  0.00 
+HETATM  110  O           1      -3.001   7.595   1.768  1.00  0.00 
+HETATM  111  C           1      -1.156   9.034   1.872  1.00  0.00 
+HETATM  112  C           1      -1.534  10.432   1.344  1.00  0.00 
+HETATM  113  C           1      -0.625  11.493   2.001  1.00  0.00 
+HETATM  114  C           1      -0.976  12.902   1.479  1.00  0.00 
+HETATM  115  C           1      -0.062  13.955   2.143  1.00  0.00 
+HETATM  116  C           1      -0.432  15.365   1.636  1.00  0.00 
+HETATM  117  C           1       0.472  16.432   2.289  1.00  0.00 
+HETATM  118  C           1       0.070  17.801   1.786  1.00  0.00 
+HETATM  119  C           1       0.739  18.910   2.133  1.00  0.00 
+HETATM  120  C           1       1.947  18.864   3.043  1.00  0.00 
+HETATM  121  C           1       2.466  20.301   3.261  1.00  0.00 
+HETATM  122  C           1       3.707  20.302   4.178  1.00  0.00 
+HETATM  123  C           1       4.204  21.750   4.364  1.00  0.00 
+HETATM  124  C           1       5.448  21.780   5.275  1.00  0.00 
+HETATM  125  C           1       5.933  23.236   5.440  1.00  0.00 
+HETATM  126  C           1      -1.676   5.203   3.160  1.00  0.00 
+HETATM  127  O           1      -1.395   6.362   3.326  1.00  0.00 
+HETATM  128  C           1      -2.722   4.564   4.031  1.00  0.00 
+HETATM  129  C           1      -3.529   5.657   4.765  1.00  0.00 
+HETATM  130  C           1      -4.616   5.007   5.648  1.00  0.00 
+HETATM  131  C           1      -5.417   6.088   6.405  1.00  0.00 
+HETATM  132  C           1      -6.505   5.421   7.274  1.00  0.00 
+HETATM  133  C           1      -7.276   6.485   8.085  1.00  0.00 
+HETATM  134  C           1      -8.342   5.803   8.967  1.00  0.00 
+HETATM  135  C           1      -8.999   6.835   9.859  1.00  0.00 
+HETATM  136  C           1     -10.265   7.250   9.698  1.00  0.00 
+HETATM  137  C           1     -11.161   6.729   8.595  1.00  0.00 
+HETATM  138  C           1     -12.519   7.460   8.650  1.00  0.00 
+HETATM  139  C           1     -13.450   6.941   7.534  1.00  0.00 
+HETATM  140  C           1     -14.810   7.665   7.610  1.00  0.00 
+HETATM  141  C           1     -15.745   7.150   6.496  1.00  0.00 
+HETATM  142  C           1     -17.110   7.866   6.583  1.00  0.00 
+HETATM  143  C           1       2.842   7.281   1.802  1.00  0.00 
+HETATM  144  O           1       2.205   8.253   2.118  1.00  0.00 
+HETATM  145  C           1       4.220   7.092   2.370  1.00  0.00 
+HETATM  146  C           1       4.473   8.156   3.459  1.00  0.00 
+HETATM  147  C           1       5.893   8.017   4.051  1.00  0.00 
+HETATM  148  C           1       6.113   9.105   5.125  1.00  0.00 
+HETATM  149  C           1       7.536   9.013   5.717  1.00  0.00 
+HETATM  150  C           1       7.731  10.123   6.772  1.00  0.00 
+HETATM  151  C           1       9.153  10.065   7.368  1.00  0.00 
+HETATM  152  C           1       9.319  11.173   8.385  1.00  0.00 
+HETATM  153  C           1      10.461  11.337   9.067  1.00  0.00 
+HETATM  154  C           1      11.643  10.413   8.868  1.00  0.00 
+HETATM  155  C           1      12.819  10.884   9.749  1.00  0.00 
+HETATM  156  C           1      14.028   9.942   9.572  1.00  0.00 
+HETATM  157  C           1      15.194  10.418  10.464  1.00  0.00 
+HETATM  158  C           1      16.397   9.465  10.312  1.00  0.00 
+HETATM  159  C           1      17.555   9.936  11.217  1.00  0.00 
+HETATM  160  C           1      18.753   8.973  11.081  1.00  0.00 
+HETATM  161  C           1      19.907   9.437  11.992  1.00  0.00 
+HETATM  162  C           1       7.637 -11.294  12.332  1.00  0.00 
+HETATM  163  C           1       8.066 -12.287  13.432  1.00  0.00 
+HETATM  164  C           1      -3.503 -20.792  -3.494  1.00  0.00 
+HETATM  165  C           1      -3.976 -22.215  -3.853  1.00  0.00 
+HETATM  166  C           1       2.094  -6.341  17.349  1.00  0.00 
+HETATM  167  C           1       1.786  -7.131  18.637  1.00  0.00 
+HETATM  168  C           1       5.336  16.589 -11.634  1.00  0.00 
+HETATM  169  C           1       5.771  17.593 -12.721  1.00  0.00 
+HETATM  170  C           1       7.177  23.279   6.350  1.00  0.00 
+HETATM  171  C           1       7.661  24.734   6.509  1.00  0.00 
+HETATM  172  C           1     -19.327   2.450  -7.548  1.00  0.00 
+HETATM  173  C           1     -20.747   2.406  -8.149  1.00  0.00 
+HETATM  174  C           1     -18.044   7.350   5.470  1.00  0.00 
+HETATM  175  C           1     -19.412   8.057   5.560  1.00  0.00 
+HETATM  176  H           1      -0.368   0.553  -0.864  1.00  0.00 
+HETATM  177  H           1       1.874  -0.482   0.920  1.00  0.00 
+HETATM  178  H           1       1.632   1.978  -0.879  1.00  0.00 
+HETATM  179  H           1       1.826   1.557   2.131  1.00  0.00 
+HETATM  180  H           1      -0.503   2.395   2.180  1.00  0.00 
+HETATM  181  H           1      -1.766   5.183  -1.654  1.00  0.00 
+HETATM  182  H           1      -2.562   3.672  -1.182  1.00  0.00 
+HETATM  183  H           1      -2.404   5.015   0.817  1.00  0.00 
+HETATM  184  H           1       0.079   6.263  -1.372  1.00  0.00 
+HETATM  185  H           1      -0.107   6.607   1.580  1.00  0.00 
+HETATM  186  H           1       1.568   7.745  -0.111  1.00  0.00 
+HETATM  187  H           1       2.495   6.425  -0.844  1.00  0.00 
+HETATM  188  H           1      -0.089  -2.043   0.726  1.00  0.00 
+HETATM  189  H           1      -0.191  -1.883  -1.040  1.00  0.00 
+HETATM  190  H           1      -2.226  -4.025   0.643  1.00  0.00 
+HETATM  191  H           1      -1.448  -4.280  -0.936  1.00  0.00 
+HETATM  192  H           1      -3.732  -4.461  -1.987  1.00  0.00 
+HETATM  193  H           1      -4.457  -4.327  -0.372  1.00  0.00 
+HETATM  194  H           1      -3.242  -6.413   0.317  1.00  0.00 
+HETATM  195  H           1      -2.560  -6.535  -1.319  1.00  0.00 
+HETATM  196  H           1      -4.902  -6.654  -2.241  1.00  0.00 
+HETATM  197  H           1      -5.527  -6.653  -0.579  1.00  0.00 
+HETATM  198  H           1      -4.259  -8.767  -0.123  1.00  0.00 
+HETATM  199  H           1      -3.666  -8.756  -1.799  1.00  0.00 
+HETATM  200  H           1      -6.047  -8.844  -2.605  1.00  0.00 
+HETATM  201  H           1      -6.588  -8.955  -0.918  1.00  0.00 
+HETATM  202  H           1      -5.310 -11.089  -0.659  1.00  0.00 
+HETATM  203  H           1      -4.783 -10.967  -2.355  1.00  0.00 
+HETATM  204  H           1      -7.781 -10.795  -2.125  1.00  0.00 
+HETATM  205  H           1      -7.896 -13.091  -2.754  1.00  0.00 
+HETATM  206  H           1      -5.275 -13.588  -1.440  1.00  0.00 
+HETATM  207  H           1      -4.997 -13.243  -3.164  1.00  0.00 
+HETATM  208  H           1      -6.618 -15.028  -3.785  1.00  0.00 
+HETATM  209  H           1      -6.898 -15.374  -2.065  1.00  0.00 
+HETATM  210  H           1      -4.502 -16.000  -1.801  1.00  0.00 
+HETATM  211  H           1      -4.222 -15.655  -3.522  1.00  0.00 
+HETATM  212  H           1      -5.875 -17.411  -4.145  1.00  0.00 
+HETATM  213  H           1      -6.163 -17.753  -2.425  1.00  0.00 
+HETATM  214  H           1      -3.773 -18.402  -2.155  1.00  0.00 
+HETATM  215  H           1      -3.486 -18.063  -3.876  1.00  0.00 
+HETATM  216  H           1      -5.150 -19.810  -4.498  1.00  0.00 
+HETATM  217  H           1      -5.441 -20.147  -2.777  1.00  0.00 
+HETATM  218  H           1       3.046  -2.532   0.416  1.00  0.00 
+HETATM  219  H           1       4.102  -1.216   0.975  1.00  0.00 
+HETATM  220  H           1       5.884  -2.006  -0.580  1.00  0.00 
+HETATM  221  H           1       4.829  -3.337  -1.117  1.00  0.00 
+HETATM  222  H           1       4.717  -4.156   1.264  1.00  0.00 
+HETATM  223  H           1       5.773  -2.820   1.759  1.00  0.00 
+HETATM  224  H           1       7.605  -3.757   0.345  1.00  0.00 
+HETATM  225  H           1       6.511  -5.083  -0.123  1.00  0.00 
+HETATM  226  H           1       6.244  -5.737   2.294  1.00  0.00 
+HETATM  227  H           1       7.378  -4.451   2.755  1.00  0.00 
+HETATM  228  H           1       9.158  -5.517   1.539  1.00  0.00 
+HETATM  229  H           1       8.056  -6.812   1.007  1.00  0.00 
+HETATM  230  H           1       7.572  -7.372   3.439  1.00  0.00 
+HETATM  231  H           1       8.718  -6.129   3.967  1.00  0.00 
+HETATM  232  H           1      10.222  -7.926   2.206  1.00  0.00 
+HETATM  233  H           1      10.647  -9.413   4.074  1.00  0.00 
+HETATM  234  H           1       7.960  -8.886   5.148  1.00  0.00 
+HETATM  235  H           1       9.015  -7.611   5.799  1.00  0.00 
+HETATM  236  H           1      10.534  -9.341   6.725  1.00  0.00 
+HETATM  237  H           1       9.481 -10.616   6.068  1.00  0.00 
+HETATM  238  H           1       7.586  -9.753   7.443  1.00  0.00 
+HETATM  239  H           1       8.644  -8.493   8.111  1.00  0.00 
+HETATM  240  H           1      10.108 -10.239   9.105  1.00  0.00 
+HETATM  241  H           1       9.070 -11.507   8.415  1.00  0.00 
+HETATM  242  H           1       7.136 -10.633   9.726  1.00  0.00 
+HETATM  243  H           1       8.182  -9.380  10.429  1.00  0.00 
+HETATM  244  H           1       9.611 -11.139  11.453  1.00  0.00 
+HETATM  245  H           1       8.585 -12.399  10.730  1.00  0.00 
+HETATM  246  H           1       3.697   4.738   0.262  1.00  0.00 
+HETATM  247  H           1       2.973   3.837  -1.086  1.00  0.00 
+HETATM  248  H           1       5.244   3.316  -1.956  1.00  0.00 
+HETATM  249  H           1       5.973   4.181  -0.585  1.00  0.00 
+HETATM  250  H           1       4.873   6.289  -1.322  1.00  0.00 
+HETATM  251  H           1       4.136   5.428  -2.692  1.00  0.00 
+HETATM  252  H           1       6.415   4.896  -3.567  1.00  0.00 
+HETATM  253  H           1       7.137   5.781  -2.205  1.00  0.00 
+HETATM  254  H           1       5.987   7.867  -2.962  1.00  0.00 
+HETATM  255  H           1       5.288   6.976  -4.332  1.00  0.00 
+HETATM  256  H           1       7.592   6.466  -5.158  1.00  0.00 
+HETATM  257  H           1       8.273   7.389  -3.801  1.00  0.00 
+HETATM  258  H           1       7.117   9.443  -4.629  1.00  0.00 
+HETATM  259  H           1       6.453   8.510  -5.991  1.00  0.00 
+HETATM  260  H           1       9.432   8.207  -5.887  1.00  0.00 
+HETATM  261  H           1       9.620   9.946  -7.519  1.00  0.00 
+HETATM  262  H           1       7.205  11.266  -6.419  1.00  0.00 
+HETATM  263  H           1       6.685  10.153  -7.709  1.00  0.00 
+HETATM  264  H           1       8.285  11.232  -9.283  1.00  0.00 
+HETATM  265  H           1       8.793  12.353  -8.000  1.00  0.00 
+HETATM  266  H           1       6.474  13.244  -7.858  1.00  0.00 
+HETATM  267  H           1       5.958  12.114  -9.129  1.00  0.00 
+HETATM  268  H           1       7.559  13.171 -10.720  1.00  0.00 
+HETATM  269  H           1       8.073  14.304  -9.450  1.00  0.00 
+HETATM  270  H           1       5.753  15.194  -9.302  1.00  0.00 
+HETATM  271  H           1       5.234  14.057 -10.566  1.00  0.00 
+HETATM  272  H           1       6.824  15.110 -12.168  1.00  0.00 
+HETATM  273  H           1       7.346  16.246 -10.905  1.00  0.00 
+HETATM  274  H           1       2.891   4.405   4.144  1.00  0.00 
+HETATM  275  H           1       2.753   2.690   3.706  1.00  0.00 
+HETATM  276  H           1       0.360   2.729   4.502  1.00  0.00 
+HETATM  277  H           1       0.578   4.420   4.999  1.00  0.00 
+HETATM  278  H           1       2.396   3.692   6.575  1.00  0.00 
+HETATM  279  H           1       2.104   2.004   6.094  1.00  0.00 
+HETATM  280  H           1      -0.293   2.257   6.838  1.00  0.00 
+HETATM  281  H           1       0.092   3.890   7.420  1.00  0.00 
+HETATM  282  H           1       1.792   2.910   8.980  1.00  0.00 
+HETATM  283  H           1       1.366   1.285   8.397  1.00  0.00 
+HETATM  284  H           1      -1.010   1.689   9.134  1.00  0.00 
+HETATM  285  H           1      -0.503   3.254   9.807  1.00  0.00 
+HETATM  286  H           1       1.090   2.062  11.326  1.00  0.00 
+HETATM  287  H           1       0.555   0.509  10.641  1.00  0.00 
+HETATM  288  H           1      -1.682   2.279  11.759  1.00  0.00 
+HETATM  289  H           1      -1.860   0.654  13.508  1.00  0.00 
+HETATM  290  H           1       1.020  -0.047  13.053  1.00  0.00 
+HETATM  291  H           1      -0.037  -1.180  12.176  1.00  0.00 
+HETATM  292  H           1      -1.264  -1.658  14.297  1.00  0.00 
+HETATM  293  H           1      -0.170  -0.560  15.169  1.00  0.00 
+HETATM  294  H           1       1.769  -1.990  14.531  1.00  0.00 
+HETATM  295  H           1       0.675  -3.076  13.646  1.00  0.00 
+HETATM  296  H           1      -0.557  -3.546  15.772  1.00  0.00 
+HETATM  297  H           1       0.580  -2.498  16.650  1.00  0.00 
+HETATM  298  H           1       2.466  -3.977  15.971  1.00  0.00 
+HETATM  299  H           1       1.331  -5.015  15.078  1.00  0.00 
+HETATM  300  H           1       0.108  -5.493  17.202  1.00  0.00 
+HETATM  301  H           1       1.269  -4.481  18.090  1.00  0.00 
+HETATM  302  H           1      -3.652   4.262  -3.197  1.00  0.00 
+HETATM  303  H           1      -3.371   2.511  -3.339  1.00  0.00 
+HETATM  304  H           1      -3.052   2.758  -5.791  1.00  0.00 
+HETATM  305  H           1      -3.275   4.517  -5.650  1.00  0.00 
+HETATM  306  H           1      -5.575   4.153  -4.757  1.00  0.00 
+HETATM  307  H           1      -5.358   2.397  -4.919  1.00  0.00 
+HETATM  308  H           1      -5.072   2.653  -7.376  1.00  0.00 
+HETATM  309  H           1      -5.259   4.415  -7.219  1.00  0.00 
+HETATM  310  H           1      -7.548   4.093  -6.294  1.00  0.00 
+HETATM  311  H           1      -7.365   2.332  -6.447  1.00  0.00 
+HETATM  312  H           1      -7.105   2.569  -8.910  1.00  0.00 
+HETATM  313  H           1      -7.275   4.333  -8.761  1.00  0.00 
+HETATM  314  H           1      -9.553   4.035  -7.808  1.00  0.00 
+HETATM  315  H           1      -9.385   2.270  -7.955  1.00  0.00 
+HETATM  316  H           1      -8.852   3.405 -10.623  1.00  0.00 
+HETATM  317  H           1     -11.195   3.293 -11.162  1.00  0.00 
+HETATM  318  H           1     -11.879   3.949  -8.362  1.00  0.00 
+HETATM  319  H           1     -11.753   2.177  -8.477  1.00  0.00 
+HETATM  320  H           1     -13.398   2.184 -10.347  1.00  0.00 
+HETATM  321  H           1     -13.526   3.954 -10.227  1.00  0.00 
+HETATM  322  H           1     -14.340   3.732  -7.880  1.00  0.00 
+HETATM  323  H           1     -14.217   1.964  -8.007  1.00  0.00 
+HETATM  324  H           1     -15.880   1.984  -9.865  1.00  0.00 
+HETATM  325  H           1     -16.006   3.752  -9.729  1.00  0.00 
+HETATM  326  H           1     -16.797   3.511  -7.377  1.00  0.00 
+HETATM  327  H           1     -16.675   1.743  -7.519  1.00  0.00 
+HETATM  328  H           1     -18.353   1.777  -9.361  1.00  0.00 
+HETATM  329  H           1     -18.478   3.545  -9.212  1.00  0.00 
+HETATM  330  H           1      -0.105   8.848   1.652  1.00  0.00 
+HETATM  331  H           1      -1.308   8.997   2.950  1.00  0.00 
+HETATM  332  H           1      -2.576  10.642   1.584  1.00  0.00 
+HETATM  333  H           1      -1.400  10.458   0.262  1.00  0.00 
+HETATM  334  H           1       0.416  11.272   1.765  1.00  0.00 
+HETATM  335  H           1      -0.761  11.465   3.082  1.00  0.00 
+HETATM  336  H           1      -2.016  13.126   1.716  1.00  0.00 
+HETATM  337  H           1      -0.839  12.933   0.398  1.00  0.00 
+HETATM  338  H           1       0.978  13.741   1.894  1.00  0.00 
+HETATM  339  H           1      -0.189  13.915   3.224  1.00  0.00 
+HETATM  340  H           1      -1.473  15.574   1.885  1.00  0.00 
+HETATM  341  H           1      -0.309  15.403   0.553  1.00  0.00 
+HETATM  342  H           1       1.512  16.236   2.027  1.00  0.00 
+HETATM  343  H           1       0.356  16.395   3.372  1.00  0.00 
+HETATM  344  H           1      -0.793  17.892   1.125  1.00  0.00 
+HETATM  345  H           1       0.403  19.871   1.743  1.00  0.00 
+HETATM  346  H           1       2.729  18.261   2.583  1.00  0.00 
+HETATM  347  H           1       1.666  18.429   4.003  1.00  0.00 
+HETATM  348  H           1       1.680  20.901   3.718  1.00  0.00 
+HETATM  349  H           1       2.733  20.734   2.297  1.00  0.00 
+HETATM  350  H           1       4.496  19.701   3.725  1.00  0.00 
+HETATM  351  H           1       3.443  19.879   5.148  1.00  0.00 
+HETATM  352  H           1       3.412  22.349   4.815  1.00  0.00 
+HETATM  353  H           1       4.461  22.170   3.391  1.00  0.00 
+HETATM  354  H           1       6.241  21.182   4.827  1.00  0.00 
+HETATM  355  H           1       5.192  21.369   6.251  1.00  0.00 
+HETATM  356  H           1       5.138  23.834   5.886  1.00  0.00 
+HETATM  357  H           1       6.186  23.646   4.463  1.00  0.00 
+HETATM  358  H           1      -2.234   3.917   4.760  1.00  0.00 
+HETATM  359  H           1      -3.391   3.970   3.410  1.00  0.00 
+HETATM  360  H           1      -3.999   6.312   4.032  1.00  0.00 
+HETATM  361  H           1      -2.855   6.243   5.391  1.00  0.00 
+HETATM  362  H           1      -4.143   4.340   6.369  1.00  0.00 
+HETATM  363  H           1      -5.294   4.431   5.018  1.00  0.00 
+HETATM  364  H           1      -5.887   6.762   5.689  1.00  0.00 
+HETATM  365  H           1      -4.741   6.657   7.044  1.00  0.00 
+HETATM  366  H           1      -6.034   4.719   7.961  1.00  0.00 
+HETATM  367  H           1      -7.201   4.881   6.631  1.00  0.00 
+HETATM  368  H           1      -7.762   7.185   7.405  1.00  0.00 
+HETATM  369  H           1      -6.577   7.027   8.721  1.00  0.00 
+HETATM  370  H           1      -7.858   5.057   9.599  1.00  0.00 
+HETATM  371  H           1      -9.075   5.305   8.334  1.00  0.00 
+HETATM  372  H           1      -8.416   7.259  10.676  1.00  0.00 
+HETATM  373  H           1     -10.661   7.994  10.389  1.00  0.00 
+HETATM  374  H           1     -11.324   5.660   8.731  1.00  0.00 
+HETATM  375  H           1     -10.692   6.909   7.628  1.00  0.00 
+HETATM  376  H           1     -12.360   8.530   8.520  1.00  0.00 
+HETATM  377  H           1     -12.985   7.281   9.620  1.00  0.00 
+HETATM  378  H           1     -13.603   5.869   7.659  1.00  0.00 
+HETATM  379  H           1     -12.992   7.129   6.563  1.00  0.00 
+HETATM  380  H           1     -14.657   8.738   7.488  1.00  0.00 
+HETATM  381  H           1     -15.267   7.476   8.582  1.00  0.00 
+HETATM  382  H           1     -15.891   6.077   6.614  1.00  0.00 
+HETATM  383  H           1     -15.293   7.348   5.524  1.00  0.00 
+HETATM  384  H           1     -16.964   8.939   6.466  1.00  0.00 
+HETATM  385  H           1     -17.561   7.667   7.556  1.00  0.00 
+HETATM  386  H           1       4.947   7.200   1.566  1.00  0.00 
+HETATM  387  H           1       4.294   6.092   2.798  1.00  0.00 
+HETATM  388  H           1       3.737   8.034   4.255  1.00  0.00 
+HETATM  389  H           1       4.363   9.148   3.021  1.00  0.00 
+HETATM  390  H           1       6.629   8.137   3.256  1.00  0.00 
+HETATM  391  H           1       6.005   7.031   4.501  1.00  0.00 
+HETATM  392  H           1       5.382   8.976   5.924  1.00  0.00 
+HETATM  393  H           1       5.977  10.088   4.673  1.00  0.00 
+HETATM  394  H           1       8.269   9.137   4.920  1.00  0.00 
+HETATM  395  H           1       7.673   8.038   6.185  1.00  0.00 
+HETATM  396  H           1       7.001   9.993   7.571  1.00  0.00 
+HETATM  397  H           1       7.579  11.095   6.302  1.00  0.00 
+HETATM  398  H           1       9.884  10.192   6.570  1.00  0.00 
+HETATM  399  H           1       9.304   9.100   7.851  1.00  0.00 
+HETATM  400  H           1       8.493  11.861   8.565  1.00  0.00 
+HETATM  401  H           1      10.536  12.152   9.787  1.00  0.00 
+HETATM  402  H           1      11.947  10.429   7.821  1.00  0.00 
+HETATM  403  H           1      11.362   9.399   9.150  1.00  0.00 
+HETATM  404  H           1      12.509  10.880  10.795  1.00  0.00 
+HETATM  405  H           1      13.103  11.896   9.462  1.00  0.00 
+HETATM  406  H           1      14.343   9.946   8.529  1.00  0.00 
+HETATM  407  H           1      13.743   8.930   9.859  1.00  0.00 
+HETATM  408  H           1      14.872  10.428  11.505  1.00  0.00 
+HETATM  409  H           1      15.489  11.425  10.168  1.00  0.00 
+HETATM  410  H           1      16.727   9.459   9.273  1.00  0.00 
+HETATM  411  H           1      16.099   8.457  10.601  1.00  0.00 
+HETATM  412  H           1      17.219   9.951  12.254  1.00  0.00 
+HETATM  413  H           1      17.860  10.940  10.923  1.00  0.00 
+HETATM  414  H           1      19.093   8.960  10.046  1.00  0.00 
+HETATM  415  H           1      18.446   7.968  11.372  1.00  0.00 
+HETATM  416  H           1      19.573   9.448  13.030  1.00  0.00 
+HETATM  417  H           1      20.221  10.440  11.703  1.00  0.00 
+HETATM  418  H           1      20.748   8.752  11.891  1.00  0.00 
+HETATM  419  H           1       6.625 -11.535  12.006  1.00  0.00 
+HETATM  420  H           1       7.653 -10.282  12.735  1.00  0.00 
+HETATM  421  H           1       9.075 -12.048  13.767  1.00  0.00 
+HETATM  422  H           1       8.046 -13.303  13.036  1.00  0.00 
+HETATM  423  H           1       7.378 -12.215  14.274  1.00  0.00 
+HETATM  424  H           1      -2.762 -20.465  -4.223  1.00  0.00 
+HETATM  425  H           1      -3.052 -20.802  -2.502  1.00  0.00 
+HETATM  426  H           1      -4.423 -22.213  -4.847  1.00  0.00 
+HETATM  427  H           1      -4.714 -22.551  -3.124  1.00  0.00 
+HETATM  428  H           1      -3.123 -22.895  -3.842  1.00  0.00 
+HETATM  429  H           1       3.124  -5.987  17.380  1.00  0.00 
+HETATM  430  H           1       1.964  -6.995  16.486  1.00  0.00 
+HETATM  431  H           1       0.758  -7.491  18.610  1.00  0.00 
+HETATM  432  H           1       1.921  -6.484  19.504  1.00  0.00 
+HETATM  433  H           1       2.464  -7.981  18.713  1.00  0.00 
+HETATM  434  H           1       5.023  17.135 -10.744  1.00  0.00 
+HETATM  435  H           1       4.500  15.996 -12.005  1.00  0.00 
+HETATM  436  H           1       6.079  17.053 -13.616  1.00  0.00 
+HETATM  437  H           1       6.604  18.192 -12.354  1.00  0.00 
+HETATM  438  H           1       4.935  18.248 -12.965  1.00  0.00 
+HETATM  439  H           1       7.973  22.680   5.906  1.00  0.00 
+HETATM  440  H           1       6.926  22.873   7.330  1.00  0.00 
+HETATM  441  H           1       6.871  25.336   6.956  1.00  0.00 
+HETATM  442  H           1       7.919  25.143   5.532  1.00  0.00 
+HETATM  443  H           1       8.540  24.757   7.153  1.00  0.00 
+HETATM  444  H           1     -19.255   3.289  -6.856  1.00  0.00 
+HETATM  445  H           1     -19.135   1.523  -7.009  1.00  0.00 
+HETATM  446  H           1     -20.826   1.565  -8.838  1.00  0.00 
+HETATM  447  H           1     -20.947   3.334  -8.684  1.00  0.00 
+HETATM  448  H           1     -21.476   2.286  -7.348  1.00  0.00 
+HETATM  449  H           1     -18.187   6.275   5.583  1.00  0.00 
+HETATM  450  H           1     -17.597   7.553   4.497  1.00  0.00 
+HETATM  451  H           1     -19.276   9.132   5.443  1.00  0.00 
+HETATM  452  H           1     -19.866   7.853   6.529  1.00  0.00 
+HETATM  453  H           1     -20.065   7.687   4.770  1.00  0.00 
+CONECT    1    2    6   19  176
+CONECT    2    1    3   21  177
+CONECT    3    2    4   22  178
+CONECT    4    3    5   23  179
+CONECT    5    4    6    7  180
+CONECT    6    1    5
+CONECT    7    5    8
+CONECT    8    7    9   10   11
+CONECT    9    8   18  181  182
+CONECT   10    8   13   17  183
+CONECT   11    8   12
+CONECT   12   11   13   14  184
+CONECT   13   10   12   16  185
+CONECT   14   12   15  186  187
+CONECT   15   14  143
+CONECT   16   13  109
+CONECT   17   10  126
+CONECT   18    9   92
+CONECT   19    1   20  188  189
+CONECT   20   19   24
+CONECT   21    2   41
+CONECT   22    3   58
+CONECT   23    4   75
+CONECT   24   20   25   25   26
+CONECT   25   24   24
+CONECT   26   24   27  190  191
+CONECT   27   26   28  192  193
+CONECT   28   27   29  194  195
+CONECT   29   28   30  196  197
+CONECT   30   29   31  198  199
+CONECT   31   30   32  200  201
+CONECT   32   31   33  202  203
+CONECT   33   32   34   34  204
+CONECT   34   33   33   35  205
+CONECT   35   34   36  206  207
+CONECT   36   35   37  208  209
+CONECT   37   36   38  210  211
+CONECT   38   37   39  212  213
+CONECT   39   38   40  214  215
+CONECT   40   39  164  216  217
+CONECT   41   21   42   42   43
+CONECT   42   41   41
+CONECT   43   41   44  218  219
+CONECT   44   43   45  220  221
+CONECT   45   44   46  222  223
+CONECT   46   45   47  224  225
+CONECT   47   46   48  226  227
+CONECT   48   47   49  228  229
+CONECT   49   48   50  230  231
+CONECT   50   49   51   51  232
+CONECT   51   50   50   52  233
+CONECT   52   51   53  234  235
+CONECT   53   52   54  236  237
+CONECT   54   53   55  238  239
+CONECT   55   54   56  240  241
+CONECT   56   55   57  242  243
+CONECT   57   56  162  244  245
+CONECT   58   22   59   59   60
+CONECT   59   58   58
+CONECT   60   58   61  246  247
+CONECT   61   60   62  248  249
+CONECT   62   61   63  250  251
+CONECT   63   62   64  252  253
+CONECT   64   63   65  254  255
+CONECT   65   64   66  256  257
+CONECT   66   65   67  258  259
+CONECT   67   66   68   68  260
+CONECT   68   67   67   69  261
+CONECT   69   68   70  262  263
+CONECT   70   69   71  264  265
+CONECT   71   70   72  266  267
+CONECT   72   71   73  268  269
+CONECT   73   72   74  270  271
+CONECT   74   73  168  272  273
+CONECT   75   23   76   76   77
+CONECT   76   75   75
+CONECT   77   75   78  274  275
+CONECT   78   77   79  276  277
+CONECT   79   78   80  278  279
+CONECT   80   79   81  280  281
+CONECT   81   80   82  282  283
+CONECT   82   81   83  284  285
+CONECT   83   82   84  286  287
+CONECT   84   83   85   85  288
+CONECT   85   84   84   86  289
+CONECT   86   85   87  290  291
+CONECT   87   86   88  292  293
+CONECT   88   87   89  294  295
+CONECT   89   88   90  296  297
+CONECT   90   89   91  298  299
+CONECT   91   90  166  300  301
+CONECT   92   18   93   93   94
+CONECT   93   92   92
+CONECT   94   92   95  302  303
+CONECT   95   94   96  304  305
+CONECT   96   95   97  306  307
+CONECT   97   96   98  308  309
+CONECT   98   97   99  310  311
+CONECT   99   98  100  312  313
+CONECT  100   99  101  314  315
+CONECT  101  100  102  102  316
+CONECT  102  101  101  103  317
+CONECT  103  102  104  318  319
+CONECT  104  103  105  320  321
+CONECT  105  104  106  322  323
+CONECT  106  105  107  324  325
+CONECT  107  106  108  326  327
+CONECT  108  107  172  328  329
+CONECT  109   16  110  110  111
+CONECT  110  109  109
+CONECT  111  109  112  330  331
+CONECT  112  111  113  332  333
+CONECT  113  112  114  334  335
+CONECT  114  113  115  336  337
+CONECT  115  114  116  338  339
+CONECT  116  115  117  340  341
+CONECT  117  116  118  342  343
+CONECT  118  117  119  119  344
+CONECT  119  118  118  120  345
+CONECT  120  119  121  346  347
+CONECT  121  120  122  348  349
+CONECT  122  121  123  350  351
+CONECT  123  122  124  352  353
+CONECT  124  123  125  354  355
+CONECT  125  124  170  356  357
+CONECT  126   17  127  127  128
+CONECT  127  126  126
+CONECT  128  126  129  358  359
+CONECT  129  128  130  360  361
+CONECT  130  129  131  362  363
+CONECT  131  130  132  364  365
+CONECT  132  131  133  366  367
+CONECT  133  132  134  368  369
+CONECT  134  133  135  370  371
+CONECT  135  134  136  136  372
+CONECT  136  135  135  137  373
+CONECT  137  136  138  374  375
+CONECT  138  137  139  376  377
+CONECT  139  138  140  378  379
+CONECT  140  139  141  380  381
+CONECT  141  140  142  382  383
+CONECT  142  141  174  384  385
+CONECT  143   15  144  144  145
+CONECT  144  143  143
+CONECT  145  143  146  386  387
+CONECT  146  145  147  388  389
+CONECT  147  146  148  390  391
+CONECT  148  147  149  392  393
+CONECT  149  148  150  394  395
+CONECT  150  149  151  396  397
+CONECT  151  150  152  398  399
+CONECT  152  151  153  153  400
+CONECT  153  152  152  154  401
+CONECT  154  153  155  402  403
+CONECT  155  154  156  404  405
+CONECT  156  155  157  406  407
+CONECT  157  156  158  408  409
+CONECT  158  157  159  410  411
+CONECT  159  158  160  412  413
+CONECT  160  159  161  414  415
+CONECT  161  160  416  417  418
+CONECT  162   57  163  419  420
+CONECT  163  162  421  422  423
+CONECT  164   40  165  424  425
+CONECT  165  164  426  427  428
+CONECT  166   91  167  429  430
+CONECT  167  166  431  432  433
+CONECT  168   74  169  434  435
+CONECT  169  168  436  437  438
+CONECT  170  125  171  439  440
+CONECT  171  170  441  442  443
+CONECT  172  108  173  444  445
+CONECT  173  172  446  447  448
+CONECT  174  142  175  449  450
+CONECT  175  174  451  452  453
+CONECT  176    1
+CONECT  177    2
+CONECT  178    3
+CONECT  179    4
+CONECT  180    5
+CONECT  181    9
+CONECT  182    9
+CONECT  183   10
+CONECT  184   12
+CONECT  185   13
+CONECT  186   14
+CONECT  187   14
+CONECT  188   19
+CONECT  189   19
+CONECT  190   26
+CONECT  191   26
+CONECT  192   27
+CONECT  193   27
+CONECT  194   28
+CONECT  195   28
+CONECT  196   29
+CONECT  197   29
+CONECT  198   30
+CONECT  199   30
+CONECT  200   31
+CONECT  201   31
+CONECT  202   32
+CONECT  203   32
+CONECT  204   33
+CONECT  205   34
+CONECT  206   35
+CONECT  207   35
+CONECT  208   36
+CONECT  209   36
+CONECT  210   37
+CONECT  211   37
+CONECT  212   38
+CONECT  213   38
+CONECT  214   39
+CONECT  215   39
+CONECT  216   40
+CONECT  217   40
+CONECT  218   43
+CONECT  219   43
+CONECT  220   44
+CONECT  221   44
+CONECT  222   45
+CONECT  223   45
+CONECT  224   46
+CONECT  225   46
+CONECT  226   47
+CONECT  227   47
+CONECT  228   48
+CONECT  229   48
+CONECT  230   49
+CONECT  231   49
+CONECT  232   50
+CONECT  233   51
+CONECT  234   52
+CONECT  235   52
+CONECT  236   53
+CONECT  237   53
+CONECT  238   54
+CONECT  239   54
+CONECT  240   55
+CONECT  241   55
+CONECT  242   56
+CONECT  243   56
+CONECT  244   57
+CONECT  245   57
+CONECT  246   60
+CONECT  247   60
+CONECT  248   61
+CONECT  249   61
+CONECT  250   62
+CONECT  251   62
+CONECT  252   63
+CONECT  253   63
+CONECT  254   64
+CONECT  255   64
+CONECT  256   65
+CONECT  257   65
+CONECT  258   66
+CONECT  259   66
+CONECT  260   67
+CONECT  261   68
+CONECT  262   69
+CONECT  263   69
+CONECT  264   70
+CONECT  265   70
+CONECT  266   71
+CONECT  267   71
+CONECT  268   72
+CONECT  269   72
+CONECT  270   73
+CONECT  271   73
+CONECT  272   74
+CONECT  273   74
+CONECT  274   77
+CONECT  275   77
+CONECT  276   78
+CONECT  277   78
+CONECT  278   79
+CONECT  279   79
+CONECT  280   80
+CONECT  281   80
+CONECT  282   81
+CONECT  283   81
+CONECT  284   82
+CONECT  285   82
+CONECT  286   83
+CONECT  287   83
+CONECT  288   84
+CONECT  289   85
+CONECT  290   86
+CONECT  291   86
+CONECT  292   87
+CONECT  293   87
+CONECT  294   88
+CONECT  295   88
+CONECT  296   89
+CONECT  297   89
+CONECT  298   90
+CONECT  299   90
+CONECT  300   91
+CONECT  301   91
+CONECT  302   94
+CONECT  303   94
+CONECT  304   95
+CONECT  305   95
+CONECT  306   96
+CONECT  307   96
+CONECT  308   97
+CONECT  309   97
+CONECT  310   98
+CONECT  311   98
+CONECT  312   99
+CONECT  313   99
+CONECT  314  100
+CONECT  315  100
+CONECT  316  101
+CONECT  317  102
+CONECT  318  103
+CONECT  319  103
+CONECT  320  104
+CONECT  321  104
+CONECT  322  105
+CONECT  323  105
+CONECT  324  106
+CONECT  325  106
+CONECT  326  107
+CONECT  327  107
+CONECT  328  108
+CONECT  329  108
+CONECT  330  111
+CONECT  331  111
+CONECT  332  112
+CONECT  333  112
+CONECT  334  113
+CONECT  335  113
+CONECT  336  114
+CONECT  337  114
+CONECT  338  115
+CONECT  339  115
+CONECT  340  116
+CONECT  341  116
+CONECT  342  117
+CONECT  343  117
+CONECT  344  118
+CONECT  345  119
+CONECT  346  120
+CONECT  347  120
+CONECT  348  121
+CONECT  349  121
+CONECT  350  122
+CONECT  351  122
+CONECT  352  123
+CONECT  353  123
+CONECT  354  124
+CONECT  355  124
+CONECT  356  125
+CONECT  357  125
+CONECT  358  128
+CONECT  359  128
+CONECT  360  129
+CONECT  361  129
+CONECT  362  130
+CONECT  363  130
+CONECT  364  131
+CONECT  365  131
+CONECT  366  132
+CONECT  367  132
+CONECT  368  133
+CONECT  369  133
+CONECT  370  134
+CONECT  371  134
+CONECT  372  135
+CONECT  373  136
+CONECT  374  137
+CONECT  375  137
+CONECT  376  138
+CONECT  377  138
+CONECT  378  139
+CONECT  379  139
+CONECT  380  140
+CONECT  381  140
+CONECT  382  141
+CONECT  383  141
+CONECT  384  142
+CONECT  385  142
+CONECT  386  145
+CONECT  387  145
+CONECT  388  146
+CONECT  389  146
+CONECT  390  147
+CONECT  391  147
+CONECT  392  148
+CONECT  393  148
+CONECT  394  149
+CONECT  395  149
+CONECT  396  150
+CONECT  397  150
+CONECT  398  151
+CONECT  399  151
+CONECT  400  152
+CONECT  401  153
+CONECT  402  154
+CONECT  403  154
+CONECT  404  155
+CONECT  405  155
+CONECT  406  156
+CONECT  407  156
+CONECT  408  157
+CONECT  409  157
+CONECT  410  158
+CONECT  411  158
+CONECT  412  159
+CONECT  413  159
+CONECT  414  160
+CONECT  415  160
+CONECT  416  161
+CONECT  417  161
+CONECT  418  161
+CONECT  419  162
+CONECT  420  162
+CONECT  421  163
+CONECT  422  163
+CONECT  423  163
+CONECT  424  164
+CONECT  425  164
+CONECT  426  165
+CONECT  427  165
+CONECT  428  165
+CONECT  429  166
+CONECT  430  166
+CONECT  431  167
+CONECT  432  167
+CONECT  433  167
+CONECT  434  168
+CONECT  435  168
+CONECT  436  169
+CONECT  437  169
+CONECT  438  169
+CONECT  439  170
+CONECT  440  170
+CONECT  441  171
+CONECT  442  171
+CONECT  443  171
+CONECT  444  172
+CONECT  445  172
+CONECT  446  173
+CONECT  447  173
+CONECT  448  173
+CONECT  449  174
+CONECT  450  174
+CONECT  451  175
+CONECT  452  175
+CONECT  453  175
+MASTER        0    0    0    0    0    0    0    0  453    0  453    0
+END
diff --git a/hacks/images/molecules/penicillin.pdb b/hacks/images/molecules/penicillin.pdb
new file mode 100644 (file)
index 0000000..54732f5
--- /dev/null
@@ -0,0 +1,89 @@
+HEADER    Penicillin G, an antibiotic
+COMPND    al3077
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.542   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       1.415   1.509   0.000  1.00  0.00 
+HETATM    4  O           1       2.209   2.398  -0.083  1.00  0.00 
+HETATM    5  N           1       0.066   1.475   0.061  1.00  0.00 
+HETATM    6  N           1       2.125  -0.528   1.243  1.00  0.00 
+HETATM    7  C           1       2.235  -1.858   1.457  1.00  0.00 
+HETATM    8  O           1       2.669  -2.251   2.509  1.00  0.00 
+HETATM    9  C           1       1.827  -2.860   0.414  1.00  0.00 
+HETATM   10  C           1       1.446  -4.153   1.098  1.00  0.00 
+HETATM   11  C           1       0.143  -4.328   1.578  1.00  0.00 
+HETATM   12  C           1      -0.216  -5.521   2.214  1.00  0.00 
+HETATM   13  C           1       0.729  -6.540   2.373  1.00  0.00 
+HETATM   14  C           1       2.034  -6.363   1.902  1.00  0.00 
+HETATM   15  C           1       2.393  -5.168   1.268  1.00  0.00 
+HETATM   16  S           1      -0.818  -0.450   1.519  1.00  0.00 
+HETATM   17  C           1      -1.605   1.127   1.810  1.00  0.00 
+HETATM   18  C           1      -1.800   1.394   3.317  1.00  0.00 
+HETATM   19  C           1      -2.966   1.138   1.082  1.00  0.00 
+HETATM   20  C           1      -0.629   2.147   1.173  1.00  0.00 
+HETATM   21  C           1      -1.351   3.368   0.682  1.00  0.00 
+HETATM   22  O           1      -1.537   3.505  -0.499  1.00  0.00 
+HETATM   23  O           1      -2.048   4.114   1.557  1.00  0.00 
+HETATM   24  H           1      -0.466  -0.363  -0.916  1.00  0.00 
+HETATM   25  H           1       1.982  -0.387  -0.919  1.00  0.00 
+HETATM   26  H           1       2.409   0.115   1.973  1.00  0.00 
+HETATM   27  H           1       2.660  -3.033  -0.268  1.00  0.00 
+HETATM   28  H           1       0.971  -2.493  -0.151  1.00  0.00 
+HETATM   29  H           1      -0.596  -3.536   1.454  1.00  0.00 
+HETATM   30  H           1      -1.232  -5.657   2.584  1.00  0.00 
+HETATM   31  H           1       0.449  -7.470   2.868  1.00  0.00 
+HETATM   32  H           1       2.772  -7.155   2.030  1.00  0.00 
+HETATM   33  H           1       3.412  -5.032   0.906  1.00  0.00 
+HETATM   34  H           1      -0.839   1.345   3.829  1.00  0.00 
+HETATM   35  H           1      -2.470   0.644   3.739  1.00  0.00 
+HETATM   36  H           1      -2.233   2.384   3.459  1.00  0.00 
+HETATM   37  H           1      -3.586   0.322   1.454  1.00  0.00 
+HETATM   38  H           1      -2.811   1.012   0.010  1.00  0.00 
+HETATM   39  H           1      -3.480   2.082   1.263  1.00  0.00 
+HETATM   40  H           1       0.108   2.446   1.919  1.00  0.00 
+HETATM   41  H           1      -2.798   4.548   1.098  1.00  0.00 
+CONECT    1    2    5   16   24
+CONECT    2    1    3    6   25
+CONECT    3    2    4    4    5
+CONECT    4    3    3
+CONECT    5    1    3   20
+CONECT    6    2    7   26
+CONECT    7    6    8    8    9
+CONECT    8    7    7
+CONECT    9    7   10   27   28
+CONECT   10    9   11   11   15
+CONECT   11   10   10   12   29
+CONECT   12   11   13   13   30
+CONECT   13   12   12   14   31
+CONECT   14   13   15   15   32
+CONECT   15   10   14   14   33
+CONECT   16    1   17
+CONECT   17   16   18   19   20
+CONECT   18   17   34   35   36
+CONECT   19   17   37   38   39
+CONECT   20    5   17   21   40
+CONECT   21   20   22   22   23
+CONECT   22   21   21
+CONECT   23   21   41
+CONECT   24    1
+CONECT   25    2
+CONECT   26    6
+CONECT   27    9
+CONECT   28    9
+CONECT   29   11
+CONECT   30   12
+CONECT   31   13
+CONECT   32   14
+CONECT   33   15
+CONECT   34   18
+CONECT   35   18
+CONECT   36   18
+CONECT   37   19
+CONECT   38   19
+CONECT   39   19
+CONECT   40   20
+CONECT   41   23
+MASTER        0    0    0    0    0    0    0    0   41    0   41    0
+END
diff --git a/hacks/images/molecules/sarin.pdb b/hacks/images/molecules/sarin.pdb
new file mode 100644 (file)
index 0000000..ae03028
--- /dev/null
@@ -0,0 +1,43 @@
+HEADER    Sarin: S Enantiomer, a chemical warfare agent
+COMPND    al3023
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  P           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  F           1       1.779   0.000   0.000  1.00  0.00 
+HETATM    3  C           1      -0.611   1.725   0.000  1.00  0.00 
+HETATM    4  O           1      -0.599  -0.840   1.463  1.00  0.00 
+HETATM    5  O           1      -0.599  -0.841  -1.466  1.00  0.00 
+HETATM    6  C           1      -1.898  -1.369  -1.304  1.00  0.00 
+HETATM    7  C           1      -1.817  -2.772  -0.672  1.00  0.00 
+HETATM    8  C           1      -2.555  -1.476  -2.694  1.00  0.00 
+HETATM    9  H           1      -0.248   2.240  -0.890  1.00  0.00 
+HETATM   10  H           1      -0.248   2.239   0.891  1.00  0.00 
+HETATM   11  H           1      -1.701   1.724   0.000  1.00  0.00 
+HETATM   12  H           1      -2.510  -0.718  -0.679  1.00  0.00 
+HETATM   13  H           1      -1.372  -2.712   0.320  1.00  0.00 
+HETATM   14  H           1      -1.203  -3.414  -1.303  1.00  0.00 
+HETATM   15  H           1      -2.818  -3.194  -0.591  1.00  0.00 
+HETATM   16  H           1      -1.961  -2.124  -3.339  1.00  0.00 
+HETATM   17  H           1      -3.561  -1.885  -2.595  1.00  0.00 
+HETATM   18  H           1      -2.613  -0.482  -3.136  1.00  0.00 
+CONECT    1    2    3    4    4    5
+CONECT    2    1
+CONECT    3    1    9   10   11
+CONECT    4    1    1
+CONECT    5    1    6
+CONECT    6    5    7    8   12
+CONECT    7    6   13   14   15
+CONECT    8    6   16   17   18
+CONECT    9    3
+CONECT   10    3
+CONECT   11    3
+CONECT   12    6
+CONECT   13    7
+CONECT   14    7
+CONECT   15    7
+CONECT   16    8
+CONECT   17    8
+CONECT   18    8
+MASTER        0    0    0    0    0    0    0    0   18    0   18    0
+END
diff --git a/hacks/images/molecules/strychnine.pdb b/hacks/images/molecules/strychnine.pdb
new file mode 100644 (file)
index 0000000..ecb0762
--- /dev/null
@@ -0,0 +1,101 @@
+HEADER    Strychnine: Nux Vomica
+COMPND    al3061
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Wed Aug 30 12:33:12 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.395   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.124   1.193   0.000  1.00  0.00 
+HETATM    4  C           1       1.414   2.398  -0.067  1.00  0.00 
+HETATM    5  C           1       0.014   2.401  -0.115  1.00  0.00 
+HETATM    6  C           1      -0.709   1.203  -0.087  1.00  0.00 
+HETATM    7  C           1       1.911  -1.410   0.160  1.00  0.00 
+HETATM    8  N           1      -0.471  -1.291  -0.057  1.00  0.00 
+HETATM    9  C           1      -1.720  -1.604  -0.472  1.00  0.00 
+HETATM   10  O           1      -2.589  -0.778  -0.359  1.00  0.00 
+HETATM   11  C           1       0.645  -2.239  -0.189  1.00  0.00 
+HETATM   12  C           1      -1.941  -2.698  -1.483  1.00  0.00 
+HETATM   13  C           1      -0.687  -3.549  -1.797  1.00  0.00 
+HETATM   14  H           1       0.525  -3.093   0.477  1.00  0.00 
+HETATM   15  C           1       0.573  -2.674  -1.656  1.00  0.00 
+HETATM   16  H           1      -0.775  -3.908  -2.822  1.00  0.00 
+HETATM   17  O           1      -0.654  -4.641  -0.904  1.00  0.00 
+HETATM   18  C           1       0.221  -5.671  -1.313  1.00  0.00 
+HETATM   19  C           1       1.595  -5.446  -0.726  1.00  0.00 
+HETATM   20  C           1       2.356  -4.403  -1.088  1.00  0.00 
+HETATM   21  C           1       3.723  -4.222  -0.464  1.00  0.00 
+HETATM   22  C           1       1.893  -3.351  -2.072  1.00  0.00 
+HETATM   23  H           1       0.431  -1.791  -2.279  1.00  0.00 
+HETATM   24  H           1       1.803  -3.769  -3.074  1.00  0.00 
+HETATM   25  C           1       2.942  -2.222  -2.062  1.00  0.00 
+HETATM   26  C           1       3.199  -1.816  -0.595  1.00  0.00 
+HETATM   27  C           1       2.322  -1.641   1.618  1.00  0.00 
+HETATM   28  C           1       3.109  -2.956   1.512  1.00  0.00 
+HETATM   29  N           1       3.783  -2.911   0.202  1.00  0.00 
+HETATM   30  H           1       3.212   1.188   0.059  1.00  0.00 
+HETATM   31  H           1       1.957   3.343  -0.078  1.00  0.00 
+HETATM   32  H           1      -0.520   3.349  -0.172  1.00  0.00 
+HETATM   33  H           1      -1.798   1.219  -0.127  1.00  0.00 
+HETATM   34  H           1      -2.263  -2.218  -2.408  1.00  0.00 
+HETATM   35  H           1      -2.740  -3.355  -1.139  1.00  0.00 
+HETATM   36  H           1       0.290  -5.733  -2.400  1.00  0.00 
+HETATM   37  H           1      -0.163  -6.618  -0.935  1.00  0.00 
+HETATM   38  H           1       1.974  -6.159   0.006  1.00  0.00 
+HETATM   39  H           1       4.483  -4.272  -1.243  1.00  0.00 
+HETATM   40  H           1       3.923  -5.012   0.260  1.00  0.00 
+HETATM   41  H           1       2.578  -1.363  -2.625  1.00  0.00 
+HETATM   42  H           1       3.871  -2.566  -2.519  1.00  0.00 
+HETATM   43  H           1       3.898  -0.980  -0.573  1.00  0.00 
+HETATM   44  H           1       1.464  -1.724   2.285  1.00  0.00 
+HETATM   45  H           1       2.987  -0.840   1.943  1.00  0.00 
+HETATM   46  H           1       2.413  -3.794   1.551  1.00  0.00 
+HETATM   47  H           1       3.833  -3.042   2.322  1.00  0.00 
+CONECT    1    2    2    6    8
+CONECT    2    1    1    3    7
+CONECT    3    2    4    4   30
+CONECT    4    3    3    5   31
+CONECT    5    4    6    6   32
+CONECT    6    1    5    5   33
+CONECT    7    2   11   26   27
+CONECT    8    1    9   11
+CONECT    9    8   10   10   12
+CONECT   10    9    9
+CONECT   11    7    8   14   15
+CONECT   12    9   13   34   35
+CONECT   13   12   15   16   17
+CONECT   14   11
+CONECT   15   11   13   22   23
+CONECT   16   13
+CONECT   17   13   18
+CONECT   18   17   19   36   37
+CONECT   19   18   20   20   38
+CONECT   20   19   19   21   22
+CONECT   21   20   29   39   40
+CONECT   22   15   20   24   25
+CONECT   23   15
+CONECT   24   22
+CONECT   25   22   26   41   42
+CONECT   26    7   25   29   43
+CONECT   27    7   28   44   45
+CONECT   28   27   29   46   47
+CONECT   29   21   26   28
+CONECT   30    3
+CONECT   31    4
+CONECT   32    5
+CONECT   33    6
+CONECT   34   12
+CONECT   35   12
+CONECT   36   18
+CONECT   37   18
+CONECT   38   19
+CONECT   39   21
+CONECT   40   21
+CONECT   41   25
+CONECT   42   25
+CONECT   43   26
+CONECT   44   27
+CONECT   45   27
+CONECT   46   28
+CONECT   47   28
+MASTER        0    0    0    0    0    0    0    0   47    0   47    0
+END
diff --git a/hacks/images/molecules/sucrose.pdb b/hacks/images/molecules/sucrose.pdb
new file mode 100644 (file)
index 0000000..2a75f22
--- /dev/null
@@ -0,0 +1,97 @@
+HEADER    Sucrose: Sugar
+COMPND    nat0013
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.542   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.041   1.457   0.000  1.00  0.00 
+HETATM    4  C           1       1.414   2.181   1.207  1.00  0.00 
+HETATM    5  C           1      -0.117   2.034   1.128  1.00  0.00 
+HETATM    6  O           1      -0.472   0.668   1.149  1.00  0.00 
+HETATM    7  H           1      -0.566   2.548   1.978  1.00  0.00 
+HETATM    8  O           1      -0.572   2.607  -0.076  1.00  0.00 
+HETATM    9  C           1      -1.867   3.149  -0.193  1.00  0.00 
+HETATM   10  C           1      -1.993   3.815  -1.579  1.00  0.00 
+HETATM   11  C           1      -2.960   2.084  -0.002  1.00  0.00 
+HETATM   12  O           1      -2.117   4.104   0.816  1.00  0.00 
+HETATM   13  C           1      -3.516   4.220   0.978  1.00  0.00 
+HETATM   14  C           1      -4.167   2.959   0.369  1.00  0.00 
+HETATM   15  H           1      -0.368   0.500  -0.896  1.00  0.00 
+HETATM   16  H           1       1.901  -0.501   0.899  1.00  0.00 
+HETATM   17  H           1       1.728   1.949  -0.923  1.00  0.00 
+HETATM   18  H           1       1.774   1.726   2.130  1.00  0.00 
+HETATM   19  H           1      -1.836   3.065  -2.355  1.00  0.00 
+HETATM   20  H           1      -2.981   4.259  -1.698  1.00  0.00 
+HETATM   21  H           1      -3.133   1.511  -0.914  1.00  0.00 
+HETATM   22  H           1      -3.871   5.100   0.441  1.00  0.00 
+HETATM   23  H           1      -4.821   2.452   1.081  1.00  0.00 
+HETATM   24  C           1      -3.859   4.364   2.474  1.00  0.00 
+HETATM   25  O           1      -5.279   4.442   2.639  1.00  0.00 
+HETATM   26  O           1      -4.897   3.325  -0.807  1.00  0.00 
+HETATM   27  O           1      -2.638   1.202   1.079  1.00  0.00 
+HETATM   28  O           1      -0.995   4.834  -1.694  1.00  0.00 
+HETATM   29  C           1      -0.513  -1.453   0.003  1.00  0.00 
+HETATM   30  O           1      -1.944  -1.459  -0.055  1.00  0.00 
+HETATM   31  O           1       2.039  -0.690  -1.152  1.00  0.00 
+HETATM   32  O           1       3.468   1.480   0.101  1.00  0.00 
+HETATM   33  O           1       1.772   3.567   1.189  1.00  0.00 
+HETATM   34  H           1      -3.396   5.270   2.866  1.00  0.00 
+HETATM   35  H           1      -3.480   3.504   3.024  1.00  0.00 
+HETATM   36  H           1      -5.622   5.216   2.180  1.00  0.00 
+HETATM   37  H           1      -5.302   2.544  -1.199  1.00  0.00 
+HETATM   38  H           1      -2.661   1.671   1.919  1.00  0.00 
+HETATM   39  H           1      -1.056   5.255  -2.558  1.00  0.00 
+HETATM   40  H           1      -0.180  -1.958   0.910  1.00  0.00 
+HETATM   41  H           1      -0.118  -1.977  -0.868  1.00  0.00 
+HETATM   42  H           1      -2.305  -1.058   0.741  1.00  0.00 
+HETATM   43  H           1       1.728  -0.261  -1.956  1.00  0.00 
+HETATM   44  H           1       3.781   2.391   0.099  1.00  0.00 
+HETATM   45  H           1       1.428   3.987   0.394  1.00  0.00 
+CONECT    1    2    6   15   29
+CONECT    2    1    3   16   31
+CONECT    3    2    4   17   32
+CONECT    4    3    5   18   33
+CONECT    5    4    6    7    8
+CONECT    6    1    5
+CONECT    7    5
+CONECT    8    5    9
+CONECT    9    8   10   11   12
+CONECT   10    9   19   20   28
+CONECT   11    9   14   21   27
+CONECT   12    9   13
+CONECT   13   12   14   22   24
+CONECT   14   11   13   23   26
+CONECT   15    1
+CONECT   16    2
+CONECT   17    3
+CONECT   18    4
+CONECT   19   10
+CONECT   20   10
+CONECT   21   11
+CONECT   22   13
+CONECT   23   14
+CONECT   24   13   25   34   35
+CONECT   25   24   36
+CONECT   26   14   37
+CONECT   27   11   38
+CONECT   28   10   39
+CONECT   29    1   30   40   41
+CONECT   30   29   42
+CONECT   31    2   43
+CONECT   32    3   44
+CONECT   33    4   45
+CONECT   34   24
+CONECT   35   24
+CONECT   36   25
+CONECT   37   26
+CONECT   38   27
+CONECT   39   28
+CONECT   40   29
+CONECT   41   29
+CONECT   42   30
+CONECT   43   31
+CONECT   44   32
+CONECT   45   33
+MASTER        0    0    0    0    0    0    0    0   45    0   45    0
+END
diff --git a/hacks/images/molecules/thalidomide.pdb b/hacks/images/molecules/thalidomide.pdb
new file mode 100644 (file)
index 0000000..f3edb72
--- /dev/null
@@ -0,0 +1,65 @@
+HEADER    (S)-Thalidomide, a teratogenic enantiomer
+COMPND    jb03stha
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Mon Sep 18 15:35:27 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.402   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.128   1.197   0.000  1.00  0.00 
+HETATM    4  C           1       1.396   2.389  -0.011  1.00  0.00 
+HETATM    5  C           1       0.003   2.388  -0.010  1.00  0.00 
+HETATM    6  C           1      -0.728   1.196   0.001  1.00  0.00 
+HETATM    7  C           1      -0.415   3.783   0.056  1.00  0.00 
+HETATM    8  O           1      -1.550   4.177   0.150  1.00  0.00 
+HETATM    9  N           1       0.698   4.553   0.096  1.00  0.00 
+HETATM   10  C           1       1.812   3.785   0.053  1.00  0.00 
+HETATM   11  O           1       2.946   4.181   0.146  1.00  0.00 
+HETATM   12  C           1       0.702   6.005   0.319  1.00  0.00 
+HETATM   13  C           1       1.020   6.278   1.801  1.00  0.00 
+HETATM   14  C           1       1.130   7.799   2.000  1.00  0.00 
+HETATM   15  C           1       2.180   8.336   1.068  1.00  0.00 
+HETATM   16  O           1       2.814   9.307   1.391  1.00  0.00 
+HETATM   17  N           1       2.428   7.747  -0.124  1.00  0.00 
+HETATM   18  C           1       1.757   6.647  -0.538  1.00  0.00 
+HETATM   19  O           1       2.022   6.158  -1.607  1.00  0.00 
+HETATM   20  H           1      -0.535  -0.949   0.010  1.00  0.00 
+HETATM   21  H           1       1.938  -0.949   0.010  1.00  0.00 
+HETATM   22  H           1       3.217   1.203   0.020  1.00  0.00 
+HETATM   23  H           1      -1.817   1.201   0.022  1.00  0.00 
+HETATM   24  H           1      -0.272   6.423   0.067  1.00  0.00 
+HETATM   25  H           1       1.968   5.808   2.060  1.00  0.00 
+HETATM   26  H           1       0.228   5.873   2.432  1.00  0.00 
+HETATM   27  H           1       1.408   8.016   3.031  1.00  0.00 
+HETATM   28  H           1       0.173   8.268   1.775  1.00  0.00 
+HETATM   29  H           1       3.142   8.141  -0.727  1.00  0.00 
+CONECT    1    2    2    6   20
+CONECT    2    1    1    3   21
+CONECT    3    2    4    4   22
+CONECT    4    3    3    5   10
+CONECT    5    4    6    6    7
+CONECT    6    1    5    5   23
+CONECT    7    5    8    8    9
+CONECT    8    7    7
+CONECT    9    7   10   12
+CONECT   10    4    9   11   11
+CONECT   11   10   10
+CONECT   12    9   13   18   24
+CONECT   13   12   14   25   26
+CONECT   14   13   15   27   28
+CONECT   15   14   16   16   17
+CONECT   16   15   15
+CONECT   17   15   18   29
+CONECT   18   12   17   19   19
+CONECT   19   18   18
+CONECT   20    1
+CONECT   21    2
+CONECT   22    3
+CONECT   23    6
+CONECT   24   12
+CONECT   25   13
+CONECT   26   13
+CONECT   27   14
+CONECT   28   14
+CONECT   29   17
+MASTER        0    0    0    0    0    0    0    0   29    0   29    0
+END
diff --git a/hacks/images/molecules/thymine.pdb b/hacks/images/molecules/thymine.pdb
new file mode 100644 (file)
index 0000000..b58f8a6
--- /dev/null
@@ -0,0 +1,37 @@
+HEADER    Thymine: Pyrimidine base nucleotide
+COMPND    jb09thye
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Tue Sep 19 21:46:02 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.399   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.068   1.228   0.000  1.00  0.00 
+HETATM    4  N           1       1.356   2.377  -0.004  1.00  0.00 
+HETATM    5  C           1       0.004   2.350  -0.006  1.00  0.00 
+HETATM    6  N           1      -0.667   1.176  -0.004  1.00  0.00 
+HETATM    7  O           1      -0.611   3.385  -0.006  1.00  0.00 
+HETATM    8  O           1       3.272   1.261   0.006  1.00  0.00 
+HETATM    9  C           1       2.173  -1.300   0.014  1.00  0.00 
+HETATM   10  H           1      -0.549  -0.941   0.006  1.00  0.00 
+HETATM   11  H           1       1.840   3.268  -0.003  1.00  0.00 
+HETATM   12  H           1      -1.681   1.178  -0.004  1.00  0.00 
+HETATM   13  H           1       1.632  -2.055  -0.555  1.00  0.00 
+HETATM   14  H           1       2.293  -1.638   1.044  1.00  0.00 
+HETATM   15  H           1       3.155  -1.146  -0.433  1.00  0.00 
+CONECT    1    2    2    6   10
+CONECT    2    1    1    3    9
+CONECT    3    2    4    8    8
+CONECT    4    3    5   11
+CONECT    5    4    6    7    7
+CONECT    6    1    5   12
+CONECT    7    5    5
+CONECT    8    3    3
+CONECT    9    2   13   14   15
+CONECT   10    1
+CONECT   11    4
+CONECT   12    6
+CONECT   13    9
+CONECT   14    9
+CONECT   15    9
+MASTER        0    0    0    0    0    0    0    0   15    0   15    0
+END
diff --git a/hacks/images/molecules/viagra.pdb b/hacks/images/molecules/viagra.pdb
new file mode 100644 (file)
index 0000000..243a038
--- /dev/null
@@ -0,0 +1,133 @@
+COMPND    Viagra
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+REMARK    from a model provided by Dr Eric Walters
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Mon Oct 16 12:17:54 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.398   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.105   1.207   0.000  1.00  0.00 
+HETATM    4  C           1       1.417   2.427  -0.037  1.00  0.00 
+HETATM    5  C           1       0.017   2.422  -0.014  1.00  0.00 
+HETATM    6  C           1      -0.692   1.216  -0.005  1.00  0.00 
+HETATM    7  H           1      -0.545  -0.944   0.023  1.00  0.00 
+HETATM    8  H           1       1.939  -0.946   0.029  1.00  0.00 
+HETATM    9  H           1      -0.531   3.364  -0.022  1.00  0.00 
+HETATM   10  C           1       2.100   3.733  -0.053  1.00  0.00 
+HETATM   11  N           1       3.453   3.848  -0.302  1.00  0.00 
+HETATM   12  C           1       4.091   5.067  -0.302  1.00  0.00 
+HETATM   13  C           1       3.259   6.246  -0.033  1.00  0.00 
+HETATM   14  C           1       1.897   6.080   0.190  1.00  0.00 
+HETATM   15  N           1       1.310   4.840   0.169  1.00  0.00 
+HETATM   16  O           1       5.271   5.168  -0.544  1.00  0.00 
+HETATM   17  H           1       4.029   2.992  -0.569  1.00  0.00 
+HETATM   18  N           1       3.538   7.572   0.006  1.00  0.00 
+HETATM   19  N           1       2.406   8.264   0.248  1.00  0.00 
+HETATM   20  C           1       1.373   7.363   0.369  1.00  0.00 
+HETATM   21  C           1       4.863   8.163  -0.230  1.00  0.00 
+HETATM   22  H           1       4.799   9.247  -0.133  1.00  0.00 
+HETATM   23  H           1       5.200   7.907  -1.235  1.00  0.00 
+HETATM   24  H           1       5.570   7.774   0.501  1.00  0.00 
+HETATM   25  C           1      -0.079   7.701   0.624  1.00  0.00 
+HETATM   26  C           1      -0.226   9.225   0.805  1.00  0.00 
+HETATM   27  H           1      -0.415   7.190   1.526  1.00  0.00 
+HETATM   28  H           1      -0.680   7.372  -0.224  1.00  0.00 
+HETATM   29  C           1      -1.702   9.584   1.072  1.00  0.00 
+HETATM   30  H           1       0.112   9.732  -0.099  1.00  0.00 
+HETATM   31  H           1       0.383   9.550   1.649  1.00  0.00 
+HETATM   32  H           1      -1.796  10.663   1.198  1.00  0.00 
+HETATM   33  H           1      -2.043   9.083   1.978  1.00  0.00 
+HETATM   34  H           1      -2.315   9.264   0.229  1.00  0.00 
+HETATM   35  O           1       3.461   1.164   0.124  1.00  0.00 
+HETATM   36  C           1       3.859   0.886   1.450  1.00  0.00 
+HETATM   37  C           1       3.396   1.998   2.414  1.00  0.00 
+HETATM   38  H           1       4.947   0.824   1.480  1.00  0.00 
+HETATM   39  H           1       3.443  -0.069   1.771  1.00  0.00 
+HETATM   40  H           1       3.774   1.788   3.414  1.00  0.00 
+HETATM   41  H           1       2.307   2.037   2.446  1.00  0.00 
+HETATM   42  H           1       3.786   2.959   2.077  1.00  0.00 
+HETATM   43  S           1      -2.443   1.230   0.022  1.00  0.00 
+HETATM   44  N           1      -3.045  -0.296  -0.555  1.00  0.00 
+HETATM   45  C           1      -4.498  -0.382  -0.345  1.00  0.00 
+HETATM   46  C           1      -4.996  -1.765  -0.804  1.00  0.00 
+HETATM   47  N           1      -4.674  -1.957  -2.227  1.00  0.00 
+HETATM   48  C           1      -3.222  -1.855  -2.442  1.00  0.00 
+HETATM   49  C           1      -2.728  -0.471  -1.980  1.00  0.00 
+HETATM   50  H           1      -5.005   0.395  -0.919  1.00  0.00 
+HETATM   51  H           1      -4.725  -0.254   0.715  1.00  0.00 
+HETATM   52  H           1      -6.076  -1.822  -0.662  1.00  0.00 
+HETATM   53  H           1      -4.513  -2.539  -0.208  1.00  0.00 
+HETATM   54  H           1      -2.998  -1.979  -3.502  1.00  0.00 
+HETATM   55  H           1      -2.707  -2.629  -1.872  1.00  0.00 
+HETATM   56  H           1      -3.222   0.303  -2.569  1.00  0.00 
+HETATM   57  H           1      -1.651  -0.407  -2.135  1.00  0.00 
+HETATM   58  O           1      -2.929   2.282  -0.818  1.00  0.00 
+HETATM   59  O           1      -2.893   1.442   1.364  1.00  0.00 
+HETATM   60  C           1      -5.177  -3.257  -2.700  1.00  0.00 
+HETATM   61  H           1      -4.954  -3.372  -3.760  1.00  0.00 
+HETATM   62  H           1      -6.257  -3.305  -2.557  1.00  0.00 
+HETATM   63  H           1      -4.703  -4.065  -2.142  1.00  0.00 
+CONECT    1    2    2    6    7
+CONECT    2    1    1    3    8
+CONECT    3    2    4    4   35
+CONECT    4    3    3    5   10
+CONECT    5    4    6    6    9
+CONECT    6    1    5    5   43
+CONECT    7    1
+CONECT    8    2
+CONECT    9    5
+CONECT   10    4   11   15   15
+CONECT   11   10   12   17
+CONECT   12   11   13   16   16
+CONECT   13   12   14   14   18
+CONECT   14   13   13   15   20
+CONECT   15   10   14   14
+CONECT   16   12   12
+CONECT   17   11
+CONECT   18   13   19   21
+CONECT   19   18   20   20
+CONECT   20   14   19   19   25
+CONECT   21   18   22   23   24
+CONECT   22   21
+CONECT   23   21
+CONECT   24   21
+CONECT   25   20   26   27   28
+CONECT   26   25   29   30   31
+CONECT   27   25
+CONECT   28   25
+CONECT   29   26   32   33   34
+CONECT   30   26
+CONECT   31   26
+CONECT   32   29
+CONECT   33   29
+CONECT   34   29
+CONECT   35    3   36
+CONECT   36   35   37   38   39
+CONECT   37   36   40   41   42
+CONECT   38   36
+CONECT   39   36
+CONECT   40   37
+CONECT   41   37
+CONECT   42   37
+CONECT   43    6   44   58   59
+CONECT   44   43   45   49
+CONECT   45   44   46   50   51
+CONECT   46   45   47   52   53
+CONECT   47   46   48   60
+CONECT   48   47   49   54   55
+CONECT   49   44   48   56   57
+CONECT   50   45
+CONECT   51   45
+CONECT   52   46
+CONECT   53   46
+CONECT   54   48
+CONECT   55   48
+CONECT   56   49
+CONECT   57   49
+CONECT   58   43
+CONECT   59   43
+CONECT   60   47   61   62   63
+CONECT   61   60
+CONECT   62   60
+CONECT   63   60
+MASTER        0    0    0    0    0    0    0    0   63    0   63    0
+END
diff --git a/hacks/images/molecules/vitaminb6.pdb b/hacks/images/molecules/vitaminb6.pdb
new file mode 100644 (file)
index 0000000..c21654b
--- /dev/null
@@ -0,0 +1,56 @@
+HEADER    Pyridoxine: Vitamin B6
+COMPND    c8h11no3
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.399   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       2.095   1.214   0.000  1.00  0.00 
+HETATM    4  C           1       1.381   2.418   0.018  1.00  0.00 
+HETATM    5  C           1      -0.018   2.390   0.005  1.00  0.00 
+HETATM    6  N           1      -0.688   1.189  -0.006  1.00  0.00 
+HETATM    7  C           1      -0.754  -1.311   0.010  1.00  0.00 
+HETATM    8  O           1       2.079  -1.180   0.011  1.00  0.00 
+HETATM    9  C           1       3.608   1.210   0.001  1.00  0.00 
+HETATM   10  O           1       4.077   1.576   1.303  1.00  0.00 
+HETATM   11  C           1       2.102   3.747   0.058  1.00  0.00 
+HETATM   12  O           1       1.197   4.767   0.493  1.00  0.00 
+HETATM   13  H           1      -0.583   3.322   0.008  1.00  0.00 
+HETATM   14  H           1      -0.438  -1.905   0.867  1.00  0.00 
+HETATM   15  H           1      -0.543  -1.858  -0.909  1.00  0.00 
+HETATM   16  H           1      -1.824  -1.114   0.078  1.00  0.00 
+HETATM   17  H           1       2.145  -1.522  -0.886  1.00  0.00 
+HETATM   18  H           1       3.977   1.922  -0.737  1.00  0.00 
+HETATM   19  H           1       3.973   0.214  -0.250  1.00  0.00 
+HETATM   20  H           1       5.040   1.579   1.315  1.00  0.00 
+HETATM   21  H           1       2.472   3.988  -0.939  1.00  0.00 
+HETATM   22  H           1       2.940   3.690   0.753  1.00  0.00 
+HETATM   23  H           1       1.650   5.617   0.520  1.00  0.00 
+CONECT    1    2    6    7
+CONECT    1    2
+CONECT    2    1    3    8
+CONECT    3    2    4    9
+CONECT    3    4
+CONECT    4    3    5   11
+CONECT    5    4    6   13
+CONECT    5    6
+CONECT    6    1    5
+CONECT    7    1   14   15   16
+CONECT    8    2   17
+CONECT    9    3   10   18   19
+CONECT   10    9   20
+CONECT   11    4   12   21   22
+CONECT   12   11   23
+CONECT   13    5
+CONECT   14    7
+CONECT   15    7
+CONECT   16    7
+CONECT   17    8
+CONECT   18    9
+CONECT   19    9
+CONECT   20   10
+CONECT   21   11
+CONECT   22   11
+CONECT   23   12
+MASTER        0    0    0    0    0    0    0    0   23    0   23    0
+END
diff --git a/hacks/images/molecules/vitaminc.pdb b/hacks/images/molecules/vitaminc.pdb
new file mode 100644 (file)
index 0000000..d7a7d6a
--- /dev/null
@@ -0,0 +1,47 @@
+HEADER    Ascorbic Acid: Vitamin C
+COMPND    vit-c
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.512   0.000   0.000  1.00  0.00 
+HETATM    3  C           1       1.927   1.264   0.000  1.00  0.00 
+HETATM    4  C           1       0.730   2.091   0.015  1.00  0.00 
+HETATM    5  O           1      -0.382   1.359   0.113  1.00  0.00 
+HETATM    6  O           1       0.759   3.270   0.261  1.00  0.00 
+HETATM    7  O           1       3.197   1.690   0.245  1.00  0.00 
+HETATM    8  O           1       2.283  -1.055   0.386  1.00  0.00 
+HETATM    9  H           1      -0.390  -0.463  -0.907  1.00  0.00 
+HETATM   10  C           1      -0.565  -0.653   1.264  1.00  0.00 
+HETATM   11  H           1       0.050  -1.475   1.629  1.00  0.00 
+HETATM   12  O           1      -0.674   0.397   2.229  1.00  0.00 
+HETATM   13  C           1      -2.028  -1.077   1.106  1.00  0.00 
+HETATM   14  O           1      -2.543  -0.906   2.429  1.00  0.00 
+HETATM   15  H           1       3.383   1.620   1.187  1.00  0.00 
+HETATM   16  H           1       2.156  -1.784  -0.228  1.00  0.00 
+HETATM   17  H           1      -0.774   1.222   1.738  1.00  0.00 
+HETATM   18  H           1      -2.112  -2.110   0.766  1.00  0.00 
+HETATM   19  H           1      -2.545  -0.402   0.425  1.00  0.00 
+HETATM   20  H           1      -2.081  -0.175   2.830  1.00  0.00 
+CONECT    1    2    5    9   10
+CONECT    2    1    3    8
+CONECT    3    2    4    7
+CONECT    4    3    5    6    6
+CONECT    5    1    4
+CONECT    6    4    4
+CONECT    7    3   15
+CONECT    8    2   16
+CONECT    9    1
+CONECT   10    1   11   12   13
+CONECT   11   10
+CONECT   12   10   17
+CONECT   13   10   14   18   19
+CONECT   14   13   20
+CONECT   15    7
+CONECT   16    8
+CONECT   17   12
+CONECT   18   13
+CONECT   19   13
+CONECT   20   14
+MASTER        0    0    0    0    0    0    0    0   20    0   20    0
+END
diff --git a/hacks/images/molecules/vx.pdb b/hacks/images/molecules/vx.pdb
new file mode 100644 (file)
index 0000000..8b653cb
--- /dev/null
@@ -0,0 +1,92 @@
+HEADER    VX: a chemical warfare agent, cholinesterase inhibitor
+COMPND    VX
+AUTHOR    Created by Dave Woodcock at Okanagan University College
+AUTHOR    email:woodcock@okanagan.bc.ca
+AUTHOR    Date revised: Fri Sep  1 09:41:05 2000  GENERATED BY BABEL 1.6 
+HETATM    1  C           1       0.000   0.000   0.000  1.00  0.00 
+HETATM    2  C           1       1.541   0.000   0.000  1.00  0.00 
+HETATM    3  O           1       2.000   1.333   0.000  1.00  0.00 
+HETATM    4  P           1       3.580   1.768  -0.723  1.00  0.00 
+HETATM    5  O           1       3.908   3.507  -0.453  1.00  0.00 
+HETATM    6  C           1       3.536   1.434  -2.522  1.00  0.00 
+HETATM    7  S           1       5.089   0.633   0.149  1.00  0.00 
+HETATM    8  C           1       6.652   1.113  -0.581  1.00  0.00 
+HETATM    9  C           1       7.173   2.394   0.105  1.00  0.00 
+HETATM   10  N           1       8.475   2.827  -0.436  1.00  0.00 
+HETATM   11  C           1       9.247   3.677   0.492  1.00  0.00 
+HETATM   12  C           1       9.948   2.776   1.531  1.00  0.00 
+HETATM   13  C           1       8.388   4.729   1.230  1.00  0.00 
+HETATM   14  C           1       8.465   3.210  -1.863  1.00  0.00 
+HETATM   15  C           1       9.881   3.493  -2.414  1.00  0.00 
+HETATM   16  C           1       7.562   4.422  -2.181  1.00  0.00 
+HETATM   17  H           1      -0.362   0.520   0.887  1.00  0.00 
+HETATM   18  H           1      -0.367  -1.026   0.006  1.00  0.00 
+HETATM   19  H           1      -0.363   0.510  -0.892  1.00  0.00 
+HETATM   20  H           1       1.902  -0.524  -0.885  1.00  0.00 
+HETATM   21  H           1       1.904  -0.507   0.894  1.00  0.00 
+HETATM   22  H           1       2.728   2.007  -2.976  1.00  0.00 
+HETATM   23  H           1       3.367   0.370  -2.691  1.00  0.00 
+HETATM   24  H           1       4.485   1.727  -2.970  1.00  0.00 
+HETATM   25  H           1       6.489   1.278  -1.644  1.00  0.00 
+HETATM   26  H           1       7.377   0.311  -0.444  1.00  0.00 
+HETATM   27  H           1       7.282   2.161   1.162  1.00  0.00 
+HETATM   28  H           1       6.438   3.191   0.006  1.00  0.00 
+HETATM   29  H           1      10.030   4.205  -0.044  1.00  0.00 
+HETATM   30  H           1      10.539   2.021   1.012  1.00  0.00 
+HETATM   31  H           1       9.216   2.282   2.169  1.00  0.00 
+HETATM   32  H           1      10.608   3.383   2.151  1.00  0.00 
+HETATM   33  H           1       9.041   5.368   1.825  1.00  0.00 
+HETATM   34  H           1       7.675   4.243   1.895  1.00  0.00 
+HETATM   35  H           1       7.847   5.345   0.515  1.00  0.00 
+HETATM   36  H           1       8.094   2.362  -2.434  1.00  0.00 
+HETATM   37  H           1      10.574   2.735  -2.048  1.00  0.00 
+HETATM   38  H           1      10.223   4.483  -2.116  1.00  0.00 
+HETATM   39  H           1       9.853   3.454  -3.503  1.00  0.00 
+HETATM   40  H           1       7.928   5.308  -1.665  1.00  0.00 
+HETATM   41  H           1       6.533   4.222  -1.886  1.00  0.00 
+HETATM   42  H           1       7.584   4.609  -3.255  1.00  0.00 
+CONECT    1    2   17   18   19
+CONECT    2    1    3   20   21
+CONECT    3    2    4
+CONECT    4    3    5    6    7
+CONECT    4    5
+CONECT    5    4
+CONECT    6    4   22   23   24
+CONECT    7    4    8
+CONECT    8    7    9   25   26
+CONECT    9    8   10   27   28
+CONECT   10    9   11   14
+CONECT   11   10   12   13   29
+CONECT   12   11   30   31   32
+CONECT   13   11   33   34   35
+CONECT   14   10   15   16   36
+CONECT   15   14   37   38   39
+CONECT   16   14   40   41   42
+CONECT   17    1
+CONECT   18    1
+CONECT   19    1
+CONECT   20    2
+CONECT   21    2
+CONECT   22    6
+CONECT   23    6
+CONECT   24    6
+CONECT   25    8
+CONECT   26    8
+CONECT   27    9
+CONECT   28    9
+CONECT   29   11
+CONECT   30   12
+CONECT   31   12
+CONECT   32   12
+CONECT   33   13
+CONECT   34   13
+CONECT   35   13
+CONECT   36   14
+CONECT   37   15
+CONECT   38   15
+CONECT   39   15
+CONECT   40   16
+CONECT   41   16
+CONECT   42   16
+MASTER        0    0    0    0    0    0    0    0   42    0   42    0
+END
index 9b95c6b943e92bfb608da884d37e3aa16f741b78..ea872be7190d1b79ca7545c4215c0e45629324c3 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1997, 1998 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1997, 1998, 2001 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -191,7 +191,12 @@ moire (Display *dpy, Window window, int offset, XColor *colors, int ncolors)
        image->data = 0;
       }
 
-  XDestroyImage (image);
+# ifdef HAVE_XSHM_EXTENSION
+  if (use_shm)
+    destroy_xshm_image (dpy, image, &shm_info);
+  else
+# endif /*  HAVE_XSHM_EXTENSION */
+    XDestroyImage (image);
 }
 
 \f
diff --git a/hacks/rotzoomer.c b/hacks/rotzoomer.c
new file mode 100644 (file)
index 0000000..3397322
--- /dev/null
@@ -0,0 +1,317 @@
+/* rotzoomer - creates a collage of rotated and scaled portions of the screen
+ * Copyright (C) 2001 Claudio Matsuoka <claudio@helllabs.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#include <math.h>
+#include "screenhack.h"
+#include <X11/Xutil.h>
+
+#ifdef HAVE_XSHM_EXTENSION
+#include "xshm.h"
+static Bool use_shm;
+static XShmSegmentInfo shm_info;
+#endif
+
+struct zoom_area {
+       int w, h;               /* rectangle width and height */
+       int inc1, inc2;         /* rotation and zoom angle increments */
+       int dx, dy;             /* translation increments */
+       int a1, a2;             /* rotation and zoom angular variables */
+       int ox, oy;             /* origin in the background copy */
+       int xx, yy;             /* left-upper corner position (* 256) */
+       int x, y;               /* left-upper corner position */
+       int ww, hh;             /* valid area to place left-upper corner */
+       int n;                  /* number of iteractions */
+};
+
+static Window window;
+static Display *display;
+static GC gc;
+static Visual *visual;
+static XImage *orig_map, *buffer_map;
+static Colormap colormap;
+
+static int width, height;
+static struct zoom_area **zoom_box;
+static int num_zoom = 2;
+static int move = 1;
+static int delay = 0;
+
+
+static void rotzoom (struct zoom_area *za)
+{
+       int x, y, c, s, zoom, z;
+       int x2 = za->x + za->w - 1, y2 = za->y + za->h - 1;
+       int ox = 0, oy = 0;
+
+       z = 8100 * sin (M_PI * za->a2 / 8192);
+       zoom = 8192 + z;
+
+       c = zoom * cos (M_PI * za->a1 / 8192);
+       s = zoom * sin (M_PI * za->a1 / 8192);
+       for (y = za->y; y <= y2; y++) {
+               for (x = za->x; x <= x2; x++) {
+                       ox = (x * c + y * s) >> 13;
+                       oy = (-x * s + y * c) >> 13;
+
+                       while (ox < 0)
+                               ox += width;
+                       while (oy < 0)
+                               oy += height;
+                       while (ox >= width)
+                               ox -= width;
+                       while (oy >= height)
+                               oy -= height;
+
+                       XPutPixel (buffer_map, x, y, XGetPixel (orig_map, ox, oy));
+               }
+       }
+
+       za->a1 += za->inc1;             /* Rotation angle */
+       za->a1 &= 0x3fff;;
+
+       za->a2 += za->inc2;             /* Zoom */
+       za->a2 &= 0x3fff;
+
+       za->ox = ox;                    /* Save state for next iteration */
+       za->oy = oy;
+}
+
+
+static void reset_zoom (struct zoom_area *za)
+{
+       za->w = 50 + random() % 300;
+       za->h = 50 + random() % 300;
+
+       if (za->w > width / 3)
+               za->w = width / 3;
+
+       if (za->h > height / 3)
+               za->h = height / 3;
+
+       za->ww = width - za->w;
+       za->hh = height - za->h;
+
+       za->x = (random() % za->ww);
+       za->y = (random() % za->hh);
+       za->xx = za->x * 256;
+       za->yy = za->y * 256;
+
+       za->a1 = 0;
+       za->a2 = 0;
+       za->dx = ((2 * (random() & 1)) - 1) * (100 + random() % 300);
+       za->dy = ((2 * (random() & 1)) - 1) * (100 + random() % 300);
+       za->inc1 = ((2 * (random() & 1)) - 1) * (random () % 30);
+       za->inc2 = ((2 * (random() & 1)) - 1) * (random () % 30);
+       za->n = 50 + random() % 1000;
+}
+
+
+static struct zoom_area *create_zoom (void)
+{
+       struct zoom_area *za;
+
+       za = malloc (sizeof (struct zoom_area));
+       reset_zoom (za);
+
+       return za;
+}
+
+
+static void update_position (struct zoom_area *za)
+{
+       za->xx += za->dx;
+       za->yy += za->dy;
+
+       za->x = za->xx >> 8;
+       za->y = za->yy >> 8;
+
+       if (za->x < 0) {
+               za->x = 0;
+               za->dx = 100 + random() % 100;
+       }
+               
+       if (za->y < 0) {
+               za->y = 0;
+               za->dy = 100 + random() % 100;
+       }
+               
+       if (za->x > za->ww) {
+               za->x = za->ww;
+               za->dx = -(100 + random() % 100);
+       }
+
+       if (za->y > za->hh) {
+               za->y = za->hh;
+               za->dy = -(100 + random() % 100);
+       }
+}
+
+
+static void DisplayImage (int x, int y, int w, int h)
+{
+#ifdef HAVE_XSHM_EXTENSION
+       if (use_shm)
+               XShmPutImage (display, window, gc, buffer_map, x, y, x, y,
+                       w, h, False);
+       else
+#endif /* HAVE_XSHM_EXTENSION */
+               XPutImage(display, window, gc, buffer_map, x, y, x, y, w, h);
+}
+
+
+static void hack_main (void)
+{
+       int i;
+
+       for (i = 0; i < num_zoom; i++) {
+               if (move)
+                       update_position (zoom_box[i]);
+
+               if (zoom_box[i]->n) {
+                       rotzoom (zoom_box[i]);
+                       zoom_box[i]->n--;
+               } else {
+                       reset_zoom (zoom_box[i]);
+               }
+       }
+
+       for (i = 0; i < num_zoom; i++) {
+               DisplayImage(zoom_box[i]->x, zoom_box[i]->y,
+                       zoom_box[i]->w, zoom_box[i]->h);
+       }
+
+       XSync(display,False);
+       screenhack_handle_events(display);
+}
+
+
+static void init_hack (void)
+{
+       int i;
+
+       zoom_box = calloc (num_zoom, sizeof (struct zoom_area *));
+       for (i = 0; i < num_zoom; i++) {
+               zoom_box[i] = create_zoom ();
+       }
+
+       memcpy (buffer_map->data, orig_map->data,
+               height * buffer_map->bytes_per_line);
+
+       DisplayImage(0, 0, width, height);
+       XSync(display,False);
+}
+
+
+static void setup_X (Display * disp, Window win)
+{
+       XWindowAttributes xwa;
+       int depth;
+       XGCValues gcv;
+       long gcflags;
+
+       XGetWindowAttributes (disp, win, &xwa);
+       window = win;
+       display = disp;
+       depth = xwa.depth;
+       colormap = xwa.colormap;
+       width = xwa.width;
+       height = xwa.height;
+       visual = xwa.visual;
+
+       if (width % 2)
+               width++;
+       if (height % 2)
+               height++;
+
+       gcv.function = GXcopy;
+       gcv.subwindow_mode = IncludeInferiors;
+       gcflags = GCForeground | GCFunction;
+       if (use_subwindow_mode_p (xwa.screen, window))  /* see grabscreen.c */
+               gcflags |= GCSubwindowMode;
+       gc = XCreateGC (display, window, gcflags, &gcv);
+       grab_screen_image (xwa.screen, window);
+
+       orig_map = XGetImage (display, window, 0, 0, width, height, ~0L, ZPixmap);
+
+       if (!gc) {
+               fprintf(stderr, "XCreateGC failed\n");
+               exit(1);
+       }
+
+       buffer_map = 0;
+
+#ifdef HAVE_XSHM_EXTENSION
+       if (use_shm) {
+               buffer_map = create_xshm_image(display, xwa.visual, depth,
+                       ZPixmap, 0, &shm_info, width, height);
+               if (!buffer_map) {
+                       use_shm = False;
+                       fprintf(stderr, "create_xshm_image failed\n");
+               }
+       }
+#endif /* HAVE_XSHM_EXTENSION */
+
+       if (!buffer_map) {
+               buffer_map = XCreateImage(display, xwa.visual,
+                       depth, ZPixmap, 0, 0, width, height, 8, 0);
+               buffer_map->data = (char *)calloc (buffer_map->height,
+                       buffer_map->bytes_per_line);
+       }
+}
+
+
+
+char *progclass = "Rotzoomer";
+
+char *defaults[] = {
+#ifdef HAVE_XSHM_EXTENSION
+       "*useSHM: True",
+#endif
+       "*delay: 10000",
+       "*move: False",
+       "*numboxes: 2",
+       0
+};
+
+
+XrmOptionDescRec options[] = {
+#ifdef HAVE_XSHM_EXTENSION
+       { "-shm",       ".useSHM",      XrmoptionNoArg, "True" },
+       { "-no-shm",    ".useSHM",      XrmoptionNoArg, "False" },
+#endif
+       { "-move",      ".move",        XrmoptionNoArg, "True"},
+       { "-no-move",   ".move",        XrmoptionNoArg, "False"},
+       { "-delay",     ".delay",       XrmoptionSepArg, 0},
+       { "-n",         ".numboxes",    XrmoptionSepArg, 0},
+       { 0, 0, 0, 0 }
+};
+
+
+void screenhack(Display *disp, Window win)
+{
+#ifdef HAVE_XSHM_EXTENSION
+       use_shm = get_boolean_resource ("useSHM", "Boolean");
+#endif
+       num_zoom = get_integer_resource("numboxes", "Integer");
+       move = get_boolean_resource("move", "Boolean");
+       delay = get_integer_resource("delay", "Integer");
+
+       setup_X (disp, win);
+
+       init_hack ();
+
+       /* Main drawing loop */
+       while (42) {
+               hack_main ();
+               usleep (delay);
+       }
+}
diff --git a/hacks/rotzoomer.man b/hacks/rotzoomer.man
new file mode 100644 (file)
index 0000000..03a0245
--- /dev/null
@@ -0,0 +1,69 @@
+.TH XScreenSaver 1 "14-Mar-01" "X Version 11"
+.SH NAME
+rotzoomer - animated rotations and scalings of portions of the screen
+.SH SYNOPSIS
+.B rotzoomer
+[\-display \fIhost:display.screen\fP]
+[\-move | \-no\-move]
+[\-delay \fIusecs\fP]
+[\-n \fIcount\fP]
+[\-shm | \-no\-shm]
+[\-window] [\-root] [\-install] [\-visual \fIvisual\fP]
+.SH DESCRIPTION
+The \fIrotzoomer\fP program grabs an image of the screen, then picks
+rectangles and draws scaled and rotated animations of that part of
+the screen.
+.SH OPTIONS
+.I rotzoomer
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fImicroseconds\fP
+How much of a delay should be introduced between steps of the animation.
+Default 10000, or about 1/100th second.
+.TP 8
+.B \-move
+Make the rectangles should wander around the screen.
+.TP 8
+.B \-no\-move
+Make the rectangles be stationary.  This is the default.
+.TP 8
+.B \-n \fIcount\fP
+How many rectangles to animate simultaniously.  Default 2.
+.TP 8
+.B \-no\-shm
+Disable use of the SHM extension, even if it appears to be available.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 2001 by Claudio Matsuoka.  Permission to use, copy, modify, 
+distribute, and sell this software and its documentation for any purpose is 
+hereby granted without fee, provided that the above copyright notice appear 
+in all copies and that both that copyright notice and this permission notice
+appear in supporting documentation.  No representations are made about the 
+suitability of this software for any purpose.  It is provided "as is" without
+express or implied warranty.
+.SH AUTHOR
+Claudio Matsuoka <claudio@helllabs.org>
index c3c8ad4aa713280b5809c91e3253c2a29d0ff540..be5c19befc6aad8defb6eaab1fed1274d6dec039 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992, 1995, 1997, 1998
+/* xscreensaver, Copyright (c) 1992, 1995, 1997, 1998, 2001
  *  Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -77,7 +77,6 @@ static XrmOptionDescRec default_options [] = {
   { "-install",        ".installColormap",     XrmoptionNoArg, "True" },
   { "-noinstall",".installColormap",   XrmoptionNoArg, "False" },
   { "-visual", ".visualID",            XrmoptionSepArg, 0 },
-  { "-window-id", ".windowID",         XrmoptionSepArg, 0 },
   { 0, 0, 0, 0 }
 };
 
@@ -87,7 +86,6 @@ static char *default_defaults[] = {
   "*mono:              false",
   "*installColormap:   false",
   "*visualID:          default",
-  "*windowID:          ",
   0
 };
 
@@ -276,9 +274,9 @@ pick_visual (Screen *screen)
 
 
 /* Notice when the user has requested a different visual or colormap
-   on a pre-existing window (e.g., "-root -visual truecolor" or
-   "-window-id 0x2c00001 -install") and complain, since when drawing
-   on an existing window, we have no choice about these things.
+   on a pre-existing window (e.g., "-root -visual truecolor") and 
+   complain, since when drawing on an existing window, we have no 
+   choice about these things.
  */
 static void
 visual_warning (Screen *screen, Window window, Visual *visual, Colormap cmap,
@@ -347,7 +345,6 @@ main (int argc, char **argv)
   Visual *visual;
   Colormap cmap;
   Bool root_p;
-  Window on_window = 0;
   XEvent event;
   Boolean dont_clear /*, dont_map */;
   char version[255];
@@ -441,24 +438,7 @@ main (int argc, char **argv)
 
   root_p = get_boolean_resource ("root", "Boolean");
 
-  {
-    char *s = get_string_resource ("windowID", "WindowID");
-    if (s && *s)
-      on_window = get_integer_resource ("windowID", "WindowID");
-    if (s) free (s);
-  }
-
-  if (on_window)
-    {
-      XWindowAttributes xgwa;
-      window = (Window) on_window;
-      XtDestroyWidget (toplevel);
-      XGetWindowAttributes (dpy, window, &xgwa);
-      cmap = xgwa.colormap;
-      visual = xgwa.visual;
-      visual_warning (screen, window, visual, cmap, True);
-    }
-  else if (root_p)
+  if (root_p)
     {
       XWindowAttributes xgwa;
       window = RootWindowOfScreen (XtScreen (toplevel));
@@ -569,7 +549,7 @@ main (int argc, char **argv)
       XClearWindow (dpy, window);
     }
 
-  if (!root_p && !on_window)
+  if (!root_p)
     /* wait for it to be mapped */
     XIfEvent (dpy, &event, MapNotify_event_p, (XPointer) window);
 
index 8afd6252d31db993a1e0f4c41f527e1c0a0753ff..e655e5d4bc2fd35daba5ea86a47a8ab11e7e446f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl5 -w
+#!/usr/freeware/bin/perl5 -w
 #
 # webcollage, Copyright (c) 1999, 2000 by Jamie Zawinski <jwz@jwz.org>
 # This program decorates the screen with random images from the web.
@@ -28,7 +28,7 @@ use Fcntl ':flock'; # import LOCK_* constants
 use POSIX qw(strftime);
 
 
-my $version = q{ $Revision: 1.61 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.62 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 my $copyright = "WebCollage $version, Copyright (c) 1999" .
     " Jamie Zawinski <jwz\@jwz.org>\n" .
     "            http://www.jwz.org/xscreensaver/\n";
index 2789ef4c518a92bb95f57616130f92444607da63..574f1883deeb8b88e51389ce09be0ddad248aaf7 100644 (file)
--- a/setup.com
+++ b/setup.com
@@ -72,6 +72,7 @@ $ ripples     :== $'mydir'ripples
 $ rocks                :== $'mydir'rocks
 $ rorschach    :== $'mydir'rorschach
 $ rotor                :== $'mydir'rotor
+$ rotzoomer    :== $'mydir'rotzoomer
 $ shadebobs    :== $'mydir'shadebobs
 $ sierpinski   :== $'mydir'sierpinski
 $ slidescreen  :== $'mydir'slidescreen
index 96da4785ce2de4e8a20490cecb23b4358c8fff02..356408a8e35e836c290213f9dd4d0ef3fd467e0e 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 3.29 (05-Feb-2001), by Jamie Zawinski (jwz@jwz.org)";
+       "@(#)xscreensaver 3.30 (19-Mar-2001), by Jamie Zawinski (jwz@jwz.org)";
index c9498e5b0e18e39891744e845c27a6738db8afaa..5e23456f7900b6c6a03e4c086c8db8d6631c2e02 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
+/* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 2001
  *  by Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -189,4 +189,42 @@ create_xshm_image (Display *dpy, Visual *visual,
   return image;
 }
 
+
+void
+destroy_xshm_image (Display *dpy, XImage *image, XShmSegmentInfo *shm_info)
+{
+  Status status;
+
+  CATCH_X_ERROR(dpy);
+  status = XShmDetach (dpy, shm_info);
+  UNCATCH_X_ERROR(dpy);
+  if (shm_got_x_error)
+    status = False;
+  if (!status)
+    fprintf (stderr, "%s: XShmDetach failed!\n", progname);
+#ifdef DEBUG
+  else
+    fprintf (stderr, "%s: XShmDetach(dpy, shm_info) ==> True\n", progname);
+#endif
+
+  XDestroyImage (image);
+  XSync(dpy, False);
+
+  status = shmdt (shm_info->shmaddr);
+
+  if (status != 0)
+    {
+      char buf[1024];
+      sprintf (buf, "%s: shmdt(0x%x) failed", progname, shm_info->shmaddr);
+      perror(buf);
+    }
+#ifdef DEBUG
+  else
+    fprintf (stderr, "%s: shmdt(shm_info->shmaddr) ==> 0\n", progname);
+#endif
+
+  XSync(dpy, False);
+}
+
+
 #endif /* HAVE_XSHM_EXTENSION */
index 54e492e28e4cdd8e973ec9b9f0d8dedf208fd4c5..947a71ac3c6e8cb85d4f352839249b5a2658bbcf 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
+/* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 2001
  *  by Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -29,6 +29,8 @@ extern XImage *create_xshm_image (Display *dpy, Visual *visual,
                                  int format, char *data,
                                  XShmSegmentInfo *shm_info,
                                  unsigned int width, unsigned int height);
+extern void destroy_xshm_image (Display *dpy, XImage *image,
+                                XShmSegmentInfo *shm_info);
 
 #endif /* HAVE_XSHM_EXTENSION */
 
index 177a6df064e19f52964b5bc7dee9f3e0262099a7..49bf63d18ceb61ce3d95e344a01e9fbbec47ee95 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title:          xscreensaver
-Version:        3.29
-Entered-date:   13FEB01
+Version:        3.30
+Entered-date:   19MAR01
 Description:    A modular screen saver and locker for the X Window System.
                 Highly customizable: allows the use of any program that
                 can draw on the root window as a display mode.
@@ -10,15 +10,15 @@ Keywords:       screen saver, screen lock, lock, xlock, X11
 Author:         jwz@jwz.org (Jamie Zawinski)
 Maintained-by:  jwz@jwz.org (Jamie Zawinski)
 Primary-site:   http://www.jwz.org/xscreensaver/
-                1521K xscreensaver-3.29.tar.gz
+                1606K xscreensaver-3.30.tar.gz
                 46K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
-                1521K xscreensaver-3.29.tar.gz
+                1606K xscreensaver-3.30.tar.gz
                 46K  xscreensaver.README
                 1K   xscreensaver.lsm
 Alternate-site: ftp.x.org /contrib/applications/
-                1521K xscreensaver-3.29.tar.gz
+                1606K xscreensaver-3.30.tar.gz
                 46K  xscreensaver.README
                 1K   xscreensaver.lsm
 Platforms:      Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
index 4cac483c84753800e051c5c9f1a9cca68a7a111b..241a06f0903c5cf88f539e2e6d273064a85a95da 100644 (file)
@@ -1,5 +1,5 @@
 %define        name    xscreensaver
-%define        version 3.29
+%define        version 3.30
 %define        release 1
 %define        serial  1
 %define        prefix  /usr/X11R6
@@ -24,7 +24,7 @@ Buildroot:    /var/tmp/%{name}-%{version}-root
 A modular screen saver and locker for the X Window System.
 Highly customizable: allows the use of any program that
 can draw on the root window as a display mode.
-More than 100 display modes are included in this package.
+More than 120 display modes are included in this package.
 %{?USE_GL:See also the xscreensaver-gl package, which}
 %{?USE_GL:includes optional OpenGL display modes.}