# Enthalpy units

Greetings,

I am dumping enthalpy using the thermo keywords with units real. I have read that the units of enthalpy is Kcal/mol but the value I get from the simulation does not match the value I have from the experiment. Only when I divide the lammps-reported enthalpy with the number of atoms in the system, these two agree. So I am confused. what is the real unit of enthalpy? is it Kcal*#atoms/mole?

This is not a question of units but of normalization.

Thanks, Axel, but do not we already normalize when we divide the energy by the total number of moles in the system?

Please see the thermo_modify documentation. Please also take note of the difference between intensive and extensive properties, and finally keep in mind that LAMMPS does not have any concept of molecules, it just looks at atoms and interactions between them.

Upon further consideration, it looks like you are misunderstanding what kcal/mol means:
it is the amount of energy that would be 1 kcal, if you have 1 mole of atoms (=6.02214076Ă10^{23}).

Besides, there are usually no moles in atomic simulations.

I do understand what kcal/mole mean And yes, we have far less number of molecules than a mole contains in almost all MD simulations! Anyway, thanks very much for your explanations.

Hey,

The kcal/mol unit in this context is not really per mol of atoms or molecules in your system: it is per mol of simulation boxes. So basically the energy LAMMPS is printing is the total energy (extensive) your system would have if there was 6.02E23 simulation boxes - in other words, this would be the total energy content in the volume of 6.02E23 simulation boxes.

To find out the energy corresponding to that much volume you have in one simulation box, you would need to divide your value printed by LAMMPS by 6.02E23.

Best,
Cecilia

Thanks @ceciliaalvares . What you just explained makes sense partially except for the last part. I have experimental energy of the system in Kcal/mole which is far different from the enthalpy that lammps gives me in Kcal/mol. Only when I divide lammps outputted enthalpy with the number of atoms in the simulation box, I get the same number as the experimental enthalpy in Kcal/mole. Based on what you explained, dividing the lammps enthalpy with the number of atoms per simulation box makes sense, and not by 6.02E23. Because number of atoms per simulation box is the same as mole atoms/mole of Box. Dividing Kcal/(mole of box) with (mole of atoms)/(mole of box) would give Kcal/(mole of atoms).

Hey,

I dont think that what you are doing is correct. Dividing the value of enthalpy, given by LAMMPS in kcal/mol in your case, by the number of atoms in your system doesnt even yield something that would make sense to me.

Letâs say that you are simulating water: you have a box of a given volume V containing 5000 molecules (and not atoms) of water. By doing what I told you in the previous cmment (i.e., dividing by 6.02E23 the energy output in kcal/mol by LAMMPS), you would find out how many kcal your system of 5000 water molecules has. It should be a tiny value. This is an extensive quantity, corresponding to the energy of 5000 molecules. Now, from that value, you will ask yourself âokay, if 5000 molecules of water have this many kcals, how many kcals would 6.02E23 molecules of water have?â. This way you would figure out the vaulue of energy in kcal/mol of molecules of water, which is probably what the â/molâ of the experimental value means (usually experimentalists measure stuff in the /mol of substance).
Ofc you could do the same reasoning for enthalpy.

If you are not trusting this, you can try running your simulation in units metal. Units metal will output you the energy (and enthalpy) in eV and it will be an extensive quantity, corresponding to the one of your simulation box, with the given N atoms. Then from this you can try to figure out the energy per mol of whatever it is you are simulating.

Note also that your result dont have to match the experimental result: your model can be bad for estimating the enthalpy or any other thing you are simulating.

UPDATE: actually if your system is atomic (I mean if the molecules have only one atom each or if the solid is a single-atom-type system), the reasoning I told you will ultimatelyl mathematically converge to dividing the value LAMMPS gives by the total number of atoms if you want to have /mol of the given chemical speciesâŚ but be careful because the division you are doing goes to hell if your system is not atomic.

Hi @ceciliaalvares,
I am sorry but there appear to be some confusion here. I agree that the implied of using \rm{kcal/mol} in LAMMPS is that we consider moles of âsimulation boxesâ but youâre mixing two different things when you say:

Sorry but I think this is incorrect. You already get the total energy of your simulation box. The mole in the output units is a unitless \mathcal{N} factor. It is a number. The energy you get is still extensive. Dividing your results by \mathcal{N} just gives you the results in plain \mathrm{kcal}. This is independent of the units system you use (apart from normalization behaviour @akohlmey has already mentioned). Proof is, make a bigger box, get higher total energy.

On the other hand âper moleâ has the typical issue of âper mole of what?â when we use it. This is where normalization comes into play and where we are indeed talking of intensive properties. In LAMMPS this behaviour can be triggered by using the command thermo_modify norm where the extensive values (energy, enthalpy etc.) are divided by the number of atoms and what you get is an energy per atom (intensive). You get the same value at equilibrium independently of the size of the simulation box. To get the value per molecule, you would have to divide by the number of molecules, which LAMMPS does not track.

See the units for a quick mention of the default behaviour difference of lj units and the thermo_style command for an explanation on how to normalize the values.

So @m.adibi is correct. If your article uses \mathrm{kcal/mol} of atoms, you divide by the number of atoms. If it is moles of molecules, divide by the number of molecules etcâŚ

Hey @Germain

yes, I agree: you would have, in kcal, the amount of energy of your system composed of a number of atoms equal to the amount you are simualting

Yes, because then you would have 1 mol of the bigger simulation box, so the energy LAMMPS prints should be larger.

Basically what I was saying is just that the value of LAMMPS is the energy of the simulation box multiplied by 6.02E23 so that it becomes kcal/mol (of simulation box). So dividing it by 6.02E23 would give you the amount of kcal in your simulation box
(Maybe we are saying the same thing?)

My point was to be mindful because we dont know what system @m.adibi is simulatingâŚ so if the thing is molecular, the division to transform it in /mol of the substance should not be by N (same goes if it is a non-âuniâ-atomic solid or something)

Experimental enthalpy of what? compared to what exactly?

In general, absolute (potential) energy values in classical models have no meaning (and the enthalpy thermo property in LAMMPS falls into that category since it is simply H = E_{pot}+E_{kin}+p \cdot V); only energy differences (e.g. \Delta H = H_{after} - H_{before}) have a proper meaning. You can see this because you can add a constant to each potential energy function without changing the individual forces and the forces are what matters. Same applies to \Delta H. A simple manifestation of that is the âpair_modify shift yesâ option.

In other words, there is a good chance that what you observe by dividing by the number of atoms is a coincidence and has no meaning either.

I cannot understand what you wrote! I simply lost connection! You once divide by Avagadroâs number then multiply by it again to gain the same number you already had!

Its enthalpy of methane. Experimental enthalpy of methane published in a paper compared to enthalpy I get from running simulations using lammps.

There is possibility that its a coincidence, which I donât think so. We are running a simple npt
simulations using the same forcefield we got from the published paper and output enthalpy data for our simulations and compare it with the value published in the paper (both md and experimental). I am not looking for any meaning through the data. I am looking for agreement between the data. We were able to match other properties of methane with the published properties in the paper. Only enthalpy is very off! That made me thinking the concept of âmolâ in lammps might not refer to mole of substance. I can easily test if what I get is coincidental or no by looking into enthalpy at other p-T conditions

So at the end you get kcal per N number of atoms in your system correct? What should you do to find kcal/mol of atoms? 1st divide by the number of atoms N (to normalize it) and then multiply by 6.02E23 to find Kcal/mol of atoms, right?
This is exactly what I just mentioned above! You can get the same thing just by dividing kcal/(mol of sim box) by the number of atoms because multiplying and dividing by 6.02E23 results in one!

You are missing my point. It is not possible to determine the absolute value of the enthalpy of a substance at a given thermodynamic point. All you can do is to determine a difference. For that you have to state what process you are looking at, i.e. what is the state before and what is the state after and then you can get an enthalpy difference, like an enthalpy of formation or an enthalpy of a phase transition (note that those are written as \Delta H and not H).

You have now repeatedly made claims without providing any kind of proof or the means to verify it independently, and thus made it extremely difficult to prove you right or wrong, and to give you the answer that you were originally looking for. This is one of the reasons this discussion goes in circles without really being helpful.

Let me re-iterate. What LAMMPS does is consistent with its documentation and common use. The unit of energy in use is the unit that applies to individual potential functions, i.e. when you have a Lennard-Jones pair style, then the value of energy determined by applying the potential function (with the appropriate choices of epsilon and sigma) is added to the total system in the chosen unit of energy. System size and whether there are molecules are irrelevant to that. Because of that, you will get double the potential energy if you double the size of the system, unless you change the normalization of the output to be written out per atom. The latter is chosen by default, if you are using reduced units.

Unless you provide hard proof that what happens is different, you have to assume that you are misunderstanding something. But then again, we cannot help you clear this up unless you provide more tangible information.

1 Like

I agree with you @m.adibi , mathematically speaking our reasonings will converge to the same total result in some cases, but not all. Short answer: if you are working with methane, you should not divide the kcal/mol LAMMPS outputs you by N. Instead, you should divide it by number of molecules. Then you would get the value of kcal/mol per mol of methane (i.e., 6.02E23 molecules of methane). Now, if you want your energy in terms of kcal/mol of atoms, then okay, you divide by N (but then it would not be per mol of methane).

The paper reported H and not DH! Although I agree with you that the absolute value of enthalpy has no meaning, enthalpy is a state function and one can determine it only by knowing the state of the system. Anyway, this was not even my question! My question was about the units you use in lammps. Because one mole can mean one mole of many things! Is it mole of atoms? Or mole of a simulation box? Its that simple!
If its mole of simulation box, then dividing it by the number of atoms makes sense to convert it to mole of atoms.

I donât understand what type of proof you need. Do you want me to refer to the paper? Or something else?

These are minor issues. I said atoms because I use coarse grained methane model.