{"action":"closed","issue":{"url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/479","repository_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py","labels_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/479/labels{/name}","comments_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/479/comments","events_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/479/events","html_url":"https://github.com/ReactionMechanismGenerator/RMG-Py/issues/479","id":114274803,"number":479,"title":"generateFluxDiagram fails with minimal example (on local machine)","user":{"login":"KEHANG","id":2739496,"avatar_url":"https://avatars.githubusercontent.com/u/2739496?v=3","gravatar_id":"","url":"https://api.github.com/users/KEHANG","html_url":"https://github.com/KEHANG","followers_url":"https://api.github.com/users/KEHANG/followers","following_url":"https://api.github.com/users/KEHANG/following{/other_user}","gists_url":"https://api.github.com/users/KEHANG/gists{/gist_id}","starred_url":"https://api.github.com/users/KEHANG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KEHANG/subscriptions","organizations_url":"https://api.github.com/users/KEHANG/orgs","repos_url":"https://api.github.com/users/KEHANG/repos","events_url":"https://api.github.com/users/KEHANG/events{/privacy}","received_events_url":"https://api.github.com/users/KEHANG/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-10-30T13:58:43Z","updated_at":"2016-09-26T16:17:01Z","closed_at":"2016-09-26T16:17:01Z","body":"I used `minimal` example to generateFluxDiagram by running `python generateFluxDiagram.py testing/minimal/input.py`. It gave the error:\r\n```\r\nConducting simulation of reaction system 1...\r\nGenerating flux diagram for reaction system 1...\r\nTraceback (most recent call last):\r\n  File \"scripts/generateFluxDiagram.py\", line 42, in <module>\r\n    main()\r\n  File \"scripts/generateFluxDiagram.py\", line 39, in main\r\n    fluxdiagram.run(inputFile, useJava)\r\n  File \"/home/kehang/Code/edge_inchi_proj/RMG-Py/rmgpy/tools/fluxdiagram.py\", line 517, in run\r\n    os.path.join(rmg.outputDirectory, 'flux', '{0:d}'.format(index+1)), centralSpecies, speciesPath\r\n  File \"/home/kehang/Code/edge_inchi_proj/RMG-Py/rmgpy/tools/fluxdiagram.py\", line 265, in generateFluxDiagram\r\n    graph.write_dot(os.path.join(outputDirectory, 'flux_diagram_{0:04d}.dot'.format(frameNumber)))\r\n  File \"build/bdist.linux-x86_64/egg/pydot.py\", line 1809, in <lambda>\r\n  File \"build/bdist.linux-x86_64/egg/pydot.py\", line 1911, in write\r\n  File \"build/bdist.linux-x86_64/egg/pydot.py\", line 2023, in create\r\npydot.InvocationException: Program terminated with status: 1. stderr follows: Warning: syntax ambiguity - badly delimited number '3.75015410405e' in line 8 of /tmp/tmpnMujyK splits into two tokens\r\nError: /tmp/tmpnMujyK: syntax error in line 8 near '-05'\r\n```\r\nThe temporary file looks like this:\r\n```\r\n  1 digraph flux_diagram {\r\n  2 label=\"t = 10^-6.5 s\";\r\n  3 graph [rankdir=LR, fontname=sans, fontsize=10, overlap=false, bb=\"0,0,788.26,243.41\"];\r\n  4 node [label=\"\\N\"];\r\n  5 \"ethane(1)\" [penwidth=9.99989414208, width=\"0.9027\", image=\"/home/kehang/Code/edge_inchi_proj/RMG-Py/testing/minimal/species/ethane(1).png\", label=\" \", pos=\"32.497,14    9.29\", height=\"0.5\"];\r\n  6 \"C2H5(5)\" [penwidth=0.33175608147, width=\"0.9027\", image=\"/home/kehang/Code/edge_inchi_proj/RMG-Py/testing/minimal/species/C2H5(5).png\", label=\" \", pos=\"133.49,149.29    \", height=\"0.5\"];\r\n  7 \"ethane(1)\" -> \"C2H5(5)\"  [pos=\"e,100.86,149.29 65.092,149.29 73.218,149.29 82.088,149.29 90.645,149.29\", dir=forward, penwidth=7.28341608272];\r\n  8 \"H(6)\" [penwidth=3.75015410405e-05, width=\"0.75\", image=\"/home/kehang/Code/edge_inchi_proj/RMG-Py/testing/minimal/species/H(6).png\", label=\" \", pos=\"228.99,105.29\", h    eight=\"0.5\"];\r\n  9 \"ethane(1)\" -> \"H(6)\"  [pos=\"e,201.84,106.89 58.003,137.78 70.599,132.31 86.346,126.14 100.99,122.29 131.06,114.39 166.14,110.05 191.81,107.74\", dir=forward, penwidth    =4.43495823888];\r\n...\r\n```\r\nSo the issue is from the `H(6)` is having a too small penwidth or the program cannot draw such small width (look at other penwidth, they are much bigger). The penwidth setting is from the following code:\r\n```\r\nif concentration < concentrationTolerance:\r\n                penwidth = 0.0\r\n            else:\r\n                penwidth = slope * math.log10(concentration) + maximumNodePenWidth\r\n            node.set_penwidth(penwidth)\r\n```\r\nSo if we increase the `concentrationTolerance`, it can solve the problem (already tested)."}}
{"actor":{"display_login":"mliu49"}}