Hello,
I would like to define a pressure based on number of molecules using fix_modify.
Something like this:
compute peratom all stress/atom NULL
compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
variable myPress equal -((c_p[1]+c_p[2]+c_p[3])/(3*vol))*${num_mols}
fix_modify my_npt press myPress
My understanding is that fix_modify requires a compute and not a variable, what is the proper way to “cast” a variable to a compute?
Thanks,
Frank