About the Barostats in lammps

Dear all

hope you are well and I hope to get the some ideas for barostats.
as indicated in documentations:

Barostatting in LAMMPS is performed by fixes. Two barostatting methods are currently available: Nose-Hoover (npt and nph) and Berendsen:

for Nose-Hoover, we have npt and nph, however if i only want to control stress, i may use fix nph; should i use fix nph/sphere if i use finite-size sphereical particles (i am confused since fix npt/sphere is shown in documentation, while fix nph/sphere is not illusrated in Barostats pages).

Then i use fix nph/sphere to control stress, while i got the error
“Current temperature too close to zero, consider using ptemp setting”
may I just a random ptemp values ? maybe “ptemp 293” , something like this?

dose anyone can share a idea for this?
hope you have a nice day

:face_with_peeking_eye:

:weary:

Hi @Tom_lammps,

Yes. The nph variants of the integrator are the same as the npt without the thermostat. Only the box dimensions are coupled to the pseudo-Hamiltonian.The sphere variants mainly use a different integrator and a different temperature formula.

Please have a detailed look on the section concerning the Ptemp keyword of the general nose-hoover integrators (you posted the link twice). As is stated there:

If a thermostat is not defined, T_{target} is set to the current temperature of the system when the barostat is initialized. If this temperature is too low the simulation will quit with an error. Note: in previous versions of LAMMPS, T_{target} would default to a value of 1.0 for lj units and 300.0 otherwise if the system had a temperature of exactly zero. […] If a thermostat is not specified by this fix, T_{target} can be manually specified using the Ptemp parameter. This may be useful if the barostat is initialized when the current temperature does not reflect the steady state temperature of the system. This keyword may also be useful in athermal simulations where the temperature is not well defined.

The error is self-explanatory and the manual page straight-forward in explaining what the parameter is about. What you should do is up to you depending on what you want to do. Someone related to your research project might give more valuable advices/insights on how you should add temperature to your system’s integrator since many options are available (NVT equilibration, use of velocity command etc…).

Hi Germain
Many thanks for your response, I am clear for the fix nph/sphere now. it is really helpful.