replace atom type in a region every n step

Hi all,

I am trying to select “C” atom once it enter to a “region bulk” and replace it with “O” atom, this operation to be done every 1000 step.

the closest I get get is using “set” and “group” commands, but it did not work so far, here is a wrong attempt :

run 10000 every 1000 &
“group C type 2” &

“group C region bulk” &

“set group C type 3” &

I could not find relevant information on so far,

Thank you for helping.
Best regards.

El Tayeb Bentria Ph.D.
QEERI, Qatar.

Hi all,

I am trying to select "C" atom once it enter to a "region bulk" and replace it with "O" atom, this operation to be done every 1000 step.

the closest I get get is using "set" and "group" commands, but it did not work so far, here is a wrong attempt :
run 10000 every 1000 &
"group C type 2" &

"group C region bulk" &

"set group C type 3" &

I could not find relevant information on so far,

very relevant information, that you seem to be ignoring, is in the
documentation for the group command (check out the parts about using
the group command multiple times and creating a group from the
intersection of two groups).

axel.

Dear Pr. Axel,

Thank you for your prompt replay, and yes, I was completely ignoring “intersect” command, it’s working now.

run 10000 every 1000 &
“group C type 2” &
“group boo region bulk” &
“group C_bulk intersect C boo” &
“set group C_bulk type 5” &

Thank you and best regards.
Tayeb.