Position restraint

I want to apply position restraints to a group of atoms which are not bonded to each other. What should I follow?

Please have a look at fix spring/self.

Thank you. Got it. Any suggestion you want to give about the force constan value? Also can we use setforce command making the force acting 0 for position restraint?

No. That depends on the choice of units anyway.

I don’t understand your logic here. If you don’t want a position restraint force, then don’t apply it. This is selected by the fix group. Fix setforce will do what the documentation says it does on the atoms in its fix group. What will be the exact outcome of applying fix spring/self (which adds to the per-atom force vector) and fix setforce (which replaces force vector components) depends on the order in which the two fixes are applied.