Hi all
For a calculation I need to define an indexed variable A[i] (array/vector in C) in LAMMPS, but I do not know how to define such a variable. Is there such a possibility in LAMMPS or trick to do something similar?
I want to do something like below with an array for XP[10], but it can not accept an array in the superficial way that I do.
label loop_chains
variable M loop 1 10
variable XP_M equal 0
label loop\_xp
variable n loop 1 100
variable m equal \({M}-1)*100+n
variable xp equal x\[{m}]*($n-0.5)
variable XP_M equal {XP_M\}\+{xp}
next n
jump SELF loop_xp
next M
jump SELF loop_chains
I will be grateful if somebody has any suggestion about it.
Cheers
Sara