Dear all,
I did not understand very well about the role of the “single(int type, int i1, int i2, int i3)”. For example, as for the angle_harmonic potential, we already have the function “void AngleHarmonic::compute(int eflag, int vflag)” to calculate the force due to the interaction. On the other hand, we still have another function as
“double AngleHarmonic::single(int type, int i1, int i2, int i3)”. I did not find where this function is used. Could anyone point out where the function has been used?
Thanks a lot.
Best,
Teng
Dear all,
I did not understand very well about the role of the "single(int type, int
i1, int i2, int i3)". For example, as for the angle_harmonic potential, we
same as pair::single() and bond::single() it is used to compute
the interaction for a single interaction and not the entire list
of angle (or pairs/neigbors or bonds, respectively). this is less
efficient and thus only used in exceptional cases.
already have the function "void AngleHarmonic::compute(int eflag, int
vflag)" to calculate the force due to the interaction. On the other hand, we
still have another function as
"double AngleHarmonic::single(int type, int i1, int i2, int i3)". I did not
find where this function is used. Could anyone point out where the function
has been used?
it is easy to find, if you know C++ and have looked at the developer guide:
[akohlmey/ lammps-icms/src]$ grep -- 'angle->single' *.cpp
compute_angle_local.cpp: ebuf[n] =
angle->single(angle_type[atom2][i],atom1,atom2,atom3);
fix_bond_swap.cpp: return force->angle->single(atype,i,j,k);
axel.
Dear Axel,
thank you very much for your kind and quick help.
Best,
Teng
2012/5/8 Axel Kohlmeyer <[email protected]>
It's used in bond/swap to calculate
the energy of a single angle interaction
to contribute to the energy involved in
swapping one bond.
Steve
Thank you very much.
Best
2012/5/9 Steve Plimpton <[email protected]>