LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] dump image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] dump image

From: Massimo Pica Ciamarra <picaciam@...24...>
Date: Fri, 27 Oct 2017 12:26:53 +0800

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;