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

Can BROWNIAN_PER_PARTICLE and LANGEVIN_PER_PARTICLE be united? #4008

Closed
RudolfWeeber opened this issue Nov 24, 2020 · 11 comments · Fixed by #4057
Closed

Can BROWNIAN_PER_PARTICLE and LANGEVIN_PER_PARTICLE be united? #4008

RudolfWeeber opened this issue Nov 24, 2020 · 11 comments · Fixed by #4057

Comments

@RudolfWeeber
Copy link
Contributor

What we actually are switchting is, whether friction and temperature are particle specific. This should (and will) be also usable) with Walberla LB.

My suggestion would be

  • use a common THERMOSTAT_PER_PARTICLE or THERMOSTAT_PARAMS_PER_PARTICLE which turns on the data members (and is therefore performance relevant)
  • If it's on, thermostats should use it
  • Maybe remove kT per particle (I'm not aware of a case where that makes sense)

Otherwise, we end up with
£ifdef BROWNIAN_PER_PARTICLE || LANGEVIN_PAR_PARTICLE || LB_PER_PARTICLE
in many places.

@RudolfWeeber
Copy link
Contributor Author

Came up during review of #3999.

@jngrad
Copy link
Member

jngrad commented Nov 24, 2020

Related to #3734

@jngrad
Copy link
Member

jngrad commented Dec 1, 2020

ESPResSo meeting discussion: the per-particle temperature was introduced for visualization purposes and isn't used in simulations, can be removed.

@jngrad
Copy link
Member

jngrad commented Dec 17, 2020

@KonradBreitsprecher do you remember by any chance why Drude particles are set with a per-particle temperature of 0? The documentation doesn't explain why it is necessary, and we would like to remove the per-particle temperature feature. From what I understand, the per-particle temperature of 0 is not necessary since the per-particle gamma is already zero for Drude, in which case the Langevin thermostat is not applied to the Drude particles and the Brownian thermostat is undefined (division by zero). The trajectory of a Langevin simulation with Drude particles is identical with and without the per-particle temperature.

@KaiSzuttor
Copy link
Member

in the best of all worlds you can just remove it and see if the drude tests still pass.

@KonradBreitsprecher
Copy link
Contributor

The core+drude particles are thermalized by the special bonds, so you can't use them with a global langevin thermostat. If you now want to simulate a Drude complex (like the IL from the drude_bmimpf6.py) PLUS some water, you need a way to thermalize the water as well. Therefore, you do the per particle thermalization to 'exclude' the Drude complex.

@jngrad
Copy link
Member

jngrad commented Dec 17, 2020

Isn't it sufficient to simply set the Drude per-particle gamma to zero? Then the friction coefficient of Langevin is zero for Drude particles and non-zero for water molecules.

@KaiSzuttor
Copy link
Member

then dissipation is zero but not fluctuation, right?

@KonradBreitsprecher
Copy link
Contributor

KonradBreitsprecher commented Dec 17, 2020

Doesn't the gamma also appear in the variance of the random force?

@KaiSzuttor
Copy link
Member

correct, @jngrad did you vheck if it works?

@jngrad
Copy link
Member

jngrad commented Dec 17, 2020

Yes, sigma also appears as a prefactor of the random noise for Langevin. That's why the Langevin trajectories of Drude particles don't change regardless of the value of the per-particle temperature.

@kodiakhq kodiakhq bot closed this as completed in #4057 Jan 14, 2021
kodiakhq bot added a commit that referenced this issue Jan 14, 2021
Fixes #4008

Description of changes:
- merge `BROWNIAN_PER_PARTICLE` and `LANGEVIN_PER_PARTICLE` into `THERMOSTAT_PER_PARTICLE`
- remove per-particle temperature
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants