COMPILING AND INSTALLING DAYPERL2 Contents: * Compiling Swig * Compiling * Testing * Installing Unfortunately, this is a bit more complicated than the traditional "perl Makefile.PL" installation. Maybe some day... Compiling Swig -------------- The hard part of compiling DayPerl2 is getting swig(1) (but your computer may have it already). The source for swig version 1.3.19 is included in the DayPerl2 distribution. If you want to try a more recent version of swig, go to: http://www.swig.org (More recent versions of swig may work, but we haven't tried them.) If you don't have swig, compile the version supplied: cd swig gunzip makefile # where is linux or solaris make To start fresh, type "make clean". To start completely out-of-the-box fresh, type "make distclean". This will erase DayPerl2 and all of the graphics libraries. Testing ------- Before you install, you can run a few of the examples. You must stay in the main dayperl2-1.x.x directory (i.e. do NOT cd to the examples directory). A simple one is: $ echo "c1ccccc1O" | ./examples/cansmi.pl Oc1ccccc1 If you have Thor running: $ ./examples/thortest.pl Got thor server: 1, isnew = 1 dt_stringvalue() = 'moonunit2:thor' dt_typename() = 'server' Directories: /usr/local/daylight/thordb Databases: /usr/local/daylight/thordb/medchem00demo.THOR /usr/local/daylight/thordb/medchem00demo_datatypes.THOR /usr/local/daylight/thordb/medchem00demo_indirect.THOR ... etc. Opening medchem00demo database...$db = 0, $isnew = 1 Got merlin server: 48, isnew = 1 dt_stringvalue() = 'moonunit2:merlin' dt_typename() = 'merlinserver' Directories: /usr/local/daylight/thordb Databases: /usr/local/daylight/thordb/medchem00demo.THOR ... etc. Opening medchem00demo database...$db = 0, $isnew = 1 If you have the Depict Toolkit, the following will produce a file "test_out.png" $ ./examples/depicttest.pl DayPerl2 has not been thoroughly tested. The stuff that's been used a lot (primarily the SMILES, SMARTS and Depict toolkits) seems to work pretty well. Other toolkits, particularly Thor and Merlin, have had their basics tested but there are many functions that have not been tested. And the more obscure functionality, such as the Monomer Toolkit, has not been tested at all. DayPerl2 needs a comprehensive set of tests. The Swig compiler seems to work pretty well, so if you encounter errors they're most likely to be oddball functions that have unusual parameters that Swig can't handle. The symptom is usually that Perl complains you've given the wrong number or type of parameters to the function, or you get a core dump. In almost all cases, a core dump will be from a function that takes a length-and-string parameter, one whose "signature" is not in the typemaps.i file. Installing ---------- As the "root" user, type "make install". This will copy the .pm and .so files to your Perl library directory. If you can't be the root user, you can use DayPerl2 without installing it, but DayPerl2.so must be in your LD_LIBRARY_PATH, and DayPerl2.pm must be in your @INC path. If you're using Apache, you may need to use SetEnv LD_LIBRARY_PATH directive in your httpd.conf file; see the Apache documentation for details. If you're on an SGI, it's even trickier because IRIX has more than one LD_LIBRARY_PATH variable, for 32-bit, 64-bit and o-32 and n-32 object files. If you know what I'm talking about, good luck, and if you don't, don't even try it.