Dear all:
I have been trying to add a force depending on the x/y/z-coordination of the atoms.Although in many ways,there is
still a problem for me.
The problem is discribed below.
Supposing,there are 24 particles.The force added to the ID 1 is parallel to (x[3]-x[2],y[3]-y[2],z[3]-z[2]).The ID
4 is parallel to (x[6]-x[5],y[6]-y[5],z[6]-z[5])…No force for the ID 3j and 3j-1(j=1…8).
Because,the addforce command can use the per-atom variable.I want to create a per-atom variable stored the force
information.But I don’t find the command to evaluate a vaule to the per-atom array/vector.e.g:like a[2][3] = 2 in
C.So I don’t get the vector v_fx like:
ID fx value
1 2.3
2 0
3 0
4 4.5
5 0
6 0
… …
22 2.1
23 0
24 0
I hope you can give me some hints to realize this function.
Best wishes.
Chen Wang
2014-10-22