No. There is no slack to give, the question is blatantly off-topic. Question that are off-topic should be closed.
I completely and utterly disagree with the chosen close reason though.
Todd left the vote with which I agree more:
I'm voting to close this question as off-topic because this is a code review question, not a chemistry question.
It is essentially a question about debugging, not code reviewing, but it is essentially not about chemistry, not even about software powering chemistry.
I also left a comment, where I pointed out where it might be on topic, and where it will definitely not:
This wouldn't be on topic at code review, as it is not a fully functional program or code. It might be on topic on scientific computing (or computer science; I can never remember the correct name). With me background it could probably be a fit for stack overflow, but I'm not sure about that. Implementation is certainly something our site touches tangentially at best.
I admit that comment was a bit mysterious, I was on the bus and didn't have the time to do a proper check. The site I meant was Computational Science, which would have been found easily from the site description. Also it should have read "with more background' instead of "with me background", but still I think these are important points, which first of all could have been resolved with another comment, and second were completely and utterly ignored.
Furthermore:
The OP attempted to obtain answers in different sites (he reposted in code review SE and on SO), but the post was placed on hold in both. This illustrates shortcomings with the SE ecosystem, namely narrowness of scope. I suggest a little more tolerance for this type of question given the difficulty finding anywhere else to post them.
Reposting the same question, without deleting the original is strongly discouraged. In most cases, if the case of cross-posting is known, the question will be immediately put on hold with prejudice. It's worse, when it is not even said that the question was cross-posted.
If you post a question on any site of the network, it is your duty to check whether it is on topic, or live with the consequences of it being closed. Again it would have been easy to check the requisites of these sites before posting it. The user didn't even check whether the site supports MathJax.
This does not illustrate the shortcomings of stack exchange, but rather the inability or reluctant attitude of one user to do a bit of basic research and invest some effort into the question. (And I am not talking about the effort put into the program, which I am sure was quite substantial, but making the question clearer for other users.)
Apart from this, there was help at both of the spun off questions, pointing out why it is off topic, and what to do to put it on topic, or where to send it. There really is not much more to do from our end; I'm sure this question could have found a proper home with a little more effort on the users behalf.
The user you are asking us to cut more slack repeatedly ignored advice on our site on how to improve the questions; others and I have spent hours in reformating the questions to fit our standards. We have cut enough slack already, it has to stop now.