How to apply for professorship in another field?
With due attention to the fact that within that CS department, there might be many affiliated faculty members, are who proficient in programming and capable of teaching, your tendency might not, reasonably, lead to the desired outcome.

As the programming skills, nowadays, are essential for different scientific disciplines, I suggest you try to convince the department, in a proposal-based manner, to define a programming-driven course for students corresponding to your home department, you say, containing the fundamentals of the simulating chemical processes (If it has not been already existed, of course)...

Such scenario would sound more functional for you to follow your interest.