ccsb-scripps / AutoDock-Vina

AutoDock Vina
http://vina.scripps.edu
Apache License 2.0
611 stars 211 forks source link

"IndexError: list index out of range" for flexible docking with beta-cyclodextrin #183

Open darekb94 opened 1 year ago

darekb94 commented 1 year ago

I prepared a PDB file with a structure of beta-cyclodextrin (BCD.pdb), based on crystallographic data. Beta-cyclodextrin is a cyclic macromolecule, consisting of seven linked glucose residues. I would like to dock a drug molecule inside its cavity. However, the configuration of a cyclodextrin (receptor) may change a bit depending on the dcoked ligand, therefore I tried to calculate how the structures of the complexes would change when the flexibility of the molecule is allowed. Therefore I invoked:

  prepare_receptor -r BCD.pdb -o BCD.pdbqt
  pythonsh ~/AutoDock-Vina/example/autodock_scripts/prepare_flexreceptor.py -r BCD.pdbqt -s GLC1

The first command resulted in a correct creation of a file (BCD.pdbqt), but the second returned an error:

Traceback (most recent call last): File "/home/dboczar/AutoDock-Vina/example/autodock_scripts/prepare_flexreceptor.py", line 220, in non_rotatable_bonds=all_bnds, mode = mode) File "/home/dboczar/ADFRsuite-1.0/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2674, in init flex_residues = self.flex_residues = self.process_residues(residues) File "/home/dboczar/ADFRsuite-1.0/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 3080, in process_residues ntors = self.setAutoFlexFields(res) File "/home/dboczar/ADFRsuite-1.0/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 3134, in setAutoFlexFields res.root = ca_atom[0] File "/home/dboczar/ADFRsuite-1.0/lib/python2.7/UserList.py", line 31, in getitem def getitem(self, i): return self.data[i] IndexError: list index out of range

What is the reason of this error and what can I do to solve the problem? I attach two files mentioned above.

BCD.zip

diogomart commented 1 year ago

See #204 for how to handle flexible sidechains on a rigid cyclodextrin core.

Also, it should be possible to use meeko to prepare the cyclodextrin as a flexible ligand, which will include macrocycle flexibility, and dock both the cyclodextrin and the actual ligand as individual ligands to an empty receptor. If vina rejects the empty receptor, a workaround is to place the search space more than 8 Angstroms aways from any receptor atom.