Back to main menu

Writing functions

When running in interactive mode, Atomsk may be used as a calculator to evaluate some basic operations. Some options, like the option "-properties", also allow to define functions that take a different value for each atom in the system, depending on its coordinates (x,y,z). This page describes how to define such functions for Atomsk to interpret.

The following mathematical operators are supported, by order of priority:

The following mathematical functions are supported:

The following mathematical and physical constants are replaced by their corresponding value:

Finally, the following keywords relative to the current atomic system can be used (only when an atomic system is actually defined):

Examples

sqrt(2)

3*cos(pi/2)

3.2*atan2(x/y)

3*cos(pi*x/Hx) + 2*sin(pi*y/Hy)

Back to main menu