Graylab / IgFold

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

When I used IgFold, I got this error:Bio.PDB.PDBExceptions.PDBConstructionException: Invalid or missing coordinate(s) at line 1. #42

Closed YANG-LQ closed 1 year ago

YANG-LQ commented 1 year ago

I use IgFold to predict the VH structure of antibodies, and here is my code:

import pandas as pd  
from igfold import IgFoldRunner  
from Bio.PDB.PDBExceptions import PDBConstructionException  

def get_igfold_structure(inputpath):  
    data = pd.read_csv(inputpath,header=None,index_col=0)  
    sequences = list(data.iloc[:,0])  
    igfold = IgFoldRunner()  
    i = 1  
    for seq,i in zip(sequences,range(1,len(sequences))):  
        seq = {str(i):seq}  
        outputpath = "feature/igfold_structure/trastuzumab_VH/VH_igfold_" + str(i) + ".pdb"  
        igfold.fold(  
            outputpath,  # Output PDB file  
            sequences=seq,  # Nanobody sequence  
            do_refine=False,  # Refine the antibody structure with PyRosetta  
            use_openmm=True,  # Use OpenMM for refinement  
            do_renum=False,  # Renumber predicted antibody structure (Chothia)  
            )  
        i = i+1  

inputpath = "data/trastuzumab_VH/seqs2.csv"  
get_igfold_structure(inputpath)

I want to use the for loop to generate multiple VH PDB files at once, but when the loop reaches the 10th time, an error is reported: Bio. PDB. PDBExceptions. PDBConstructionException: Invalid or missing coordinate (s) at line 1. And the PDB file generated for the 10th time does not have "TER" or the last column of atomic symbols compared to the previous PDB file. As shown in the following figure: Pasted image 20230425163134 Pasted image 20230425163348

jeffreyruffolo commented 1 year ago

Hello, sorry for the delay but this should be fixed now with an update to the PDB writing functionality.