hanging on minimize

Hello LAMMPS,

LAMMPS seems to hang upon minimization if any part of the system happens to already be “perfectly minimized,” i.e. exactly in the lowest energy state position as specified by the force field.

Please find a short script and data file which displays this behavior.

Thanks,

Jake

test_lammps_min_prob.data (9 KB)

minimize_cnt.class2 (703 Bytes)

Hello LAMMPS,

LAMMPS seems to hang upon minimization if any part of the system happens to
already be "perfectly minimized," i.e. exactly in the lowest energy state
position as specified by the force field.

Please find a short script and data file which displays this behavior.

i notice that your output has a NaN pressure already at step 0, and
when using compute pressure on the various subsystems, it looks like
you have come across an issue in your impropers that seems to be
messing things up.
looking at the data file, all improper coefficients are zero, so your
impropers actually have no effect.

when i remote the impropers from your data file the simulation seems
to be running "normal".

axel.

Thanks Axel. I will say, this is just a small part of my system which does also contain legitimate impropers. It would be problematic in the future to go through and remove just these impropers when converting systems from third party software

compatibility with third party tools is a constant struggle. it is a
rather thankless task to write and maintain the conversion tools and
most of the people who are able to do so, don't care so much, because
they have their own tools and the people that prefer using third party
tools often don't have the ability or time to write, maintain or
update the converters. that gets more complicated, when the file
formats require significant reverse engineering and money needs to be
spent on obtaining a license for the third party tool in order to
thoroughly test a converter tool. this is another case, where some
kind of "bounty system" or "crowdfunding" approach might be
considered. or you may start looking into other tools for setting up a
system.

in this specific case, a quick look in the LAMMPS source code can help
as well. with the following small change, the NaNs can be avoided and
the simulation should proceed cleanly by avoiding to compute the
diverging AngleAngle terms.

axel.

diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp
index c813954..942f46a 100644
--- a/src/CLASS2/improper_class2.cpp
+++ b/src/CLASS2/improper_class2.cpp
@@ -657,6 +657,9 @@ void ImproperClass2::angleangle(int eflag, int vflag)
     i4 = improperlist[n][3];
     type = improperlist[n][4];

+ if ((aa_k1[type] == 0.0) && (aa_k2[type] == 0.0)
+ && (aa_k3[type] == 0.0)) continue;