Skip to content

Instantly share code, notes, and snippets.

@aschreyer
Created May 24, 2011 12:55
Show Gist options
  • Select an option

  • Save aschreyer/988656 to your computer and use it in GitHub Desktop.

Select an option

Save aschreyer/988656 to your computer and use it in GitHub Desktop.
Stereochemistry functions in the PostgreSQL OpenEye cartridge
SELECT canonical_smiles, openeye.has_undef_stereo(canonical_smiles)
FROM chembl.compound_structures s
JOIN chembl.chembl_id_lookup i
ON s.molregno = i.entity_id AND i.entity_type = 'COMPOUND'
WHERE i.chembl_id = 'CHEMBL287587' OR i.chembl_id = 'CHEMBL1437';
canonical_smiles | has_undef_stereo
----------------------------+-----------------------
'NC[C@H](O)c1ccc(O)c(O)c1' | f
'NCC(O)c1ccc(O)c(O)c1F' | t
(2 rows)
SELECT openeye.count_chiral_atoms('C(Cl)(Br)N');
count_chiral_atoms
--------------------
1
(1 row)
SELECT openeye.create_iupac_name('C(Cl)(Br)N');
create_iupac_name
----------------------------
'bromo(chloro)methanamine'
(1 row)
SELECT openeye.flipper('C(Cl)(Br)N');
flipper
------------------------------------
'{[C@H](N)(Cl)Br,[C@@H](N)(Cl)Br}'
(1 row)
SELECT openeye.has_undef_stereo('C(Cl)(Br)N');
has_undef_stereo
------------------
t
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment