  We study stability and structure of quark matters as a function of density in
a framework of molecular dynamics (MD). Using appropriate effective
interactions and the frictional cooling method, we search for the minimum
energy of the system. Transition from confined to deconfined phase is observed
at densities of 2 -- 3$\rho_0$, where $\rho_0$ is the nuclear matter saturation
density. The $uds$ matter becomes more stable than the charge-neutral $ud$
matter at 3$\rho_0$, but the $udd$ matter is the most stable even at high
density.
