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

Re: [lammps-users] dump image


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 27 Oct 2017 11:32:05 -0400

On Fri, Oct 27, 2017 at 12:26 AM, Massimo Pica Ciamarra
<picaciam@...24...> wrote:
> 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.
https://github.com/lammps/lammps/pull/716

it should be included in the next LAMMPS patch.

thanks again,
      axel.

>
> 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
>     force->bounds(FLERR,arg[1],atom->nbondtypes,nlo,nhi);
>
> // 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;
>   }
>
>
> Thanks!
> Massimo
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
>



-- 
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.