smi2rasm

Displays a SMILES in RasMol.

Syntax

expr  smi2rasm(SMILES)
char  SMILES

Description

smi2rasm() takes a SMILES parameter read from the display field. The default length of this parameter is set at 2000 bytes, but this can be adjusted up or down. If the SMILES string is a mixture of dot disconnects, the user is given a list of the moieties and asked to select one for display in RasMol

The SMILES string is converted to a hex string using smi2hex() and this string is submitted to the DayCGI script called ruby. Data returned from ruby are saved to the local cache directory as rasmol.pdb. If ruby failed, this file will contain an error message that is displayed in the browser. If ruby succeeded, rasmol.pdb will contain a 3d depiction in CEX File Format and this file will be opened in RasMol.

Example

RasMol can be linked to an action button. The following code calls smi2rasm() and passes it the SMILES displayed in the current window. The SMILES in the display can be selected from Thor or entered from the keyboard.

 {
 smi2rasm(mywindow.smile_d);
 escape(input);}
 }


Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999