One good way to start learning Daylight Toolkit programming
is to work from a simple existing program. If programming
in C or Fortran, learning to compile and link, probably with
a Makefile, is an essential skill.
is a good first program because it links only to the SMILES
Toolkit, and performs a simple yet useful function, to
cansmi.c, the following must have been done first by the Daylight administrator (user "thor"):
% cd $DY_ROOT/contrib/src
This creates the Daylight-user library and also installs
the correct machine-dependent include file at
Note: In this course, if you are using a Daylight distribution on a shared server, this has already been done and is unnecessary.
cansmi.cand its associated
makefileto this directory:
% cp $DY_ROOT/contrib/src/c/smiles/cansmi.c .
% cp $DY_ROOT/contrib/src/c/smiles/makefile .
% make cansmi
cansmiby entering the command and then a few SMILES:
You have created a "development environment" in which
cansmi.c can be modified and recompiled.
Or, a new program could be created and compiled by modifying
makefile, which we will try in a subsequent
dt_count()to determine the number of atoms and bonds in each molecule. With each SMILES, print these numbers.
Daylight Chemical Information Systems Inc.