Daylight Summer School 1998, July 28-30, St. John's College, Santa Fe, NM

Daylight Worksheet - Modify cansmi for reaction functions.

We'll start reaction toolkit programming with cansmi.c. It should be familiar, and it illustrates one of the main ideas for reaction toolkit programming.

Reaction basics

  1. Build cansmi and run it. Try entering reactions. Note that if the reaction toolkit license is available, cansmi will successfully canonicalize reactions.

  2. Modify cansmi.c. Use the function dt_type() to determine whether a molecule or reaction was entered. Print out the result. Compile and test.

  3. If a reaction was input, use dt_count() to determine the number of molecules in the reaction and print out the result. Compile and test.

  4. Use dt_stream() to get each molecule from the reaction, and print out each individual molecule canonical SMILES. Identify the role of each molecule in the reaction using dt_getrole(). Compile and test.


Atoms and Bonds in reactions

  1. Continuing with cansmi.c, lets look at how atoms and bonds behave for reactions.

  2. Use the function dt_count() to determine the number of atoms and bonds in each object entered. Compile and test.

  3. For reactions, use dt_stream() to get each molecule. Print out the number of atoms and bonds in each molecule. Keep a running total of atoms and bonds for each reaction and compare to the overall count of atoms and bonds for the reaction (from step #2). Compile and test.


Daylight Chemical Information Systems Inc.
support@daylight.com