The Internet standard for specifying options in a URL query is built HTTP Services and is based on name=value syntax. Multiple options are separated by the ampersand character (&) and the URL is separated from the options by the question mark (?). An example of standard URL syntax is smi2gif?option1=true&option2=false
Syntax for specifying SMILES is smiles=<SMILES string> and illustrated at /dayhttp/smi2gif?smiles=c1ccccc1.
Syntax for specifying XSMILES (Kekule Form) is xsmiles=true syntax and illustrated at /dayhttp/smi2gif?xsmiles=true&smiles=c1ccccc1.
Several characters in the SMILES character set, such as square brackets () have special meaning to a browser when they apeear in a URL. In order to transmit SMILES strings using a browser, such characters are encoded in hexidecimal format. The old way of encoding SMILES was to convert all characters in the string to hexidecimal. For example, the hexidecimal form of cyclohexylketone (O=C1CCCCC1) is 4f3d4331434343434331 and is illustrated at /dayhttp/smi2gif?4f3d4331434343434331.
While this old mechanism works fine, it is not an industry standard. So, we've implemented the Internet standard protocol for URL-encoding as specified at RFC 1738. Basically, this protocol involves encoding special URL characters to a character triplet consisting of the percent character (%) followed by the two hexadecimal digits (from "0123456789ABCDEF") which form the hexadecimal value of the character. SMILES characters that are not special URL characters are not encoded. For example, the URL-encoding of "O=C1CCCCC1" is "O%3DC1CCCCC1". The equal sign (=) is a special URL character (for use in option=value syntax) and therefore has been encoded (percent sign (%) plus hexidecimal value (3D)). The standard URL-encoding is illustrated at /dayhttp/smi2gif?smiles=O%3DC1CCCCC1.
Note: A programer routine called du_bin2url and a user application by the same name are provided in Contrib for encoding URLs according to the Internet standard. The routine and program should be used to standardize hyperlinks in HTTP Toolkit programs and in the location field of a browser. The routine is located at $DY_ROOT/contrib/src/libdu/http/ and the program at $DY_ROOT/contrib/src/applics/http/.
Syntax for specifying the rise and run of a GIF image is width=pixels and height=pixels and illustrated at /dayhttp/smi2gif?width=300&height=300&smiles=O%3DC1CCCCC1. The default width and height is 400 and 300, respectively.
Note: Images are automatically oriented by aligning the major dimension along the X or Y axis, depending on the width and height. If the width is greater than the height, the major dimension is oriented along the X-axis. Otherwise, the major dimension is oriented along the Y-axis.
Syntax for specifying a reaction is reaction=true and illustrated by a keto-enol tautamer at /dayhttp/smi2gif?reaction=true&width=640&height=480&smiles=%5BO%3A1%5D%3D%5BC%3A2%5D1%5BC%3A3%5D(%5BH%3A4%5D)(%5BH%5D)CCCC1%3E%5BH%2B%5D%3E%5BH%3A4%5D%5BO%3A1%5D%5BC%3A2%5D1%3D%5BC%3A3%5D(%5BH%5D)CCCC1>.
Syntax for specifying a generic reaction is smirks=true and illustrated by the following oxygen or nitrogen pattern at /dayhttp/smi2gif?smirks=true&width=640&height=480&smiles=%5BO%2CNH%3A1%5D%3D%5BC%3A2%5D1%5BC%3A3%5D(%5BH%3A4%5D)(%5BH%5D)CCCC1%3E%5BH%2B%5D%3E%5BH%3A4%5D%5BO%2CNH%3A1%5D%5BC%3A2%5D1%3D%5BC%3A3%5D(%5BH%5D)CCCC1>. This option will also display most regular SMARTS, with the exception of SMARTS containing bond expressions.
Syntax for specifying the foreground and background is colormode=scheme where scheme is one of the following:
The color on paper scheme is illustrated at /dayhttp/smi2gif?colormode=COP&smiles=O%3DC1CCCCC1. Paper background is transparent. The default scheme is color on black.
Syntax for specifying horizontal alignment is fromto=true and illustrated by alignment of cyclohexylketone at /dayhttp/smi2gif?fromto=true&smiles=O%3DC1CC(%5B*-1%5D)CC(%5B*-2%5D)C1. This option aligns the image along the horizon by intersecting the X axis with -1 and -2 charged wildcard atoms ([*-1] and [*-2]). This option has the side effect of replacing the atoms with the text "from" and "to".
Syntax for showing hydrogens on carbon is hydrogens=true and illustrated at /dayhttp/smi2gif?hydrogens=true&smiles=O%3DC1CCCCC1. The default value is false.
Syntax for specifying TDT input is tdt=$SMI<SMILES>|. For example, cyclohexylketone in TDT form ("$SMI<O=C1CCCCC1>|") is illustrated at /dayhttp/smi2gif?tdt=%24SMI%3CO%3DC1CCCCC1%3E%7C. Remember that a TDT string contains special URL characters (i.e. '<', '>', and '|') and should be encoded as described in the section URL-Encoding.
Syntax for specifying 2D layout is tdt=$SMI<SMILES>2D<x,y coordinates>|. For example, the chair conformation of cyclohexylketone ("$SMI<O=C1CCCCC1>2D<-.75,1.5,0,1,1,0,2,.5,3,0,2,1,1,.5>|") is illustrated at /dayhttp/smi2gif?tdt=%24SMI%3CO%3DC1CCCCC1%3E2D%3C-.75%2C1.5%2C0%2C1%2C1%2C0%2C2%2C.5%2C3%2C0%2C2%2C1%2C1%2C.5%3E%7C.
Note: Automatic orientation of the image is not performed when a 2D layout is specified.
Syntax for specifying automatic orientation of 2D layout is orient=true. Use this option when you specify a 2D layout and you want to allow orientation of the image. For example, orientation of the chair conformation of cyclohexylketone is illustrated at /dayhttp/smi2gif?orient=true&width=300&height=300&tdt=%24SMI%3CO%3DC1CCCCC1%3E2D%3C-.75%2C1.5%2C0%2C1%2C1%2C0%2C2%2C.5%2C3%2C0%2C2%2C1%2C1%2C.5%3E%7C.
Note: Image orientation depends on the width and height, as described in the "Width & Height" section.
Syntax for specifying atom color is tdt=numcolors=<number of colors>&tdt=$SMI<SMILES>ALAB<atom color value>|. The numcolors option indicates the number of different colors up to a maximum of 10. The ALAB data in a comma-separated list of decimal values between 0.0 and 1.0 inclusive and determines a particular atom color. As ALAB values increase from 0.0 to 1.0, the color varies from dark red, red-orange, orange, orange-yellow, yellow, yellow-green, green, green-blue,light blue, blue, and grey-white. For example, decanol with a red oxygen (ALAB value 0.0) and a white carbon (ALAB value 1.0) and all 10 colors ("numcolors=10&tdt=$SMI<OCCCCCCCCCC>ALAB<0.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0>|") is illustrated at /dayhttp/smi2gif?numcolors=10&tdt=%24SMI%3COCCCCCCCCCC%3EALAB%3C0.0%2C.1%2C.2%2C.3%2C.4%2C.5%2C.6%2C.7%2C.8%2C.9%2C1.0%3E%7C.
Option names can be abbreviated to the unique number of charaters for as follows:
Option values 'true' and 'false' may be abbreviated 't' and 'f'. All options names and values are case-insensitive.
|Daylight Chemical Information Systems, Inc.||Daylight|