Create spm.r

Calculate SPM value . The method is compiled basing on method description from TiSGeD database.