Hello. I am running some simulations on a region with particles and 100,000 timesteps. I was wondering if there was a way for the number of bonds at the end of the simulation (timestep 100,000) to be shown in LAMMPS output other than having to output a whole separate file with the bond information. Is there a way just to simply print this at the end of the output when I run it through the terminal?
There is not enough detail here to give specific advice. There are different ways to access the “number of bonds” depending on what kind of model you use. How do you access the number of bonds in your case currently? Can you provide a minimal example?
Here is a portion of the script I am running with the BPM package. I dump the bond property data into a file from which I am able to find the end number of bonds at the end of the simulation
compute 1 all property/local btype batom1 batom2 # computes bond data (bond type, particle idenitifier for atom 1 and 2)
compute 2 all bond/local dist engpot # computes bond data (length and energy)
thermo_style custom step ke pe pxx pyy pzz #c_tbond
thermo_modify lost ignore lost/bond ignore
dump 1 all custom 100 atomsize1 id x y z c_nbond
dump 3 all local 50000 bpmsize1_bond.txt index c_1 c_2 # dump bond properities
Normally, you would be able to output the number of bonds with the “bonds” thermodynamic property, but for BPM this is a bit different. I suggest you contact the principal author of the package for specific advice.
The non-specific workaround is to not configure the dump command for during the run. After it is completed, however, define/configure it to output every step and then continue to the run for just one more step. That way you will only generate one frame of output.