[lammps-users] 'nan' in E_mol, Total energy and pressure

Dear everyone,

Thank you very much for answering my trivial questions, Paul and Steve.
It helps me a lot.
I could make Lammps, and could create input script with a data file.
Now I tried to run with the input script, but I got 'nan' in E_mol,
Totla energy and pressure...
If you don't mind, would you tell me what is going on with this and what
I should check first?
Does 'E_mol' mean energy per mol?
I thought that atoms are too close, so changed timestep, but it did not
work...
Thank you very much.

Best regards,
Nanako Takahashi

Dear everyone,

Thank you very much for answering my trivial questions, Paul and Steve.
It helps me a lot.
I could make Lammps, and could create input script with a data file.
Now I tried to run with the input script, but I got 'nan' in E_mol,
Totla energy and pressure...

what input? did you try any of the reference examples?

those _have_ to work or else you have a miscompiled executable.
in the latter case we need to know what compiler/platform you
are running on and what compiler flags you have been using.

cheers,
   axel.

Hi Axel,

Thank you very much for your prompt reply.
I have already tried examples, and I could run them.
I got 'nan' with my input script which I created....
The following is my input script and data file.
Actually I am not sure what I need to select for "fix" command, but,
I get 'nan' at the first step, so I thought something is wrong with my initial settings...
Thank you very much.

Best regards,
Nanako Takahashi

* input script*-----------------------

units real
atom_style full
bond_style harmonic
special_bonds amber
angle_style harmonic
dihedral_style charmm
improper_style cvff
pair_style lj/cut/coul/cut 200.0

read_data data.EMI_BF4

neighbor 17. bin

# Temperature T=300 K
velocity all create 300.00 376847

minimize 1.0e-4 1.0e-6 100 10000

fix 1nn all nvt 300.0 300.0 3000.0

thermo 100
timestep 0.00001

dump myDump all atom 10 dump.EMI._BF4

run 500

*data file*----------------------
LAMMPS data file

24 atoms
23 bonds
39 angles
39 dihedrals
14 impropers

10 atom types
10 bond types
15 angle types
11 dihedral types
3 improper types

-20.000000 20.000000 xlo xhi
-20.000000 20.000000 ylo yhi
-20.000000 20.000000 zlo zhi

Masses

1 14.0070
2 12.0010
3 12.0010
4 12.0010
5 1.0080
6 0.0080
7 1.0080
8 1.0080
9 10.8110
10 18.9984

Atoms

1 1 1 -0.0100 -1.543 0.630 -0.795
2 1 2 0.0581 -0.169 0.630 -0.795
3 1 1 0.0795 0.270 1.934 -0.795
4 1 3 -0.1671 -0.853 2.780 -0.803
5 1 3 -0.1925 -1.988 1.964 -0.807
6 1 4 0.0328 -2.370 -0.556 -0.690
7 1 4 -0.0795 -2.694 -1.214 -2.019
8 1 4 -0.1657 1.644 2.336 -0.684
9 1 5 0.2587 -3.047 2.227 -0.805
10 1 6 0.2046 0.492 -0.288 -0.737
11 1 5 0.2482 -0.765 3.868 -0.798
12 1 7 0.1293 1.693 3.363 -0.235
13 1 7 0.1293 2.116 2.346 -1.703
14 1 7 0.1293 2.188 1.604 -0.015
15 1 7 0.0892 -1.815 -1.288 -0.020
16 1 7 0.0892 -3.324 -0.250 -0.173
17 1 8 0.0556 -1.767 -1.554 -2.540
18 1 8 0.0556 -3.330 -2.110 -1.811
19 1 8 0.0556 -3.255 -0.526 -2.695
20 2 9 0.8275 1.233 -1.338 1.219
21 2 10 -0.4569 1.465 -1.697 -0.075
22 2 10 -0.4569 -0.114 -1.329 1.392
23 2 10 -0.4569 1.834 -2.182 2.072
24 2 10 -0.4569 1.691 -0.068 1.366

Bond Coeffs

1 309.99 1.526
2 339.99 1.090
3 339.99 1.090
4 336.99 1.475
5 366.99 1.080
6 476.99 1.343
7 366.99 1.080
8 426.99 1.381
9 548.99 1.350
10 289.99 1.393

Bonds

1 6 2 1
2 6 3 2
3 8 4 3
4 9 5 4
5 8 1 5
6 4 1 6
7 1 6 7
8 2 6 15
9 2 6 16
10 3 7 17
11 3 7 18
12 3 7 19
13 4 3 8
14 2 8 12
15 2 8 13
16 2 8 14
17 5 2 10
18 7 4 11
19 7 5 9
20 10 20 21
21 10 20 22
22 10 20 23
23 10 20 24

Angle Coeffs

1 35.00 109.5
2 50.00 109.5
3 70.00 128.8
4 70.00 121.2
5 70.00 121.2
6 35.00 119.7
7 50.00 109.5
8 50.00 109.5
9 35.00 109.5
10 50.00 109.5
11 70.00 120.0
12 35.00 120.0
13 70.00 120.0
14 35.00 120.0
15 50.00 109.5

Angles

1 1 15 6 16
2 1 12 8 13
3 1 12 8 14
4 1 13 8 14
5 2 15 6 1
6 2 16 6 1
7 2 12 8 3
8 2 13 8 3
9 2 14 8 3
10 3 2 1 6
11 3 2 3 8
12 4 5 1 6
13 4 4 3 8
14 5 5 4 3
15 5 4 5 1
16 6 4 5 9
17 6 5 4 11
18 7 7 6 15
19 7 7 6 16
20 8 6 6 17
21 8 6 6 18
22 8 6 6 19
23 9 17 7 18
24 9 17 7 19
25 9 18 7 19
26 10 7 6 1
27 11 1 2 3
28 12 1 2 10
29 12 3 2 10
30 13 2 3 4
31 13 2 1 5
32 14 1 5 9
33 14 3 4 11
34 15 21 20 22
35 15 21 20 23
36 15 21 20 24
37 15 22 20 23
38 15 22 20 24
39 15 23 20 24

Dihedral Coeffs

1 1.7000 2 180 0.0
2 1.7000 2 180 0.0
3 2.3249 2 180 0.0
4 2.3249 2 180 0.0
5 0.1555 3 0 0.0
6 0.0000 2 0 0.0
7 6.6498 2 180 0.0
8 1.8500 2 180 0.0
9 1.8500 2 180 0.0
10 1.5000 2 180 0.0
11 1.8500 2 180 0.0

Dihedrals

1 1 1 2 3 8
2 1 3 2 1 6
3 2 10 2 2 6
4 2 10 2 3 8
5 3 10 2 1 5
6 3 10 2 3 4
7 4 1 2 3 4
8 4 3 2 1 5
9 5 1 6 7 17
10 5 1 6 7 18
11 5 1 6 7 19
12 5 17 7 6 15
13 5 17 7 6 16
14 5 18 7 6 15
15 5 18 7 6 16
16 5 19 7 6 15
17 5 19 7 6 16
18 6 15 6 1 2
19 6 15 6 1 5
20 6 16 6 1 2
21 6 16 6 1 5
22 6 12 8 3 2
23 6 12 8 3 4
24 6 13 8 3 2
25 6 13 8 3 4
26 6 14 8 3 2
27 6 14 8 3 4
28 7 3 4 5 1
29 7 3 4 5 9
30 7 11 4 5 1
31 7 11 4 5 9
32 8 4 5 1 2
33 8 5 4 3 2
34 9 4 5 1 6
35 9 5 4 3 8
36 10 9 5 1 2
37 10 11 4 3 2
38 11 9 5 1 6
39 11 11 4 3 8

Improper Coeffs

1 1.1000 -1 2
2 1.1000 -1 2
3 1.0000 -1 2

Impropers

1 1 6 1 2 10
2 1 5 1 2 10
3 1 4 3 2 10
4 1 8 1 2 10
5 2 2 3 4 11
6 2 8 3 4 11
7 2 1 5 4 11
8 2 9 5 4 11
9 2 2 1 5 9
10 2 6 1 5 9
11 2 3 4 5 9
12 3 17 7 6 1
13 3 18 7 6 1
14 3 19 7 6 1

Pair Coeffs

1 0.1700 3.2500
2 0.0860 3.3997
3 0.0860 3.3997
4 0.1094 3.3997
5 0.0150 2.5106
6 0.0150 2.4215
7 0.0157 2.4714
8 0.0157 2.6495
9 0.0950 3.5814
10 0.0610 3.1181

Axel Kohlmeyer wrote:

Hi Axel,

Thank you very much for your prompt reply.
I have already tried examples, and I could run them.
I got 'nan' with my input script which I created....
The following is my input script and data file.
Actually I am not sure what I need to select for "fix" command, but,
I get 'nan' at the first step, so I thought something is wrong with my
initial settings...
Thank you very much.

Best regards,
Nanako Takahashi

* input script*-----------------------

units real
atom_style full
bond_style harmonic
special_bonds amber
angle_style harmonic
dihedral_style charmm
improper_style cvff
pair_style lj/cut/coul/cut 200.0

your cutoff is much larger than your box.

read_data data.EMI_BF4

neighbor 17. bin

# Temperature T=300 K
velocity all create 300.00 376847
minimize 1.0e-4 1.0e-6 100 10000

fix 1nn all nvt 300.0 300.0 3000.0

i would try running with nve first. that is more stable.

also, you have to find a way to verify that all bonds
and so on are assigned properly. you could try the converter
scripts to VMD for example...

cheers,
   axel.

If you get a NaN in the thermo output, something is wrong
with your simulation. If it happens at time 0, your
initial config is bad.

Steve