This is the code at the time of publication of the second version of the preprint of the paper in arXiv. The main changes have been that in the notebook 3 of Mathematica, I have added the equations for the Weddle surfaces in Katsura and Kondo's model.