How to keep rigid bodies rigid during energy minimization

The manual says the fix rigid won’t be invoked during energy minimization,thus how can I keep the rigid bodies rigid during energy minimization.

Thank you in advance!

1 Like

My first thing to do would be using a fix nve integrator together with a fix langevin thermostat to drain any generated kinetic energy, using a very small damp time to overdamp the system and adjusting the temperature from a high initial value to a very low final value, effectively performing simulated annealing.

If high-energy clashes destabilized the system right at the start it might take an additional fix dt/reset to keep numerical stability.

I remember once reading a post where Axel (@akohlmey) suggested to put very high values for the bonded parameters during the minimization stage in order to prevent the atoms from getting away from the desired positions relative to one another. I tried to search for this post quickly but I could not find it. I hope I am not hallucinating. In any case, I have used this strategy to get an optimal configuration (slightly different context from yours) and it worked super fine, so I guess it should work in your case also ^^

PS: ofc this implies that you would need to actually have bonded potentials reinforcing the desired relative spacing within that rigid body of yours.

Stiff bonds and angles is an option that would be most useful to replace fix shake. So whether this will give the desired effect to replace fix rigid depends on the geometry and topology of the rigid object.

An alternative to a minimization would be simulated annealing, that means running an MD with a suitably short time step and fix nve (or fix nve/limit) and then use fix viscous to slowly drain energy from the system. If the system has already low potential energy, it may be required to first add some kinetic energy with the velocity command or otherwise heat the system up before draining the energy.

And how can I, or what keyword/tactic should I use, to have first stiff bond parameters during minimization and then change back to my bond parameters?

What I know so far is that:
1- Bond parameters are declared once, in my case in the data.lmp file.
2- Then I have thought of maybe overwriting these bond parameters with
**bond_coeff * **
3- Do the minimization and last, and what I yet dont’ know, is to go back to the bond parameters of data.lmp, step 1.

Well, I mean, you can always do the minimization with the “unrightful” super high values of K, save the configuration with the write_data command by the end of it and then just set up a new simulation for the sake of doing MD. In this new simulation you declare the proper parameters for everything and also suitable initial velocities. It is rustic but it works :slight_smile:

2 Likes

You can save all “coeff” settings from the data file to a separate file with the write_coeff command — LAMMPS documentation

To restore the old settings after reading the data file generated after minimization, you just need to read that file with include command — LAMMPS documentation and you should be back to your original settings.

1 Like