Insertion of atoms

Dear all,
I want to change “fix_deposit.cpp” to insert atoms in my simulation system, and calculate the potential between the inserted atom and other already existing atoms, which will be used to judge if the inserted atom is at appropriate position. Any suggestion about writing the code for calculating the potential, or just use some already existing commands of Lammps? Thanks in advance.

Best regards,
Wenjing Zhou

If the pair style is a true pairwise interaction, then the
pair_*.cpp will have a single() method which can be
called to compute the energy for a aingle I,J interaction.

Steve