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

unconditonal generation with pretrained weights yields molecules with poor validity #1

Closed
e-yi opened this issue Dec 2, 2022 · 2 comments

Comments

@e-yi
Copy link

e-yi commented Dec 2, 2022

Hi, I really like your work and I am facing a little problem trying to reproduce the results in your paper.

I downloaded the pretrianed weights from https://zenodo.org/record/6832146 as the paper suggested and followed the instruction in readme to generate molecules by running python src/molecular_generation.py --model models/ChemBERTaLM --num_return_sequences 30000 --do_sample. But the validity of generated molecules is about 0.13. I guess maybe your uploaded weights are not fully trained.

Below are some of the generated molecules:

CC(CNC(=O)C1CCC(=O)N1)OC1
CC1SC(=O)N(CC(=O)NC(C)C
CC1CC(C)C(S(=O)(=O)NCCCOC(C
CN1NCNC1-C1CCCC(NC(=O)C2CCC3
CCOC1NCCNC1N1CCN(CC(=O)NCC(F)(F
O=C(NCC12CC3CC(CC(C3)C1
COCC(C)NC(=O)NC(C)C1CCC(BR
COCCNC1OC(-C2CCCO2)NC1C#N
O=C(NC1CCC(N2CNNC2)CC1)C
C=C(C)CN(CC)C(=O)CN(C
COC1NCCCC1CNC(=O)CN1CC(C)OCC1C
CN1CNNC1SCC(=O)C1CCC2C(C1)
CC(C)C1CCSC1C(=O)NCC1C[NH
O=C(NCC1CCCCC1)N1CCC(OCCCO)CC1
CCCCNC(=O)N1CC2NN(C(C)C)C
CC1CCC(OCC(=O)N2CCCC2C2CCC[NH
@gokceuludogan
Copy link
Member

Hi,

Thanks a lot for your interest in our work. I suppose that this is due to max_length parameter being unspecified. I updated its default value to 128, which is the value we used in the study in our codebase. You can run the same command again by pulling the new version or the following one where max_length is specified:

python src/molecular_generation.py --model models/ChemBERTaLM --num_return_sequences 30000 --do_sample --max_length 128

I am sorry for the inconvenience. Please let me know if you still have an issue or further questions.

Best.

@e-yi
Copy link
Author

e-yi commented Dec 4, 2022

It works perfectly now, thanks!

@e-yi e-yi closed this as completed Dec 4, 2022
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