We develop a model of Bose-Einstein condensate dark matter halos with a solitonic core and an isothermal atmosphere based on a generalized Gross-Pitaevskii-Poisson equation [ P.H . Chavanis , Eur . Phys . J . Plus 132 , 248 ( 2017 ) ] . This equation provides a heuristic coarse-grained parametrization of the ordinary Gross-Pitaevskii-Poisson equation accounting for violent relaxation and gravitational cooling . It involves a cubic nonlinearity taking into account the self-interaction of the bosons , a logarithmic nonlinearity associated with an effective temperature , and a source of dissipation . It leads to superfluid dark matter halos with a core-halo structure . The quantum potential or the self-interaction of the bosons generates a solitonic core that solves the cusp problem of the cold dark matter model . The logarithmic nonlinearity generates an isothermal atmosphere accounting for the flat rotation curves of the galaxies . The dissipation ensures that the system relaxes towards an equilibrium configuration . In the Thomas-Fermi approximation , the dark matter halo is equivalent to a barotropic gas with an equation of state P = 2 \pi a _ { s } \hbar ^ { 2 } \rho ^ { 2 } / m ^ { 3 } + \rho k _ { B } T / m , where a _ { s } is the scattering length of the bosons and m is their individual mass . We numerically solve the equation of hydrostatic equilibrium and determine the corresponding density profiles and rotation curves . We impose that the surface density of the halos has the universal value \Sigma _ { 0 } = \rho _ { 0 } r _ { h } = 141 M _ { \odot } / { pc } ^ { 2 } obtained from the observations . For a boson with ratio a _ { s } / m ^ { 3 } = 3.28 \times 10 ^ { 3 } { fm } / ( { eV / c ^ { 2 } } ) ^ { 3 } , we find a minimum halo mass ( M _ { h } ) _ { min } = 1.86 \times 10 ^ { 8 } M _ { \odot } and a minimum halo radius ( r _ { h } ) _ { min } = 788 { pc } . This ultracompact halo corresponds to a pure soliton which is the ground state of the Gross-Pitaevskii-Poisson equation . For ( M _ { h } ) _ { min } < M _ { h } < ( M _ { h } ) _ { * } = 3.30 \times 10 ^ { 9 } M _ { \odot } the soliton is surrounded by a tenuous isothermal atmosphere without plateau . For M _ { h } > ( M _ { h } ) _ { * } we find two branches of solutions corresponding to ( i ) pure isothermal halos without soliton and ( ii ) isothermal halos harboring a central soliton and presenting a plateau . The purely isothermal halos ( gaseous phase ) are stable . For M _ { h } > ( M _ { h } ) _ { c } = 6.86 \times 10 ^ { 10 } M _ { \odot } , they are indistinguishable from the observational Burkert profile . For ( M _ { h } ) _ { * } < M _ { h } < ( M _ { h } ) _ { c } , the deviation from the isothermal law ( most probable state ) may be explained by incomplete violent relaxation , tidal effects , or stochastic forcing . The isothermal halos harboring a central soliton ( core-halo phase ) are canonically unstable ( having a negative specific heat ) but they are microcanonically stable so they are long-lived . By extremizing the free energy ( or entropy ) with respect to the core mass , we find that the core mass scales as M _ { c } / ( M _ { h } ) _ { min } = 0.626 ( M _ { h } / ( M _ { h } ) _ { min } ) ^ { 1 / 2 } \ln ( M _ { h } / ( M _ { h } % ) _ { min } ) . For a halo of mass M _ { h } = 10 ^ { 12 } M _ { \odot } , similar to the mass of the halo that surrounds our Galaxy , the solitonic core has a mass M _ { c } = 6.39 \times 10 ^ { 10 } M _ { \odot } and a radius R _ { c } = 1 { kpc } . The solitonic core can not mimic by itself a supermassive black hole at the center of the Galaxy but it may represent a large bulge which is either present now or may have , in the past , triggered the collapse of the surrounding gas , leading to a supermassive black hole and a quasar . On the other hand , we argue that large halos with a mass M _ { h } > 10 ^ { 12 } M _ { \odot } may undergo a gravothermal catastrophe leading ultimately to the formation of a supermassive black hole ( for smaller halos , the gravothermal catastrophe is inhibited by quantum effects ) . We relate the bifurcation point and the point above which supermassive black holes may form to the canonical and microcanonical critical points ( M _ { h } ) _ { CCP } = 3.27 \times 10 ^ { 9 } M _ { \odot } and ( M _ { h } ) _ { MCP } \sim 2 \times 10 ^ { 12 } M _ { \odot } of the thermal self-gravitating bosonic gas . Our model has no free parameter so it is completely predictive . Extension of this model to noninteracting bosons and fermions will be presented in forthcoming papers . Preliminary calculations show that our results are in agreement with the results of Schive et al . [ Phys . Rev . Lett 113 , 261302 ( 2014 ) ] for noninteracting bosons and to the results of Ruffini et al . [ Mon . Not . R. Astron . Soc . 451 , 622 ( 2015 ) ] for fermions and that they provide a thermodynamical justification to their core mass - halo mass relations .