Problem by varying timestep

Dear LAMMPS-Users,

Actually, I have asked this question 2-3 days ago. Dear Axel gave me some clues on that time but my problem was not resolved. I really attempted to solve my problem myself however I could not found more things about that through searching the mailing list. So, please accept my apologies for posting this question again.

I am trying to simulate a box with two carbon atom walls filled by SPC/E water. I would like to immobilize the carbon atom walls via applying the “fix setforce” along side “ fix move” commands. I also preferred to use “fix nvt” just on water molecules aimed at time integrating.

By applying different values for “timestep” I will come across to some quite different outputs for Temp PotEng TotEng and Press.

I would be greatly appreciated by sharing your comments that what things may lead to happen these issues?

Thanks in advance

MajiD

Please take a look at the outputs as follows

Ts=0.02

Step Temp PotEng TotEng Press Volume

100 260.85822 -12940.01 -10258.175 4774.8327 36000

200 264.42727 -12143.879 -9425.3517 3379.0445 36000

300 261.51265 -12222.816 -9534.2529 3660.858 36000

400 254.88042 -11646.066 -9025.6878 5661.3674 36000

500 256.67901 -11247.388 -8608.5187 9173.6195 36000

Ts= 0.2

Step Temp PotEng TotEng Press Volume

100 260.85822 -12940.01 -10258.175 4774.8327 36000

200 0 -12673.481 -12673.481 2546.0049 36000

300 0 -12739.355 -12739.355 2788.1116 36000

400 0 -12776.9 -12776.9 2852.939 36000

500 0 -12804.046 -12804.046 2854.771 36000

Ts= 2

Step Temp PotEng TotEng Press Volume

100 260.85822 -12940.01 -10258.175 4774.8327 36000

200 -nan -nan -nan -nan 36000

300 -nan -nan -nan -nan 36000

400 -nan -nan -nan -nan 36000

500 -nan -nan -nan -nan 36000

My input’

units real

dimension 3

boundary p p p

atom_style full

read_data mydata.in

group carbon type 1

group hydrogen type 2

group oxygen type 3

group water type 2 3

set group oxygen charge -0.8476

set group hydrogen charge 0.4238

set group carbon charge 0.0000

#pair_style dpd/tstat 300.0 300.0 10.0 34387

#comm_style brick

#comm_modify vel yes

#pair_style hybrid lj/cut/coul/long 10.0 10.0 tersoff

pair_style lj/cut/coul/long 10.0 10.0

pair_coeff 1 1 0.000000 0.0000 #lj/cut/coul/long

pair_coeff 1 2 0.00000 0.00000

pair_coeff 1 3 0.093627 3.1900

pair_coeff 2 2 0.000000 0.0000

pair_coeff 2 3 0.000000 0.0000

pair_coeff 3 3 0.155300 3.16900

#pair_coeff * * tersoff SiC_1994.tersoff NULL NULL C

bond_style harmonic

bond_coeff 1 529.581 1.0

angle_style harmonic

angle_coeff 1 37.95 109.47

fix force_zero carbon setforce 0.0 0.0 0.0

fix vel_zero carbon move linear 0.0 0.0 0.0 units lattice

velocity water create 300.0 34387 rot yes dist gaussian # for water

kspace_style ewald 1.0e-6

neighbor 2.0 bin

neigh_modify delay 0 every 10 check yes

reset_timestep 0

delete_atoms overlap 0.3 all all

minimize 1.0e-4 1.0e-6 100 100000

min_style cg

compute peatom all pe/atom

compute keatom all ke/atom

thermo 100

thermo_style custom step temp pe etotal press vol

thermo_modify norm no flush yes

fix ensemble_set water nvt temp 300.0 300.0 0.05

fix 2 water temp/rescale 100 300.0 300.0 10.0 0.05

fix spce_model water shake 0.0001 20 0 b 1 a 1

#fix 3 water addforce 0.0 0.0 1.0

variable end equal 1000

dump pos all custom ${end} pos_filename id element type q x y z

dump_modify pos format “%5d %5s %d %13.10f %17.12f %17.12f %17.12f”

dump_modify pos sort id

dump_modify pos element C HW OW

dump vel all custom ${end} vel_filename id element vx vy vz

dump_modify vel format “%5d %5s %18.15f %18.15f %18.15f”

dump_modify vel sort id

dump_modify vel element C HW OW

timestep 0.02

run 1000

A small part of my data file’

3450 atoms

2000 bonds

1000 angles

0 dihedrals

0 impropers

3 atom types

1 bond types

1 angle types

0 dihedral types

0 improper types

0.00 30.00 xlo xhi

0.00 30.00 ylo yhi

-5.00 35.00 zlo zhi

Masses

1 12.011000 # C

2 1.008000 # HW

3 15.999000 # OW

Atoms

1 1 1 0.000000 2.000000 2.000000 30.000000 # C JJC

2 1 1 0.000000 2.000000 4.000000 30.000000 # C JJC

3 1 1 0.000000 2.000000 6.000000 30.000000 # C JJC

4 1 1 0.000000 2.000000 8.000000 30.000000 # C JJC

5 1 1 0.000000 2.000000 10.000000 30.000000 # C JJC

.

.

451 1 3 -0.847600 24.346001 12.055000 24.049999 # OW JJC

452 1 2 0.423800 24.346001 12.872000 23.469999 # HW JJC

453 1 2 0.423800 24.346001 11.239000 23.469999 # HW JJC

454 1 3 -0.847600 9.512000 7.806000 20.660000 # OW JJC

455 1 2 0.423800 10.089000 7.806000 21.480000 # HW JJC

Bonds

1 1 451 452

2 1 451 453

3 1 454 455

4 1 454 456

5 1 457 459

.

.

Angles

1 1 452 451 453

2 1 455 454 456

3 1 458 457 459

4 1 461 460 462

5 1 464 463 465

.

.

Dear LAMMPS-Users,

Actually, I have asked this question 2-3 days ago. Dear Axel gave me some
clues on that time but my problem was not resolved. I really attempted to
solve my problem myself however I could not found more things about that
through searching the mailing list. So, please accept my apologies for
posting this question again.

you didn't follow my advice *completely* and thus there is no surprise
you still have problems.

- there is no need for fix setforce and fix move at all, when you
restrict fix nvt on the water molecules only
- you *still* have a bogus time constant for fix nvt. the bogus output
is primarily the consequence of that.
- instead of time integrating atoms twice, you know thermostat them
twice, which is equally bad.

this things *are* explained in the manual and *have* been discussed on
the mailing list many times.
what you have to do, i already told you in the previous mail. the fact
that your situation is not improved is solely due to your not
following advice being given.

I am trying to simulate a box with two carbon atom walls filled by SPC/E
water. I would like to immobilize the carbon atom walls via applying the
“fix setforce” along side “ fix move” commands. I also preferred to use “fix
nvt” just on water molecules aimed at time integrating.

By applying different values for “timestep” I will come across to some quite
different outputs for Temp PotEng TotEng and Press.

I would be greatly appreciated by sharing your comments that what things may
lead to happen these issues?

MD is garbage in, garbage out. and all details matter. a smart person
would have started with a water only system and find the parameters
that make this work safely and correctly and only then move on to a
more complex setup.

axel.

Dear Axel,

Let me greatly thank for your suggestions. The problem was completely disappeared when modifying the bogus time constant for fix nvt as you suggested. :))

I also tried by neglecting the fix setforce and fix move that I found that they have not any visible effect on temp,pot and press at all.

I think my bogus time constant was wrong.

Thanks again for your valuable time and suggestion.

Cheers