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
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?
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).
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.
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!