Dear all,
I am porting a force-field (SAPT non-bonded interactions for use with
polarizable atoms) to LAMMPS, and while looking at the code for existing
pair styles I noticed that in most cases the codes run through the
Coulombic and LJ pair force calculation loops even when a zero
factor_coul (or factor_lj) from special bonds means that the final pair
interaction should simply be zero.
In my modifications, I am including an if(factor_coul) / if(factor_ij)
condition at the beginning of the loop to completely skip the pair
calculation if unnecessary. I will definitely be testing this to make
sure there are no subtle problems, but I am wondering if this has been
looked at / tried before, and if there is some obvious reason not to use
the if(factor)-trigger that I am missing.
(I know sometimes users set the special_bonds weights to a very small
quantity during analysis reruns to activate intramolecular pair
calculations -- under those cases, the if(factor) should correctly
trigger the calculations as required.)
Thanks in advance!
Cheers,
Shern