Hello All,
I am relatively a new user of HOOMD and I am trying to apply external oscillatory force on a spherical particle embedded in a soft matter system. The idea is to oscillate the particle in one of the Cartesian directions while holding it in a harmonic trap to prevent it from diffusing through the system. I previously used to achieve this in LAMMPS (in reduced units) as follows:
variable NumProbeBeads equal 2988
variable Amplitude equal 23
variable Hxx equal 10
variable Hyy equal 1000
variable Hzz equal 1000
variable TimestepPerOscillation equal 105000*v_Timestep
variable Omega equal (2*3.1415)/${TimestepPerOscillation}
variable ForceX equal (v_Amplitude*cos(v_Omega*v_Time)-v_Hxx*v_delX)/v_NumProbeBeads
variable ForceY equal (-v_Hyy*v_delY)/v_NumProbeBeads
variable ForceZ equal (-v_Hzz*v_delZ)/v_NumProbeBeads
fix ExtForce Probe addforce v_ForceX v_ForceY v_ForceZ
v_delX, v_delY, and v_delZ are the displacement of the particle's center of mass from its initial position during the start of the simulation. As can be seen above, I am applying oscillatory force + a weak harmonic trap in the x-direction (variable ForceX ....) while a very strong harmonic trap in the y and z directions (variable ForceY .... and variable ForceZ ....) to hold the spherical particle in its place. Could someone please let me know how to achieve the same in HOOMD? Thanks for the help.
Best,
Dinesh