compute averaged bond length

Dear all,

I hope to compute the time averaged bond length. I am trying to use compute pair/local, but the computed bond length can not be applied to ave/time to get the time average. Is there any convenient way that I can get the average without post process the dump file?


If it’s a single bond, and defined explicitly, (If it’s not explicit, you could perhaps define an explicit bond of type none between the two atoms) isolate it with a group, use compute bond/local > compute reduce sum > fix ave/time. If it’s more than one bond, it’s not possible because the bonds/pairs don’t have unique identifiers to collate them by for time averaging. (At least as far as I know).

You can also use compute reduce to sum up and average over
many bond lengths tallied by compute bond/local. You could
also use fix ave/histo to tally the bond lengths in bins, i.e. histogram
them. Brad is correct, that there is no current way to compute
one average bond length per bond and maintain it over time, b/c
the ordering of what compute bond/local produces is random.
So you would need to post process that from a dump local file.