cif2pdb is broken in example
Closed this issue · 1 comments
danpf commented
Hello,
When I run the example with newest blast+ (2.15.0) I get a template (not sure which one) which causes the error:
/opt/DiffModeler/Predict_Result/map/single_chain_pdb/A-B-C-D existed
File "/opt/DiffModeler/ops/fasta_searchdb.py", line 147, in fasta_searchdb
remain waiting assign chain number 51
/opt/DiffModeler/Predict_Result/map/single_chain_pdb/A-B-C-D existed
remain waiting assign chain number 51
actual_structure_length = count_residues(final_pdb_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/DiffModeler/ops/pdb_utils.py", line 408, in count_residues
y=float(line[38:46])
^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: '7 37.93'
This is because https://www.ebi.ac.uk/pdbe-srv/pdbechem/atom/show?cid=MLE&name=HD11 is part of the structure. It has an atom name that is 4 letters and the cif2pdb function only considers atom names with <=3 characters.
after looking at the code for ~10 seconds i'd guess the solution should be '%-3s' -> '%-4s' during writing - but better that someone that knows what's going on makes that call.
wang3702 commented
Thank you so much for finding this bug. I have fixed it and pushed it to the github/server. Please let me know if you still encounter problems