[lammps-users] Could the atan2 function be included in LAMMPS?

Dear LAMMPS developers,

Is there any possibility that the atan2(y,x) function could be included in the variable math functions in LAMMPS? It would be really helpful in order to determine the polar coordinates of an atom from its x and y coordinates, and use this angle further in other formulas.

Thanks for your help!

Christer H. Ersland.

I'll add it to the todo list ...


Added it as the 13 Sept patch.
Let me know if it works as you expect.


Hi Steve,

The atan2(y,x) function in the new patch works like a charm. Finally, I can use some more complicated functions to move my boundary atoms! Thank you so much for adding this.