Given a very simple DNAStringSet, built like this:
afastafile <- DNAStringSet(c("GCAAATGGG", "CCCGGGTT", "AAAGGGTT", "TTTGGGCC"))
names(afastafile) <- c("ABC1_1", "ABC2_1", "ABC3_1", "ABC1_2")
I would get a DNAStringSetList where the list elements are grouped by a pattern in the sequence name;
in this example, I would get a list of 3 (ABC*) elements, with the first element containing sequence #1 and #4 (ABC1_1 and ABC1_2), and so on...