# [lammps-users] output density/mass of oxygen and hydrgen in units metal

Dear all

I am simulating graphite and water system. I apply metal units and want to calculate the density/mass of oxygen and hydrgen and output them seperately. I read the manual, the unit of my density should be gram/mol/Angstroms^3. How can I change my output unit to g/cm^3? I used densityNumofatom1024/6.0210^23, but I couldn’t get the correct water density 1 g/cm^3 for both oxygen and hydrogen. Did I make any mistakes about the unit translator? I am pretty confused of the mass unit in metal which is gram/mol.

Thanks

ziyuan

Dear Shiziyuan,

I am simulating graphite and water system. I apply metal units

The standard choice for this kind of systems would be real units, I've
never seen a paper on water and graphite/graphene/CNT with energies in
eV.

and want to
calculate the density/mass of oxygen and hydrgen and output them seperately.
I read the manual, the unit of my density should be gram/mol/Angstroms^3.
How can I change my output unit to g/cm^3? I used
density*Numofatom*10*24/6.02*10^23, but I couldn't get the correct water
density 1 g/cm^3 for both oxygen and hydrogen.

You don't give enough information: Which values do you get? What is
is in the liquid state?

The conversion is indeed: density/mass / 6.02e23 * 1e24.

But if you output separately the mass densities of oxygen and
hydrogen, then you should only get the total mass density of water
when you sum both values.

I am pretty confused of the mass unit in metal which is
gram/mol.

1 g/mol is simply 1/6.02e23 g.

Best,
Laurent

Thanks Laurent

“The conversion is indeed: density/mass / 6.02e23 * 1e24.”

I did it in this way. And got oxygen density is right about 1 g/cm^3, but hydrogen is much smaller. And I read the paper “Calculation of cadmium-water interface” using ab initio calculation published on Journal of chemical physics volume 112, their hydrogen and oxygen’s densities both are 1 g/cm^3. So I felt confused and suspect I may make a mistake about the conversion. Maybe it’s because water model is different. Our model the center of mass is on oxygen. And you are right, the sum of oxygen and hydrgen density should be water’s density.

Thans a lot.

ziyuan