dump image

Dear all,

it looks to me that there is a problem with the bdiam option of dump_modify.
Lammps looks for the atom type to select the bond properties, not for the bond type.

To fix, one should change, in dump_image.cpp, the function

int DumpImage::modify_param(int narg, char **arg)

if (strcmp(arg[0],“bdiam”) == 0) {
if (narg < 3) error->all(FLERR,“Illegal dump_modify command”);
if (atom->nbondtypes == 0)
error->all(FLERR,“Dump modify bdiam not allowed with no bond types”);
int nlo,nhi;

// replace with this line

// this commented line
// force->bounds(FLERR,arg[1],atom->ntypes,nlo,nhi);

double diam = force->numeric(FLERR,arg[2]);
if (diam <= 0.0) error->all(FLERR,“Illegal dump_modify command”);
for (int i = nlo; i <= nhi; i++) bdiamtype[i] = diam;
return 3;


Dear all,

dear massimo,

thanks for reporting this issue and providing a solution as well.
you are correct, this is an obvious cut-n-paste bug. i've included this
in my latest bugfix-collection pull request in the LAMMPS project on github.

it should be included in the next LAMMPS patch.

thanks again,