Examples

Once the database is created, you can use many chemical functions. Here's a (very) short overview of the possibilities.

Calculating the Molecular Weight

The computation of the molecular weight of a molecule is performed by the MOLWEIGHT() function. In the following example, the molecular weight of the amino acid glycine is calculated.

mysql> SELECT MOLWEIGHT(`compound_mol`.`mol`)
    -> FROM `compound`,`compound_mol`
    -> WHERE `compound`.`name`='glycine'
    -> AND `compound`.`id`=`compound_mol`.`compound_id`;
        -> 75.066600
      

Generating SMILES String

To generate the SMILES string of the amino acid glycine, use the MOLECULE_TO_SMILES() function:

mysql> SELECT MOLECULE_TO_SMILES(`compound_mol`.`mol`)
    -> FROM `compound`,`compound_mol`
    -> WHERE `compound`.`name`='glycine'
    -> AND `compound`.`id`=`compound_mol`.`compound_id`;
        -> C(N)C(=O)O