Dear LAMMPS developer:
I am currently working on repeat and extend the procedure of a paper in polymer crystallization as attached. The idea of the paper is to apply an external orientational force on bonds inside a given region to a specific direction, which intends to accelerate the regular packing of the polymer chain. The external potential given in the original paper is:
E = k * (theta)^2 for theta < 0.5π
E = k * (pi - theta)^2 for theta ≥ 0.5π
Where theta is the angle between the bond and the orientation direction.
To the best of my knowledge, LAMMPS does not currently offer a built-in fix with this functionality (the closest might be angle_style dipole, but that is molecule-specific). Therefore, I have written a custom fix (based on version 29Aug2024 Update 1, compiles without errors). With respect to the original paper and to avoid the costly computation of arccos, I use the following equation to represent the potential energy:
E = k*(sin(theta-theta0))^2
Where theta is still the angle between the bond and the orientation direction. Theta0 is the equilibrium angle between the chemical bond and the orientation direction. The reason theta0 was added because the original paper was simulating a polymer chain with equilibrium bond angle at 180 degree.
The syntax of this fix is simple:
fix ID group-ID region “type” bondtype k theta0 rx ry rz “type” bondtype k theta0 rx ry rz …
- region : region in which the bond midpoint must lie to apply the force.
- bondtype : bond type to which this potential applies.
- k : force constant.
- theta0 : reference angle (in degrees) between the bond and the crystal direction vector (rx,ry,rz).
When testing this fix on a simple OPLS-UA HDPE system, I could observed “flying-ice” draft (center-of-mass velocity develops, not the random thermal motion) right after the system was compacted from extreme low density state. I suspect this may be due to a parallel communication issue that I did not currently correctly set. The simulation setting, including in, data, potential file, was attached. The drafting is significant after timestep 40000.
I also tried (and attached) some simple two atoms with one bond (point from 1 to 2) system in size of 20A*20A*20A, with explicit command “newton on on”:
- case 1: running with -np 24, no bond length constrain, atom 2 lost force when bond length > 3.65 at step 146, already set comm_modify cutoff 5.0
- case 2: running with -np 24, no bond length constrain, atom 2 lost force when bond length > ~13, which probably due to bond length > half of
- cell case 3: running with -np 24, has bond length constrain, significant “flying-ice” draft after step 6000
- case 3_nofix: running with -np 24, has bond length constrain, new fix disabled, no “flying-ice” draft.
I am not sure where I did wrong in the fix’s coding or the setting of the simulation. I would appreciate any guidance.
Best regards
Jiawei Zhao [email protected]
SINOPEC (Beijing) Research Institute of Chemical Industry
original paper :
deformation-and-fracture-processes-of-a-lamellar-structure-in-polyethylene-at-the-molecular-level-by-a-coarse-grained.pdf (6.5 MB)
fix’s src:
fix_orient_crystal.h (938 Bytes)
fix_orient_crystal.cpp (9.0 KB)
small trial systems and results:
case_3_nofix.zip (874.0 KB)
case_3.zip (992.3 KB)
case_2.zip (920.1 KB)
case_1.zip (944.9 KB)
polymer simulation files:
polymer_simulation.zip (483.2 KB)