Perl |
DayPerl |
|
---|---|
DayPerl2 |
|
DayPerl | Acquire the dayperl-491.tar.gz or dayperl-481.tar.gz archive. |
---|---|
% gzip -dc dayperl-491.tar.gz | tar xf - % cd dayperl-491/ % more _readme % perl parse_perlv.pl % make % su root # make install % make test | |
DayPerl2 | Acquire the dayperl2.tar.gz archive. |
% gzip -dc dayperl2.tar.gz | tar xf - % more README % cd dayperl2/swig % gzip -dc swig-1.3.9.tar.gz | tar xf - % cd SWIG-1.3.19 % ./configure % make % su root # make install % cd ../../libgd % ./Build.sh % cd ../DayPerl2 % cp makefile.linux makefile % vi makefile <verify SWIG location> % make % su root # make install |
DayPerl cansmi.pl |
#!/usr/bin/env perl use DayPerl; my ( $mol, $smiles, $cansmi); while ($smiles = <STDIN>) { chomp $smiles; if (NULL_OB == ($mol = dt_smilin($smiles))) { print STDERR "ERROR: (dt_smilin) Can't parse SMILES \"$_\"\n"; } else { $cansmi = dt_cansmiles($mol, 1); if (!$cansmi) { print STDERR "ERROR: (dt_cansmi) \"$_\"\n"; } else { print $cansmi, "\n"; } } dt_dealloc($mol); } exit 0 |
---|---|
% echo "OCC" | perl cansmi.pl CCO | |
DayPerl2 cansmi.pl |
#!/usr/bin/env perl use strict; use DayPerl2; my ( $mol, $smiles, $cansmi); while ($smiles = <STDIN>) { chomp $smiles; if ($NULL_OB == ($mol = dt_smilin($smiles))) { print STDERR "ERROR: (dt_smilin) Can't parse SMILES \"$_\"\n"; } else { if (!$cansmi) { print STDERR "ERROR: (dt_cansmi) \"$_\"\n"; } else { print $cansmi, "\n"; } } dt_dealloc($mol); } exit 0 |
% echo "OCC" | perl cansmi.pl CCO |