[lammps-users] fix recenter

can i use fix recenter for one group of rigid molecules?

I don’t think that would be a good idea. Please also read the “Notes” blocks in the documentation very carefully.

What is the problem you want to address? or the effect that you want to achieve?
I have the suspicion that you either want to mask a problem that should be properly addressed or want to do something that can be done differently.

thanks for your reply.
I have two molecules water and THF
I want use fix rigid/npt for my work and i should stop movment one section of this system.i want use fix recenter but this fix doesnt work and scatters my system.
i tried it without rigid command and it works well.
how i can stop movment of this section of system but with rigid molecules.
why fix recenter with rigid command scatters system?

I am having difficulties understanding your english. It sounds to me as if your intention is to immobilize some atoms.

there are two problems with that and using fix recenter:

  1. as it is stated in its documentation, fix recenter does not alter the dynamics, it just changes coordinates after the fact. think of it like a moving camera that is following a person in a large crowd. and as I already mentioned, there is a big “note” block discussing the “shift” option as you would normally use this with “shift all”. it does not immobilize atoms at all, it only changes how you look at them.

  2. there are general problems with immobilizing atoms when using a variable cell (npt): the cell adjustment is usually done by scaling all atom positions (dilate all), but that will move atoms that you want not to be moved, but if you do not move them (exclude them from the scaling) then the atoms around them will be displaced and in then “pushed into” the immobile atoms, which is unphysical.

this topic has been discussed multiple times on this mailing list and there is no fully satisfactory solution. most approaches cause more harm than good.
thus it is usually better to either avoid using npt and use nvt instead or don’t fully immobilize but use fix spring/self or something similar to do a restrain, i.e. atoms can move around but will be pulled back.

thanks alot