Hi,
There is a Ni0(H2O)2 molecule in box, the force field used for define it is UFF4MOF.
The data file is generated by lammps_interface and can run MD using lammps successfully.
Now I want to fill the box with TIP4P-Ew H2O molecules, and I use molecule and creat_atomscommand.
- The script run into an ERROR says
"ERROR: Not all per-type masses are set". I’ve checked the input script carefully but can’t find out why, please help me. - How to define the interaction between TIP4P-Ew H2O molecules and Ni0(H2O)2 since they are defined in different force field?
I am using lammps-11Aug17 and below is my input script.
Thanks a lot!
Zhongming
#content: in.H2O2-Ni0
log log.H2O2-Ni0 append
units real
atom_style full
boundary p p p
pair_style hybrid lj/cut/coul/long 12.500 lj/cut/tip4p/long 9 10 9 16 0.1250 12.500 10.000
bond_style harmonic
angle_style hybrid fourier cosine/periodic harmonic
kspace_style ewald 0.000001
dielectric 1.0
pair_modify pair lj/cut/coul/long tail yes mix arithmetic
special_bonds lj/coul 0.0 0.0 1.0
box tilt large
read_data data.H2O2-Ni0 extra/atom/types 2 extra/bond/types 1 extra/angle/types 1
# insert TIP4P-Ew H2O
molecule h2o H2O.txt offset 3 2 3 0 0
create_atoms 0 random 20 1 NULL mol h2o 1
# add coffs for TIP4P-Ew H2O according to http://lammps.sandia.gov/doc/Section_howto.html#tip4p-water-model
pair_coeff 4 4 lj/cut/tip4p/long 0.16275 3.16435
pair_coeff 4 5 lj/cut/tip4p/long 0.0 0.0
pair_coeff 5 5 lj/cut/tip4p/long 0.0 0.0
bond_coeff 3 559.995206 0.9572
angle_coeff 4 harmonic 300.0 104.52
dump myDump1 all atom 1 dump1.txt
velocity all create 298.0 12345689 dist uniform
neighbor 2.0 bin
neigh_modify delay 0 every 10 check yes
thermo 200
thermo_style custom step time temp
thermo_modify norm no flush yes
fix 1 all nvt temp 298.0 298.0 100.0
minimize 1.0e-8 1.0e-8 10000 10000
# output trj
dump trj2 all xyz 4000 MD-result.xyz
dump_modify trj2 element Zr C O O H Ni O H
timestep 0.5
run 200000 # run md for 0.1ns
# content: data.H2O2-Ni0
Created on Sat Mar 10 15:52:15 2018
7 atoms
6 bonds
7 angles
3 atom types
2 bond types
3 angle types
0.000000 30.000000 xlo xhi
0.000000 30.000000 ylo yhi
0.000000 30.000000 zlo zhi
0.000000 0.000000 0.000000 xy xz yz
Masses
1 58.693400000 # Ni1
2 15.999400000 # O_3
3 1.007940000 # H_
Bond Coeffs
1 272.490300 1.895541 # Ni1 O_3
2 559.995206 0.990254 # O_3 H_
Angle Coeffs
1 cosine/periodic 17.945113 1 1 # O_3 Ni1 O_3
2 fourier 57.090081 0.300235 0.267331 0.266745 # Ni1 O_3 H_
3 fourier 122.883342 0.300235 0.267331 0.266745 # H_ O_3 H_
Pair Coeffs
1 lj/cut/coul/long 0.015000 2.524807 # Ni1 Ni1
2 lj/cut/coul/long 0.060000 3.118146 # O_3 O_3
3 lj/cut/coul/long 0.044000 2.571134 # H_ H_
Atoms
1 1 1 0.00000 -6.51360 -3.19770 5.43240
2 1 2 0.00000 -8.00880 -3.22170 6.57150
3 1 3 0.00000 -7.67370 -3.33060 7.48860
4 1 3 0.00000 -8.50470 -4.04940 6.38790
5 1 2 0.00000 -5.04570 -3.16620 4.25970
6 1 3 0.00000 -4.88910 -2.22900 4.01040
7 1 3 0.00000 -4.25640 -3.42000 4.78620
Bonds
1 1 1 2
2 1 1 5
3 2 2 3
4 2 2 4
5 2 5 6
6 2 5 7
Angles
1 1 2 1 5
2 2 1 2 3
3 3 3 2 4
4 2 1 2 4
5 2 1 5 6
6 3 6 5 7
7 2 1 5 7
# content: H2O.txt
Created on Sat Mar 10 09:43:39 2018
3 atoms
2 bonds
1 angles
Coords
1 8.17610 0.16360 0.10430 # O
2 8.85210 0.64630 0.64340 # H
3 7.32070 0.61450 0.31730 # H
Types
1 1
2 2
3 2
Masses
1 15.9994 # O
2 1.008 # H
3 1.008 # H
Charges
1 -1.0484
2 0.5242
3 0.5242
Bonds
1 1 1 2
2 1 1 3
Angles
1 1 2 1 3
# content : log.lammps
units real
atom_style full
boundary p p p
# for lj/cut/tip4p: LJ cutoff >= Coulomb cutoff + 2*(OM distance)
pair_style hybrid lj/cut/coul/long 12.500 lj/cut/tip4p/long 9 10 9 16 0.1250 12.500 10.000
bond_style harmonic
angle_style hybrid fourier cosine/periodic harmonic
kspace_style ewald 0.000001
dielectric 1.0
pair_modify pair lj/cut/coul/long tail yes mix arithmetic
special_bonds lj/coul 0.0 0.0 1.0
box tilt large
read_data data.H2O2-Ni0 extra/atom/types 2 extra/bond/types 1 extra/angle/types 1
triclinic box = (0 0 0) to (30 30 30) with tilt (0 0 0)
2 by 2 by 2 MPI processor grid
reading atoms ...
7 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
3 = max angles/atom
reading bonds ...
6 bonds
reading angles ...
7 angles
3 = max # of 1-2 neighbors
4 = max # of 1-3 neighbors
6 = max # of special neighbors
#### Atom Groupings ####
group 1 id 1:7
7 atoms in group 1
#### END Atom Groupings ####
# insert H2O
molecule h2o H2O.txt offset 3 2 3 0 0
Read molecule h2o:
3 atoms with 5 types
2 bonds with 3 types
1 angles with 4 types
0 dihedrals with 0 types
0 impropers with 0 types
create_atoms 0 random 20 1 NULL mol h2o 1
WARNING: Molecule attributes do not match system attributes (../molecule.cpp:1369)
Created 60 atoms
# add coffs for h2o according to http://lammps.sandia.gov/doc/Section_howto.html#tip4p-water-model
pair_coeff 4 4 lj/cut/tip4p/long 0.16275 3.16435
pair_coeff 4 5 lj/cut/tip4p/long 0.0 0.0
pair_coeff 5 5 lj/cut/tip4p/long 0.0 0.0
bond_coeff 3 559.995206 0.9572
angle_coeff 4 harmonic 300.0 104.52
dump myDump1 all atom 1 dump1.txt
velocity all create 298.0 12345689 dist uniform
ERROR: Not all per-type masses are set (../velocity.cpp:63)
Last command: velocity all create 298.0 12345689 dist uniform
in.H2O2-Ni0 (1.5 KB)
data.H2O2-Ni0 (2.09 KB)
H2O.txt (558 Bytes)
log.H2O2-Ni0 (1.83 KB)