Fixed and reflective boundary, and use npt to compress the polymer system

Dear Lammps experts:
I use packmol to build an initial system of polymer as the starting structure. During the simulation, I want to use non-periodic conditions, with fix wall/reflective. So the boundary condition allowed is f.
But at the same time, the structure needs to be compressed to a denser structure. How can I do that? Can I still use npt?

Thank you for checking.

Hello,

From checking the npt page of the manual it seems that the barostattating can only work in directions that are periodic:

“X, y, z cannot be barostatted if the associated dimension is not periodic.”

I think the way out would be to do the simulation at fixed volume corresponding to the density you are expecting. If you dont know what the density should be (in the sense that you are expecting it to be the one for which your force-field predicts a given specific pressure), maybe you can try many different initial volumes, keep tabs on how pressure changes with volume and use it as guideline to keep changing the volume until you reach the desired one (see change_box command — LAMMPS documentation).

Other than that I dont see a way out. An alternative, dead-end idea that had come to mind was: you could use periodic boundaries and use a simulation box much larger than the actual occupied space by your polymer atoms (thus preventing interaction across boundaries to occur). And then you could use the fix wall/reflective to keep your atoms contrainted and assign its lo,hi values to scale with the simulation box’s total size by using a variable. This would allow you to use npt and have both: the total volume of the box and the space occupied by your system to change. The problem with doing this is that the pressure calculation takes the volume of the entire simulation box not the one your system occupies (I think) and since they are not the same in your case, you would converge to a wrong equilibrated state anyways. I dont think there is a way to set up the volume you want for the calculation.

But maybe there is an alternative way to do this (to be seen with people that know LAMMPS better).

1 Like