Hi,
I want to realize a crosslinking process of a polymer chain based on two metathesis reactions with fixed the chemical potential of small molecules. In the data file, the atomtype of polymer is 1 and there are some of reaction site of the polymer chains with atomtype 2. The template of small molecules react with reaction sites is 3-4-3. In the fist step reaction, the reaction sites on polymer react with the small molecules:
1-2 + 3-4-3 = 1-4-3 + 2-3
where 2-3 is the small molecules produced after reaction. Here I want to fix the chemical potential of the two kinds of small molecules (3-4-3 and 2-3) so the fix gcmc would be performed. For dynamically group atoms in gcmc, I change the atomtype after reaction:
1-2 + 3-4-3 = 1-6-5 + 7-8
In the second step, the reaction sites reacted in the fist step will react with other reaction sites:
1-4-3 + 1-2= 1-4-1 + 2-3
For dynamically group atoms in gcmc, the atomtype would be changed:
1-6-5 + 1-2= 1-9-1 + 7-8
Therefore achieving cross-linking of polymer chains. The two steps are reversible.
Here is my lammps in. file:
#box information
units lj
boundary p p p
atom_style bond
#read data
read_data vitrimers.dat
molecule primer data_templates/primer.data_template
molecule byproduct data_templates/byproduct.data_template
molecule step1_unreacted data_templates/step1.unreacted.data_template
molecule step1_reacted data_templates/step1.reacted.data_template
molecule step2_unreacted data_templates/step2.unreacted.data_template
molecule step2_reacted data_templates/step2.reacted.data_template
#neighbor and velocity
neighbor 0.4 bin
neigh_modify every 1 one 100
velocity all create 1.0 123
#set LJ pair_style
pair_style lj/cut 2.5
pair_modify shift yes
pair_coeff * * 1.0 1.0 2.5
#set bond
bond_style harmonic
bond_coeff * 500.0 1.0
#reaction and gcmc
fix metathesis all bond/react stabilization yes nvt_grp .03 &
react step1_forward all 100 1.0 1.5 step1_unreacted step1_reacted map_files/step1_forward_map &
react step1_backward all 100 1.0 1.5 step1_reacted step1_unreacted map_files/step1_backward_map &
react step2_forward all 100 1.0 1.5 step2_unreacted step2_reacted map_files/step2_forward_map &
react step2_backward all 100 1.0 1.5 step2_reacted step2_unreacted map_files/step2_backward_map
run 50
variable type_primer atom “type==3 || type==4”
variable type_byproduct atom “type==7 || type==8”
group dynamic_primer dynamic all var type_primer every 1
group dynamic_byproduct dynamic all var type_byproduct every 1
variable Nprimer equal count(dynamic_primer)/3.
variable Nbyproduct equal count(dynamic_byproduct)/2.
fix gcmc_primer dynamic_primer gcmc 100 1 0 0 123 1.0 -7.0 0.5 mol primer group nvt_grp_REACT
fix gcmc_byproduct dynamic_byproduct gcmc 100 1 0 0 123 1.0 -7.0 0.5 mol byproduct group nvt_grp_REACT
fix 1 nvt_grp_REACT nvt temp 1.0 1.0 0.05
compute_modify thermo_temp dynamic/dof yes
compute_modify 1_temp dynamic/dof yes
thermo_style custom step atoms temp press vol epair & v_Nprimer v_Nbyproduct
run 1000000
where primer and byproduct is the molecule 3-4-3 and 2-3 before mentioned.
while after some steps, it will output an error message:
ERROR on proc 0: Bond atoms 12 73 missing on proc 0 at step 18151 (…/ntopo_bond_partial.cpp:64)
Last command: run 1000000
The message usually occured in a step that reaction happened. The lammps version is 7 Aug 2019.
I doubt the identity of some atoms may changed incorrectly in the bond/react or gcmc process.
Any ideas what’s going on?
Thanks,