Hi Axel,Yes, the image is not set for ghost particles. Even worse, p1->r.p is shifted so that the Euclidian distance can be used for particles in the primary cell. That is, ghost particles on the left of the simulation box have their x coordinate shifted by -box_l[0], those to the right by +box_l[0]. But their p1->l.i is not updated when doing this shifting, so you would get wrong unfolded coordinates.
Ok, so the image is not set for ghost particles, I get it. But for twoparticles with bonded interaction I can get correct unfoldedpositions, right? When evaluating bonded forces, one gets always thefirst particle which is not a ghost particle. Am I correct? Andunfolding this non-ghost particle give us its unfolded position.Afterwards, using relative positions to other neighbors of bondedinteraction (which might be ghost particles) we get unfolded positionof all neighbors from bonded interaction...Imagineset box_l 10 10 10part 0 pos 9 5 5part 1 pos 9.5 5 5inter 0 fene 1.0 1.0part 0 bond 0 1Let us move particles p0 and p1 to the right so that x coord of p0 ise.g. 9.8 and x-coord of p1 is 10.2. When evaluating fene forces, weget p0 from inside simulation box and we can unfold position of p0.Using get_mi_vector and p0->r.p and p1->r.p we get unfolded positionalso for p1, right?
Provided you know your bond cannot stretch more than half the box length, that should work, yes. However, I don’t think the first particle is always the physical one, just one of the two. But you can just use the feature GHOST_FLAG to get a flag to easily figure out who is a ghost.
Best, Axel
------------------------------------------------ JP Dr. Axel Arnold ICP, Universität Stuttgart Allmandring 3 70569 Stuttgart, Germany Email: address@hiddenPhone: +49 711 685 67609
|