The simulations done in molecular dynamics (MD) are used to learn about the behavior of macromolecular systems. While analyzing large macromolecular systems, the computation can last long, many times for days, weeks and months, due to which the need of parallelization occurs for shortening the time. The graphics processing unit (GPU) yields to multithread computational capacity by the use of CUDA high-level language which suits the molecular dynamics algorithms. The OpenCL platform allows its reckoning kernels to run without difficulty on GPUs, as well as on multicore computers. We developed a new thermostat that combines Langevin dynamics with the global Berendsen thermostat which is parallelized in CUDA, as well as in OpenCL. The GPU parallelization is presented in this paper by applying stochastic dynamics, respectively the Langevin integrator, together with the Berendsen thermostat. A system of atoms is tested by taking into consideration the friction coefficient and the coupling parameter.