I have a simulation of spheres or ellipsoids. The default pressure compute includes the rotational kinetic energy, which I do not want. I know how to compute pressure just using translational kinetic energy, since it is described in the documentation of compute stress/atom. How do I turn this quantity, which currently is a variable, into a compute that can be fed into my fix nph barostat? Ideally, this compute should be able to give both the scalar and the vector (tensor) pressure, because sometimes I barostat only along some dimensions.
# Computing my custom pressure
compute temp_null all temp
compute peratom_null all stress/atom NULL
compute p_null all reduce sum c_peratom_null[1] c_peratom_null[2] c_peratom_null[3] c_peratom_null[4] c_peratom_null[5] c_peratom_null[6]
variable press_scal_null equal -(c_p_null[1]+c_p_null[2]+c_p_null[3])/(3*vol)
variable press_vec_null vector -c_p_null/vol
...
fix fNPH all nph/asphere x ${my_press} ${my_press} ${my_Pdamp}
# Cannot do this, because my pressure is a variable and not a compute
fix_modify fNPH temp temp_null press press_vec_null
Thank you.
Adam