Theoretical study of photoinduced singlet and triplet excited states of 4-dimethylaminobenzonitrile and its derivatives.