[lammps-users] control the temperature in a specific region

Dear Sir:
i wonder if i can use a thermostat to control the temperature of atoms in a specific region in Lammps? Thank you very much for any feedback!

Ge Song PhD Candidate
School of Aerospace, Tsinghua Univ.
Beijing 100084, P. R. China
Tel(O): +86-10-51537819
Mobile: +86-15801578643
Email : ges08@…61…

Sure, you can. Define a group that contains the atoms in a region you want to specify the temperature. Use any temperature controler like Nose-Hoover, berendsen, or even scale velocity.

Cheers,

Ajing

Sure, you can. Define a group that contains the atoms in a region you want
to specify the temperature. Use any temperature controler like Nose-Hoover,
berendsen, or even scale velocity.

sorry, but you cannot. the group definition is a one time choice
and you'll have to update the group (and remember that you have
to delete a group first to reset it, or else you'll just add new atoms)
to handle atoms moving in or out of the region of interest.

"stateless" thermostats like berendsen, langevin, temp/rescale,
could in principle be changed to have an additional "region" flag
that would combine the required group selection with a region
selection like some other fixes do.

cheers,
     axel.

I did not realize what he asked is if lammps could control the temperature in a specific “region” instead of a “group”. As Axel pointed out, the group is defined for those atoms you want one time. If no operation afterwards, the group could not update atoms according to their new spatial positions.

Cheers,

Ajing

Ge, we have done approximate region thermostatting by using the lammps for loop commands. You reset the thermostatted group each iteration based on the atoms in a region. Doing the reset every 10 timesteps seemed reasonable for our needs, and if your region is larger you may be able to get by with a larger iteration window.
Jeremy

Jeremy,

How are you doing. Have not heard from you since last meeting in Livermore.
It is good to know your experience. It would be nicer to know what kind of problems you have addressed for the 10 timesteps iteration. I know most of the materials you have dealt with are liquids. That requires frequent update of atoms info, as I can imagine. For solid materials without much diffusion, I would say perhaps 100 or more timestesp one need to check the boundary atoms. So this really depends.

Best,

Ajing

Dear all,

Isn't it possible to simply bias the thermostat with a compute temp/region, e.g.

compute Tin liquid temp/region in
fix 1 liquid temp/rescale 10 1.0 1.0 0.0 1.0
fix_modify 1 temp Tin

Best regards,
Laurent

Hi Ajing,
Jeremy is referring to some work that I have done recently. Essentially we are simulating a liquid box and applying a temperature gradient to the system. The frequency of iteration certainly depends on the system that is being modelled, as ours is a fairly small region of liquid atoms. As Jeremy mentioned, for a larger region (or a solid with minimal diffusion as you mentioned) one can get away with a much slower frequency to achieve a similar thermostatting.

Jonathan

Jonathan,

Nice to hear from you. This actually gives us some idea of how to make the local thermostating work. Can not wait to see the paper :slight_smile:

best regards,

Ajing

dear laurent,

Dear all,

Isn't it possible to simply bias the thermostat with a compute temp/region, e.g.

compute Tin liquid temp/region in
fix 1 liquid temp/rescale 10 1.0 1.0 0.0 1.0
fix_modify 1 temp Tin

no! that would still apply the velocity/acceleration manipulations
to the whole group, but only use the temperature in the reference
region to compute how much manipulation is needed. that would
probably be worse.

axel.

Dear Axel,

dear laurent,

Dear all,

Isn't it possible to simply bias the thermostat with a compute temp/region, e.g.

compute Tin liquid temp/region in
fix 1 liquid temp/rescale 10 1.0 1.0 0.0 1.0
fix_modify 1 temp Tin

no! that would still apply the velocity/acceleration manipulations
to the whole group, but only use the temperature in the reference
region to compute how much manipulation is needed. that would
probably be worse.

I disagree: when fix_modify is used, the thermostat is only applied to
the atoms in the compte/temp region. See the doc page on
thermostating:

"Any of the thermostatting fixes can use temperature computes that
remove bias for two purposes: (a) computing the current temperature to
compare to the requested target temperature, and (b) adjusting only
the thermal temperature component of the particle's velocities."

or more directly in the source code, the remove_bias function in
compute_temp_region.cpp.

In fact I clumsily turned my sentence in the form of a question, but
I've already used that method to thermostat a liquid in a "bulk"
region around a heated nanoparticle, and it's working:

http://dx.doi.org/10.1073/pnas.0901372106

But I agree that only thermostats that do not perform time integration
can be used this way, as one can only time integrate the whole group.
In fact I forgot one line in my example:

compute Tin liquid temp/region in
fix 1 liquid temp/rescale 10 1.0 1.0 0.0 1.0
fix_modify 1 temp Tin
fix 2 liquid nve # time integration of the whole group

Best,
Laurent

I am coming to this thread late, so someone may have suggested this.

But you can use compute temp/region in conjunction with a thermostat
to do this. See the compute temp/region doc page. You assign
this compute to your thermostat via fix modify temp.

As the doc page says, this works best with langevin or resclaling, but
can also be used with fix nvt if you are careful. In that case, the more
atoms in the region and the more slowly changing the system is,
the better.

Also see section 4.16 of the manual for an overview of thermostatting.

Steve

2010/12/22 gesong <[email protected]...>: