ERROR: Invalid variable name in variable formula (../variable.cpp:1320)

where the variable is directly calculated by “v_a-count(oxygen,up)*0.5”, not as the “variable m equal v_a-v_Oxymolup”. It works well. I don’t know why?

The reason is that your formula for v_Oxymolup contained a reference to another variable, v_Oxygen, even though the variable Oxygen is never defined.
The new formula only references variables, groups and regions that were previously defined, so there is no problem.

I have zero experience with depositing molecules so I can’t help you with that.