Hi Steve
I looked the Pseudo-code in developer guide which explains how the Verlet:run () method works. My understanding is that MD force is computed by the methods from pair->compute () to kspace->compute (). While the fix setforce command will invoke the fix->post_force () method which deals with the external force. So if I set the force components in y,z direction as NULL by this command
fix still wall setforce 0.0 NULL NULL
It means that the force components in y,z direction should same as the MD force which is calculated by the methods from pair->compute () to kspace->compute ().
Therefore, for my first simulaiton (all walls are fixed) I should use
velocity bot_wall set NULL NULL NULL units box
velocity top_wall set NULL NULL NULL units box
fix still wall setforce 0.0 0.0 0.0
As the force in y,z should be 0.
In terms of my second case.
In my second simulation, I have one fixed layer and one flexible layer (the thermostat is applied to the flexible layer). I want to keep both layers moving with a constant velocity at x direction so the force in x direction should be 0 for both layers, and force in y z direction for fixed layer should be 0 as well .As for force in the y,z direction for the flexible layer, I want to keep it as which is decided by potential. So I use these command:
velocity fix_wall set NULL NULL NULL units box
velocity flexible_wall set NULL NULL NULL units box
fix 1 fix_wall setforce 0.0 0.0 0.0
fix 2 flexible_wall setforce 0.0 NULL NULL
Is my understanding right?
If not, could you please explain more?
The restart file does store the velocity. Does it also store the force?
Fan Li
------------------ Original ------------------