density along x direction

What about putting all of the CO2 carbon atoms in a group, and then using fix ave/spatial?

Or do some post processing based on the trajectory. It can be useful when I am using different MD packages and would like to compare the results.

And, I prefer mdanalysis code.

Bests,
Yi

Thank you for your reply.

Or do some post processing based on the trajectory. It can be useful when I am using different MD packages and would like to compare the results.

And, I prefer mdanalysis code.

Bests,
Yi