https://gist.github.com/FedericoV/7132880 here you go.
This equation is passed to odeint to numerically integrate. Originally, I tried using .subs() to close the function over all the parameters, and to them pass a function where only the variables were open to odeint, but the overhead from using .subs() was way too much. I also looked into your project, csympy for faster subs, but as I understand, it cannot handle float substitution yet? Federico On Wednesday, 23 October 2013 17:52:25 UTC+2, Federico Vaggi wrote: > > Hi everyone, > > I had two quick questions about autowrap: > > - I've been unable to wrap an expression that contains very long variable > names. This is just a differential equation, here it is: > > 2*fullbound_RE*k_transopen + fullbound_RE*k_unbindleft_p53_RE + > fullbound_RE*k_unbindright_p53_RE + 2*fullbound_closed_RE*k_transclosed - > k_bindleft_p53_RE*p53*rightbound_RE - k_bindleft_p53_RE*p53*(-fullbound_RE - > fullbound_closed_RE - leftbound_RE - rightbound_RE + 0.0005725) - > k_bindright_p53_RE*leftbound_RE*p53 - k_bindright_p53_RE*p53*(-fullbound_RE - > fullbound_closed_RE - leftbound_RE - rightbound_RE + 0.0005725) - > k_deg_p53*p53 + k_transhalf*leftbound_RE + k_transhalf*rightbound_RE + > k_unbindleft_p53_RE*leftbound_RE + k_unbindright_p53_RE*rightbound_RE + > (-empty + 1)*(Gal*k_max_synt_p53/(Gal + k_sat_p53) + k_base_synt_p53) > > > When attempting to wrap it using autowrap, I get this error: > > > Warning: Line truncated at (1) > wrapped_code_1.f90:1.132: > > und_closed_RE, k_base_synt_p53, k_bindleft_p53_RE, k_bindright_p53_RE, k_de > 1 > > Error: Expected formal argument list in function definition at (1) > wrapped_code_1.f90:32.3: > > end function > 1 > Error: Expecting END PROGRAM statement at (1) > Error: Unexpected end of file in 'wrapped_code_1.f90' > wrapped_code_1.f90:1.133: > > nd_closed_RE, k_base_synt_p53, k_bindleft_p53_RE, k_bindright_p53_RE, k_de > 1 > > Warning: Line truncated at (1) > wrapped_code_1.f90:1.132: > > und_closed_RE, k_base_synt_p53, k_bindleft_p53_RE, k_bindright_p53_RE, k_de > 1 > > Error: Expected formal argument list in function definition at (1) > wrapped_code_1.f90:32.3: > > end function > 1 > Error: Expecting END PROGRAM statement at (1) > Error: Unexpected end of file in 'wrapped_code_1.f90' > > > Is this something I can just fix by renaming all the parameters using .subs > to shorter names, then working with that? > > > Second point: > > > if I autowrap a function with a lot of symbols, can I specify the order in > which the function will take the different symbols as input, or will the > order simply be determined by the order in which they appear in the > expression? Is there any introspection to determine the parameter order? > > > Thank you very much. > > > Federico > > > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
