temperature dependent potential

Hi

I am trying to write some files for a new potential (style). The potential is temperature dependent and I am unsuccessful in getting the value of the instantaneous temperature in my routine.

I was looking in thermos.cpp and thermos.h and tried “Thermos::temperature->scalar” and it not worked. I even put a function in thermos.h like

double GetTemperature() {return temperature->scalar;};

with no results.

Someone can give advice ?

Sylvian Kahane

email: skahane@…2638…

image001.jpg

Hi

I am trying to write some files for a new potential (style). The potential is temperature dependent and I am unsuccessful in getting the value of the instantaneous temperature in my routine.

why don't you have your pair style generate a compute on a suitable
group of atoms
with an "internal" name and then query this compute?

axel.

You have to invoke the compute, and then
it returns the temperature. You don’t need to
add a query function.

double t = c->compute_scalar();

Steve

image001.jpg