Implementing forward communication in a pre_exchange fix

Hello, I am writing a fix in which a local processor checks certain criteria across its local and ghost atoms. If they are met, it changes the molecule ID makes slight changes to the atom’s position. Because this is an abrupt change, I figured it would be logically similar to fix_deposit, and it would be most appropriate to be invoked during pre_exchange as done for fix_deposit.

I understand that forward communication is needed to update information on ghost atoms. I looked at some computes and fixes with forward communication. I just wanted to check if:

  1. If this is a matter of adding the method but no explicit invocation (looking at compute_cluster_atom.cpp) and forward communication will be invoked automatically later in the timestep.

  2. if I need to invoke anything in the main body of the fix (during pre_exchange for this one). For example, fix_qeq.cpp has an explicit invocation: comm->forward_comm_fix(this);

I checked the “How a timestep works” sections in the 2011 Developer PDF andthe 2014 Italy presentation. It looks like fix->pre_exchange() is called when nflag is true, but comm->forward_comm() is called when nflag is false, so I am trying to verify the proper way to go about this.

Thank you,

Sorry, I looked at verlet.cpp in more detail and realized I had misinterpreted the timestep structure in the other documents. Please disregard this question.