In paper, a numerical modeling of the collapse of molecular cloud is presented. The numerical method for solving the equations of hydrodynamics is based on the extension of HLL method for using of nested adaptive mesh technologies. In case of nested meshes, if neighboring cells have the same size as the one considered cell, the Rieman problem is trivial. If the neighboring cell is larger than a considered cell, then a uniform distribution of the parameters over the large cell is assumed. Then a new subcell is allocated in a larger cell corresponding to a size of the cell considered and being adjacent to it, after which the necessary data for a computing. If a neighboring cell is less than a considered cell, then values around a small cell are averaged. The energy behavior of the rotating molecular cloud is in quantitative agreement with the results of other codes before the moment of collapse, and after the moment of collapse. It should be noted that collapse occurs at exactly the same moment in time.