Skip to content

Instantly share code, notes, and snippets.

View aschreyer's full-sized avatar

Adrian Schreyer aschreyer

View GitHub Profile
@aschreyer
aschreyer / openeye-enumerate-tautomers.sql
Created May 20, 2011 14:21
Introduction to the OpenEye PostgreSQL cartridge
SELECT openeye.enumerate_tautomers('O=C1NN=Cc2cocc12');
enumerate_tautomers
---------------------------------------
'{O=c1[nH]ncc2c1coc2,Oc1nncc2c1coc2}'
(1 row)
@aschreyer
aschreyer / gist:982860
Created May 20, 2011 13:13
Credoscript example
In [ 1]: from credo.credoscript import *
# Fetch a structure from a database with the corresponding adaptor
In [ 2]: s = StructureAdaptor().fetch_by_pdb('3CS9')
# Database columns are mapped as attributes
In [ 3]: s.title
Out[ 3]: 'Human ABL kinase in complex with nilotinib'
# Relationships with other entities are mapped as attributes as well