Code Monkey home page Code Monkey logo

Comments (3)

dingquanyu avatar dingquanyu commented on June 30, 2024 1

Unfortunately, this problem roots in AlphaFold's module.py, as shown here: https://github.com/google-deepmind/alphafold/blob/632ef575c64eff9eb5ed96c8c7b055bf675421ac/alphafold/model/modules.py#L331

In the case of monomer modelling, Deepmind never exposed num_recycles to the users thus num_recycles is always hard-coded as 3 in the configuration. The batch size is 4 in the above snipped, hard-coded as well by Deepmind. Thus, when num_recycles is smaller or equals to 3, this line of num_ensemble = batch_size // (self.config.num_recycle + 1) assigns num_ensemble to 1. However, if num_recyle is greater than 3, then num_ensemble = batch_size // (self.config.num_recycle + 1) will make num_ensemble 0. num_ensemble=0 will mess up the downstream data processing like here:
https://github.com/google-deepmind/alphafold/blob/632ef575c64eff9eb5ed96c8c7b055bf675421ac/alphafold/model/modules.py#L336
and here https://github.com/google-deepmind/alphafold/blob/632ef575c64eff9eb5ed96c8c7b055bf675421ac/alphafold/model/modules.py#L166

Multimer modelling works for whichever number of recyles cuz in multimer_module.py, this step is completely got rid off.
I think the solution now is that we should add an extra check in AlphaPulldown so that if it models a monomer structure, we set the upper limit of num_recyles.

from alphapulldown.

jkosinski avatar jkosinski commented on June 30, 2024

Crazy! I think ColabFold might have fixed that by editing this line:
https://github.com/sokrypton/alphafold/blob/7c09316f71893e532bc15528cce4c1d3cb705f8f/alphafold/model/modules.py#L421
Do I understand that correct? Maybe we could do the same? Allowing for more recycles for monomers is a useful feature, esp. if they are big.

from alphapulldown.

dingquanyu avatar dingquanyu commented on June 30, 2024

Crazy! I think ColabFold might have fixed that by editing this line: https://github.com/sokrypton/alphafold/blob/7c09316f71893e532bc15528cce4c1d3cb705f8f/alphafold/model/modules.py#L421 Do I understand that correct? Maybe we could do the same? Allowing for more recycles for monomers is a useful feature, esp. if they are big.

Thanks Jan you're right ColabFold guys got rid of this limit in these lines. We can do the same but it has to be done on our AlphaFold"s fork instead of AlphaPulldown.

from alphapulldown.

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.