forked from lijiext/lammps
98 lines
2.7 KiB
Plaintext
98 lines
2.7 KiB
Plaintext
# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics
|
|
# Rigid CO2 TraPPE model
|
|
# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of
|
|
# mixtures containing alkanes, carbon dioxide and
|
|
# nitrogen AIChE J., 47,1676-1682 (2001)].
|
|
|
|
# variables available on command line
|
|
|
|
variable mu index -8.1
|
|
variable disp index 0.5
|
|
variable temp index 338.0
|
|
variable lbox index 10.0
|
|
variable spacing index 5.0
|
|
|
|
# global model settings
|
|
|
|
units real
|
|
atom_style full
|
|
boundary p p p
|
|
pair_style lj/cut/coul/long 14
|
|
pair_modify mix arithmetic tail yes
|
|
kspace_style ewald 0.0001
|
|
bond_style harmonic
|
|
angle_style harmonic
|
|
|
|
# box, start molecules on simple cubic lattice
|
|
|
|
lattice sc ${spacing}
|
|
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} 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 co2mol CO2.txt
|
|
create_atoms 0 box mol co2mol 464563 units box
|
|
|
|
# rigid CO2 TraPPE model
|
|
|
|
pair_coeff 1 1 0.053649 2.8
|
|
pair_coeff 2 2 0.156973 3.05
|
|
bond_coeff 1 0 1.16
|
|
angle_coeff 1 0 180
|
|
|
|
# masses
|
|
|
|
mass 1 12.0107
|
|
mass 2 15.9994
|
|
|
|
# MD settings
|
|
|
|
group co2 type 1 2
|
|
neighbor 2.0 bin
|
|
neigh_modify every 1 delay 10 check yes
|
|
velocity all create ${temp} 54654
|
|
timestep 1.0
|
|
|
|
# rigid constraints with thermostat
|
|
|
|
fix myrigidnvt co2 rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol
|
|
|
|
# dynamically update fix rigid/nvt/small temperature ndof
|
|
fix_modify myrigidnvt dynamic/dof yes
|
|
|
|
# gcmc
|
|
|
|
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
|
|
fix mygcmc co2 gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol &
|
|
co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
|
|
|
|
# atom counts
|
|
|
|
variable carbon atom "type==1"
|
|
variable oxygen atom "type==2"
|
|
group carbon dynamic co2 var carbon
|
|
group oxygen dynamic co2 var oxygen
|
|
variable nC equal count(carbon)
|
|
variable nO equal count(oxygen)
|
|
|
|
# output
|
|
|
|
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
|
|
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
|
|
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
|
|
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
|
|
|
|
# dynamically update default temperature ndof
|
|
compute_modify thermo_temp dynamic/dof yes
|
|
|
|
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc v_nC v_nO
|
|
thermo 1000
|
|
|
|
# run
|
|
|
|
run 20000
|
|
|