This modification module provides functions that modify the chemical structure. This module is fully working starting on version 0.6.0 of Mychem.
If a function of the modification module fails, it returns an empty string.
ADD_HYDROGENS() adds hydrogens to a molecule (makes explicit the hydrogen atoms).
mysql>SELECT ADD_HYDROGENS(molecule_col) FROMtbl_name->WHERE name='glycine';-> glycine OpenBabel11190809242D 10 9 0 0 0 0 0 0 0 0999 V2000 206.0000 126.0000 0.0000 C 0 0 0 0 0 227.0075 113.8713 0.0000 C 0 0 0 0 0 227.0075 89.6139 0.0000 O 0 0 0 0 0 248.0151 126.0000 0.0000 O 0 0 0 0 0 184.9925 113.8713 0.0000 N 0 0 0 0 0 206.0000 126.7208 -0.8832 H 0 0 0 0 0 206.0000 126.4888 1.0299 H 0 0 0 0 0 248.9361 125.4682 0.0000 H 0 0 0 0 0 184.8694 113.3367 -0.9765 H 0 0 0 0 0 184.1380 114.5759 0.1668 H 0 0 0 0 0 1 2 1 0 0 0 1 5 1 0 0 0 1 6 1 0 0 0 1 7 1 0 0 0 2 3 2 0 0 0 2 4 1 0 0 0 4 8 1 0 0 0 5 9 1 0 0 0 5 10 1 0 0 0 M END
REMOVE_HYDROGENS() removes the hydrogens to a molecule (makes implicit the hydrogen atoms).
mysql>SELECT REMOVE_HYDROGENS(molecule_col) FROMtbl_name->WHERE name='glycine';-> glycine OpenBabel11190809252D 5 4 0 0 0 0 0 0 0 0999 V2000 206.0000 126.0000 0.0000 C 0 0 0 0 0 227.0075 113.8713 0.0000 C 0 0 0 0 0 227.0075 89.6139 0.0000 O 0 0 0 0 0 248.0151 126.0000 0.0000 O 0 0 0 0 0 184.9925 113.8713 0.0000 N 0 0 0 0 0 1 2 1 0 0 0 1 5 1 0 0 0 2 3 2 0 0 0 2 4 1 0 0 0 M END
STRIP_SALTS() removes all atoms except for the larger contiguous fragment.
mysql>SELECT STRIP_SALTS(molecule_col) FROMtbl_name->WHERE name='sodium 2-aminoacetate';-> OpenBabel11190812342D 5 4 0 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 N 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 O 0 0 0 0 0 0.0000 0.0000 0.0000 O 0 0 0 0 0 1 2 1 0 0 0 2 3 1 0 0 0 3 4 2 0 0 0 3 5 1 0 0 0 M CHG 1 5 -1 M END