I came across filling a space with O2 (oxygen as a molecule) and apart from not knowing exactly how to create this, I wonder if Geant4 even distinguishes a space filled with single oxygen atoms with a certain density or a space filled with couples of two oxygen atoms?
Does Geant4 distinguish this?
If yes, how do I create this?
Geant4 does not treat molecules in materials at all. When you specify a volume with a material, it is implicitly a continuum. During transportation, interaction lengths for various processes are computed as floating point values. When that track distance is reached, an interaction occurs. There is no taking into account crystal structure, lattice constants, space between atoms, etc.