This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- PostgreSQL database dump | |
| -- | |
| -- Dumped from database version 9.0.4 | |
| -- Dumped by pg_dump version 9.0.1 | |
| -- Started on 2011-08-12 09:23:17 | |
| SET statement_timeout = 0; | |
| SET client_encoding = 'UTF8'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- PostgreSQL database dump | |
| -- | |
| -- Dumped from database version 9.0.4 | |
| -- Dumped by pg_dump version 9.0.1 | |
| -- Started on 2011-07-22 13:30:36 | |
| SET statement_timeout = 0; | |
| SET client_encoding = 'UTF8'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT molregno, s.ism, similarity(s.ism, 'C[NH+](C)CC[C@H](CSc1ccccc1)Nc2ccc(cc2[N+](=O)[O-])S(=O)(=O)NC(=O)c3ccc(cc3)N4CC[NH+](CC4)Cc5ccccc5c6ccc(cc6)Cl') As sim | |
| FROM chembl.compound_smiles s | |
| WHERE s.ism % 'C[NH+](C)CC[C@H](CSc1ccccc1)Nc2ccc(cc2[N+](=O)[O-])S(=O)(=O)NC(=O)c3ccc(cc3)N4CC[NH+](CC4)Cc5ccccc5c6ccc(cc6)Cl' | |
| ORDER BY s.ism <-> 'C[NH+](C)CC[C@H](CSc1ccccc1)Nc2ccc(cc2[N+](=O)[O-])S(=O)(=O)NC(=O)c3ccc(cc3)N4CC[NH+](CC4)Cc5ccccc5c6ccc(cc6)Cl' | |
| LIMIT 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from credo.credoscript import * | |
| ca = ChemCompAdaptor() | |
| # GET IMATINIB | |
| sti = ca.fetch_by_het_id('STI') | |
| # GET ALL SIMILAR CHEMICAL COMPONENTS USING CIRCULAR FINGERPRINTS | |
| ca.fetch_all_by_sim(sti.ism, fp='circular') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from credo.credoscript import * | |
| from credo.contrib.chemidresolver import * | |
| ca = ChemCompAdaptor() | |
| rsvr = ChemIdResolver() | |
| # GET THE SDF FILE OF LAPATINIB WITH 3D COORDINATES | |
| molstring = rsvr.get_structure('lapatinib','sdf', get3d=True) | |
| # GET THE USR MOMENTS FOR THE STRUCTURE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| from urllib import urlopen | |
| # GET A CHEMICAL COMPONENT | |
| response = urlopen('http://0.0.0.0:8000/credo/rest/chemcomps/sti').read() | |
| # PARSE JSON INTO PYTHON DICTIONARY | |
| sti = json.loads(response) | |
| # COLUMN DATA/ATTRIBUTES ARE CONVERTED TO DICTIONARY KEYS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT degrees('(3,0,0)'::vector3d @ '(5,5,0)'::vector3d) AS angle; | |
| angle | |
| ------- | |
| 45 | |
| (1 row) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT s.pdb, l.ligand_name, s.title, sq.similarity | |
| FROM ( | |
| WITH query AS (SELECT calphafp FROM credo.ligand_fuzcav WHERE ligand_id = 3919) | |
| SELECT f.ligand_id, arrayxi_fuzcavsim_global(query.calphafp, f.calphafp) AS similarity | |
| FROM credo.ligand_fuzcav f, query | |
| WHERE arrayxi_fuzcavsim_global(query.calphafp, f.calphafp) > 0.17 | |
| ) sq, | |
| credo.ligands l, credo.biomolecules b, credo.structures s | |
| WHERE sq.ligand_id = l.ligand_id | |
| AND l.biomolecule_id = b.biomolecule_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT '{1,2,3,4,5}'::arrayxi & '{5,4,3,2,1}'::arrayxi; | |
| ?column? | |
| --------------- | |
| '{0,0,3,0,0}' | |
| (1 row) | |
| Time: 0.290 ms |