I’ve tried to define an atom style variable which is some constant times the kinetic energy of atom:
variable Tvib atom (0.67/kB)0.5mass*sqrt(vx^2+vy^2+vz^2)
But I keep getting “invalid thermo keyword in variable formula” error
Anyone knows what’s wrong with it ? Or maybe has a suggestion of how should I dump the vibrational temperature of each particle ?
Thanks!
David Furman, MSc. student The Fritz Haber Research Center for Molecular Dynamics Institute of Chemistry The Hebrew University of Jerusalem Jerusalem, ISRAEL
I've tried to define an atom style variable which is some constant
times the kinetic energy of atom:
variable Tvib atom (0.67/kB)*0.5*mass*sqrt(vx^2+vy^2
+vz^2)
But I keep getting "invalid thermo keyword in variable formula" error
Anyone knows what's wrong with it ? Or maybe has a suggestion of how
should I dump the vibrational temperature of each particle ?
i don't see "kB" mentioned in the variable documentation
as an available constant and it doesn't show up in the
source either.
axel.
Thanks!
David Furman, MSc. student
The Fritz Haber Research Center for Molecular Dynamics
Institute of Chemistry
The Hebrew University of Jerusalem
Jerusalem, ISRAEL
Hey Axel,
kb is a an equal style variable I defined earlier in the input.
I solved the problem. Apparently I had to type (reference type) v_kb instead of $kb or kb.
Hey Axel,
kb is a an equal style variable I defined earlier in the input.
I solved the problem. Apparently I had to type (reference type) v_kb instead of $kb or kb.
Yes. That is the documented behavior. To expand variables you need to
use either the v_ prefix or \. But plain only works for single
character variables. In your case you'd have to use ${kb}. There is
another subtle difference between the two types of expansion. In the
first case the expansion is performed new every time the parent
expression is evaluated, in the second case it is expanded
immediately.