In order to calculate the total spin the following function has to be present in the module file *.so:
extern "C" void Scalc(Vector & S,double * T, Vector & Hxc, Vector & Hext, double * gJ, Vector & MODPAR, char ** sipffilename, ComplexMatrix & Icalc_parstorage);
it works exactly as mcalc, therefore we do not give more details here.