Chemistry Reference
In-Depth Information
Create Function add_new_structure() Returns Trigger As $EOSQL$
Declare
std_smiles Text;
smirks Text;
std Record;
Begin
For std In Select * from std_smirks Loop
std_smiles = xform(NEW.smi, std.smirks);
If std_smiles != NEW.smi Then
NEW.smi = std_smiles;
End If;
End Loop;
NEW.smi = isosmiles(NEW.smi);
NEW.cansmi = cansmiles(NEW.smi);
NEW.fp = fp(NEW.smi);
Return NEW;
Exception
When OTHERS Then
Insert Into error_log (smi) Values (NEW.smi);
Return Null;
End;
$EOSQL$ Language plpgsql;
The std _ smirks table would contain the standard transformations.
Chapter 9 shows a sample table of standard SMIRKS transformations. This
table could be expanded at any time to include more standardizations as
they become necessary without having to modify the trigger function to
deal with these additions.
Other types of tautomers are not so easy to standardize. Some tau-
tomers are not arbitrarily different ways of “spelling” a SMILES. These tau-
tomers are readily isolated chemical entities for which different chemical
properties can be measured. For example, dihydroxynapthelene exists in
two forms 1 as shown in Figure 13.1. When the dihydroxy form (Oc1ccc(O)
c2ccccc12) is registered, it must be assumed that the dihydroxy form is
intended rather than the diketo form (O=C3CCC(=O)c4ccccc34) of the com-
pound. However, it is possible to detect that a tautomer of a compound is
already present in the database. Using the graph function described in
OH
O
C
C
HC
CH
HC
CH 2
HC
CH
CH 2
HC
H
H
OH
O
Figure 13.1 Two enantiomeric forms of dihydroxynapthelene.
Search WWH ::




Custom Search