You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to get bespoke torsions for the molecule CNC(=O)[C@H](CCC\C=C/CCC[C@H](NC(C)=O)C(=O)NC)NC(C)=O. However, the QC generation step exits with the following message:
3. running the fitting pipeline
[✓] fragmentation successful
[x] qc-generation failed
[null, null, null, null, null, {"type": "ValueError", "message": "TorsionDrive error at -135:\ngeomeTRIC run_json error:\nTraceback (most recent
call last):\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/run_json.py\", line 269, in
geometric_run_json\n geometric.optimize.Optimize(coords, M, IC, engine, dirname, params, print_info = (ic==0))\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 779, in Optimize\n return
optimizer.optimizeGeometry()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 697, in
optimizeGeometry\n self.calcEnergyForce()\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 278, in calcEnergyForce\n
self.checkStructure()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 730, in
checkStructure\n raise LinearTorsionError(\"A constrained torsion has three consecutive atoms\\n\"\ngeometric.errors.LinearTorsionError: A
constrained torsion has three consecutive atoms\nforming a nearly linear angle, making the torsion angle poorly defined.\n> Atoms Angle\n> 8-10-12
179.90\n\n", "traceback": "Traceback (most recent call last):\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/celery/app/trace.py\", line 477, in trace_task\n R = retval = fun(*args,
**kwargs)\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/celery/app/trace.py\", line 760, in __protected_call__\n
return self.run(*args, **kwargs)\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/openff/bespokefit/executor/services/qcgenerator/worker.py\", line 150, in
compute_torsion_drive\n return_value = qcengine.compute_procedure(\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/qcengine/compute.py\", line 178, in compute_procedure\n return
handle_output_metadata(output_data, metadata, raise_error=raise_error, return_dict=return_dict)\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/qcengine/util.py\", line 183, in handle_output_metadata\n raise
ValueError(output_fusion[\"error\"][\"error_message\"])\nValueError: TorsionDrive error at -135:\ngeomeTRIC run_json error:\nTraceback (most
recent call last):\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/run_json.py\", line 269, in
geometric_run_json\n geometric.optimize.Optimize(coords, M, IC, engine, dirname, params, print_info = (ic==0))\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 779, in Optimize\n return
optimizer.optimizeGeometry()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 697, in
optimizeGeometry\n self.calcEnergyForce()\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 278, in calcEnergyForce\n
self.checkStructure()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 730, in
checkStructure\n raise LinearTorsionError(\"A constrained torsion has three consecutive atoms\\n\"\ngeometric.errors.LinearTorsionError: A
constrained torsion has three consecutive atoms\nforming a nearly linear angle, making the torsion angle poorly defined.\n> Atoms Angle\n> 8-10-12
179.90\n\n\n"}, null, null, null]
Is there a way to see which atoms these are and which fragment is causing the error? I suspect it's atoms around the C=C double bond, since I ran bespokefit on the same molecule with a single bond instead CNC([C@@H](NC(C)=O)CCCCCCCC[C@@H](C(NC)=O)NC(C)=O)=O and the calculations finished fine (I got a .offxml file).
I also tested bespokefit on a smaller molecule with a C=C double bond O=C(O)/C=C/C(O)=O and I got a similar error:
3. running the fitting pipeline
[✓] fragmentation successful
[x] qc-generation failed
[{"type": "ValueError", "message": "TorsionDrive error at -75:\ngeomeTRIC run_json error:\nTraceback (most recent call last):\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/run_json.py\", line 269, in geometric_run_json\n
geometric.optimize.Optimize(coords, M, IC, engine, dirname, params, print_info = (ic==0))\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 779, in Optimize\n return
optimizer.optimizeGeometry()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 697, in
optimizeGeometry\n self.calcEnergyForce()\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 278, in calcEnergyForce\n
self.checkStructure()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 730, in
checkStructure\n raise LinearTorsionError(\"A constrained torsion has three consecutive atoms\\n\"\ngeometric.errors.LinearTorsionError: A
constrained torsion has three consecutive atoms\nforming a nearly linear angle, making the torsion angle poorly defined.\n> Atoms Angle\n> 5-7-9
179.94\n\n", "traceback": "Traceback (most recent call last):\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/celery/app/trace.py\", line 477, in trace_task\n R = retval = fun(*args,
**kwargs)\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/celery/app/trace.py\", line 760, in __protected_call__\n
return self.run(*args, **kwargs)\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/openff/bespokefit/executor/services/qcgenerator/worker.py\", line 150, in
compute_torsion_drive\n return_value = qcengine.compute_procedure(\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/qcengine/compute.py\", line 178, in compute_procedure\n return
handle_output_metadata(output_data, metadata, raise_error=raise_error, return_dict=return_dict)\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/qcengine/util.py\", line 183, in handle_output_metadata\n raise
ValueError(output_fusion[\"error\"][\"error_message\"])\nValueError: TorsionDrive error at -75:\ngeomeTRIC run_json error:\nTraceback (most recent
call last):\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/run_json.py\", line 269, in
geometric_run_json\n geometric.optimize.Optimize(coords, M, IC, engine, dirname, params, print_info = (ic==0))\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 779, in Optimize\n return
optimizer.optimizeGeometry()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 697, in
optimizeGeometry\n self.calcEnergyForce()\n File
\"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 278, in calcEnergyForce\n
self.checkStructure()\n File \"/home/eva/anaconda3/envs/bespokefit-env/lib/python3.9/site-packages/geometric/optimize.py\", line 730, in
checkStructure\n raise LinearTorsionError(\"A constrained torsion has three consecutive atoms\\n\"\ngeometric.errors.LinearTorsionError: A
constrained torsion has three consecutive atoms\nforming a nearly linear angle, making the torsion angle poorly defined.\n> Atoms Angle\n> 5-7-9
179.94\n\n\n"}, null]
Hi, sorry for the delay. This looks pretty tricky - thanks for all the info, it really helps track stuff down.
My first idea is to capture errors in the function call to QCEngine and re-raise the error with extra info about the fragment. That wouldn't fix it, but it would provide more information about the specific fragment that's causing the failure. Since geomeTRIC is already providing a decent amount of information about the failure, I don't think it's reasonable to ask it to provide more info ("and here is the mapped SMILES of the full molecule:" etc.)
A more robust solution would probably be #295; I figure you shouldn't normally have linear triplets around a double bond, so this is just a funky chemistry forced by driving the torsion, so skipping that one particular structure is justified.
We recently released a new version (0.2.3) with a couple of improvements related to torsion drives (parallelization #277 and re-starting failed jobs #279) but if I understand the issue correctly, neither of these really address the root cause. It still might be worth a shot.
mattwthompson
changed the title
Error with linear angle during QC generation
Error with linear angle during QC generation within a torsion drive
Nov 17, 2023
Hi, thank you very much for the reply. Unfortunately I can't skip this particular structure as it's one of the few I would like to optimise. I will probably have to resort to manual torsion scans.
Hi, I am trying to get bespoke torsions for the molecule
CNC(=O)[C@H](CCC\C=C/CCC[C@H](NC(C)=O)C(=O)NC)NC(C)=O
. However, the QC generation step exits with the following message:Is there a way to see which atoms these are and which fragment is causing the error? I suspect it's atoms around the C=C double bond, since I ran bespokefit on the same molecule with a single bond instead
CNC([C@@H](NC(C)=O)CCCCCCCC[C@@H](C(NC)=O)NC(C)=O)=O
and the calculations finished fine (I got a .offxml file).I also tested bespokefit on a smaller molecule with a C=C double bond
O=C(O)/C=C/C(O)=O
and I got a similar error:Bespokefit is ran via the CLI:
The workflow file is: factory.json
Any help with this would be greatly appreciated!
Software versions
conda list
?Output of
conda list
The text was updated successfully, but these errors were encountered: