Hi,

I’m studying Lennard-Jones glass with an external force field (implemented using edited add fixforce .cpp file) under athermal quasistatic conditions. The external force field is a bending force field, the potential of which is not “continuous” when particle rearrangements happen, and thus has converging problems during energy minimization (CG).

I’d like to try preconditioned Conjugate Gradient. Is there an example on how to modify minimization source code? Or has someone done preconditioned CG in LAMMPS before?

Best,
Meng

I don’t think preconditioning is going to help if the potential you are minimizing is discontinuous. Perhaps you are better off approximating your bending potential with something that is continuous or using a damped dynamics minimizer.

Hi, Stefan:

Thanks for the reply! The CG code from our research lab written in c++ works well in this system, but is relatively slow when when go to large system size. This is why I tend to try LAMMPS. I have tried FIRE and damping methods as well, while FIRE could take too long to converge and damping was too slow to get close to minimum.

Is the LAMMPS CG minimizer easy to modify? Also, here below is the description of the bending potential and please let me know if you have any suggestions.

Best,
Meng

/———————————————Bending potential———————————————/

The LJ potential is a standard shifted-force Lennard Jones potential, which is 1st-order and 2nd-order continuous at cutoff. However, the potential of the force field may not. Here below are the details of the force field:

The force field is a bending force field, and the force on any particle at position (x,y,z) only has z-direction component:
F_z = A[cos(pi*x/L)-2/pi] + ax + by +c,
Where A is a constant amplitude, L is a constant box length, and a, b , and c are close-to-zero numbers that are fixed at current configuration but will vary whenever the configuration changes. At any given configuration during an energy minimization step, I solve linear equations to update a,b and c, in order to make total force and total torque equal to zero. To summarize, given a configuration, I can use an analytical expression from positions of all particles to calculate a,b and c, and then update my force field.

I integrate the force function in z direction to calculate its corresponding potential energy. I suppose this force field is “discontinuous” since a, b and c are varying, i.e., my Energy Landscape is varying itself. Thus, I need a Conjugate Gradient algorithm that can constantly update new conjugate directions when the line search along the old direction cannot find a minimum.

/—————————————————————————————————————/

If a, b and c change every step then there is no use in using a conjugate gradient. You probably should use steepest descent (sd) instead? Does your custom code agree with LAMMPS for smaller systems?

Hi, Stefan:

Thanks for your reply. The parameters a,b,c are close to zero, and I am iterating “increase force field amplitude A by dA=0.001, then do CG” step by step. My custom code agrees well with LAMMPS (with difference of minimized energy smaller than 1e-8) when the system does not rearrange, i.e., when the system is close to a “fixed” minimum.

I would try the sd method then.

Best,
Meng