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

Error Running CatMAP reactionModel #155

Open
Shedo28 opened this issue Jun 16, 2022 · 2 comments
Open

Error Running CatMAP reactionModel #155

Shedo28 opened this issue Jun 16, 2022 · 2 comments

Comments

@Shedo28
Copy link

Shedo28 commented Jun 16, 2022

Hello CatMAP community, I just encountered similar issue @lrjohnson494 posted sometimes in 2018. I've been trying all day to resolve it but to no avail. I've perused my .mkm file (rxn expression file), all sites including empty sites are balanced.

I have no issue with the compilation as I've ran several jobs after compiling CatMAP. Below are the output errors, which I guess are similar to those of @lrjohnson494.

Traceback (most recent call last):
File "mkm_job.py", line 7, in
File "/home/shed/.local/lib/python3.8/site-packages/catmap/model.py", line 260, in run
self.descriptor_space_analysis()
File "/home/shed/.local/lib/python3.8/site-packages/catmap/model.py", line 324, in descriptor_space_analysis
self.mapper.get_output_map(self.descriptor_ranges,self.resolution)
File "/home/shed/.local/lib/python3.8/site-packages/catmap/mappers/mapper_base.py", line 89, in get_output_map
self.solver.compile()
File "/home/shed/.local/lib/python3.8/site-packages/catmap/solvers/steady_state_solver.py", line 429, in compile
self.generate_static_functions()
File "/home/shed/.local/lib/python3.8/site-packages/catmap/model.py", line 357, in generate_static_functions
exec(func_string, globals(), locs)
File "", line 730
J[0][0] = 0 + 2*(-7*kf[7]*theta[10]*s[0]*s[0]*s[0]*s[0]*s[0]*s[0] + (kfkBT[7])*dEf[7][0]*theta[10]*s[0]*s[0]*s[0]*s[0]*s[0]s[0]s[0] - kr[7](-6theta[0]*s[0]*s[0]*s[0]*s[0]s[0] + 2s[0]theta[0]) - (krkBT[7])*dEr[7][0]*theta[0]*theta[0]*s[0]*s[0]*s[0]*s[0]s[0]s[0]) + 1(-6kf[12]*theta[12]*theta[21]*s[0]*s[0]*s[0]*s[0]*s[0] + (kfkBT[12])*dEf[12][0]*theta[12]*theta[21]*s[0]*s[0]*s[0]*s[0]s[0]s[0] - kr[12](-5theta[0]*s[0]*s[0]*s[0]s[0] + 1s[0])*theta[2]*theta[21] - (krkBT[12])*dEr[12][0]*theta[0]*theta[2]*theta[21]*s[0]*s[0]*s[0]s[0]s[0]) + 1(-6kf[16]*theta[11]*theta[21]*s[0]*s[0]*s[0]*s[0]*s[0] + (kfkBT[16])*dEf[16][0]*theta[11]*theta[21]*s[0]*s[0]*s[0]*s[0]s[0]s[0] - kr[16](-5theta[0]*s[0]*s[0]*s[0]s[0] + 1s[0])*theta[1]*theta[21] - (krkBT[16])*dEr[16][0]*theta[0]*theta[1]*theta[21]*s[0]*s[0]*s[0]s[0]s[0]) + 1(-5kf[20]*theta[14]*theta[21]*theta[21]*s[0]*s[0]*s[0]*s[0] + (kfkBT[20])*dEf[20][0]*theta[14]*theta[21]*theta[21]*s[0]*s[0]*s[0]s[0]s[0] - kr[20](-4theta[0]*s[0]*s[0]s[0] + 1s[0])*theta[4]*theta[21]*theta[21] - (krkBT[20])*dEr[20][0]*theta[0]*theta[4]*theta[21]*theta[21]*s[0]*s[0]s[0]s[0]) + 1(-5kf[27]*theta[13]*theta[21]*theta[21]*s[0]*s[0]*s[0]*s[0] + (kfkBT[27])*dEf[27][0]*theta[13]*theta[21]*theta[21]*s[0]*s[0]*s[0]s[0]s[0] - kr[27](-4theta[0]*s[0]*s[0]s[0] + 1s[0])*theta[3]*theta[21]*theta[21] - (krkBT[27])*dEr[27][0]*theta[0]*theta[3]*theta[21]*theta[21]*s[0]*s[0]s[0]s[0]) + 1(-4kf[40]*theta[15]*theta[21]*theta[21]*theta[21]*s[0]*s[0]*s[0] + (kfkBT[40])*dEf[40][0]*theta[15]*theta[21]*theta[21]*theta[21]*s[0]*s[0]s[0]s[0] - kr[40](-3theta[0]*s[0]s[0] + 1s[0])*theta[5]*theta[21]*theta[21]*theta[21] - (krkBT[40])*dEr[40][0]*theta[0]*theta[5]*theta[21]*theta[21]*theta[21]*s[0]*s[0]*s[0])
^
SyntaxError: invalid syntax

Please everyone in the community, I need a resolution to this as soon as possible. Your kind assistance will be highly appreciated.

@ajmedford
Copy link
Collaborator

This error happens when the string that is generated for your kinetic equation is not valid for some reason. CatMAP auto-generates the long string you see (starting with J[0,0]) and then executes it to "compile" the equations. My strong suspicion is that this arises due to an error in the mkm file, but it may be difficult to debug. Try to create a "minimal working example" (a simpler reaction that reproduces the error) and share the mkm file as well as the resulting error.

@Shedo28
Copy link
Author

Shedo28 commented Jul 19, 2022

@ajmedford Thank you Prof. for the response. I am also sorry for the late reply, I've been on leave for quite sometimes.

You are absolutely right, the issue was from my .mkm file. There were lots of improper material balances. I have sorted it. Thanks once again.
EG_dehydrogenation.mkm.txt

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