(base) ubun@ubun-System-Product-Name:~/relax/test$ python $ROSETTA/main/source/src/apps/public/relax_w_allatom_cst/clean_pdb_keep_ligand.py 01-MD-086DS.pdb -ignorechain
Traceback (most recent call last):
File "/home/ubun/rosetta/main/source/src/apps/public/relax_w_allatom_cst/clean_pdb_keep_ligand.py", line 135, in <module>
if (chainid == line or ignorechain):
IndexError: string index out of range
The 01-MD-086DS.pdb file contains a substrate and a cofactor.
The issue is that the script is expecting files with whitespace padding out to 80 columns (like the wwPDB provides). In your file, the CONECT records aren't whitespace padded. Luckily, Rosetta won't use the CONECT lines, so you can just manually delete them.
That said, Rosetta has gotten better at reading PDBs, and the PDB you procided is basically "clean" as it is. Honestly, I'd probably just recommend skipping the clean PDB step, and using your PDB as-is with Rosetta. (I believe that Rosetta should be able to handle the non-whitespace padded CONECT lines.)