Amorphous silicon oxycarbide (SiOC) is of great technological interest. However, its atomic-level structure is not well understood. Using density functional theory calculations, we show that the clustering tendency of C atoms in SiOC is extremely sensitive to hydrogen (H): without H, the C-C interaction is attractive, leading to enrichment of aggregated SiC4 tetrahedral units; with hydrogen, th...