benstaf / ChemGAN-challenge

Code for the paper: ChemGAN challenge for drug discovery: can AI reproduce natural chemical diversity? arXiv preprint arXiv:1708.08227.
https://arxiv.org/abs/1708.08227
113 stars 55 forks source link

I am getting a Sanitization Error when running the train_ogan code, any suggestions on getting over with it? #1

Closed redBirdTx closed 6 years ago

redBirdTx commented 6 years ago

Hi, I am trying to run the train_ogan, but getting the following. Any suggestions on getting over with it? Thanks!

Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN-challenge-master/model/train_ogan.py', wdir='C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN-challenge-master/model')

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN-challenge-master/model/train_ogan.py", line 379, in return

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN-challenge-master/model/train_ogan.py", line 309, in main print('\t* LOAD_PRETRAIN was set to false.')

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN-challenge-master/model/train_ogan.py", line 193, in pretrain mm.compute_results(samples, train_samples, ord_dict, results)

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN-challenge-master\model\mol_metrics.py", line 176, in compute_results results[objective] = np.mean(func(verified_samples, train_data))

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN-challenge-master\model\mol_metrics.py", line 292, in batch_solubility vals = [logP(s, train_smiles) if verify_sequence(s) else 0 for s in smiles]

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN-challenge-master\model\mol_metrics.py", line 292, in vals = [logP(s, train_smiles) if verify_sequence(s) else 0 for s in smiles]

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN-challenge-master\model\mol_metrics.py", line 299, in logP logp = Crippen.MolLogP(Chem.MolFromSmiles(smile))

File "C:\ProgramData\Anaconda3\lib\site-packages\rdkit\Chem\Crippen.py", line 170, in MolLogP = lambda *x, *y: rdMolDescriptors.CalcCrippenDescriptors(x, **y)[0]

ValueError: Sanitization error: Explicit valence for atom # 3 O, 3, is greater than permitted

benstaf commented 6 years ago

It's an error with rdkit, so it's better to isolate this problem and ask this question in the rdkit project

On Feb 9, 2018 4:03 AM, "redBirdTx" notifications@github.com wrote:

Hi, I am trying to run the train_ogan, but getting the following. Any suggestions on getting over with it? Thanks!

Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py', wdir='C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN-challenge-master/model')

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py", line 379, in return

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py", line 309, in main print('\t* LOAD_PRETRAIN was set to false.')

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py", line 193, in pretrain mm.compute_results(samples, train_samples, ord_dict, results)

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 176, in compute_results results[objective] = np.mean(func(verified_samples, train_data))

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 292, in batch_solubility vals = [logP(s, train_smiles) if verify_sequence(s) else 0 for s in smiles]

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 292, in vals = [logP(s, train_smiles) if verify_sequence(s) else 0 for s in smiles]

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 299, in logP logp = Crippen.MolLogP(Chem.MolFromSmiles(smile))

File "C:\ProgramData\Anaconda3\lib\site-packages\rdkit\Chem\Crippen.py", line 170, in MolLogP = lambda *x, *y: rdMolDescriptors.CalcCrippenDescriptors(x, **y)[0]

ValueError: Sanitization error: Explicit valence for atom # 3 O, 3, is greater than permitted

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mostafachatillon/ChemGAN-challenge/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AHzfFMRUEEXWrU8YTLmE1ZDyQ7HbYlzMks5tS6dsgaJpZM4R_T5y .

redBirdTx commented 6 years ago

I see. Thanks!

Did you run into the problem before? If not, would you mind letting me know which rdkit version you have? Thanks

best regards Jenn

On Thu, Feb 8, 2018 at 11:10 PM, Mostafa Benhenda notifications@github.com wrote:

It's an error with rdkit, so it's better to isolate this problem and ask this question in the rdkit project

On Feb 9, 2018 4:03 AM, "redBirdTx" notifications@github.com wrote:

Hi, I am trying to run the train_ogan, but getting the following. Any suggestions on getting over with it? Thanks!

Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py', wdir='C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN-challenge-master/model')

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\ site\sitecustomize.py", line 710, in runfile execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\ site\sitecustomize.py", line 101, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py", line 379, in return

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py", line 309, in main print('\t* LOAD_PRETRAIN was set to false.')

File "C:/Users/AAA/Documents/Deep learning/GAN/ChemGAN- challenge-master/model/train_ogan.py", line 193, in pretrain mm.compute_results(samples, train_samples, ord_dict, results)

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 176, in compute_results results[objective] = np.mean(func(verified_samples, train_data))

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 292, in batch_solubility vals = [logP(s, train_smiles) if verify_sequence(s) else 0 for s in smiles]

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 292, in vals = [logP(s, train_smiles) if verify_sequence(s) else 0 for s in smiles]

File "C:\Users\AAA\Documents\Deep learning\GAN\ChemGAN- challenge-master\model\mol_metrics.py", line 299, in logP logp = Crippen.MolLogP(Chem.MolFromSmiles(smile))

File "C:\ProgramData\Anaconda3\lib\site-packages\rdkit\Chem\Crippen.py", line 170, in MolLogP = lambda *x, *y: rdMolDescriptors.CalcCrippenDescriptors(x, **y)[0]

ValueError: Sanitization error: Explicit valence for atom # 3 O, 3, is greater than permitted

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mostafachatillon/ChemGAN-challenge/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ AHzfFMRUEEXWrU8YTLmE1ZDyQ7HbYlzMks5tS6dsgaJpZM4R_T5y .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mostafachatillon/ChemGAN-challenge/issues/1#issuecomment-364336868, or mute the thread https://github.com/notifications/unsubscribe-auth/Aby1VPSpaAkpnye_9WeXr-xB9H9VcAxFks5tS9NRgaJpZM4R_T5y .

benstaf commented 6 years ago

I don't remember this error. Requirements: Rdkit version 2017.03.3 from Anaconda,

see README.md

redBirdTx commented 6 years ago

Thanks! I'll try. I had the 2017 09 release.

On Fri, Feb 9, 2018 at 9:40 AM, Mostafa Benhenda notifications@github.com wrote:

I don't remember this error. Requirements: Rdkit version 2017.03.3 from Anaconda,

see README.md

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mostafachatillon/ChemGAN-challenge/issues/1#issuecomment-364469173, or mute the thread https://github.com/notifications/unsubscribe-auth/Aby1VKwWZz1hr799-FQNRsCh_zje1OoRks5tTGb3gaJpZM4R_T5y .