Entropy Calculation in Lammps

Dear Lammps users,
I want to calculate the entropy of an alloy by using compute entropy/atom command. But I am not aware of, how to post process it. It’s not showing in logfile.
Please advise me.
Thanks.

Compute entropy/atom won’t write its data to the logfile because it’s a per-atom compute. You write this data to a dump file. Also, just defining a compute will not write it to the log file or dump file; you have to include the compute in the thermo_style custom command or dump custom command.

Will

I was trying to write it in my thermo_style custom and dumpfile by writing entropy and entropy/atom. But nothing happened. What is the correct syntax of writing it in thermo_style and dumpfile?

This page of the LAMMPS documentation covers how to output from LAMMPS: https://lammps.sandia.gov/doc/Howto_output.html.

Sir in thermodynamics section, entropy is not mentioned.

Sir in thermodynamics section, entropy is not mentioned.

if it is not there, then you cannot output it as a thermo keyword.

overall, it seems to me that you have not read the documentation of the entropy/atom command with sufficient care.
This is not at all about “computing the entropy of a system”, but having a local measure of order.

Axel

Thanks axel, but is there any other way to calculate the configurational entropy of alloy using LAMMPS?

Below is an example of a per-atom compute that is dumped.

compute kpa all ke/atom
compute ppa all pe/atom

dump 1 all custom/gz 10000 dump.lammpstrj.gz x y z type id c_ppa c_kpa

Now in your case:
compute entropy all entropy/atom …
dump 1 all custom/gz 10000 dump.lammpstrj.gz x y z type id c_entropy

There is no ready to use feature that I am aware of. But that does not mean that it cannot be done. Instead you have to look up how this is computed at all, and then search through the lammps documentation for how to get the pieces of information you need, collect and output them and then run some post-processing calculations on that collected data.

That is how most analysis of MD simulations is done. It is rare, that a code can output a property right away. There are examples of doing analysis of MD data and processing it in the how to section of the manual (viscosity, self-diffusion, thermal conductivity etc.) and the examples folders. You will likely have to do something similar in spirit.

Axel

Thanks for the help.