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

Fix range error due to inconsistent rotable_bonds. #220

Closed
wants to merge 1 commit into from
Closed

Fix range error due to inconsistent rotable_bonds. #220

wants to merge 1 commit into from

Conversation

Nobody-Zhang
Copy link

@Nobody-Zhang Nobody-Zhang commented Apr 29, 2024

from datasets.pdbbind import PDBBind
dataset = PDBBind(root='data/samples', split_path='data/samples/samples_test', keep_original=True, require_ligand=True)

When using PDBBind Datasets, it could cause some problems just like:

image

Skipping 4qw4 ligand because of the error:
Range Error
	lAtomId
	Violation occurred on line 618 in file Code/GraphMol/MolTransforms/MolTransforms.cpp
	Failed Expression: 79 < 52
	RDKIT: 2022.09.5
	BOOST: 1_78

After checking process_mols.py, it is probably due to the inconsistency between mol_maybe_noh and mol_rdkit/mol.

For example, it is probable that mol removes more Hs than mol_maybe_noh due to 'AllChem.RemoveAllHs' function.

If still using rotable_bonds generated by mol_maybe_noh, there could be some bounds that do not included in mol.

And that's the reason why optimize_rotatable_bonds function could cause the error above.

By changing rotable_bounds, the error is fixed.

image

@Nobody-Zhang
Copy link
Author

Nobody-Zhang commented Apr 29, 2024

@gcorso @amorehead @jsilter @duerrsimon

@jsilter jsilter closed this in 561f70a Apr 30, 2024
@jsilter
Copy link
Collaborator

jsilter commented Apr 30, 2024

I patched this in a different way but the bug should be fixed in v1.1.2

donbyron02 added a commit to Conifer-Point/DiffDock that referenced this pull request Oct 15, 2024
* first commit v1.1

* Add Dockerfile for creating container.
Also add web app code for simple gradio app.
Refine requirements.txt/environment.yml.
Automatically download models if not present.

* Minor bugfix in Dockerfile (old paths)

* Add examples

* Rename default_inference_args.yaml to inference_args.yaml

* Rename inference_args.yaml to default_inference_args.yaml

* Update README.md

* Break from download loop once the model has been downloaded.

* Fix conda install instructions in README.

Closes #gcorsoGH-185

* Update README.md

* Add example CSV file

Meant to rename it earlier, accidentally just removed it.

* Improved logging

* Change many print statements to logging statements, for better control
* Save log file to web app zip file for easier debugging

* Improve memory efficiency of graph convolution operation.

* Various bugfixes

* Ensure we calculate rotatable bonds on the version of the ligand with no hydrogens. Also fix spelling of rotable -> rotatable. Closes gcorsoGH-220 (@Nobody-Zhang)

* Vectorize SO3 calculations. Closes PR gcorsoGH-218 (@tornikeo)

* Pin pytorch-lightning version. Closes gcorsoGH-193 (@mikael-h-christensen)

* Guard against divide by zero in torus.py. Closes gcorsoGH-161 (@amorehead)

* Update e3nn version to 0.5.1. Closes gcorsoGH-155 (@amorehead)

* Add a little more info on docker container to README.md

* fix a typo

* Set any nans/infs in model scores to a small value.

    With some low (but non-trivial) frequency, processing through the convolutional layers diverge and node attributes become a mixture of nan and inf (which seem to all turn to nan). This later throws an exception during the Kabsch transform, which ruins results for the whole complex. Setting these to 0 basically skips an iteration, at worst it ruins one of the sampled complexes, but leaves the others. Note this is only applied to the main model, *not* the confidence model.

* Pin setuptools version

* Add __init__ files to all python modules. There were import failures in some cases, when project not in root directory without own virtual env

* fix issue with different sequences and order

* changing zero to nan to allow filtering of nan in new_extract_receptor_structure

* fix docker build command in README.md

* update README with GPU instructions

* Fix environment.yml

Install prody with conda and not pip.

* Update README.md

* Fix typo

* Forgot something

* Update cp_diffdock_api for new diffdock module

* Workaround logging bug

* Use latest diffdock dependencies

* Force python3.10 for venv

* Don't need cp_inference_module anymore

* Upgrade pip when installing packages

---------

Co-authored-by: Gabriele Corso <gabri.corso@gmail.com>
Co-authored-by: Jacob Silterra <silterra@mit.edu>
Co-authored-by: Jacob Silterra <603941+jsilter@users.noreply.github.com>
Co-authored-by: Alex Morehead <alex.morehead@gmail.com>
Co-authored-by: Satish Gaurav <36672530+satishgaurav@users.noreply.github.com>
Co-authored-by: Alexander Schepetilnikov <shchepetilnikov@tochka.com>
Co-authored-by: Bjorn Mattsson <bamattsson@gmail.com>
Co-authored-by: Julio César <jc@juliocesar.io>
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

Successfully merging this pull request may close these issues.

2 participants