isayevlab / Auto3D_pkg

Auto3D generates low-energy conformers from SMILES/SDF
MIT License
146 stars 32 forks source link

ValueError in hash_taut_smi when read molecules from SDF #52

Closed OlgaGKononova closed 11 months ago

OlgaGKononova commented 11 months ago

Describe the bug Running the code with sdf file as input and --enumerate_tautomer = True gives an error:

Traceback (most recent call last):
  File "/anaconda3/envs/cocoa_env/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/anaconda3/envs/cocoa_env/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/dev/Cocoa/Auto3D/Auto3D_pkg/src/Auto3D/auto3D.py", line 95, in isomer_wraper
    hash_taut_smi(output_taut, output_taut)
  File "/dev/Cocoa/Auto3D/Auto3D_pkg/src/Auto3D/utils.py", line 380, in hash_taut_smi
    smiles, id = line.strip().split()
ValueError: too many values to unpack (expected 2)

And calculations are getting frozen.

To Reproduce Steps to reproduce the behavior: python ../Auto3D_pkg/auto3D.py stereo_test/tautomers_test.sdf --k 5 --enumerate_tautomer True --tauto_engine rdkit

Expected behavior Generates tautomers if structure is ambiguous.

System information:

LiuCMU commented 11 months ago

Hey @OlgaGKononova , this is expected behavior. --enumerate_tautomer = True only works for smi input format. The design thought is as follows: For SDF input, the molecule information (tautomer and steric center) is already known, so there is no need to enumerate them.

Using SDF as the input is a new feature. I haven't added corresponding documentation and usage case for it. Sorry for the confusion. Better documentation is on the way. We are planning to release AIMNET2 in Auto3D very soon (probably within 1 or 2 weeks). So there is some lag in fixing some pubic features.

OlgaGKononova commented 11 months ago

Thank you @LiuCMU . Looking forward to the updates.