You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.
-- #1. Create table of parent molecules in RDKit format
select distinctc.molregno,mol_from_ctab(molfile::cstring) m into mols_rdkit from compound_structures c, molecule_hierarchy h where is_valid_ctab(molfile::cstring) andc.molregno=h.parent_molregno;
-- SELECT 1279988
altertable mols_rdkit add primary key (molregno);
-- #2. Create index for the table above
createindexrdkit_mol_idxon mols_rdkit using gist(m);
-- #3. Create tables with different fingerprints of the selected molecules
select molregno, torsionbv_fp(m) as torsionbv, morganbv_fp(m,2) as mfp2, featmorganbv_fp(m,2) as ffp2, rdkit_fp(m) as rdkfp, atompairbv_fp(m) as atombv, layered_fp(m) as layeredfp, maccs_fp(m) as maccsfp into fps_rdkit from mols_rdkit;
-- #4. Create index for the fingerprints tables
createindexfps_ttbv_idxon fps_rdkit using gist(torsionbv);
createindexfps_mfp2_idxon fps_rdkit using gist(mfp2);
createindexfps_ffp2_idxon fps_rdkit using gist(ffp2);
createindexfps_rdkfp_idxon fps_rdkit using gist(rdkfp);
createindexfps_atombv_idxon fps_rdkit using gist(atombv);
createindexfps_layfp_idxon fps_rdkit using gist(layeredfp);
-- create index fps_maccsfp_idx on fps_rdkit using gist(maccsfp); -- crashes postgres server
-- #5. Create the primary keys
altertable fps_rdkit add primary key (molregno);
-- #6. Create table from rdkit images
-- CREATE TABLE mol_pictures (molregno INT PRIMARY KEY, image BYTEA);