how to creat a new atom at the average position of two deleted atoms

Dear all users,

I need to delete both overlaped atoms and insert a new one at their average position, but I
don't quite know how to achieve it.

It appears to me that setting the two group IDs to be same in 'delete_atom overlap' will delete both atoms,
then by using 'create_atoms single' a new atom will be created. But I wonder how to get the average position
of the two deleted atoms.

Could anyone please give me some suggestions?
Thanks in advance.

I think you'd need to write your own new command or fix
to do that.