Temperature control problem in npt fix

Dear Lammps Users,

I am trying to fix pressure and temperature at 300 K for an ionic crystal: Li10GeP2S12. However, the temperature rises to about 650 K and cannot be fixed at 300K. As a new user the system does not let me to upload my files.
Here is my input file:


          units                      metal
	dimension              3
	boundary                p p p
	atom_style             charge
	timestep                 0.0001
	atom_modify          map array sort   0   0.0
	neighbor                 3.0 bin 
	# System definition
	read_data               Li.data
        replicate 1 1 1
	#Simulation setting
	pair_style  hybrid  morse  6  coul/long 8.9 
	pair_coeff   1  4      morse   1.066825  1.531394 2.349741
	pair_coeff   2  4      morse    2.087340  1.945525  2.104578
	pair_coeff   3  4      morse    3.939695  1.766784  1.951558
	pair_coeff   1   1     coul/long
	pair_coeff   1   2     coul/long
	pair_coeff   1   3     coul/long
	pair_coeff   2   2     coul/long
	pair_coeff   2   3     coul/long
	pair_coeff   3   3     coul/long
	pair_coeff   4   4     coul/long
	kspace_style     ewald  1.0e-6
	#	Definition Li10GeP2S12 group
	group Li   type 1
	group Ge   type 2
	group P   type 3
	group S  type 4
            # ---------- Define Settings --------------------- 
            compute eng all pe/atom 
            compute eatoms all reduce sum c_eng 
            fix 1 all box/relax iso 0.0 vmax 0.001
            thermo 400 
            thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms vol temp 
            min_style cg 
         minimize        1.0e-25  1.0e-25  10000  10000
        unfix 1
            #	Equilibrium Setup
          velocity        all create 300 1357  mom yes rot yes
	fix 		2 all npt  temp 300.0 300.0 100  iso 0.0 0.0  1000

	dump 1  all atom  100  Equilibrium.atom 
            run		20000
	unfix		2
	undump 1
	reset_timestep	       0

Could you please let me know where the problem is?

Many thanks in advance,

Amirkabir University

Without seeing your other files (specifically your log file), it’s impossible to say for certain. You can always upload the files to Google Drive, Dropbox, etc. and share the link. This has been mentioned on the forum multiple times.

However, I do notice that your damping parameter is huge, much larger than what is initially recommended in the documentation:

A Nose-Hoover thermostat will not work well for arbitrary values of Tdamp. If Tdamp is too small, the temperature can fluctuate wildly; if it is too large, the temperature will take a very long time to equilibrate. A good choice for many models is a Tdamp of around 100 timesteps. Note that this is NOT the same as 100 time units for most units settings. A simple way to ensure this, is via using an immediate variable expression accessing the thermo property ‘dt’, which is the length of the time step. Example:
fix 1 all nvt temp 300.0 300.0 $(100.0*dt)

This is a very unusual force field setup. It is inconsistent, too. You do not compute real-space coulomb interactions between 1-4, 2-4, and 3-4 although all atoms seem to have charges and would be included in the kspace part of the calculation.

It would not be unusual that this kind of setup leads to a “coulomb catastrophe”, i.e. atoms with opposite sign charges collapsing onto each other, which can produce spikes in the kinetic and potential energy and generally bogus results.

Dear Michael

Sorry, I am a new user. Here I have copied the link of the log file on the google drive.
Many thanks for your answer, now the temperature is almost fixed for both NVT and NPT ensembles. However, there is still a little fluctuation on the pressure and it is not be fixed.


And it will never be constant for finite size simulations of the size of systems accessible to classical MD simulations. The topic of pressure fluctuations has been discussed many times. Please search through the archives for those previous discussions and learn from them (and from a text book on statistical thermodynamics).