Giter VIP home page Giter VIP logo

synspace's Introduction

synspace

This is early-stage code that is in progress. It is in flux

This package generates a local chemical space around a given molecule using retro and forward synthesis rules. The reactions used are the 50 robust medchem reactions proposed by Hartenfeller et al.. The retrosynthesis is done either via PostEra Mannifold if you have an API key, or by reversing the 50 robust reactions. The purchasable building blocks come from the Purchasable Mcule supplier building block catalogs. All of these things can be customized though.

chemical space showing a molecule space that is predicted not to cross the blood brain barrier along with three synthetically feasible modifications

Installation

pip install synspace

Usage

Generate local chemical space given a SMILES string

mols, props = synspace.chemical_space('CCC=O')

props contains information like the synthesis route for the molecules. Note that all synthesis routes are relative to the given molecule (it is assumed to be synthetically feasible).

Citation

TODO

Also, this idea is similar to Dolfus et al.

NOTICE

This product includes software developed by Pat Walters (MIT Licensed) https://github.com/PatWalters/useful_rdkit_utils Copyright (c) 2022 Pat Walters

synspace's People

Contributors

whitead avatar pschwllr avatar

Stargazers

Ron Cvek avatar Matthew Hoctor avatar  avatar Adrian Mirza avatar  avatar jimmycliff obonyo avatar Markus Rauhalahti avatar Warren Thompson avatar He Huang avatar David Huang avatar Lin Min Htoo avatar  avatar Wenhao Gao avatar pan xiaolin avatar Al avatar Gabe Gomes avatar  avatar Letícia Maria Pequeno Madureira avatar Harry Stern avatar  avatar Ifra Saifi avatar  avatar  avatar  avatar Boris Piakillia avatar Alan Kai avatar Sandip Giri avatar  avatar Alia Abbas avatar Théophile Gaudin avatar Rubén Laplaza avatar Sterling G. Baird avatar mortlock_19 avatar  avatar Kevin M Jablonka avatar

Watchers

 avatar  avatar  avatar

synspace's Issues

Retro step always performed.

Is it intended that one retrosynthesis step is always performed?

I would remove the following line

mols, props = retro(mol, rxns=rxns, strict=False if strict is None else strict)

and use

    mols, props = [], [] # has to be defined, otherwise forward will fail
    if use_mannifold:
        if _pbar:
            _pbar.set_description("⚗️Synspace Retrosynthesis (Mannifold)⚗️")
        mols, props = mannifold_retro(mol)
    else:
        if _pbar and steps[0] > 0:
            _pbar.set_description("⚗️Synspace Retrosynthesis...⚗️")
        # mols, props = retro(mol, rxns=rxns, strict=False if strict is None else strict) # remove this 
        for _ in range(steps[0]): # change 
            to_add = []
            for m, p in zip(mols, props):
                ms, ps = retro(
                    m,
                    rxns=rxns,
                    strict=False if strict is None else strict,
                    start_props=p,
                )
                to_add.append((ms, ps))
            for m, p in to_add:
                mols.extend(m)
                props.extend(p)
                if _pbar:
                    _pbar.update(len(mols))
            mols, props = remove_dups(mols, props)

so that if the steps are (0,1) it only performs a forward step.

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.