Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with smart_open ? #47

Open
slchan3 opened this issue Oct 23, 2020 · 2 comments
Open

problem with smart_open ? #47

slchan3 opened this issue Oct 23, 2020 · 2 comments

Comments

@slchan3
Copy link

slchan3 commented Oct 23, 2020

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
Copy link
Collaborator

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
Copy link
Author

slchan3 commented Jan 15, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants