Suani T. R. Pinho, V. A. G. O. de Meneses, M. S. P. Muniz, Thierry Petit Lobão: An algorithm for periodicity and almost periodicity of uniform substitution sequences and its implications on aperiodic spin models. Comput. Phys. Commun. 241: 48-55 (2019)