Help on set up file for liquid simulation

Hi, all:

      I am new to the LAMMPS. I need some help to set up file for liquid simulation. My target is methanol (CH3OH). Here is my questions:

1) how do I make more methanol molecules in a box instead of just one? I tried replicate command and got some extra bonds between molecules.

2) I want each molecule has a random velocity before simulation. The velocity command acts on a group of atoms not molecules. If I use the velocity command, the atoms in each molecule will move randomly and gave a wrong molecular configuration (e.g. the H and C atoms of CH3 will be on the same plane).

Thank you in advance for any suggestion and help.

jing

Hi, all:

 I am new to the LAMMPS\. I need some help to set up file for liquid

simulation. My target is methanol (CH3OH). Here is my questions:

1) how do I make more methanol molecules in a box instead of just one? I
tried replicate command and got some extra bonds between molecules.

how do you determine this? replicate only replicates bond information. it
doesn't add bonds.

2) I want each molecule has a random velocity before simulation. The
velocity command acts on a group of atoms not molecules. If I use the
velocity command, the atoms in each molecule will move randomly and gave
a wrong molecular configuration (e.g. the H and C atoms of CH3 will be
on the same plane).

this has nothing to do with the velocity initialization, but more likely with
incorrect assignment of bonded interactions.

axel

Hi, all:

      I am new to the LAMMPS. I need some help to set up file for liquid
simulation. My target is methanol (CH3OH). Here is my questions:

1) how do I make more methanol molecules in a box instead of just one? I
tried replicate command and got some extra bonds between molecules.

how do you determine this? replicate only replicates bond information. it
doesn't add bonds.

Yes, you are right. Once I enlarge the box, the extra bonds got away.

2) I want each molecule has a random velocity before simulation. The
velocity command acts on a group of atoms not molecules. If I use the
velocity command, the atoms in each molecule will move randomly and gave
a wrong molecular configuration (e.g. the H and C atoms of CH3 will be
on the same plane).

this has nothing to do with the velocity initialization, but more likely with
incorrect assignment of bonded interactions.

Here is my data file:

LAMMPS data file. CGCMM style. atom_style full generated by VMD/TopoTools v1.1 on Mon May 16

  6 atoms
  5 bonds
  7 angles
  3 dihedrals
  0 impropers
  4 atom types
  3 bond types
  3 angle types
  1 dihedral types
  0 improper types

  -10.00000 10.00000 xlo xhi
  -10.00000 10.00000 ylo yhi
  -10.00000 10.00000 zlo zhi

  Pair Coeffs

  1 0.207 3.775 #CH3
  2 0.0 0.0 #HC
  3 0.17 3.07 #OH
  4 0.0 0.0 #HO

  Bond Coeffs

  1 320.0 1.406 #CT-OH
  2 340.0 1.108 #CT-HC
  3 553.0 0.955 #HO-OH

  Angle Coeffs

  1 55.0 107.56 #CT-OH-HO
  2 50.0 107.09 #H1-CT-OH
  3 35.0 106.51 #HC-CT-HC

  Dihedral Coeffs

  1 0.5 1 0 #x-CT-OH-X

  Masses

  1 12.010700 # C
  2 1.007940 # HC
  3 15.999400 # O
  4 1.007940 # HO

  Atoms

1 1 1 0.265000 -5.691000 0.880000 -0.007000 # C LIG
2 1 3 -0.700000 -4.275000 0.885000 0.007000 # O LIG
3 1 2 0.000000 -6.060000 1.908000 -0.008000 # H LIG
4 1 2 0.000000 -6.063000 0.348000 0.871000 # H LIG
5 1 2 0.000000 -6.035000 0.371000 -0.911000 # H LIG
6 1 4 0.435000 -4.000000 1.343000 0.820000 # H LIG

  Bonds

1 1 1 2
2 2 1 3
3 2 1 4
4 2 1 5
5 3 2 6

  Angles

1 2 2 1 3
2 2 2 1 4
3 2 2 1 5
4 3 3 1 4
5 3 3 1 5
6 3 4 1 5
7 1 1 2 6

  Dihedrals

1 1 3 1 2 6
2 1 4 1 2 6
3 1 5 1 2 6

Here goes the input file:

# Methanol

units lj
atom_style full

pair_style lj/cut/coul/cut 10.0 10.0
bond_style harmonic
angle_style harmonic
dihedral_style harmonic

read_data data.methanol

#replicate 2 2 2

velocity all create 300.0 3457567 dist uniform
thermo_style multi
thermo 50

fix 1 all nvt temp 275.0 275.0 100.0 tchain 1

dump 1 all atom 1 dump.methanol

run 300

And the dump file for the first 10 time steps, step 5 shows the CH3 is almost on the same plane:

ITEM: TIMESTEP
0
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.21545 0.544 0.49965
2 3 0.28625 0.54425 0.50035
3 2 0.197 0.5954 0.4996
4 2 0.19685 0.5174 0.54355
5 2 0.19825 0.51855 0.45445
6 4 0.3 0.56715 0.541
ITEM: TIMESTEP
1
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.214356 0.544182 0.498901
2 3 0.286135 0.543621 0.499653
3 2 0.203019 0.595869 0.505436
4 2 0.198096 0.516946 0.549958
5 2 0.199867 0.52017 0.455105
6 4 0.305985 0.57333 0.548086
ITEM: TIMESTEP
2
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.213267 0.544362 0.498164
2 3 0.286026 0.543001 0.498973
3 2 0.209014 0.59637 0.511259
4 2 0.199354 0.516519 0.556291
5 2 0.201454 0.521771 0.455713
6 4 0.311854 0.579343 0.554898
ITEM: TIMESTEP
3
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.212187 0.544538 0.497452
2 3 0.285929 0.542402 0.498325
3 2 0.214973 0.596905 0.51705
4 2 0.200635 0.51615 0.562455
5 2 0.202991 0.52334 0.456236
6 4 0.317482 0.585026 0.561202
ITEM: TIMESTEP
4
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.211117 0.544711 0.496779
2 3 0.285852 0.541833 0.49772
3 2 0.220889 0.597453 0.522784
4 2 0.201939 0.515861 0.568352
5 2 0.204471 0.52487 0.456634
6 4 0.32274 0.59022 0.566784
ITEM: TIMESTEP
5
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.210062 0.544883 0.49616
2 3 0.285802 0.541302 0.497171
3 2 0.226751 0.597976 0.528425
4 2 0.203262 0.515677 0.573885
5 2 0.205899 0.526348 0.456874
6 4 0.327505 0.594776 0.571457
ITEM: TIMESTEP
6
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.209022 0.545059 0.49561
2 3 0.285785 0.540818 0.496687
3 2 0.232539 0.598423 0.53393
4 2 0.204593 0.515616 0.57896
5 2 0.207291 0.527761 0.456927
6 4 0.331663 0.598565 0.575062
ITEM: TIMESTEP
7
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.208002 0.545243 0.495141
2 3 0.285805 0.540388 0.496276
3 2 0.238216 0.598736 0.539247
4 2 0.20592 0.515696 0.583492
5 2 0.208667 0.529093 0.456778
6 4 0.335115 0.601474 0.577473
ITEM: TIMESTEP
8
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.207007 0.54544 0.494766
2 3 0.285867 0.540017 0.495943
3 2 0.243734 0.598857 0.544321
4 2 0.207229 0.51593 0.587402
5 2 0.210044 0.530329 0.456417
6 4 0.337779 0.603418 0.5786
ITEM: TIMESTEP
9
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.206044 0.545654 0.494497
2 3 0.285974 0.539709 0.495692
3 2 0.249031 0.598739 0.54909
4 2 0.208503 0.516328 0.590625
5 2 0.211436 0.531458 0.455844
6 4 0.339597 0.604339 0.578392
ITEM: TIMESTEP
10
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-10 10
ITEM: ATOMS id type xs ys zs
1 1 0.205121 0.545888 0.494341
2 3 0.286126 0.539467 0.495522
3 2 0.254041 0.59834 0.553492
4 2 0.209727 0.516899 0.593106
5 2 0.212854 0.53248 0.455062
6 4 0.340533 0.604208 0.576837

Where did I do wrong? in the data file or input file? Thanks

jing

this has nothing to do with the velocity initialization, but more likely
with
incorrect assignment of bonded interactions.

Here is my data file:

[...]

Here goes the input file:

# Methanol

units lj
atom_style full

pair_style lj/cut/coul/cut 10.0 10.0
bond_style harmonic
angle_style harmonic
dihedral_style harmonic

read_data data.methanol

#replicate 2 2 2

velocity all create 300.0 3457567 dist uniform
thermo_style multi
thermo 50

fix 1 all nvt temp 275.0 275.0 100.0 tchain 1

dump 1 all atom 1 dump.methanol

run 300

[...]

Where did I do wrong? in the data file or input file? Thanks

depends. they are obviously inconsistent. in your input file you
specify that you want to use reduced units, but the numbers in
the data file as well as in the input look more like you want to
use standard "md units". with that kind of mismatch your force
constants and temperatures are _way_ off and thus the
"garbage in, garbage out"-principle applies.

axel.