I have been trying to calculate the pressure tensor using AMBER simulation data. I have stored the force, velocity, and trajectory for each snapshot and attempted to compute the pressure tensor manually in Python using the Green-Kubo equation. As far as I understand, the mden file stores the diagonal components of the pressure tensor as Pres_x, Pres_y, and Pres_z in line number 3. However, when I compared my results with the values from the mden file (plotting Nsteps vs. Pres_X), there was no correlation.
To ensure proper boundary conditions, I translated the trajectory within the simulation box before calculating the pressure tensor. My ultimate goal is to compute the viscosity, and I am simulating an ionic liquid system with 25,000 atoms under periodic boundary conditions (PBC) in a 90×90×90 ų simulation box.
I am looking for guidance on the following:
- Is it possible to directly output the full (both diagonal and off-diagonal) pressure tensor or viscosity from an AMBER molecular dynamics simulation? If modifications to the source code are required, how should I proceed?
- Are there any detailed resources or documentation explaining how to compute the pressure tensor or viscosity from AMBER simulation data using post-processing methods based on velocity, force, and trajectory information? If anyone has experience with this, I would appreciate insights on how you approached it.
Any hints, suggestions, or relevant references would be greatly appreciated. Thank you!