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

Mass dependence #3

Open
sottcap opened this issue Nov 6, 2019 · 1 comment
Open

Mass dependence #3

sottcap opened this issue Nov 6, 2019 · 1 comment

Comments

@sottcap
Copy link

sottcap commented Nov 6, 2019

I have a question about BD. As long as I know, Brownian Dynamics should be mass-independent. But, when I went through your codes, I found it seems your implementation is mass-dependent (See line 103 of fix_bd.cpp

        randf = sqrt(rmass[i]) * gfactor;
        x[i][0] += dtv * dtfm * (f[i][0]+randf*random->gaussian());
        x[i][1] += dtv * dtfm * (f[i][1]+randf*random->gaussian());
        x[i][2] += dtv * dtfm * (f[i][2]+randf*random->gaussian());

or

line 112

        dtfm = dtf / mass[type[i]];
        randf = sqrt(mass[type[i]]) * gfactor;
        x[i][0] += dtv * dtfm * (f[i][0]+randf*random->gaussian());
        x[i][1] += dtv * dtfm * (f[i][1]+randf*random->gaussian());
        x[i][2] += dtv * dtfm * (f[i][2]+randf*random->gaussian());

).
Have you checked your program with masses other than 1.0? I am not sure if this will work.

@anyuzx
Copy link
Owner

anyuzx commented Apr 6, 2020

you are right that bd is mass-independent, as only the friction coefficient matters. Here, as long as the value of the friction coefficient is the same, the results would be the same as well. For instance, you can use mass=1 and damp=1, which would be the same as mass=10 and damp=10. In another word, the value of the friction coefficient is not a direct parameter. Instead, it is based on mass and damp parameter.

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

2 participants