I’m trying to find the minimum value in one of the columns of the bin array generated by the ave/spatial fix, using
variable minimum equal min(f_ID[J]) (with J = 2 in particular for the number of atoms in the bins)
I consistently get a value of zero when I print v_minimum along with the other thermal output.
However, when I use the max() special function to find the maximum in f_ID[J], it gives me the correct non-zero value.
I know that the minimum value is not zero because I write the data generated by the ave/spatial fix to an output file and the column in question contains no zero value on inspection.
I need to calculate this minimum value because I use it as a condition to jump to a different line of my Lammps input script. I’m running alternating contact formation and rupture simulations on metal input structures of various geometries and I would like contact formation to continue only to a certain minimum number of atoms in the contact region and then rupture the contact. Ideally, I want to repeat this process many cycles and so “mechanically anneal” the metal tips I bring into contact with each other.
I use the lmp_g++ executable on a server on which I don’t have sudo permissions, so if the solution to my question requires me to modify and reinstall lammps (difficult, server administrators are very busy), I would be grateful if anyone could suggest other ways of doing the repeated formation/rupture simulations.
Thanks in advance for any help and suggestions