From electronic structures to molecular-level cluster formation mechanisms in the atmosphere