DayPerl2 - PowerPoint PPT Presentation

About This Presentation
Title:

DayPerl2

Description:

New Feature, built into DayPerl2. Drawing Library uses libpng ... Converts a molecule to all C, single bond (the 'graph' or 'skeleton') example ... – PowerPoint PPT presentation

Number of Views:12
Avg rating:3.0/5.0
Slides: 20
Provided by: dayl9
Category:
Tags: dayperl2 | bond | is | james | new | the | who

less

Transcript and Presenter's Notes

Title: DayPerl2


1
  • DayPerl2
  • You Can Teach an Old Dog New Tricks!

2
DayPerl2 Brief History
  • Brief History of DayPerl
  • Version 1.1, 1996 Alex Wong
  • Daylight support Roger Critchlow, Jeremy Yang,
    Margaret Kamphorst, Jack Delany
  • Roger did the first swig(1) implementation, which
    supports Perl, Python, Tcl/Tk.

3
DayPerl2 Outline
  • Overview of the talk
  • Features, compare to DayPerl
  • Example Molecular modeling
  • Example PNG depiction
  • Example Molecular graph theory
  • Example Thor / Merlin
  • Comparison C, PyDaylight

4
DayPerl2 What Does It Do?
  • Implements the Daylight Toolkit in Perl
  • All Daylight Toolkit functions and constants
  • Includes a PNG drawing library
  • Implemented with swig(1)
  • Availability - Tested on
  • RedHat Linux 7.2 and 9.0
  • Solaris 2.8
  • Perl versions 5.6 and 5.8 (Sun and Linux)
  • Has compiled on IRIX 6.5, but difficult

5
Changes DayPerl to DayPerl2
  • Why DayPerl2?
  • Uses swig(1) for easier support
  • Original DayPerl had illegal perl syntax
  • Four major differences
  • Constants
  • Multiple return values
  • "invalid string"
  • Depiction library

6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
Depict Library
  • New Feature, built into DayPerl2
  • Drawing Library uses libpng
  • No patent issues with PNG, worldwide
  • Colors
  • Antialiasing
  • Fixed font, truetype fonts, or old vector font
  • Transparent background

10
Example 1 Molecular Modeling
  • smartsprops.pl
  • Simple property calculator
  • HBD, HBA, Rotatable Bonds
  • example

11
Example 2 PNG Depiction
  • depicttest.pl
  • Illustrates creating a depiction as a PNG image
  • example

12
Example 3 Molecular Graph
  • make_skeleton.pl
  • Converts a molecule to all C, single bond (the
    "graph" or "skeleton")
  • example

13
Example 4 Thor/Merlin
  • spresi_reaction_finder.pl
  • Finds the ten most-similar compounds to the given
    compound for which a reaction is given in the
    literature
  • example

14
C man(1) to DayPerl2 syntax
  • Add to constants
  • C NULL_OBperl NULL_OB
  • Drop string lengths
  • C dt_alloc_string(len, s)perl dt_alloc_string
    (s)

15
C man(1) to DayPerl2 syntax
  • Use undef for the "invalid string"
  • C dt_alloc_string(0, NULL)
  • perl dt_alloc_string(undef)
  • Move all return values to left side of ''
  • C ok dt_continue(server, status)
  • perl (ok, status) dt_continue(server)

16
Comparison Other Languages
  • C/C
  • Perl is MUCH easier
  • Writing Perl is 2-10 times faster than C or C
  • But ...
  • DayPerl2 doesn't protect you against "core dump"
    if you give Toolkit illegal parameters
  • DayPerl2 doesn't protect you against memory leaks
    (must call dt_dealloc()).

17
Comparison Other Languages
  • PyDaylight and Python
  • Python PyDaylight is a better solution than
    Perl DayPerl2
  • Python is a cleaner language, PyDaylight has nice
    object-oriented features
  • However...
  • Perl is a great language, and DayPerl2 is a
    "straight-ahead" translation of the Toolkits
  • If you're familiar with perl, use DayPerl2, it's
    a very capable combination

18
Why Not dayswig?
  • For the technical among you...
  • Perl has peculiarities that are handled by
    specialized swig(1) rules
  • If anyone has time, and more swig(1) expertise
    than me, I'd be happy to team up to try to unify
    DayPerl2's swig rules with dayswig's rules

19
DayPerl2
  • The Old Dog is Still Alive
  • Perl DayPerl2 is still a viable tool for
    writing Daylight Toolkit programs
  • Modernized DayPerl2 syntax matches improvements
    in Perl syntax
  • He's learned a new trick
  • Depictions are very handy for web applications
Write a Comment
User Comments (0)
About PowerShow.com