I'm running a simulation consisting in a box containing a certain number of particles (2 types of atoms). The system a quite simple, the atoms evolves in the box and for some time steps I extract the following informations on the pairs: id-type1, id-type2, type1, type2, distance, fx, fy, fz, force. For that I'm using the commands property/local (for the id and type of the atoms in the pair), and pair/local (for the distance, the components and the value of the force) as it follows:

compute type_pair mol1 mol2 property/local ptype1 ptype2 patom1 patom2
compute dfp mol1 mol2 pair/local dist fx fy fz force

This works well but it extracts the alike pairs (type1-type1 and type2-type2) as well as the unlike pairs (type1-type2 or type2-type1).

My question is the following: Is there any way to compute and/or save only the unlike pairs (type1-type2 or type2-type1) ? Then by avoiding to compute and/or saving the alike pairs, it would considerably reduce the computing time.

I'm running a simulation consisting in a box containing a certain number of
particles (2 types of atoms). The system a quite simple, the atoms evolves
in the box and for some time steps I extract the following informations on
the pairs: id-type1, id-type2, type1, type2, distance, fx, fy, fz, force.
For that I'm using the commands property/local (for the id and type of the
atoms in the pair), and pair/local (for the distance, the components and the
value of the force) as it follows:

compute type_pair mol1 mol2 property/local ptype1 ptype2 patom1 patom2
compute dfp mol1 mol2 pair/local dist fx fy fz force

This works well but it extracts the alike pairs (type1-type1 and
type2-type2) as well as the unlike pairs (type1-type2 or type2-type1).

My question is the following: Is there any way to compute and/or save only
the unlike pairs (type1-type2 or type2-type1) ?

not currently. you would have to modify the source code.

Then by avoiding to compute
and/or saving the alike pairs, it would considerably reduce the computing
time.

computing time is dominated by the time spent on computing the
pairwise forces and building the neighborlists for it.
you won't save much by the optimization you are proposing. you may
save some time on i/o, but for that you can simply output data less
often.