Assign density to a variable

Hello,

I just wanted to ask if it is possible to assign “density” to a variable. I can do it for potential energy or temperature like,

Variable T equal c_thermo_temp

But it does not work for “c_thermo_density”.

Btw I know one solution from Aidan Thompson, ( https://lammps.sandia.gov/threads/msg39822.html ). I was wondering if I can use anything from the “thermo” keyword.

Thanks,

Projesh K Roy

Hello,

I just wanted to ask if it is possible to assign “density” to a variable. I can do it for potential energy or temperature like,

Variable T equal c_thermo_temp

But it does not work for “c_thermo_density”.

because it is not delegated to an existing compute by the Thermo class. using c_thermo_temp is the same as using the “temp” keyword, same for “pe”.

Btw I know one solution from Aidan Thompson, ( https://lammps.sandia.gov/threads/msg39822.html ). I was wondering if I can use anything from the “thermo” keyword.

yes. please see the corresponding discussion in the (extensive and detailed!) documentation of the variable command.

axel.