Centering a micelle in a gro file, but it's cut by box boundary

GROMACS version: 2022.4

Dear gromacs users,

I’m trying to center a micelle in the box after simulation, and the output is somehow not expected:

This is understandable becasue the COM of the micelle is located at the center of box, but it’s cut by box boundary as 2 parts.

I’ve tried 2 different approaches, but both of them result in the strucutre as described:

  1. gmx trjconv -s md.tpr -f md.gro -pbc mol -center
  2. a vmd tcl script:
package require pbctools
mol new "$file_name"
set sel [atomselect top "not resname SOL NAW CHL CA2"]
pbc wrap -center \$sel
set com [measure center \$sel weight mass]
set box [molinfo top get {a b c}]
set box_center [vecscale 0.5 \$box]
set translation_vector [vecsub \$box_center \$com]
set all [atomselect top "all"]
\$all moveby \$translation_vector
pbc wrap -all
animate write gro "$file_name"

These methods work adequately when the micelle’s final position is already near the box center. However, issues arise when the micelle is positioned close to the box boundary. I hope there’s a solution that can reliably handle both scenarios without requiring manual adjustment of the system prior to centering.

Please kindly help me if you have any ideas. Thank you.

Hi,

I would suggest a similar workflow that I have already described here.
Instead of selecting an atom close to the center of the membrane core, you could try to select an atom close to the center of your micelle (e.g., the last atom of one of your detergents). Make sure that the selected atom does not leave the micelle during the simulation!

Best,
Marius