The present paper proposes a method for electronic-structure calculations on a type of system that cannot be handled by present methods. It considers a system where a multideterminant wave function is essential for an atom or a small cluster of atoms embedded in a large system, normally a solid, which can be treated by density-functional methods such as with the local-density approximation (LDA). A suitable example is a transition-metal atom in a semiconductor or MgO host. In this method the embedding potential for the cluster is generated from a LDA calculation but applied in a multiconfiguration calculation. The method and the concept of the embedding potential are validated by application to a simple system of a cluster Li2Mg2 of four pseudoatoms.