First-principles method for calculating the rate constants of internal-conversion and intersystem-crossing transitions | Synapse