I understand that you are interested to do a minimization with some frozen atoms. You have to create a group with the particles that must be fixed and apply zero force to that group (with 'fix setforce' command). If you are interested in MD, then you may apply the solutions above.
IMPORTANT NOTE: In case of layered systems (interfaces of solid-liquid, graphite) you have to remove the rotation and translation of each layer. Otherwise, the layers will fly in the simulation box. Because the weak interactions between layers, the rotation motion of the layers is hindered by the presence of the other layers and the rotation motion of each layer will be transformed during the simulations into translation motion. The result: the layers will start to fly in the simulation box.
Viorel Chihaia Hi Viorel. Could you explain a little more about how to remove the rotation and translation of each layer?
I'm investigating the solid-liquid interface. In my simulations, atoms in the solid crystal were fixed by using the fix setforce command, while atoms in the liquid were allowed to move freely. When the system was cooled down (in NVT runs), the liquid solidified. However, I found that atoms in these solidified layers don't move around their equilibrium sites. Instead, each of these layers fly forward and backward as a whole. How to solve this problem? Many thanks.
You have to define each layer as a group (using "group" command) and set for each group (layer) the translation and rotation of the groups by "velocity" or "fix momentum" commands. The liquid molecules must to be treated as a group as well. If all the linear momentum for each group are zero, then also the total linear momentum is zero. For angular momentum, is somehow similar, but the way how the reference point is chosen can change the discussion. Anyway, at the end you might fix the total angular momentum by "fix momentum" command.