[lammps-users] local density

Dear Friends

I want to calculate local density of a type of molecules. I used group command with molecule style for grouping my molecules. furthermore I divided my region to small regions and I use group command with block style. But I don’t know about calculation of the mass of a group type in one of my blocks.would you please help me?



There are variable functions (see the variable command) that count
moleclues in a region and group, and calculate their mass.


Dear Steve

I think theses functions are global. for example mass(water) will give me overall mass of water in my simulation box, but I need local mass of water in two phase.

Would you please help me?



Then define two grpops, one for the frozen water,
one for the liquid, and do mass(frozen) and mass(liquid).