Subject: success in patching RasMol 2.7.1 for use with SpaceOrb 360

From: Eugene Leitl <[email-masked]>
Date: Tue, 18 Jan 2000 20:43:29 -0800 (PST)

It is possible to successfully patch RasMol 2.7.1 

   http://www.bernstein-plus-sons.com/software/RasMol_2.7.1.tar.gz

with the patch for the SpaceOrb 360 6DOF input device 

   http://www.spacetec.com/product/profile/index.cfm?ProductID=154

using the patch for RasMol-2.6b2

   http://www.in-machina.com/~reece/RasMol/RasMol-2.6b2-spaceorb-01.patch.gz

under Linux 2.2.14 with the following modifications: unpack the RasMol
tarball. Unzip and put the patch into the RasMol_2.7.1/src
directory. Go there.

Apply the patch via 

      patch <RasMol-2.6b2-spaceorb-01.patch

Since in the current RasMol revision the INSTALL file has wandered to
.., enter ../INSTALL when prompted by the patch program. Tidying up
INSTALL is facultative, if you want, put SPACEORB under COMPILATION
DIRECTIVES just after DIALBOX. The remaining patches should require no
manual interaction. You will now need to cut out the following
incorrectly inserted passage in x11win.c

#ifdef SPACEORB
#include "orb.h"
#define XR 0
#define YR 1
#define ZR 2

[...]

#undef XR
#undef YR
#undef ZR
#undef XT
#undef YT
#undef ZT
#endif

and insert it just before 

static void DrawMainWin()
{

modify the Imakefile by inserting orb.o between infile.o and tokens.o:

OBJS = rasmol.o molecule.o abstree.o cmndline.o command.o transfor.o \
       render.o repres.o  x11win.o pixutils.o outfile.o script.o \
       infile.o orb.o tokens.o  cif_fract.o cif.o cif_ctonum.o cif_stx.o   

As usual, not forget to choose the DEPTHDEF appropriate for your
system in rasmol.h. Ibid uncomment and name the serial device you're
using, in my case this is:

#define SPACEORB "/dev/ttyS0" /* 6-DOF joystick support */

As usually build the Makefile by saying xmkmf, then make. The build
should now proceed without glitches.

If after compilation you haven't done "make install" as root, you
shouldn't forget to invoke rasmol ./rasmol some-pdb-file.pdb , orelse
you will be calling the old copy without the spaceball support of you
just say rasmol some-pdb-file.pdb 

If the spaceball still has no impact, check whether you as user are
allowed to access the serial port. Start rasmol as root, or do a chmod 
666 on your serial port device.

The control is surprisingly intuitive, but could be smoother (10
bit/degree of freedom are possible with this controller). The mouse
use is not affected.

Have fun!

Regards,
Eugene Leitl