keiserlab / e3fp

3D molecular fingerprints
GNU Lesser General Public License v3.0
121 stars 33 forks source link

problem with smart_open ? #47

Open slchan3 opened 4 years ago

slchan3 commented 4 years ago

I tried generating conformers by python $E3FP/conformer/generate.py -s temp.smi -o ~/outdir -n 3 where temp.smi is simply Brc4cccc(Nc2ncnc3cc1ccccc1cc23)c4 CHEMBL63786

I encountered the following error.

2020-10-22 21:19:30,180|INFO|Input type: Detected SMILES file(s) 2020-10-22 21:19:30,180|INFO|Input file number: 1 2020-10-22 21:19:30,180|INFO|Parallel Type: processes 2020-10-22 21:19:30,180|INFO|Out Directory: ......outdir 2020-10-22 21:19:30,180|INFO|Overwrite Existing Files: False 2020-10-22 21:19:30,180|INFO|Target Conformer Number: 3 2020-10-22 21:19:30,181|INFO|First Conformers Number: all 2020-10-22 21:19:30,181|INFO|Pool Multiplier: 1 2020-10-22 21:19:30,181|INFO|RMSD Cutoff: 0.5 2020-10-22 21:19:30,181|INFO|Maximum Energy Difference: None 2020-10-22 21:19:30,181|INFO|Forcefield: UFF 2020-10-22 21:19:30,181|INFO|Starting. Traceback (most recent call last): File "generate.py", line 413, in run(**kwargs) File "generate.py", line 338, in run for result, data in results_iterator: File "....../envs/e3fp_env/lib/python3.6/site-packages/sdaxen_python_utilities-0.1.4-py3.6.egg/python_utilities/parallel.py", line 304, in File "....../envs/e3fp_env/lib/python3.6/site-packages/sdaxen_python_utilities-0.1.4-py3.6.egg/python_utilities/parallel.py", line 353, in concurrent_run File "generate.py", line 279, in data_iterator = make_data_iterator((x for x in mol_iter File "generate.py", line 265, in mol_iter = (mol_from_smiles(_smiles, _name, File "....../envs/e3fp_env/lib/python3.6/site-packages/e3fp/conformer/util.py", line 165, in smiles_generator values = line.rstrip('\r\n').split() TypeError: a bytes-like object is required, not 'str'

I think it is a problem with smart_open because this part worked when I changed smart_open to a simple open. (Then there comes a problem of a similar nature when it tried to output.)

sethaxen commented 3 years ago

Thanks for the issue, and I apologize for the delayed reply. This looks like it might be due to a change in rdkit.Chem.SDWriter. I'll look into a workaround.

slchan3 commented 3 years ago

Please don't worry, Seth. I don't need this fix as of now. Thank you. Ling

On Thu, Jan 14, 2021 at 12:38 AM Seth Axen notifications@github.com wrote:

Thanks for the issue, and I apologize for the delayed reply. This looks like it might be due to a change in rdkit.Chem.SDWriter. I'll look into a workaround.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keiserlab/e3fp/issues/47#issuecomment-760022633, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARHCUCAMTJIRED4QCLDQRILSZ2UR3ANCNFSM4S4BWFRQ .