Hello all,
Has anyone calculated local pressure tensor along a direction of the simulation box?
I have a system of polymers with fene and WCA interactions..
My plan is to use neighbor list of freud to calculate forces on particles from their trajectory.
For this I find the neighbors with 1 sigma distances and calculate forces and the distances and distance vectors.
Now for each particle I find the force on each of them due to neighbors (using neighbor list).
Bond list from gsd file will be used similary for FENE calculations.
I then find virial on each particle separately.
Now I bin the virial of each particles by using position of each particles along a direction. I can then sum over the virial of each particle in a bin to get total pressure tensor of that bin.
The problem now is that the result I get from this does not match with on the fly calculation in hoomd 2.9.6. I am attaching my code here. I think I am doing something wrong in force calculation and may be I should used different kind of neighbor list. Any input would be appreciated.