LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Setting per-atom masses with fix property/atom rmass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Setting per-atom masses with fix property/atom rmass

From: Joshua Moore <jdmoore@...1442...>
Date: Wed, 28 Jun 2017 12:59:00 -0400


velocity.cpp (if you set velocities) and atom.cpp call check_mass in atom.cpp which only checks if the per-type masses are set and gives the error if they are not.  It doesn't pass with just per-atom masses set.  It appears the check_mass in atom.cpp is always called so long as init is called.

Could there be a switch of error checks in atom.cpp and velocity.cpp based on if the rmass is set? If rmass is set then check that the per-atom masses are set instead of per-type masses?

However, it appears that the per-type masses  aren't used in anything I'm doing when the per-atom masses are set so seems safe to set per-type masses to any arbitrary value.  



Sent from my iPhone

On Jun 28, 2017, at 6:09 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:

On Tue, Jun 27, 2017 at 9:16 PM, Joshua Moore <jdmoore@...1442...> wrote:

When using fix/property rmass to set a per-atom mass, do the per-type masses still need to be initialized first?

For example, from the the manual, with (using  full atom_style)

fix Isotopes all property/atom rmass ghost yes
read_data fix Isotopes NULL Isotopes

I get "ERROR: Not all per-type masses are set" unless I also set the per-type masses before using fix property/atom rmass.

you will get that error message depending on certain constructs in other parts of your input, that you are not showing here.
not all of the features in LAMMPS support per-atom masses and some that do, still have checks in place from the time where only per-type masses were available.



Thank you.


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

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