private void initPTMMap(Unimod unimodObject) {

        ptmMap = new HashMap<Comparable, PTM>(unimodObject.getModifications().getMod().size());

        for(UnimodModification unimodMod: unimodObject.getModifications().getMod()){
            /**
             * We will add the UNIMOD to the id in order to have the same style than PSI-MOD and
             * the mzIdentML files
             */
            String accession   = "UNIMOD:" + (unimodMod.getRecordId()).intValue();
            String name        = unimodMod.getTitle();
            String description = unimodMod.getFullName();
            String formula     = (unimodMod.getDelta()!=null)?unimodMod.getDelta().getComposition():null;
            Double avgMass     = (unimodMod.getDelta()!=null)? (unimodMod.getDelta().getAvgeMass()).doubleValue():null;
            Double monoMass    = (unimodMod.getDelta()!=null)? (unimodMod.getDelta().getMonoMass()).doubleValue():null;
            List<uk.ac.ebi.pride.utilities.pridemod.model.Specificity> specificityList = null;

            if(unimodMod.getSpecificity() != null && unimodMod.getSpecificity().size() > 0){
                specificityList = new ArrayList<uk.ac.ebi.pride.utilities.pridemod.model.Specificity>(unimodMod.getSpecificity().size());
                for(uk.ac.ebi.pride.utilities.pridemod.io.unimod.model.Specificity oldSpecificty: unimodMod.getSpecificity()){
                    uk.ac.ebi.pride.utilities.pridemod.model.Specificity specificity = new uk.ac.ebi.pride.utilities.pridemod.model.Specificity(oldSpecificty.getSite(), oldSpecificty.getPosition());
                    specificityList.add(specificity);
                }

            }
            PTM uniModPTM = new UniModPTM(accession, name,description,monoMass,avgMass,specificityList,formula);
            ptmMap.put(accession,uniModPTM);
        }
    }