Fix npt temperature for a heterogeneous system

Hi all,

I’m working on system which is comprised of wall with the solvent on both sides of it and periodic boundary conditions everywhere. I want to use “fix npt” but as the manual states this fix defines a compute temperature which includes the group “all” because the pressure is computed for the entire system. However, my question is:

1- How can I control the temperature in solvent and wall separately to make sure no temperature gradient happens between them? as the fix npt just controls the temperature of the whole system.

2- Is that right if I use two thermostat fix like temp/berendsen, one for solvent and one for the wall and apply them after “fix npt”? I think this should deteriorate the properness of a statistical ensemble, right? what is a better solution?

I would appreciate it if you can help me with this.

Cheers,
Kasra.

Hi all,

I'm working on system which is comprised of wall with the solvent on both
sides of it and periodic boundary conditions everywhere. I want to use "fix
npt" but as the manual states this fix defines a compute temperature which
includes the group "all" because the pressure is computed for the entire
system. However, my question is:

1- How can I control the temperature in solvent and wall separately to make
sure no temperature gradient happens between them? as the fix npt just
controls the temperature of the whole system.

use fix nph and separate thermostats.

2- Is that right if I use two thermostat fix like temp/berendsen, one for
solvent and one for the wall and apply them after "fix npt"? I think this

no.

should deteriorate the properness of a statistical ensemble, right?

fix temp/berendsen does not give you a proper ensemble in any case.
having a temperature gradient defeats the idea of a well defined
ensemble as well. however, using two thermostats on the same degrees
of freedom simply gives you unphysical results.

what is
a better solution?

fix nph plus additional non-integrating thermostats.

axel.

You can also assign a different temperature compute than the
default to fix npt, via fix_modify temp.

And you can then integrate other atoms in your system with
their own fix nvt or fix nve and their own thermostat.

Steve

And I meant to add that the temp compute assigned
by fix_modify temp does not have to be invoked on
group all.

Also you can use a group != all with fix npt,
and those are the only ones the thermostat is
applied to.

As the doc page states:

Regardless of what atoms are in the fix group (the only atoms which are time integrated), a global pressure or stress tensor is computed for all atoms. Similarly, when the size of the simulation box is changed, all atoms are re-scaled to new positions, unless the keyword dilate is specified with a dilate-group-ID for a group that represents a subset of the atoms.

Steve