Graylab / IgFold

Fast, accurate antibody structure prediction from deep learning on massive set of natural antibodies
Other
319 stars 60 forks source link

AttributeError: module 'torch.linalg' has no attribute 'solve' #28

Closed kimdn closed 1 year ago

kimdn commented 1 year ago

At my python3.7 local conda environment, I did

git clone https://github.com/Graylab/IgFold.git
cd IgFold

pip install -r requirements.txt 
# yes, https://github.com/Graylab/IgFold/blob/main/requirements.txt

pip install IgFold
conda install -c conda-forge openmm pdbfixer

However, I can't run even simple.py (e.g.

from igfold import IgFoldRunner

sequences = {
    "H": "QVQLQESGGGLVQAGGSLTLSCAVSGLTFSNYAMGWFRQAPGKEREFVAAITWDGGNTYYTDSVKGRFTISRDNAKNTVFLQMNSLKPEDTAVYYCAAKLLGSSRYELALAGYDYWGQGTQVTVS"
}
pred_pdb = "my_nanobody.pdb"

igfold = IgFoldRunner()
igfold.fold(
    pred_pdb, # Output PDB file
    sequences=sequences, # Nanobody sequence
    do_refine=False, # Refine the antibody structure with PyRosetta
    do_renum=True, # Renumber predicted antibody structure (Chothia)
    use_abnum=True,
)

in readme)

as

Screen Shot 2023-02-26 at 1 43 27 AM

What pytorch version do you use? Mine is 1.7.1 (which is expected since requirement specifies torch==1.7.1).

kimdn commented 1 year ago

ChatGPT thinks that pytorch 1.8 is needed.

Screen Shot 2023-02-26 at 1 49 47 AM
kimdn commented 1 year ago

Indeed, chatgpt is right.

Upgrading pytorch into 1.8.1+cu102

solves this error.

I didn't know how to solve this after googling "AttributeError: module 'torch.linalg' has no attribute 'solve'"