Is it possible to add two computes together to construct a new compute like this?
compute 1 all cA/atom compute 2 all cB/atom # 1 and 2 have the same shape compute 3 all equal 1+2 # ??????????
Background: I’m trying to calculate the thermo conductivity with Green-Kubo formulation. Ideally I want to do something like this:
compute myKE all ke/atom compute myPE all pe/atom compute myStress all centroid/stress/atom NULL virial compute flux all heat/flux myKE myPE myStress
centroid/stress/atom does not support calculating kspace contributions, presumably because of the concerns presented in Revised implementation of a new atomic stress definition for correct computation of heat flux with many-body interactions by donatas-surblys · Pull Request #1704 · lammps/lammps · GitHub. I believe that two issues are irrelevant for my specific purpose (I only care about total heat flux and do not use tip4p styles), so I’d like to go forward anyway. Since the kspace contribution for virial is same for
stress/atom, I want to write like this:
compute myKE all ke/atom compute myPE all pe/atom compute myStressP1 all stress/atom NULL kspace # there are no dihedral/improper/constraints in my system compute myStressP2 all centroid/stress/atom NULL pair bond angle compute myStress equal myStressP1+myStressP2 # ???????? compute flux all heat/flux myKE myPE myStress
However, I cannot find a way to add