We present new continuum and molecular line data from the ALMA Three-millimeter Observations of Massive Star-forming regions (ATOMS) survey for the two protoclusters, G12.42+0.50 and G19.88-0.53. The 3 mm continuum maps reveal seven cores in each of the two globally contracting protoclusters. These cores satisfy the radius-mass relation and the surface mass density criteria for high-mass star formation. Similar to their natal clumps, the virial analysis of the cores suggests that they are undergoing gravitational collapse ($\rm \alpha _{vir} << 2$). The clump to core scale fragmentation is investigated and the derived core masses and separations are found to be consistent with thermal Jeans fragmentation. We detect large-scale filamentary structures with velocity gradients and multiple outflows in both regions. Dendrogram analysis of the H13CO+ map identifies several branch and leaf structures with sizes ∼ 0.1 and 0.03 pc, respectively. The supersonic gas motion displayed by the branch structures is in agreement with the Larson power-law indicating that the gas kinematics at this spatial scale is driven by turbulence. The transition to transonic/subsonic gas motion is seen to occur at spatial scales of ∼0.1 pc indicating the dissipation of turbulence. In agreement with this, the leaf structures reveal gas motions that deviate from the slope of Larson’s law. From the large-scale converging filaments to the collapsing cores, the gas dynamics in G12.42+0.50 and G19.88-0.53 show scale-dependent dominance of turbulence and gravity and the combination of these two driving mechanisms needs to be invoked to explain massive star formation in the protoclusters.