NPT and langevin

Hi, I am trying to use NPT for pressure, but want to use fix langevin for temperature control.

NPT includes a T, hence no surprise. LAMMPS does exactly what the
documentation says. fix npt *without* T is called fix nph.

Hi, I am trying to use NPT for pressure, but want to use fix langevin for
temperature control.

Likewise, the temp options for fix nvt and fix npt should not normally be
used on atoms that also have their temperature controlled by another fix -
e.g. by fix langevin or fix temp/rescale commands.

When I exclude temp from NPT, I just get an error regarding the fact that I
did not define the temperature for NPT. Even why I try NULL, I get other
errors, saying a floating point number was expected.

The fix langevin was defined before NPT.

I am not sure what the doc page means why it says the temp option can not be
used for npt, yet it gives me an error when I neglect it.

this is not what it says. the logic is the other way around. if you
use NVT or NPT you must not thermostat that atoms. and that is what is
enforced by the error messages you see.

Axel,

The doc page says that: “Likewise, the temp options for fix nvt and fix npt should not normally be used on atoms that also have their temperature controlled by another fix”

It clearly says the temp option should not normally be used on atoms that already have temperature controlled by another fix. I already have my atoms temp’s controlled by another fix. Therefore, I assume I should not use the temp option. I see what you are saying and will look into NPH but that is still very confusing to me.

Axel,

The doc page says that: "Likewise, the temp options for fix nvt and fix npt
should not normally be used on atoms that also have their temperature
controlled by another fix"

It clearly says the temp option should not normally be used on atoms that
already have temperature controlled by another fix. I already have my atoms
temp's controlled by another fix. Therefore, I assume I should not use the
temp option. I see what you are saying and will look into NPH but that is
still very confusing to me.

you assume wrong. most likely because you are looking at this without
context. the only way to not use the temp option is to not use a fix
with a T in it. temp is a required keyword for NVT and NPT. it would
be extremely confusing to have an NVT fix that doesn't adjust the
kinetic energy. in the end, all three fixes use the same code to do
the time integration and the fix nvt/npt/nph are just wrappers around
the same code that enforce different flags, i.e. whether a N-H
thermostat or N-H barostat is requested.

axel.

I’ll change the doc page to simply say:

Likewise, fix nvt and fix
npt should not normally be used on atoms that also have their temperature
controlled by another fix.

Note that the doc page you are looking at is for 3 commands (NVT, NPT, NPH).
If you don’t use the temp option can only be using fix nph.

Steve