Replies: 1 comment
-
The only obvious problem I see in your code is that the filters are not updated. Could you provide a smaller minimum example? Ideally you would place only one particle in the simulation box and set the initial position/orientation such that running a few timesteps is enough to trigger the behavior you observe. No GSD file is necessary, |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I’m running a 2D simulation in HOOMD‐blue where the simulation box is conceptually split into two regions along the y-axis:
type A
particles that have a nonzero active force.type B
particles that have zero active force.As soon as a particle crosses from$(y>0)$ into $(y\leq0)$ (or vice versa), I change its $\tau_r = 1/D_r$ . However, in practice, once a particle switches type, it doesn’t appear to keep the orientation it had before the switch - it looks like the orientation resets or changes abruptly.
typeid
accordingly. In principle, I want all particles to maintain a continuous orientation and to undergo rotational diffusion with time scaleHere’s a minimal reproducible example that illustrates my approach. The essential points are:
TypeSwitchAction
to changetypeid
based on a particle’sactive
(filter=type A) with a nonzero active force,activeB
(filter=type B) with zero active force.ActiveRotationalDiffusion
updaters to both active forces so that all particles should keep rotating.Despite this setup, particles sometimes fail to preserve their pre‐switch orientation. I’d greatly appreciate any pointers or insights from folks who have encountered similar behavior or have ideas on how to fix this.
My script:
sample_code.txt
Problem:$(y>0)$ to $(y\leq0)$ , but it appears that the orientation is reset or changed abruptly at the type switch.
I need each particle’s orientation quaternion to remain continuous (and keep rotating stochastically) when crossing from
Any help identifying the cause of this reset (and how to preserve orientation seamlessly) would be greatly appreciated.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions