public static string WriteModificationString(AminoAcidPolymer polymer)
{
IMass[] mods = polymer.GetModifications();
int count = mods.Length;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < count; i++)
{
if (mods[i] == null)
continue;
sb.Append(mods[i].ToString());
sb.Append(":");
sb.Append(i);
sb.Append(',');
}
if (sb.Length > 0)
{
sb.Remove(sb.Length - 1, 1);
}
return sb.ToString();
}