-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fragmentation failed #177
Comments
Thanks for the great reproducing example. I think the meat of this problem is in Fragmenter - I can reproduce it without BespokeFit: from openff.toolkit import Molecule
from openff.fragmenter.fragment import WBOFragmenter
parent_molecule = Molecule.from_file("test2.sdf")
frag_engine = WBOFragmenter()
result = frag_engine.fragment(parent_molecule)
It seems similar to #127 - I could see this being an issue with stereocenters in the fused ring system. I'm going to migrate this issue to the Fragmenter repo, but fixing it there should fix it in Bespokefit as well. |
I've made a fresh install of the env and verified that this works with fragmenter 0.2.2 (though I did need to delete the |
Description
Please describe what you were trying to do, what you expected to happen, and what happened instead.
This molecule failed in fragmentation stage.
Reproduction
test.tar.gz
Please include a minimally reproducing example of this bug.
BEFLOW_OPTIMIZER_KEEP_FILES=True openff-bespoke executor run --directory fitting --n-fragmenter-workers 2 --n-optimizer-workers 2 --n-qc-compute-workers 2 --qc-compute-n-cores 1 --file test2.sdf --output test2.sdf.json --output-force-field test2.sdf.offxml --workflow "default" --default-qc-spec xtb gfn2xtb none
BEFLOW_OPTIMIZER_KEEP_FILES=True openff-bespoke executor run --directory fitting --n-fragmenter-workers 2 --n-optimizer-workers 2 --n-qc-compute-workers 2 --qc-compute-n-cores 1 --file test3.sdf --output test3.sdf.json --output-force-field test3.sdf.offxml --workflow "default" --default-qc-spec xtb gfn2xtb none
Output
[✓] bespoke executor launched
[✓] 1 molecules found
[✓] fitting schemas generated
[✓] the following workflows were submitted
┏━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┓
┃ ID ┃ SMILES ┃ NAME ┃ FILE ┃
┡━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━┩
│ 2 │ c1cc(C2C[C@@h]3C[C@@h]3C2)n1 │ test2 │ test2.sdf │
└────┴──────────────────────────────┴───────┴───────────┘
[x] fragmentation failed
{"type": "ValueError", "message": "not enough values to unpack (expected 2, got 0)", "traceback": "Traceback (most recent call last):\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task\n R = retval = fun(*args, **kwargs)\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/celery/app/trace.py", line 760, in protected_call\n return self.run(*args, **kwargs)\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/bespokefit/executor/services/fragmenter/worker.py", line 36, in fragment\n
fragmenter.fragment(molecule, target_bond_smarts=target_bond_smarts)\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 916, in fragment\n result = self._fragment(molecule,
target_bond_smarts)\n File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1019, in _fragment\n fragments =
{\n File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1020, in \n bond: self._build_fragment(\n
File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1204, in _build_fragment\n fragment,
has_new_stereocenter = cls._add_next_substituent(\n File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1409,
in _add_next_substituent\n neighbour_atom_and_bond = cls._select_neighbour_by_path_length(\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1264, in _select_neighbour_by_path_length\n path_lengths_1,
path_lengths_2 = zip(\nValueError: not enough values to unpack (expected 2, got 0)\n"}
Please include the output, including full tracebacks of any errors, resulting from the reproduction.
Software versions
[✓] bespoke executor launched
[✓] 1 molecules found
[✓] fitting schemas generated
[✓] the following workflows were submitted
┏━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┓
┃ ID ┃ SMILES ┃ NAME ┃ FILE ┃
┡━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━┩
│ 2 │ c1cc(C2C[C@@h]3C[C@@h]3C2)n1 │ test2 │ test2.sdf │
└────┴──────────────────────────────┴───────┴───────────┘
[x] fragmentation failed
{"type": "ValueError", "message": "not enough values to unpack (expected 2, got 0)", "traceback": "Traceback (most recent call last):\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/celery/app/trace.py", line 477, in trace_task\n R = retval = fun(*args, **kwargs)\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/celery/app/trace.py", line 760, in protected_call\n return self.run(*args, **kwargs)\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/bespokefit/executor/services/fragmenter/worker.py", line 36, in fragment\n
fragmenter.fragment(molecule, target_bond_smarts=target_bond_smarts)\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 916, in fragment\n result = self._fragment(molecule,
target_bond_smarts)\n File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1019, in _fragment\n fragments =
{\n File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1020, in \n bond: self._build_fragment(\n
File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1204, in _build_fragment\n fragment,
has_new_stereocenter = cls._add_next_substituent(\n File "/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1409,
in _add_next_substituent\n neighbour_atom_and_bond = cls._select_neighbour_by_path_length(\n File
"/home/bckim/mambaforge/envs/bespokefit-env/lib/python3.10/site-packages/openff/fragmenter/fragment.py", line 1264, in _select_neighbour_by_path_length\n path_lengths_1,
path_lengths_2 = zip(\nValueError: not enough values to unpack (expected 2, got 0)\n"}
osx-64
) or natively (osx-arm64
)? Noconda list
?Output of
conda list
The text was updated successfully, but these errors were encountered: