Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brownian dynamics: Virtual sites do not contribute to friction #4295

Closed
christophlohrmann opened this issue Jul 9, 2021 · 2 comments
Closed

Comments

@christophlohrmann
Copy link
Contributor

christophlohrmann commented Jul 9, 2021

For raspberry particles, the friction of the virtual sites is not taken into account for the real particle.
MNWE:

from espressomd import System, virtual_sites

system = System(box_l = 3*[10])
system.time_step = 0.01
system.cell_system.skin = 0.5
system.min_global_cut = 2
system.virtual_sites = virtual_sites.VirtualSitesRelative()

force = 0.3
fric = 1.2

p_real = system.part.add(pos = [1,0,0], ext_force = [force, 0, 0])
p_virt = system.part.add(pos = [2,0,0], virtual = True)

p_virt.vs_auto_relate_to(p_real)

system.thermostat.set_brownian(
    kT = 0., gamma = fric, act_on_virtual = True, seed  = 1)
system.integrator.set_brownian_dynamics()

system.integrator.run(1)

print('velocity is ', p_real.v[0])
print('velocity should be ', force/(fric*2))

This also creates problems for rotational dynamics: If I use gamma_rotation = 0, act_on_virtual = True, the rotational friction should come from the virtual beads. At the moment this friction is 0 and any torque leads to undefined angular velocity.

@Koppeprojects
Copy link

I wasn't quite conscious that the virtual sites don't feel any friction at all.
If the virtual sites experience friction after solving the issue, how does this look like?
Consider:
If you have for example a lengthy raspberry particle (rod), the transversal friction parallel to the long particle axis should be smaller than the friction parallel to a short axis.
At least that's what I think my Perrin-factors try to tell me.
Can such effects be covered efficiently?

@jngrad
Copy link
Member

jngrad commented Jan 2, 2024

The Brownian thermostat can no longer act on virtual sites in ESPResSo 4.2.2 and in the python branch.

@jngrad jngrad closed this as completed Jan 2, 2024
@jngrad jngrad added this to the ESPResSo 4.2.2 milestone Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants