benstaf/ChemGAN-challenge

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

Closed this issue · 4 comments

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

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

see README.md