LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Adding new attributes to atom_style(?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Adding new attributes to atom_style(?)

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Tue, 24 Oct 2017 06:51:29 -0400

On Mon, Oct 23, 2017 at 11:39 PM, Quang Ha <quang.t.ha.20@...24...> wrote:
> Hi all,
> I am trying to add new attributes to the existing atom_style meso of the SPH
> package. Specifically, I want each atom to carry concentration of a specific
> substance (beside rho, e and cv). What would be the proper way around it?
> Here are the steps I believe I need to add
> 1. Add the new properties to atom_vec_meso.h
> 2. Add compute codes for the new attributes
> 3. Add new pair_style for the new attributes
> Is that all or am I missing something?

please have a look at fix property/atom. this allows you to add custom
properties (integer or floating point) to any atom style without
having to modify that style.
you can then get hold of that property via atom->find_custom() in your
custom pair style.


> Thanks,
> Quang
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites,!
> _______________________________________________
> lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.