Changed to standard std vector using .resize to create new atoms