Giter VIP home page Giter VIP logo

Comments (3)

cvignac avatar cvignac commented on September 28, 2024 1

Hello Talal,

The code is based on an old version of the files, but in sample_zs_given_zt we add something like this:

        if self.cfg.scaffold_extension.use:
            # scaffold extension mask operation
            graph_scaffold = self.graph_from_scaffold(scaffold_smile='C1C=CNC2=CC=CC=C21')
            dense_data_scaffold, node_mask_scaffold = utils.to_dense(graph_scaffold.x, graph_scaffold.edge_index,
                                                                     graph_scaffold.edge_attr, graph_scaffold.batch)
            X_scaffold, E_scaffold = dense_data_scaffold.X, dense_data_scaffold.E
            n_nodes_scaffold = X_scaffold.shape[1]

            sampled_s.X[:, :n_nodes_scaffold] = X_scaffold.argmax(-1)
            sampled_s.E[:, :n_nodes_scaffold, :n_nodes_scaffold] = E_scaffold.argmax(-1)

It would probably work better if we preserved the motif during diffusion in training, as was done in https://arxiv.org/abs/2210.05274 for 3D point clouds. As you can see in the figures, the results of our method are not great. We wanted to showcase that substructure conditioning is possible, but we didn't spend much time on it.

Another option that does not involve retraining is to adapt the proposition of RePaint to graphs:
https://arxiv.org/abs/2201.09865 and http://arxiv.org/abs/2302.01217

Best,
Clement

from digress.

twidatalla avatar twidatalla commented on September 28, 2024

Hi Clement,

Thank you for the response, I didn't realize the substructure conditioning wasn't one of you focuses, so thank you for referencing the other projects.

Looking at the script I can understand how your approach works so thank you for that as well. I can see why other approaches may be better. I recommend doing more work on this task if it suits your interests in the future however because it's quite relevant for drug design and a needed tool, a lot of the time there is an idea of the interactions/motifs desired with a target and we want to generate compounds from that, or we have a compound already and want to generate different components.

Excellent Paper!
Talal

from digress.

xinyangATK avatar xinyangATK commented on September 28, 2024

Hello Talal,

The code is based on an old version of the files, but in sample_zs_given_zt we add something like this:

        if self.cfg.scaffold_extension.use:
            # scaffold extension mask operation
            graph_scaffold = self.graph_from_scaffold(scaffold_smile='C1C=CNC2=CC=CC=C21')
            dense_data_scaffold, node_mask_scaffold = utils.to_dense(graph_scaffold.x, graph_scaffold.edge_index,
                                                                     graph_scaffold.edge_attr, graph_scaffold.batch)
            X_scaffold, E_scaffold = dense_data_scaffold.X, dense_data_scaffold.E
            n_nodes_scaffold = X_scaffold.shape[1]

            sampled_s.X[:, :n_nodes_scaffold] = X_scaffold.argmax(-1)
            sampled_s.E[:, :n_nodes_scaffold, :n_nodes_scaffold] = E_scaffold.argmax(-1)

It would probably work better if we preserved the motif during diffusion in training, as was done in https://arxiv.org/abs/2210.05274 for 3D point clouds. As you can see in the figures, the results of our method are not great. We wanted to showcase that substructure conditioning is possible, but we didn't spend much time on it.

Another option that does not involve retraining is to adapt the proposition of RePaint to graphs: https://arxiv.org/abs/2201.09865 and http://arxiv.org/abs/2302.01217

Best, Clement

Hi Clement,

Recently I am working in drug discovery, especially small molecule generation. I found the 'substructure conditioned generation' in Appendix E. Thank you for giving such script to show this function, but it still has a little difficulty in reproducing this function with DiGress, especially self.graph_from_scaffold. Could you share detailed instruction or code, that will really help me.

Thanks!
Xinyang

from digress.

Related Issues (20)

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.