Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on running prepare_flexreceptor.py for flexible docking #316

Closed
eunos-1128 opened this issue Jun 4, 2024 · 8 comments
Closed

Error on running prepare_flexreceptor.py for flexible docking #316

eunos-1128 opened this issue Jun 4, 2024 · 8 comments

Comments

@eunos-1128
Copy link
Contributor

eunos-1128 commented Jun 4, 2024

Hi,

I tried to prepare *_rigid.pdbqt and *_flex.pdbqt files for flexible docking with vina, and then noticed that errors occur when some input PDBQT files are used with the command below.

subprocess.run([
    'pythonsh',
    'AutoDock-Vina/example/autodock_scripts/prepare_flexreceptor.py',
    '-r',
    receptor_pdbqt,
    '-s',
    '_'.join(flex_residues),
    '-v'
])
'Traceback (most recent call last):\n  File "/home/uenom/data_ueno/dockings/vina/AutoDock-Vina/example/autodock_scripts/prepare_flexreceptor.py", line 220, in <module>\n    non_rotatable_bonds=all_bnds, mode = mode)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2683, in __init__\n    self.write_flex(flex_residues, flexres_filename)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2767, in write_flex\n    self.writeResidue(item, outfileptr)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2850, in writeResidue\n    self.process(at, at2, outfileptr)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2865, in process\n    self.process(fromAtom, nextAtom, outfileptr)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2860, in process\n    queue = self.writeBreadthFirst(outfileptr, fromAtom, nextAtom)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2970, in writeBreadthFirst\n    newQ = self.writeLevel(at2, outfptr)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2916, in writeLevel\n    nq = self.writeLevel(a2, outfptr)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2916, in writeLevel\n    nq = self.writeLevel(a2, outfptr)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2916, in writeLevel\n    nq = self.writeLevel(a2, outfptr)\n  File "/misc/home/uenom/ADFRsuite-1.1dev/ADFRsuite_x86_64Linux_1.1dev/ADFRsuite-1.1dev/CCSBpckgs/AutoDockTools/MoleculePreparation.py", line 2892, in writeLevel\n    if b.activeTors: \nAttributeError: Bond instance has no attribute \'activeTors\'\n'

Assuming that most input PDBQT files don't have errors, but some do, are there flaws in PDBQT files giving this error?

@eunos-1128 eunos-1128 changed the title Some receptor PDBQT files give error when executing prepare_flexreceptor.py for flexible docking Some receptor PDBQT files give error when running prepare_flexreceptor.py for flexible docking Jun 4, 2024
@eunos-1128 eunos-1128 changed the title Some receptor PDBQT files give error when running prepare_flexreceptor.py for flexible docking Specific error on running prepare_flexreceptor.py for flexible docking Jun 4, 2024
@eunos-1128 eunos-1128 changed the title Specific error on running prepare_flexreceptor.py for flexible docking Error on running prepare_flexreceptor.py for flexible docking Jun 4, 2024
@rwxayheee
Copy link
Collaborator

Hi @eunos-1128
Do you think that might have something to do with selection of flexible residues (some residues can't be made flexible under AutoDock's flexibility model)? Can you share an example of the input files? We can look at the input files and will let you know if we're able to reproduce this

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jun 5, 2024

@rwxayheee

Thanks a lot.

The attached PDBQT file is receptor's one the script produce no rigid/flex PDBQT file due to the error.

PDBQT.txt

@eunos-1128
Copy link
Contributor Author

@rwxayheee
and some other files produce flex PDBQT files but not rigid PDBQT ones due to the same error.

Do you have any ideas about that?

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jun 5, 2024

@rwxayheee
Sorry for continuous posts

AutoDock's flexibility model

I want to know about flexibility model used in AutoDock Vina. Could you tell me the paper describing that mechanism?(I didn't find out that myself)

Hi @eunos-1128 Do you think that might have something to do with selection of flexible residues (some residues can't be made flexible under AutoDock's flexibility model)? Can you share an example of the input files? We can look at the input files and will let you know if we're able to reproduce this

@rwxayheee
Copy link
Collaborator

Hi @eunos-1128 !
I looked at the PDBQT.txt you shared. Quick question: Based on the sequence, is it human dopamine D3 receptor (but unfolded)? How does it compare to a conventional, folded structure, PDB 3PBL, for example? I visualized it and found a gap (long bond) in the backbone between ASP246 and PRO247. It might be helpful to double check the integrity of your starting structure, unless you were trying to perform docking on the unfolded structure

and some other files produce flex PDBQT files but not rigid PDBQT ones due to the same error.
Could you share your command so we can reproduce it?

I want to know about flexibility model used in AutoDock Vina.
In AutoDock Vina, as you might have already noticed, the flexibility model of flex residues is the same as applied to ligands. The sidechain atoms (CB and further from the backbone) are the only mobile portion of the residues. Some residues, however, cannot be made flexible. If I remember correctly these include Pro, Gly and Ala. Alanine's sidechain is like a methyl group (-CH3) in any other ligands which under AutoDock's atom typing will be merged into an aliphatic C, and it doesn't have a torsional degree of freedom.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jun 6, 2024

@rwxayheee

I looked at the PDBQT.txt you shared. Quick question: Based on the sequence, is it human dopamine D3 receptor (but unfolded)? How does it compare to a conventional, folded structure, PDB 3PBL, for example? I visualized it and found a gap (long bond) in the backbone between ASP246 and PRO247. It might be helpful to double check the integrity of your starting structure, unless you were trying to perform docking on the unfolded structure

Thanks. As you notice they are the dopamine D3 receptor predicted by alphafold2 with custom settings.

I didn't check the structure using graphical tool. As you say I found it unfolded and so it might not needed for my study.

Could you share your command so we can reproduce it?

Commands are same to the initial one.

Below are those files.
no-rigid_pdbqt1.txt
no-rigid_pdbqt2.txt

The files are generated by alphafold2 and as one I uploaded before, they are also partially unfolded, which could lead to the error. I'm not sure why rigid files couldn't be generated while flex ones could,though.

In AutoDock Vina, as you might have already noticed, the flexibility model of flex residues is the same as applied to ligands. The sidechain atoms (CB and further from the backbone) are the only mobile portion of the residues. Some residues, however, cannot be made flexible. If I remember correctly these include Pro, Gly and Ala. Alanine's sidechain is like a methyl group (-CH3) in any other ligands which under AutoDock's atom typing will be merged into an aliphatic C, and it doesn't have a torsional degree of freedom.

Thank you! I understand.

@rwxayheee
Copy link
Collaborator

I'm not sure why rigid files couldn't be generated while flex ones could,though.

I'm not sure, either :< But please let us know if you are still experiencing the same problem with a visually-ok structure of the protein!

@eunos-1128
Copy link
Contributor Author

I'm not sure why rigid files couldn't be generated while flex ones could,though.

I'm not sure, either :< But please let us know if you are still experiencing the same problem with a visually-ok structure of the protein!

OK, Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants