I am simulating a system containing hundreds of linear polymers.
The polymers should be stretched along an axis connecting a polymer’s end point to its center of mass. Can LAMMPS be used to do this?
I have tried using the smd fix, but I can only apply it to groups of polymers and the pulling direction is in a direction predefined in the input file, which is different from what I need. I would like to stretch every single polymer in a different direction computed at every time step.
I apologise if this a silly question and I would appreciate any advice.
This might be possible with some creative use of variables, computes and fix addforce. By stretch you mean apply a force to stretch, I take it, and not “make the rest bond length longer”?
I think what you can do is ,make a group of each and every single polymer. Use group command to compute center of mass and bounds of each group. From previous results, calculate the vector from center of mass to the end point and use addforce command in that direction as suggested by Stefan.
I am not sure what I am suggesting is the best way to go for it, you can develop your own thinking.
Stefan: I mean apply a force to stretch, yes. Addforce seems to be the fix I am looking for.
Kumar: I could make a group out of every polymer, but the maximum number of groups allowed is 32 and I have a few hundreds of these polymers in the system. I am not familiar enough with the inner workings of LAMMPS to change this upper limit.
Steve: Yes, I think that would solve my problem. Right now, I’m not sure how to make the atoms “aware” of their COMs within the molecule. I would greatly appreciate if you shared the code with me.