The error is : cannot set this attribute for this atom style

Dear All,

I use lammps to create the Argon-Platinum system and I want to set different initial density of the Argon.I try to set the density of the group / region with the following commend, but failed.

The error is : cannot set this attribute for this atom style.

I know it means the attribute being set does not exist for the defined atom style, but I still don’t know how to solve this problem.

I would very appreciate if anyone could give me some advice.

Best regards

Xinyu

The input file is as below:

units real
dimension 3
boundary p p f

atom_style atomic
neighbor 0.3 bin
neigh_modify every 20 delay 0 check no

lattice fcc 3.92

region box block 0 40 0 7.38 0 106.7
region solid block 0 40 0 7.38 0 1.01

create_box 2 box

create_atoms 1 region solid

lattice fcc 5.31

region liquid block 0 29.5 0 5.44 4 16
create_atoms 2 region liquid

mass 1 195
mass 2 40

group platinum type 1
group argon type 2

set region liquid density 13

Dear All,

I use lammps to create the Argon-Platinum system and I want to set
different initial density of the Argon.I try to set the density of the
group / region with the following commend, but failed.

The error is : cannot set this attribute for this atom style.

I know it means the attribute being set does not exist for the defined
atom style, but I still don't know how to solve this problem.

​what you are trying to do makes no sense at all. the "density" property
applies to extended particles, e.g. for granular media simulations. it is
in no way applicable to atoms.​

​if you want to have a different density of atoms within a different
region, you have to adjust the number of atoms in that region accordingly,
either by adding or removing atoms.

axel.​