RFDesign icon indicating copy to clipboard operation
RFDesign copied to clipboard

index out of range

Open yx0516 opened this issue 3 years ago • 2 comments

Hi developers,

when i use this command: python /home/yanx/Dev/repos/RFDesign/inpainting/inpaint.py --task hal --checkpoint v02 --pdb=/home/yanx/Dev/workdir/XX/RFDesignRes/XX-chainD.pdb --out=/home/yanx/Dev/workdir/XX/RFDesignRes --window D,15,20:D,84,95 --num_designs 1 --inf_method=multi_shot --n_iters 10 --recycle_str_mode both --clamp_1d 0.1 --dump_all

i got the following problem:

Generating design 0 (1 total)... Traceback (most recent call last): File "/home/yanx/Dev/repos/RFDesign/inpainting/inpaint.py", line 837, in main() File "/home/yanx/Dev/repos/RFDesign/inpainting/inpaint.py", line 505, in main sm, mappings, mask_str, mask_seq = pred_util.get_mask(args, parsed_pdb) File "/home/yanx/Dev/repos/RFDesign/inpainting/pred_util.py", line 123, in get_mask mask_str = sm.inpaint File "/home/yanx/Dev/repos/RFDesign/inpainting/dj_util.py", line 207, in inpaint m_gap = np.isnan(self.ref_pdb_res) File "/home/yanx/Dev/repos/RFDesign/inpainting/dj_util.py", line 120, in ref_pdb_res ch, res = zip(*self.ref_pdb_idx) File "/home/yanx/Dev/repos/RFDesign/inpainting/dj_util.py", line 111, in ref_pdb_idx return self.expand(self.mask_str) File "/home/yanx/Dev/repos/RFDesign/inpainting/dj_util.py", line 365, in expand ch, s, e = SampledMask.parse_element(l) File "/home/yanx/Dev/repos/RFDesign/inpainting/dj_util.py", line 294, in parse_element if contig[0].isalpha(): IndexError: string index out of range

yx0516 avatar Feb 09 '22 08:02 yx0516

I found that just change the chain ID: D to A in the command , "--window A,15,20:A,84,95" and rename the chain ID in PDB file: XX-chainD.pdb from D to A, the original chain ID of this PDB is D

the above problem will be fixed.

If there is any bug in the propose of option "--window" about the chain ID ?

yx0516 avatar Feb 10 '22 02:02 yx0516

we've made major changes to the inpainting script with a recent update. give the new version a try (there is no longer a window mode, only contig) and see if it works for you

jueseph avatar Jun 21 '22 04:06 jueseph