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

Allow feeding of hyperparameters through argparse #5

Open
aksub99 opened this issue Apr 5, 2020 · 9 comments
Open

Allow feeding of hyperparameters through argparse #5

aksub99 opened this issue Apr 5, 2020 · 9 comments
Labels
good first issue Good for newcomers priority:high This issue has a high priority

Comments

@aksub99
Copy link
Owner

aksub99 commented Apr 5, 2020

As of now, users do not have the freedom to pass hyperparameters during the run.

@aksub99 aksub99 added good first issue Good for newcomers priority:high This issue has a high priority labels Apr 5, 2020
@EXJUSTICE
Copy link

still doing some pytorch revision, ill take a look as soon as im done :)

@aksub99
Copy link
Owner Author

aksub99 commented Apr 9, 2020

Sure. No hurry!

@EXJUSTICE
Copy link

Quick question. I've noticed that you're example notebook goes through a molecular optimization, but does not return an output fingerprint example for inspection. Would we call get_fingerprint at the very end? Might be good to add in the starting molecule and ending molecule in the notebook, would convince folks that this adaptation is good.

(Apologies for the delay btw, I'm working on the RL nanodegree - I want to be 100% familiar with pytorch in RL before I get cracking on this.)

@aksub99
Copy link
Owner Author

aksub99 commented Apr 20, 2020

That's a good idea! Maybe we could give the user the freedom to decide the interval after which the molecule is displayed (as an argparse parameter)? We could then modify the example notebook to use this interval parameter. Let me know if you have other ideas on the way this functionality could be added.

Currently, all hyperparameter values are fixed in the hyp.py file and the optimization proceeds for 5000 episodes by default. Our first priority should be to allow users some flexibility on these decisions (through argparse).

Since you're working on RL, I thought you might also be interested in issues #4 and #7 since they require some RL background to implement.

@EXJUSTICE
Copy link

EXJUSTICE commented Apr 20, 2020 via email

@aksub99
Copy link
Owner Author

aksub99 commented Apr 20, 2020

Yeah, I've based this on the Google repository. I've started out with only the single property optimization functionality (QED only as of now). The original implementation supports single property optimization for logP as well and also implements multi-objective optimization (#7) .
If we look at the actual architecture, the original Google repo also implements bootstrap heads (#4).
You're right, it would be a good idea to mention these as a TODO in the README. I'll get that done asap!

No issues dude, take your time!

We can connect on gitter if that's ok?

@bengeof
Copy link

bengeof commented Jan 22, 2021

I specify the molecule to optimize in the start molecule section of hyperparameter file. Where can I obtain the SMILES of the molecule at the end of each optimization step and the final molecule. We have developed some software tools for automated drug discovery ( https://www.biorxiv.org/content/10.1101/2020.12.11.421768v1 ). We plan to use this in one of our works. If interested, I welcome you to collaborate

start_molecule = "CCN1c2ccccc2Cc3c(O)ncnc13"
epsilon_start = 1.0
epsilon_end = 0.01
epsilon_decay = 2000
optimizer = "Adam"
polyak = 0.995
atom_types = ["C", "O", "N"]
max_steps_per_episode = 40
allow_removal = True
allow_no_modification = True
allow_bonds_between_rings = False
allowed_ring_sizes = [3, 4, 5, 6]
replay_buffer_size = 1000000
learning_rate = 1e-4
gamma = 0.95
fingerprint_radius = 3
fingerprint_length = 2048
discount_factor = 0.9

@aksub99
Copy link
Owner Author

aksub99 commented Jan 23, 2021

Hi @bengeof ! Thanks for your question. Your work on automated drug discovery looks very interesting!

The current version doesn't automatically display the molecule after each optimization step. But this can be easily configured by utilizing the visualize_state method defined in environment.py.

def visualize_state(self, state=None, **kwargs):

Also, to get a general sense of how to use this code, I would like to point you to examples/MolDQN-pytorch.ipynb which contains an example. Do let me know if you have any other queries or if you face any issues while working with this code.

@amir-tagh
Copy link

Hello,

I have some small molecules which interact with a rather high binding affinity toward my protein. I was wondering if I could use MolDQN to optimize these compounds and dock them against the protein target and see if the binding affinity has increased.
I can not figure out how I can feed the "smi" of these compounds to the main.py and get the outputs.
could you please provide an example on how I can achieve this?

Thanks in advance.
Best,
Amir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers priority:high This issue has a high priority
Projects
None yet
Development

No branches or pull requests

4 participants