aspuru-guzik-group / chemical_vae

Code for 10.1021/acscentsci.7b00572, now running on Keras 2.0 and Tensorflow
Apache License 2.0
483 stars 180 forks source link

Errors with vae_utils.py #10

Open chengthefang opened 6 years ago

chengthefang commented 6 years ago

Dear friends,

I tried to implemented the codes for input smiles. It worked well for some given molecules. However, I also came across some problems I could NOT figure out.

Traceback (most recent call last): in z_1 = vae.encode(X_1) File "/***/chemical_vae-master/chemvae/vae_utils.py", line 163, in encode return self.standardize_z(self.enc.predict(X)[0]) IndexError: list index out of range

Any ideas how to fix it?

Thanks, Cheng

iwwwish commented 4 years ago

@chf42 I stumbled upon this repo for the same thing lately. I figured out the issue here is the length of the input smiles. The code throws this error when your input smiles is longer than 120 characters.