How to fix atoms velocity during the dynamic simulation

Hi everyone,

I am doing the simulation work. In this work, I have already assigned the initial velocity of atoms. But, how to keep this initial velocity of atoms during the NPT or NVT dynamics simulation? Maybe need the script to solve this problem, and I try to use the "Velocity function". 

Hope some help, Thanks a lot!!!

Heyang