Fix langevin with Dynamic Groups

Dear LAMMPS users,

I was wondering if someone is looking at extending fix langevin and fix gld to dynamic groups. It would be very much appreciated and useful.

Otherwise, I’ll try to do it myself.

Best regards,

Dear LAMMPS users,

I was wondering if someone is looking at extending fix langevin and fix gld
to dynamic groups. It would be very much appreciated and useful.
Otherwise, I'll try to do it myself.

not that i know of. what do you need it for?
a lot can be done already by applying a bias.

axel.

I’d like to have regions (and therefore groups defined as atoms inside those regions) at different temperature, i.e. integrate their motion with langevin or gld but at different “effective” temperatures. I’m not saying that the bath has actually regions at different temperature! I’m just thinking about ways in which to apply something like an ATP dependent noise to the system.

thanks for the quick response.

I'd like to have regions (and therefore groups defined as atoms inside those
regions) at different temperature, i.e. integrate their motion with langevin
or gld but at different "effective" temperatures. I'm not saying that the

at least with langevin you can use biases. this is what is used as one
method to compute thermal conductivity. see the
examples/KAPPA/in.langevin
fix gld may work in a similar fashion. i suggest you ruin a test based
on this input example and additional information provided in the
manual and see if this works as needed, before you dig into the code.
for many fixes enabling support for dynamic groups is nothing more
than setting a variable to 1, but for thermostats there is usually
more work to do, that requires quite intimate knowledge of how LAMMPS
works.

axel.

I see, OK. That could work. thanks.
I have another question about this: What if I wanted to integrate only those regions with fix gld while using the standard langevin on the remaining atoms? This might be used in the case I wanted to effectively simulate localized complex viscoelastic regions.
Do I need dynamic groups for this or can I avoid it somehow?

Thanks again.

I see, OK. That could work. thanks.
I have another question about this: What if I wanted to integrate only those
regions with fix gld while using the standard langevin on the remaining
atoms? This might be used in the case I wanted to effectively simulate
localized complex viscoelastic regions.
Do I need dynamic groups for this or can I avoid it somehow?

that would be *really* tricky, since fix gld does time integration and
langevin does not.
i am not even certain whether the theory behind fix gld does allow to
do dynamic groups cleanly.

axel.

OK, thanks for the hints.

Best,

Dear Axel,

I actually have another question. Now I’m trying to add forces to atoms inside specific regions, again using dynamic groups.

The problem is that some of the fixes (for instance fix drag ) is not compatible with dynamic groups.

Any idea on how to solve this?

Also, I just realised that the bias in fix langevin does not prevent the system to thermalise, so that after some time there is no “active region”. Which is not what I’d like.

Also, I just realised that the bias in fix langevin does not prevent the
system to thermalise, so that after some time there is no "active region".

i don't understand what you are saying here. most likely your input is
not correct. however, it is difficult to discuss such matters in the
abstract.

Dear Axel,

I actually have another question. Now I'm trying to add forces to atoms
inside specific regions, again using dynamic groups.
The problem is that some of the fixes (for instance fix drag ) is not
compatible with dynamic groups.

dynamic groups are time consuming and inefficient. it is almost never
a good idea to use them, if there are alternatives. e.g. most fixes
that add or replace forces can be emulated with an atom style variable
and fix addforce, aveforce, or setforce. those can have region filters
as part of their algorithm, most of the specific fixes were introduced
before atom style variables existed and fixes were able to use them
properly.

Any idea on how to solve this?

after getting so many questions on quick succession, i am getting a
bit suspicious that you are trying to do something very complex
without the due diligence of setting up and carefully testing each
component individually and making sure that you really get what you
expect.

in any case, for uncritical operations dynamic groups can be enabled
with a one line change to the constructor. if you look at the fix.h
header and some examples that allow it, you will easily see how.

axel.