NPT and NVT simulation with langvein thermostat

Hi lammps users,

I’m using LAMMPS for some dynamic simulation of a coarse grained system.

To simulate that system I want to perform an NPT equilibration and then an NVT simulation.

I’d like to perform both with langvein thermostat can I do it ?
my guess to perform NPT is to use two fixes:
one fix nph and one fix langvein

for NVT my guess is:
one fix nve and one fix langvein

Is this correct or am I getting something wrong ?

Thanks in advance

Daniele

That’s correct. If you want to be more sophisticated, you could compute the average box dimensions in the NPT ensemble and use the change_box command to set the system to the average density before the run in the canonical ensemble.

Many thanks for your reply.
Yeah my main dubt was about how to actually do NPT and NVT so I have to use two fixes for them thanks.

Yeah actually during my simulation at the end of NPT ensamble I change my box to a bigger one and then I perform the simulation in the canonical ensamble.
Many thanks

Just another question.
Can I perform the NPT simulation with:

fix 1 all npt temp T_start T_stop T_damp iso P_start P_stop P_damp
fix 2 all langevin T_start T_stop T_damp seed

and the NVT simulation with:
fix 1 all nvt temp T_start T_stop T_damp
fix 2 all langevin T_start T_stop T_damp seed

if yes what would be the best what i said before in the first quesion or this one ?

To be clear in the firs question I meant:
NPT simulation:

fix 1 all nph iso P_start P_stop P_damp
fix 2 all langevin T_start T_stop T_damp seed

NVT simulation:
fix 1 all nve
fix 2 all langevin T_start T_stop T_damp seed

Thanks in advance

No, in both cases. You must not use two thermostats on the same atoms at the same time. This will lead to bogus results.

Ok thaks so sorry for my stupid question how would I perform a NPT or NVT simulation with langvein thermostat ?

Thanks
Daniele

You have to ask a more precise question here:

Do you mean to simulate the statistical mechanical ensembles (NVT, NPT)?
Or do you mean to do a simulation with a thermostat, or a thermostat and a barostat?

you right sorry,

I mean to simulate the statistical mechanical ensembles but with langvein thermostat.

Thanks

A Langevin thermostat has a different sampling since it follows a different Hamiltonian, so you can only get an approximation, but not the real ensemble (provided that all other prerequisites for the ensemble are given).

Ok I understand thanks.

just last question a curiosity how would I run a simulation with a thermostat, or a thermostat and a barostat as you said before ?

thak you and sorry for the multiple questions

Daniele

Well, you do need something that does time integration of the positions, something that does the thermostatting, and something that (optionally) does the barostatting.

These are done by different fixes in LAMMPS and some of them need to be combined, but you have to make certain that nothing is done twice.

Fix nve does basic time integration without any other manipulations. So combining this with fix langevin will give you an NVT-like system, but there are many other langevin type fixes. E.g. fix gle or fix gld include a langevin thermostat and time integration.

Fix nph does time integration and a Nose-Hoover barostat, so this can be combined with a non-time integration thermostat (there are several that follow a langevin scheme, not just fix langevin).
Or you can use fix nve, fix press/berendsen, and a thermostat.

To figure out how well, each of those fit for your needs, you have to determine yourself from studying the documentation or - if necessary - study the original publications.

Really thanks for your precious advices

Dear all,
Sorry ti bring back this topic but just to be sure and conclude.

From the discussion Is my understandin that

If I want to perform an NVT-like simulation with the langvein thermostat I can do
fix all langvein
fix all nve
They do different thigs on the same atom group so It should be fine.

In the other hand of I want to perform an NPT-like simulation with langvein i can do
fix all nph
fix all langvein

For the same reason as above.

If not how can i perform them ?

Thaks in Advance for the patience, I’m new with LAMMPS.
Daniele

You can use those combinations of commands, yes. You will still need to use your usual scientific skills to make sure the results are useful – checking against prior publications, physical intuition, and experimental data, and making sure you know what each command does so you can defend your simulation protocol under peer review and communicate it to people who wish to replicate your work. All the best!

Many thanks for your reply.