MD with Reax/c

Dear developers,

A segmentation fault occurs when heating up ZnO using Reax/c. The input file is based on the provided example with a bit modifications. Could you give me some hints? Thanks.

Chunguang Tang

Dear developers,

A segmentation fault occurs when heating up ZnO using Reax/c. The input
file is based on the provided example with a bit modifications. Could
you give me some hints? Thanks.

Please update your lammps version and try again.

Axel

Dear Axel and others,

I tried it with LAMMPS (1 Feb 2014) and still got the error message. (The initial temperature not matching the settings was fixed after I remember to set the initial velocity.)

Thanks.
Chunguang

Dear Axel and others,

I tried it with LAMMPS (1 Feb 2014) and still got the error message. (The

1 Feb 2014 is old. 28 Jun 2014 is current. please see:
http://lammps.sandia.gov/bug.html

Dear Axel and others,

After running the latest one, I noticed that after the first step the volume of the system became infinity and some other values became -nan. The log file looks like:

LAMMPS (28 Jun 2014)
Reading data file ...
   orthogonal box = (0 0 0) to (13.8816 13.8816 13.8816)
   2 by 1 by 2 MPI processor grid
   reading atoms ...
   216 atoms
Warning: changed valency_val to valency_boc for X
Setting up run ...
Memory usage per processor = 117.22 Mbytes
Step Temp PotEng KinEng TotEng Volume Press
        0 500 -19216.965 320.43708 -18896.528 2674.9931 -6519.2325
        1 -nan -1849.402 -nan -nan inf -nan
        2 -nan -1849.402 -nan -nan -nan -nan

Thanks.
Chunguang

Dear Axel and others,

After running the latest one, I noticed that after the first step the
volume of the system became infinity and some other values became -nan.

that is usually a sign of a bad initial choice of coordinates, e.g.
overlapping or nearly overlapping atoms or incorrect box dimensions.

axel.

Dear Axel and others,

The initial structure is a perfect crystal structure (optimized by DFT calculations). To double check, I minimized this structure using

fix fixcell all box/relax iso 0.0 vmax 0.001
minimize 1.0e-4 1.0e-6 1000 100000

The minimization finished after one step and the log file looks like:

LAMMPS (28 Jun 2014)
Reading data file ...
   orthogonal box = (0 0 0) to (13.8816 13.8816 13.8816)
   1 by 1 by 1 MPI processor grid
   reading atoms ...
   216 atoms
Warning: changed valency_val to valency_boc for X
WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168)
Setting up minimization ...
Memory usage per processor = 145.428 Mbytes
Step Temp PotEng KinEng TotEng Volume Press
        0 0 -19216.965 0 -19216.965 2674.9931 -11995.1
        1 0 -19218.444 0 -19218.444 2666.9761 -8880.4114
Loop time of 0.154003 on 1 procs for 1 steps with 216 atoms

Minimization stats:
   Stopping criterion = energy tolerance
   Energy initial, next-to-last, final =
         -19216.9653826 -19216.9653826 -19218.4438664
   Force two-norm initial, final = 1403.86 1037.25
   Force max component initial, final = 1403.86 1037.25
   Final line search alpha, max atom move = 7.12322e-07 0.000738857
   Iterations, force evaluations = 1 1

Thanks.
Chunguang

Dear Axel and others,

The initial structure is a perfect crystal structure (optimized by DFT
calculations). To double check, I minimized this structure using

fix fixcell all box/relax iso 0.0 vmax 0.001
minimize 1.0e-4 1.0e-6 1000 100000

The minimization finished after one step and the log file looks like:

that doesn't mean a lot. you can be trapped in a local minimum that
you fall out of as soon as some of the symmetry is broken. if you have
a perfect crystal that is a common possibility. try reoptimizing the
structure after randomizing it a little bit and see, if it reliably
goes back to the same minimum.

axel.

Dear developers,

A segmentation fault occurs when heating up ZnO using Reax/c. The input
file is based on the provided example with a bit modifications. Could
you give me some hints? Thanks.

Chunguang Tang
_______________________________

Input file in.zno is as follows:
# REAX potential for ZnO system
units real
atom_style charge
read_data data.ZnO
pair_style reax/c lmp_control
pair_coeff * * ffield.reax.ZnOH H O Zn
neighbor 2 bin
neigh_modify every 10 delay 0 check no
fix fixqeq all qeq/reax 1 0.0 10.0 1e-6 param.qeq

What is in the param.qeq file? Why not just use "reax/c"?

timestep 1.0 # femtosecond

You might want to reduce this timestep size by 10 fold.

dump dumptrj all atom 100000 trj.lammpstrj
dump_modify dumptrj scale no sort id append yes
restart 200000 restart
variable tmp index 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41
variable temperature equal v_tmp*100.0
label looptemp
     fix fixnpt all npt temp \{temperature\} {temperature} 0.1 iso
0.0 0.0 1.0 # 1.0 means 1000 timesteps

I think your NANs came from these dampings. "1.0" does not mean 1000
timesteps with your timestep size but only 1 timestep. Change these
dampings and my bet is you will not see NANs.

Ray

Dear Ray, Axel and others,

Thanks a lot. Right before getting your email I have confirmed the problem is to do with the settings, not the structures, since I applied these settings to the example ZnOH2 system and got similar -nan messages.

After I set the timestep to be 0.1 (fs) and the barostat damping from 1.0 to 1000.0, the problem is fixed. (The damping 1.0 was initially used for a metal system, where 1.0 ps equils 1000 steps, 1 fs per step. After I copy/paste the lines I forgot to change this damping).

Ray, I used param.qeq file following the examples. I will try reax/c.

Another question:
I noticed that the lmp_control will generate a trajectory file (in addtion to the one specified by lammps), and in this file the "timestep_length_(in_fs)" is always 250 fs and the "ensemble_type" is always NVE, even if one changes the timestep and ensemble type. You can verify this using the example file.

Thanks.
Chunguang

I wouldn’t care about any output from the control file since they are mostly leftovers from the standalone code.

Ray