[lammps-users] Update dump command


I am running a simulation whereby I have created a large vesicle of CG particles, which I then apply an external force to a specific region of. I want to dump the particle data from the particles being effected by the external force. I continually update a group containing those particles within the bounds of the forces application. I can initiate a dump command with the first iteration of this group, but when it gets updated with its new definition of constituent particles, the dump command no longer applies. Essentially I have the following two lines (running through Python)

lmp.command(“group beads id {}”.format(str_beads)) #Updates the group “beads” with the latest relevant particles

lmp.command(‘dump 2 beads atom 5000 {}’.format(dumpbead_dir)) #Define the dump command

which sit within a loop. On the 2nd iteration, this returns an error saying that the dump has already been defined so can’t be called again. How do I keep the same dump file, but allow the group that its dumping to change over time?




you would have to either use dump_modify thresh to select which subset of atoms from a fixed dump group to output or use the write_dump command. Using the dump command multiple times on the same dump id requires to first free that id by using the undump command.