How to represent the logarithmic posterior density as a number

My log posterior density is -0.5q, which the q changes as the data changes.And the q is objective function.I want to express the log posterior density=-0.5q in the model block .What I should do ?

model {
  target += -0.5 * q;
}

Thank you so much .I agree with you .And I wanted to make sure I didn’t make a mistake .