Wouldn't it be better to test group.getChemComp().getResidueType() ? It should be lPeptideLinking ...