Skip to content

Active torque makes FENEWCA bond incorrect #2008

Open
@kizzhang

Description

@kizzhang

Description

I encountered this problem as I simulated active chiral particles chained into a polymer using FENEWCA potential. The simulation does not produce any FENE out-of-bound error, but apparently the bonds are way longer than they should be (10 vs 0.97).

Image

Script

import hoomd
import gsd.hoomd

############################# GET PARAMETERS #################################

para_arr = sys.argv
seed_num = 1213
Pe_arg = 100.0
print('Pe_arg is ',Pe_arg)    
N_particles = 200

######################## Read Ring Polymer Configuration #########################
traj = gsd.hoomd.open('ring.gsd')
snapshot = traj[-1]

########################### RUN THE SIMULATION ###############################
cpu = hoomd.device.CPU()
sim = hoomd.Simulation(device=cpu, seed=seed_num)
sim.create_state_from_snapshot(snapshot)
print('Seed number is ',seed_num)

###########################  CREATE FORCE   ##################################

if Pe_arg <=1:
    kbt = 1
else:
    kbt = 1/ Pe_arg
print("kbt is = " + str(kbt))

f_sigma = 1.0
f_epsilon = 1.0
R_0 = 1.5*f_sigma

k_fene = 60 * f_epsilon/f_sigma**2

fenewca = hoomd.md.bond.FENEWCA()
fenewca.params['A-A'] = dict(k= k_fene, r0 = R_0, epsilon= f_epsilon, sigma= f_sigma,
                             delta=0.0)

nl = hoomd.md.nlist.Tree(buffer = 0.4)

lj = hoomd.md.pair.LJ(nl)
lj.params[('A', 'A')] = dict(epsilon=f_epsilon, sigma=f_sigma)
lj.r_cut[('A', 'A')] = 2**(1/6)*f_sigma

######################### CREATE DIFFUSION  ################################

gamma = np.sqrt(3)
dis_diff = kbt/gamma 
f_sigma = 1.0
rot_diff = 3*dis_diff/f_sigma**2
print("Rotational Diffusion is = ",rot_diff)

F_active = 1/np.sqrt(3)
print('F_active = ', F_active)
    
Pe = np.sqrt(F_active**2 * 3)*f_sigma/kbt
print("Pe is = "+str(Pe) +"; Pe_arg is = "+ str(Pe_arg))

brownian = hoomd.md.methods.Brownian(filter=hoomd.filter.All(),kT = kbt)
brownian.gamma.default = gamma
brownian.gamma_r.default = [0, 0, 0]

active = hoomd.md.force.Active(filter=hoomd.filter.All())
active.active_force['A'] = (F_active,F_active,F_active)
active.active_torque['A'] = (1,0,0)

integrator = hoomd.md.Integrator(dt=1e-5, methods=[brownian], forces=[fenewca,lj,active])#,integrate_rotational_dof=True)
rotational_diffusion_updater = active.create_diffusion_updater(trigger=hoomd.trigger.After(0), rotational_diffusion = rot_diff)
sim.operations += rotational_diffusion_updater

sim.operations.integrator = integrator

sim.run(1e5)
gsd_writer = hoomd.write.GSD(filename='out.gsd',
                             mode='xb',
                             trigger = hoomd.trigger.Periodic(int(5e4)),
                            )
sim.operations.writers.append(gsd_writer)
integrator.dt = 1e-4
sim.run(1e7)
gsd_writer.flush()

Input files

ring.txt

Output

As illustrated in the figure, the bond is over-stretched while FENEWCA calculation seems overridden. This happens with torques in Constant.Force as well. Things are normal if not including torque.

Expected output

Expecting the bond to be restricted by FENEWCA potential or output bond out-of-bound error.

Platform

Linux, CPU

Installation method

Conda-forge package

HOOMD-blue version

5.1.0

Python version

3.10.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions