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

Parameters #8

Open
zhangbingfeng opened this issue Nov 8, 2018 · 9 comments
Open

Parameters #8

zhangbingfeng opened this issue Nov 8, 2018 · 9 comments

Comments

@zhangbingfeng
Copy link

x = torch.multinomial(prob).view(-1)
This function procedure is wrong. How do I fill in this parameter? What parameters should I fill in num_samples?
Thanks

@tblaschke
Copy link

Hi,
please make sure that you are running pytorch 0.1.12. This error only occurs in newer version of pytorch as they changed the api.
Cheers,
Thomas

@zhangbingfeng
Copy link
Author

      Hi,

please make sure that you are running pytorch 0.1.12. This error only occurs in newer version of pytorch as they changed the api.
Cheers,
Thomas

Dear Thomas,thanks for your letter:
I changed it x = torch.multinomial(prob,1).view(-1) ,The program can run normally. But I made new mistakes again. Results after program running is
[10:19:53] SMILES Parse Error: syntax error for input: '()GO(O'
[10:19:53] SMILES Parse Error: syntax error for input: '2-212121O'
[10:19:53] non-ring atom 0 marked aromatic
[10:19:53] SMILES Parse Error: syntax error for input: 'GO2'
[10:19:53] SMILES Parse Error: syntax error for input: '(GO'
[10:19:53] SMILES Parse Error: extra close parentheses for input: 'O11)-c-c-GOc)((-2c)GO1'
[10:19:53] SMILES Parse Error: syntax error for input: 'GOcO-(cGO-2((c--1GO-'
I would like to ask why this happens.
thanks!

@zhangbingfeng
Copy link
Author

      Hi,

please make sure that you are running pytorch 0.1.12. This error only occurs in newer version of pytorch as they changed the api.
Cheers,
Thomas

My input is: Oc1ccc(cc1)c2ccccc2
sequences:['(', ')', '-', '1', '2', 'O', 'c', 'EOS', 'GO']
the result is:[10:19:53] SMILES Parse Error: syntax error for input: '()GO(O'
[10:19:53] SMILES Parse Error: syntax error for input: '2-212121O'
[10:19:53] non-ring atom 0 marked aromatic
[10:19:53] SMILES Parse Error: syntax error for input: 'GO2'
[10:19:53] SMILES Parse Error: syntax error for input: '(GO'
[10:19:53] SMILES Parse Error: extra close parentheses for input: 'O11)-c-c-GOc)((-2c)GO1'
[10:19:53] SMILES Parse Error: syntax error for input: 'GOcO-(cGO-2((c--1GO-'
I would like to ask why this happens.
thanks!

@tblaschke
Copy link

These errors are generated by rdkit when the model generates non valid SMILES. The generated SMILES (e.g 2-212121O ) are completely wrong and the included Prior doesn’t usual generate these kind of SMILES. I’m not sure where you input a single SMILES to get this result. main.py doesn’t take single SMILES as input.
Please make sure that you use the old pytorch version and you are able to run the main.py command from the readme.

@zhangbingfeng
Copy link
Author

      These errors are generated by rdkit when the model generates non valid SMILES. The generated SMILES (e.g 2-212121O ) are completely wrong and the included Prior doesn’t usual generate these kind of SMILES. I’m not sure where you input a single SMILES to get this result. main.py doesn’t take single SMILES as input.

Please make sure that you use the old pytorch version and you are able to run the main.py command from the readme.
Dear Thomas,thanks for your letter:
Thank you very much. I have run out of the program. Maybe I'll ask you a little question. When I iterate for more than 100 times, there is a mistake sometimes.
Step 62 Fraction valid SMILES: 100.0 Time elapsed: 0.08h Time left: 3.68h
Agent Prior Target Score SMILES
-2.52 -18.73 -12.03 0.34 O=C1Cc2ccccc2C1
-1.97 -19.52 -11.20 0.42 Cc1ccccc1Oc1ccccc1Oc1ccccc1
File "G:\REINVENT-master\REINVENT-master\train_agent.py", line 128, in train_agent
-3.36 -23.29 -16.15 0.36 c1ccccc1Oc1ccccc1
-1.37 -15.60 -5.52 0.50 O=C1c2ccccc2Cc2ccccc21
print(" {:6.2f} {:6.2f} {:6.2f} {:6.2f} {}".format(agent_likelihood[i],
-2.09 -22.97 -14.81 0.41 Cc1ccccc1Oc1ccccc1Oc1ccccc1O
IndexError: index 9 is out of bounds for axis 0 with size 9
-2.81 -19.01 -10.98 0.40 Cc1ccccc1Oc1ccccc1O
-2.56 -16.92 -7.18 0.49 O=C1Oc2ccccc2Cc2ccccc21
-2.42 -22.77 -14.98 0.39 Cc1ccccc1Oc1ccccc1Oc1ccccc1N+[O-]
-2.76 -16.01 -9.03 0.35 Oc1ccccc1Oc1ccccc1

Process finished with exit code 1
I would like to ask why this happens.
thanks!

@zhangbingfeng
Copy link
Author

      These errors are generated by rdkit when the model generates non valid SMILES. The generated SMILES (e.g 2-212121O ) are completely wrong and the included Prior doesn’t usual generate these kind of SMILES. I’m not sure where you input a single SMILES to get this result. main.py doesn’t take single SMILES as input.

Please make sure that you use the old pytorch version and you are able to run the main.py command from the readme.

Dear Thomas,thanks for your letter:
Thank you very much. I have run out of the program. Maybe I'll ask you a little question. When I iterate for more than 100 times, there is a mistake sometimes.
Step 62 Fraction valid SMILES: 100.0 Time elapsed: 0.08h Time left: 3.68h
Agent Prior Target Score SMILES
-2.52 -18.73 -12.03 0.34 O=C1Cc2ccccc2C1
-1.97 -19.52 -11.20 0.42 Cc1ccccc1Oc1ccccc1Oc1ccccc1
File "G:\REINVENT-master\REINVENT-master\train_agent.py", line 128, in train_agent
-3.36 -23.29 -16.15 0.36 c1ccccc1Oc1ccccc1
-1.37 -15.60 -5.52 0.50 O=C1c2ccccc2Cc2ccccc21
print(" {:6.2f} {:6.2f} {:6.2f} {:6.2f} {}".format(agent_likelihood[i],
-2.09 -22.97 -14.81 0.41 Cc1ccccc1Oc1ccccc1Oc1ccccc1O
IndexError: index 9 is out of bounds for axis 0 with size 9
-2.81 -19.01 -10.98 0.40 Cc1ccccc1Oc1ccccc1O
-2.56 -16.92 -7.18 0.49 O=C1Oc2ccccc2Cc2ccccc21
-2.42 -22.77 -14.98 0.39 Cc1ccccc1Oc1ccccc1Oc1ccccc1N+[O-]
-2.76 -16.01 -9.03 0.35 Oc1ccccc1Oc1ccccc1

I would like to ask why this happens.
thanks!

@tblaschke
Copy link

tblaschke commented Nov 12, 2018 via email

@zhangbingfeng
Copy link
Author

      Hi,

please make sure that you are running pytorch 0.1.12. This error only occurs in newer version of pytorch as they changed the api.
Cheers,
Thomas
Dear Thomas,I am sorry to bother you agin.I would like to ask you: when we generate a new molecule, we want to test its molecular weight, ClogP. Can you provide the source code? Thank you very much indeed.

@zhangbingfeng
Copy link
Author

Dear Thomas,I am sorry to bother you agin.I would like to ask you: when we generate a new molecule, we want to test its molecular weight, ClogP. Can you provide the source code? Thank you very much indeed.

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