Git Product home page Git Product logo

scaffold_network_generator's Introduction

Scaffold Network Generator

Badge LICENSE Slack

Contributers

Usage

git clone [email protected]:jach4/scaffold_network_generator.git sng
cd sng

python scaffolds_output.py --out_fmt=protobuf --np=50 --nq=100000 --file_input=data/datasets/input.smi --scaffolds_output=data/datasets/idx_sm.bin --file_output=data/datasets/idx_ls.bin 

python scaffolds_output.py --out_fmt=postgres --np=80 --nq=100000 --file_input=data/datasets/input.smi --sql_dic=./data1.json --db_name=sc1

Read the entire scaffold message from a file

from data import *
from rdkit import Chem
from rdkit.Chem import Draw
from rdkit.Chem.Draw import IPythonConsole

dic_scaffold = DicIdxLs()
with open('data/datasets/idx_ls.bin', 'rb') as f:
    dic_scaffold.ParseFromString(f.read())
dic_idx_sm = DicIdxSm()
with open('data/datasets/idx_sm.bin', 'rb') as f:
    dic_idx_sm.ParseFromString(f.read())

print(len(dic_scaffold.smiles_scaffold))
402344

Get the 1990th scaffold

print(dic_idx_sm.sm_sc[1990])
Chem.MolFromSmiles(dic_idx_sm.sm_sc[1990])
c1n[nH]nc1-c1nnc(-c2cnns2)o1

avatar

dic_scaffold.smiles_scaffold[1990]
dic_mol_atoms {
  idx_mol: 111921
  ls_atom {
    idx_atom: 1
    idx_atom: 2
    idx_atom: 3
    idx_atom: 10
    idx_atom: 11
    idx_atom: 12
    idx_atom: 13
    idx_atom: 14
    idx_atom: 15
    idx_atom: 16
    idx_atom: 17
    idx_atom: 18
    idx_atom: 19
    idx_atom: 20
    idx_atom: 22
  }
  ls_nh {
    idx_atom: 3
  }
  ls_np {
  }
}

The 111,921th molecule containing the 1990th scaffold

Chem.MolFromSmiles(smiles_from_line(111921))

avatar

Get the scaffold network of The 111,921th molecule

scaffold_list = get_mol_graph(smiles_from_line(111921)).ls_mol_from_sng_u()
Draw.MolsToGridImage(scaffold_list)

avatar

scaffold_network_generator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.