What do the arguments to this function indicate? I couldn’t find any comments in the code to guide me on this, i’m especially confused by the i, j, itype, jtype arguments.
double PairLJCut::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj,
double &fforce)
Also if the arguments can be described in the context of the Pair::write_file() routine, that would be most helpful!
What do the arguments to this function indicate? I couldn't find any
comments in the code to guide me on this, i'm especially confused by the i,
j, itype, jtype arguments.
this method is to compute the interaction between particle 'i' of tyle
'itype' and particule 'j' of 'jtype' at the squared distance rsq. so
essentially a single step out of the non-bonded innerloop.
since for LJ interactions the identity of 'i' and 'j' have no relevance
(e.g. they have no charge) only itype and ijtype and rsq matter.
factor_coul and factor_lj are the scaling factors from the
special_bonds command.
double PairLJCut::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj,
double &fforce)
Also if the arguments can be described in the context of the
Pair::write_file() routine, that would be most helpful!
well, it is essentially the same context. please provide more
detail in what is confusing you, as i find it rather obvious.
Pair::write_file simple generates a set of displacement values
for 2 atoms (r = 0 to cutoff) and calls the single function to
query the energy/force at that distance.