This program will automatically generate the perl extension module directory for a daylight toolkit wrapper. All the dt_ libraries are included (but not the dc_ Rubicon toolkit nor the du_ user functions).
$DY_ROOT
is defined. E.g., DY_ROOT=/usr/local/daylight/v483
libdl_stubs.a
is built in $DY_ROOT/contrib/lib
. To do this:
cd $DY_ROOT/contrib/src make
perl parse_perlv.pl
The program will make a makefile_include specific to the platform and perl version that the script is running on.
make (using dynamic libs) or make static (using static libs) make test (using dynamic libs) or make test_static (using static libs) su - root make install*Note for SGI* If you are using SGI and get errors during 'make test' remake DayPerl using static libraries.
(You must become the owner of perl to install the package.)
#! /usr/bin/env perl
use DayPerl;
$orig = "c1c(Br)cccc1"; $molh = dt_smilin($orig); print "molecule handle = $molh\n"; $smiles = dt_cansmiles($molh,0); print "smiles = $smiles\n";
print "NULL_OB = " . NULL_OB . "\n"; print "TYP_PROGRAM = " . TYP_PROGRAM . "\n"; print "TYP_MONOMER = " . TYP_MONOMER . "\n"; print "DY_THOR_USMILES = " . DY_THOR_USMILES . "\n"; print "DX_EDGE_TRI = " . DX_EDGE_TRI . "\n";
The results should look something like:
molecule handle = 1 smiles = Brc1ccccc1 NULL_OB = 0 TYP_PROGRAM = 70 TYP_MONOMER = 61 DY_THOR_USMILES = 1 DX_EDGE_TRI = 8
Several example programs are provided with the Daylight software
distribution as contributed source code, in $DY_ROOT/contrib/src/perl/examples
.
Use the functions as documented by the Daylight manuals.
Each dt_
function is available as a perl function. The only
difference between their C syntax and perl is that string lengths
are not required for passed arguments nor returned values. Likewise,
constants are all defined and may be used as in C (although in perl
they are actually functions).
DayPerl 1.4 has been sucessfully built with the following configurations (all w/ Daylight 4.8):
dt_mer_strsearch(hitlist,column,searchtype,action,find_next,status,s1,s2)
where s2 = the invalid string.
DayPerl-1.1 15 March 1996
DayPerl-1.2 13 March 1998 (Roger E Critchlow Jr)
DayPerl-1.3 15 January 2002 (Jeremy Yang)
DayPerl-1.4 15 June 2003 (Margaret Kamphorst)
(C) 1996 Chiron Corporation (C) 1998-2003 Daylight CIS Inc.