REINVENT icon indicating copy to clipboard operation
REINVENT copied to clipboard

Parameters

Open zhangbingfeng opened this issue 6 years ago • 9 comments

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

zhangbingfeng avatar Nov 08 '18 02:11 zhangbingfeng

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

tblaschke avatar Nov 08 '18 07:11 tblaschke

      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 avatar Nov 08 '18 07:11 zhangbingfeng

      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!

zhangbingfeng avatar Nov 08 '18 07:11 zhangbingfeng

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.

tblaschke avatar Nov 08 '18 08:11 tblaschke

      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 avatar Nov 09 '18 05:11 zhangbingfeng

      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!

zhangbingfeng avatar Nov 12 '18 06:11 zhangbingfeng

It seems that you have a completely biased prior which only produces a few different smiles. This error occurs when you have less then 10 different smiles in one batch. By default we generate 128 smiles and simply print the first unique 10 smiles during the training. Please dramatically increase your training set (or simply use the included chembl dataset) or adjust the code if you really just want to create less than 10 sequences...

On 12. Nov 2018, at 07:41, daskjdahsd [email protected] wrote:

  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!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

tblaschke avatar Nov 12 '18 16:11 tblaschke

      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 avatar Nov 15 '18 02:11 zhangbingfeng

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 avatar Nov 15 '18 07:11 zhangbingfeng