If I understand correctly, the top part of your loop just makes vectors for every possible combination of some variables. The expand.grid() function is perfect for this:
my_data <- expand.grid(
H = 0:HexC,
HN = 0:HNcC,
`F` = 0:FucC,
SA = 0:SAC,
SO3 = 0:SO3C
)
I don't have the data for the bottom half of the inner loop, but I'd bet it could be expressed as adding and manipulating columns of the above data.frame.
Edit: I don't mean this to be "You're not following the sacred idioms!" It should help speed up your code, especially if the number of combinations is very large. "Growing" vectors is a very time-expensive approach in R; every time you do x <- c(x, y), R is actually creating a new object with the value c(x, y) and then having the name x point to that new object. This takes a small amount of time to do but can quickly add up to a long time in a loop.
But expand.grid() avoids creating so many objects by doing a little work up front. It figures out how many rows and columns the final result should have, then repeats each vector's values as needed to have a row for every combination.