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

vectorize so3, so that I don't have to wait for 20 minutes #218

Closed
wants to merge 1 commit into from

Conversation

tornikeo
Copy link

Importing utils/so3.py takes absolutely forever. Yes, it's a one-time call, but I don't want to suffer it when I move this every time I use this code on a fresh remote VM. So I vectorized the heaviest calculations

I tested this locally, but I don't see a tests/ directory to check this PR automatically.

Also, are you guys open to me adding a few automated tests for this repo? The recent BELKA challenge on kaggle will likely generate a lot of PRs and issues, and having test suite will make approving and checking good changes lot easier.

@jsilter
Copy link
Collaborator

jsilter commented Apr 26, 2024

Have you done a runtime comparison that you could share?

I'm definitely open to reviewing automated tests if you'd like to add some.

jsilter added a commit that referenced this pull request Apr 30, 2024
* Ensure we calculate rotatable bonds on the version of the ligand with no hydrogens. Also fix spelling of rotable -> rotatable. Closes GH-220 (@Nobody-Zhang)

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

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

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

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

* Add a little more info on docker container to README.md
@jsilter
Copy link
Collaborator

jsilter commented Apr 30, 2024

Included in v1.1.2

@jsilter jsilter closed this Apr 30, 2024
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