Hi,
I want to simulate bulk CO2 with fix_gcmc command using EPM2 force field.
I encountered some problems when calculating the density profile:
I have tried Both rigid and shake,
- when using fix_shake, Lammps crashes with an Error: shake determinant =0.0. So I searched the solutions on Lammps Mailing List and found that “the SHAKE/RATTLE implementation in LAMMPS cannot process linear molecules with more than 2 atoms.”
2) therefore, I use fix_rigid instead. But I failed with the ERROR: Fix rigid: Bad principal moments (…/fix_rigid_small.cpp:2229).
I have looked through the LAMMPS Mailing List but I haven’t found the answers to the above problems.
The version of LAMMPS I am using is lammps-11Aug17.
Any help would be helpful.
Thank you very much
Best regards,
Juan Zhou
#####################INPUT SCRIPT############################
variable mu index -0.99968
variable disp index 0.5
variable press equal 100
variable pressatm equal ${press}*0.9869233
variable fugacoeff equal 0.49048
variable temp index 300.0
variable lbox index 50.0
variable spacing index 5.0
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 14.0
pair_modify mix arithmetic tail yes
kspace_style ewald 0.0001
bond_style harmonic
angle_style harmonic
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 CO2 CO2.txt
create_atoms 0 box mol CO2 464563 units box
pair_coeff 1 1 0.0558535 2.757
pair_coeff 2 2 0.1598562 3.033
bond_coeff 1 2057.09623 1.149
angle_coeff 1 111.950929 180
mass 1 12.0107
mass 2 15.9994
minimize 1.0e-4 1.0e-6 100 1000
min_style cg
group gas type 1 2
neighbor 2.0 bin
neigh_modify every 1 delay 10 check yes
velocity all create ${temp} 4928459 mom yes rot yes dist gaussian
timestep 1.0
thermo_style custom step temp press density atoms pe ke
thermo 100
fix 1 gas rigid/nvt/small molecule temp {temp} {temp} 100 mol CO2
fix_modify 1 dynamic/dof yes
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix 2 gas gcmc 10 1000 0 0 54341 {temp} {mu} {disp} mol CO2 pressure {pressatm} fugacity_coeff ${fugacoeff} &
tfac_insert ${tfac} group gas rigid 1
compute_modify thermo_temp dynamic/dof yes
run 100000
##################### CO2.txt ############################
3 atoms
2 bonds
1 angles
Coords
1 2.0000 1.0000 0.0000
2 3.0221 1.5679 0.0000
3 0.9779 0.4321 0.0000
Types
1 1
2 2
3 2
Charges
1 0.6512
2 -0.3256
3 -0.3256
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
#Shake Flags
#1 1
#2 2
#3 2
#Shake Atoms
#1 1 2 3
#2 1 2
#3 1 3
#Shake Bond Types
#1 1 1 1
#2 1
#3 1