sokrypton / ColabFold

Making Protein folding accessible to all!
MIT License
1.96k stars 493 forks source link

How to use ColabFold to predict the 3D structure of a protein dimer linked by a disulfide bridge? #517

Open agroppi opened 12 months ago

agroppi commented 12 months ago

Hi,

I am attempting to utilize ColabFold to predict the 3D structure of a protein dimer connected by a disulfide bridge.

I understand that AlphaFold can accomplish this using the following command line:

alphafold_run(
    fasta_file="protein_dimer.fasta",
    disulfide_bond_connectivity="C100-C200",
    homology_models=["protein_dimer_homology_model.pdb"],
    experimental_data=["protein_dimer_cryo_em.mrc"],
    temperature=0.5,
    num_iterations=100
)

However, I lack the necessary resources to execute AlphaFold on our GPU cluster.

Fortunately, I have learned that ColabFold is capable of performing this type of analysis.

Unfortunately, I have been unable to determine how to input the parameters required for such an analysis.

I would greatly appreciate your assistance and guidance.

Thank you for your time and consideration.

Best,

Alexis

agroppi commented 12 months ago

What I have tried so far :

!pip install colabfold

But when I try to run the prediction, :

from colabfold.alphafold import predict

with open('protein_dimer.fasta', 'r') as f:
    protein_seq = f.read()

disulfide_bonds = ['C100-C200']
    prediction = predict(
    sequence=protein_seq,
    disulfide_bonds=disulfide_bonds,
    num_iterations=100,  
)

I have the following error :

ImportError                               Traceback (most recent call last)
<ipython-input-2-73555320e8e7> in <cell line: 1>()
----> 1 from colabfold.alphafold import predict
      2 
      3 # Load the protein sequence
      4 with open('protein_dimer.fasta', 'r') as f:
      5     protein_seq = f.read()

ImportError: cannot import name 'predict' from 'colabfold.alphafold' (/usr/local/lib/python3.10/dist-packages/colabfold/alphafold/__init__.py)

What is going wrong ?

Thanks

boyinthebigcity commented 8 months ago

The ImportError means the 'predict' command can't be located in colabfold.alphafold. It might be something like alphafold_predict() or run()? I haven't a clue to be honest. You might be able to check by importing the whole module and running 'colabfold.alphafold?' to show all the commands available in the package.

Is there a reference that specified ColabFold supports setting disulfide bond connectivity? I'm trying to do something similar (though with a disulfide bridged monomer) so would be helpful!

agroppi commented 8 months ago

hi @boyinthebigcity Still haven't found the way to do this :/

nannemdp commented 7 months ago

Maybe you are looking for the predict function from colabdesign.af.contrib, maybe? See the gamma branch... https://github.com/sokrypton/ColabDesign/blob/efd52f071d851b14fa0401052e0b3c801255bd0f/colabdesign/af/contrib/predict.py