Chemistry Reference
In-Depth Information
Table 8.2 Atomic Weights for Some
Common Atoms and Associated SMARTS
SMARTS
Weight
Symbol
[#1]
1.01
H
[#6]
12.01
C
[#7]
14.01
N
[#8]
16.00
O
[#9]
19.00
F
[#15]
30.97
P
[#16]
32.06
S
[#17]
35.45
Cl
[*;h1]
1.01
H1
[*;h2]
2.02
H2
[*;h3]
3.03
H3
[*;h4]
4.04
H4
[*;h5]
5.05
H5
[*;h6]
6.06
H6
buried in an external computer program, exposing them in a table makes
it easier to maintain, verify, and expand the parameter set.
The simplest molecular property is molecular weight. The obvious frag-
ments to use for this are atoms. It is a simple matter to define the SMARTS
fragments for any atom. Table 8.2 shows the definition for a few common
atoms. The full table for the first 103 atoms is shown in the Appendix.
The following function is analogous to the fragment key function
above. It uses a relational table to define fragments, a function to match
SMILES and SMARTS (in this case count _ matches ), and an aggregate
SQL function to tally the results over all matched fragments.
Create Function amw(character varying)
Returns Numeric As $EOSQL$
Select sum(weight*count_matches($1,smarts)) From amw;
$EOSQL$ Language SQL;
This function is not a very efficient method to compute molecular weight
compared with a compiled C program, for example. The advantage is that
the function is contained within the database and is expressed using a
relational table that exposes the important parameters of the computation.
The following function could be used when creating a table containing
SMILES, or used when necessary, for example, to compute the molecular
weight of phenol.
Select amw('c1ccccc1O');
Select amw(smiles) from structure;
Search WWH ::




Custom Search