Stretching polymers in different directions

Dear LAMMPS users,

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.

Thank you in advance,
Ondrej Horvath

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”?

Hi,

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.

Best,
Vinit

Imagine each atom knew the coords of the COM of the polymer molecule it is in.

Could you write a per-atom variable (formula) which used that COM and the

atom’s current coords to derive a force you want to apply to it?
Then use that per-atom variable as input to fix addforce.

If so, I have draft code of a compute that spreads per-chunk

values (e.g. from compute com/chunk) to all the atoms in each chunk,

which is the only step missing to do that sequence of operations.

Steve

Thank you all for the answers!

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.

Best wishes!

În vin., 24 aug. 2018 la 23:36, Steve Plimpton <sjplimp@…36…24…> a scris: