LAMMPS 中 molecule command 的分子模板

谈谈分子模板,手册中提供了几种例子,我们这里用水的作为例子说明,剩下的我找了一些贴出来便于大家参考,欢迎交流!

# Water molecule. SPC/E model.

3 atoms  ## 分子模板中的原子总数
2 bonds  ## 分子模板中的bond总数
1 angles ## 分子模板中的角总数

Coords
# 原子ID x        y       z
1    1.12456   0.09298   1.27452
2    1.53683   0.75606   1.89928
3    0.49482   0.56390   0.65678

Types
# 原子ID  type
1        1
2        2
3        2

Charges
# 原子ID charge
1       -0.8472  
2        0.4236
3        0.4236

Bonds
#ID type   atom1  atom2
1   1      1      2
2   1      1      3

Angles
#ID type   atom1  atom2  atom3
1   1      2      1      3

Shake Flags
# ID flag
1 1         ### 0 :不属于fix shake 作用的 
2 1         ### 1 :shake two bonds and the angle they form
3 1         ### 2 :2-atom SHAKE cluster with a single bond
            ### 3 : 3-atom SHAKE cluster with two bonds
            ### 4 : 4-atom SHAKE cluster with three bonds
Shake Atoms

1 1 2 3     flag = 1 : ID a(中心原子) b   c   (组成的角连接的其他两个atom)
2 1 2 3     flag = 2: ID a(ID of atom in bond with the the lowest ID)  b(ID of atom in bond with the the highest ID)
3 1 2 3     flag = 3: ID a(ID of central atom) b,c = IDs of other two atoms bonded to the central atom.
            flag = 4: ID a(ID of central atom) b,c = IDs of other three atoms bonded to the central atom.

Shake Bond Types  
If flag = 1, a,b,c are listed, where a = bondtype of the bond between the central atom and the first non-central atom (value b in the Shake Atoms section), b = bondtype of the bond between the central atom and the 2nd non-central atom (value c in the Shake Atoms section), and c = the angle type (1 to Nangletypes) of the angle between the 3 atoms.

1 1 1 1
2 1 1 1
3 1 1 1

Special Bond Counts
#ID   1-2原子紧邻  1-3 1-4
1     2           0   0  ## 对于atom1 也就是o来说
2     1           1   0
3     1           1   0
##
##     atom1   
##          o
##         / \
##  atom2 h   h atom3
##
##  atom1 atom2就是1-2紧邻,atom1 atom3同理;--> 两个相邻原子间隔了1个键
##  atom2和atom3呢?三个原子间隔了2个键
## 显然 1-2原子紧邻 2个 ,1-3,1个,1-4,0个

Special Bonds

1 2 3  ###  ID 1-2紧邻 1-3
2 1 3  ###   1 2      3 #原子atom1 1-2紧邻的是原子2;1-3紧邻的是原子3
3 1 2  ###   2 1      3

完整代码:

# Water molecule. SPC/E model.

3 atoms  
2 bonds 
1 angles 

Coords
1    1.12456   0.09298   1.27452
2    1.53683   0.75606   1.89928
3    0.49482   0.56390   0.65678

Types
1        1
2        2
3        2

Charges
1       -0.8472  
2        0.4236
3        0.4236

Bonds
1   1      1      2
2   1      1      3

Angles
1   1      2      1      3

Shake Flags
1 1         
2 1         
3 1                    

Shake Atoms
1 1 2 3     
2 1 2 3     
3 1 2 3     

Shake Bond Types  
1 1 1 1
2 1 1 1
3 1 1 1

Special Bond Counts
1 2  0   0  
2 1  1   0
3 1  1   0

Special Bonds

1 2 3  
2 1 3  
3 1 2 

水分子dimer结构

# dimer molecule

2 atoms
1 bonds

Coords

1 0 0 0
2 1 0 0

Types

1 2
2 3

Bonds

1 1 1 2

Special Bond Counts

1 1 0 0
2 1 0 0

Special Bonds

1 2
2 1

dimer granular molecule

# dimer granular molecule

5 atoms

Coords

1 0 0 0
2 1 0 0
3 2 0 0
4 2 1 0
5 2 2 0

Types

1 1
2 1
3 1
4 1
5 1

Diameters

1 1.0
2 1.0
3 1.0
4 1.0
5 1.0

Masses

1 0.5
2 0.5
3 0.5
4 0.5
5 0.5

CO2 molecule file. TraPPE model.

# CO2 molecule file. TraPPE model.

3 atoms
2 bonds
1 angles

Coords

1        0.0 0.0 0.0
2        -1.16 0.0 0.0
3        1.16 0.0 0.0

Types

1        1
2        2
3        2

Charges

1        0.7
2       -0.35
3       -0.35

Bonds

1   1      1      2
2   1      1      3

Angles

1   1      2      1      3

Special Bond Counts

1 2 0 0
2 1 1 0
3 1 1 0

Special Bonds

1 2 3
2 1 3
3 1 2

LAMMPS data file created for rigid body molecule template

LAMMPS data file created for rigid body molecule template

5 atoms

2.3388800000000005 mass

6.002239704473936 4.99 4.989999999999999 com

116.79265620480001 144.26721336320003 144.26721336320006 -70.05220681600004 -70.05220681600002 -58.238345888000005 inertia

Coords

1 5 5 5
2 5.1 5.0 5.0
3 5.2 5.0 5.0
4 6.2 5.0 5.0
5 7.2 5.0 5.0

Types

1 1
2 1
3 1
4 1
5 1

Diameters

1 1.0
2 0.9
3 1.2
4 1.2
5 1.0

Masses

1 0.5235987755982988
2 0.3817035074111599
3 0.9047786842338602
4 0.9047786842338602
5 0.5235987755982988

这里我给出一个in文件的例子,随机建立2000个水分子

###################
# initial setting #
###################
#----------------------------------------------------------#
variable         x          equal 50
variable         y          equal 50
variable         z          equal 50
#----------------------------------------------------------#

units              metal
dimension            3
boundary           p p p
atom_style          full
bond_style        harmonic
angle_style       harmonic

##############
# create box #
##############
#----------------------------------------------------------#
region            box   block 0 $x 0 $y 0 $z units box
create_box        2 box                           &
                  bond/types 1                    &
                  angle/types 1                   &
                  extra/bond/per/atom 2           &
                  extra/angle/per/atom 1          &
                  extra/special/per/atom 2

molecule         water H2O.txt 
create_atoms     0 random 2000 12345 box  mol water 12345 units box
#----------------------------------------------------------#
# setting mass

mass              1 16.0 
mass              2  1.0

bond_coeff        1 19.51 0.9572
angle_coeff       1 2.40 104.52

write_data        1

在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43689832/article/details/104443175

相关文章