Self-consistent field : theory and applications