Generalized open shell SCF theory