Global array.

Dear Sir,

I have two different groups of particles. The first group, I freeze. The second group is free to move under the influence of a temporally constant potential defined everywhere in the domain. The potential is to be defined USING THE PARTICLES FROM GROUP 1. I wish to modify fix_freeze to do freeze particles and define the potential at once. The potential has to be accessible from the fix_gravity (for group 2) which I shall modify. How may I define a globally accessible vector for this purpose that stores the potential? Is there some other workaround for this?

Dear Sir,

I have two different groups of particles. The first group, I freeze. The second group is free to move under the influence of a temporally constant potential defined everywhere in the domain. The potential is to be defined USING THE PARTICLES FROM GROUP 1. I wish to modify fix_freeze to do freeze particles and define the potential at once. The potential has to be accessible from the fix_gravity (for group 2) which I shall modify. How may I define a globally accessible vector for this purpose that stores the potential? Is there some other workaround for this?

why not access atoms from group 1 in your modified fix directly? just add an argument that takes a second group id and use its bitmask to identify the group 1 atoms inside the second fix.

axel.

Thank you for the quick reply. Do I add this argument inside the second fix (fix_gravity)? It would be nice if you could elaborate on the process in a slightly detailed manner or refer to some material which talks about adding new arguments for group IDs.

Thank you for the quick reply. Do I add this argument inside the second fix (fix_gravity)?

yes.

It would be nice if you could elaborate on the process in a slightly detailed manner or refer to some material which talks about adding new arguments for group IDs.

please study the source code of other fixes that take a group id as additional argument.

axel.