I want to add a force field that depends on the atom possition. I have tried to compute the atom position, the use that as a variable and then, set the force field but I get the messege:
ERROR: Variable name for fix addforce does not exist
the code I have tried is:
variable a equal c_X
variable extforce equal ${maxforce}*step/${eqrun}*a
fix externforce A addforce v_extforce 0 0