ERROR: Computed temperature for fix temp/berendsen cannot be 0.0

Lammps Developers,

Executing the following script I get the error “ERROR: Computed temperature for fix temp/berendsen cannot be 0.0”. As you can see I am using a compute to initialize the velocities, and I verify in my output the initial temperature is equal to 300. When I comment out this line “fix 5 all press/berendsen y 0.0 0.0 250.0 z 0.0 0.0 250.0”, the error goes away. Therefore, shouldn’t the error say “ERROR: Computed pressure for fix temp/press cannot be 0.0”?

reset_timestep 0
units real
atom_style charge
read_data data.relaxed
velocity all create 300.0 4928459 dist gaussian

pair_style reax/c NULL
pair_coeff * * ffield.reax.chosi C H O Si Hc

neighbor 2 bin
neigh_modify every 3 delay 0 check yes

fix 1 all qeq/reax 1 0.0 10.0 1e-6 reax/c
fix 2 all nve
fix 3 all temp/berendsen 300.0 300.0 100.0
fix 4 all deform 1 x delta 0 10.0 units box
fix 5 all press/berendsen y 0.0 0.0 250.0 z 0.0 0.0 250.0

compute thermo_pres all pressure thermo_temp
thermo_style custom step cpu pe vol temp press pxx pyy pzz lx ly lz
thermo 100

timestep 0.25
dump 1 all atom 500 dump.stretchx
run 800000

clear

Best,
Josh Deetz
PhD Candidate Student
Chemical Engineering
University of California, Davis

These commands work for me. Which version of LAMMPS are you using? If you are using a not too old one, the error message should provide the line number in the source code where the error occurs.

Ray

Ray,

Thanks for your reply! The full error code is “ERROR: Computed temperature for fix temp/berendsen cannot be 0.0 (…/fix_temp_berendsen.cpp:139)”

I am using LAMMPS (30 Aug 2013), I will try using a newer version.

I upgraded my version to LAMMPS (4 Jun 2014) and still see the same issue. The problem must come from somewhere else.

I don’t see it with your input script (data file and force field file substituted with those from examples/reax). You need to do the same or you need to upload the input files.

Ray

The error is coming from fix temp/berendsen and it’s saying
the temperature of your system is 0.0. The fact that error
goes away when you comment out fix press/berendsen simply

means that you are running a different simulation (where
the box size didn’t change).

In the sim with the error, what is the temperature and box
size and pressure on the timestep when it gives the error?

Use thermo 1 to see what is happening to your system right
before the crash.

Steve

Ray, Thanks for checking it with the examples, that was kind of you.

After a bit of troubleshooting and something like Steve suggested, I realized that I needed to change the bulk modulus for the system as the volume rescaling was far too aggressive. In fact I was noticing all kinds of strangeness such as negative box dimension lengths, etc. I am not really sure how this caused the temperature to go to 0.0, but it is safe to say something got messed up.

Thanks for your help. Hopefully this message will inform the next person that has this problem.