  We perform a coupled channel calculation of the $DD^*$ and $c\bar c$ sectors
in the framework of a constituent quark model. The interaction for the $DD^*$
states is obtained using the Resonant Group Method (RGM) and the underlying
quark interaction model. The coupling with the two quark system is performed
using the $^3 P_0$ model. The X(3872) is found as a molecular state with a
sizable $c\bar c$ component. A comparison with Belle and BaBar data has been
done, finding a good agreement. Other possible molecular molecular states are
discussed.
