I think there is an issue in the energy printed after several minimizations. I think this problem was reported before and I thought it was solved but I am still getting it. I am using LAMMPS 20 Nov 2015 version and when I run the input attached some times I get the following results:
this input deck requires a very long time to run. this makes debugging
near impossible.
do you think you could manufacture some input that runs faster? it
doesn't have to produce meaningful results, just reproduce the issue.
also, you might want to try running a test with the latest patch.
we've been systematically auditing different parts of LAMMPS with
static code analysis tools and incrementally added changes to address
the issues reported. this is a bit of a long shot, but it may just be
that one of them solves the problem you are seeing.
I know it will be hard to track with the run I sent. I’ll try to find something easier but it seems like the issue is subtle and does not show up that often.
I just pull the latest version and I’ll try with it to see if I can reproduce the error.
This rings a bell alright. I suspect it has something to do with how fix box/relax works. I looked at your output file and observed that the increases in energy on the last step only occur when fix box/relax is used. Also, it only happens 29 times out of 230 runs. Finally, there seem to be to distinct non-zero values of the pressure occurring: ~-400 (13 times) and ~-335 (16 times) e.g.
I suspect that the final geometry is unchanged, but the energy and pressure calculation is somehow incorrect. You could verify this by reading back in the dump file. I bet you will see energy and pressure very close to the previous step. If you are going to be running this type of simulation again, you could also follow the final minimize with a ‘run 0’ command, to get the true energy. That way, I predict you will always get a good value for ${ener}. As Axel said, in order to fully track this down, we would need a smaller example.
I agree, the problem seems to be in box/relax. I have used the last pulled version and the results are the same. You are right in your diagnostics so I’ll try the run 0, that should work. And I’ll try to find something more tractable so it is easier to debug.