I am working across mathematics, physics and engineering. And I am looking for whether there exists already formally established knowledge in the field.

Given a periodic graph (actually a physical lattice or crystal structure), we want to examine some periodic coloring ( or ordered but not periodic coloring) of the graph. This coloring in physics may be considered as filling the lattice site with atoms, ions and so forth. Is there some already formally established mathematical area that deals with the this?

Further, we could construct functions from these kinds of coloring to a real number. ( in physics we associate average energy with the specific structure) and we want to minimize it by searching the periodic or ordered graph space. Is there such a branch in mathematics dealing with this also?

Furthermore, I wish to construct a program to analyze any arbitrary periodic colored graphs (that is to analyze different crystal structure. ) By analyze I mean search the coloring that would give the minimum energy. Is there existing well established knowledge for doing this?

An reduced problem would be is there some established mathematical theorems tackling the coloring of an arbitrary periodic graph, in any possible way?

Thank you very much.