gangle add x and y axis to second vector group options
Currently the second vector group that can calculate the angle with only includes the z axis. Would be very handy if was also able to calculate the angle of the vector with the x and y axes.
i.e. current options are
-g2 <enum> (none)
Type of second vector group: none, vector, plane, t0, z, sphnorm
Addition of two:
-g2 <enum> (none)
Type of second vector group: none, vector, plane, t0, x, y, z, sphnorm
Support more complex fixed position selections
Make it possible to create selections like
[0,0,0] plus [0,1,0]
to specify a fixed set of positions. This can be useful at least for
'gmx gangle' to calculate angles from a fixed reference vector.
Such selections were already understood properly by the parser, but
caused various crashes elsewhere in the code. Fixed those crashes by
consistently managing the memory for the involved t_block structures
(always allocate one value in the index array, even if the block is
empty), and by not assuming that a plus-like keyword always has a child
element in the evaluation tree.
#1 Updated by Teemu Murtola over 5 years ago
- Status changed from New to In Progress
- Assignee set to Teemu Murtola
- Target version set to 5.1
I'll implement this in a slightly different manner than originally requested, but the functionality should be there: it should be possible to run
gmx gangle ... -g2 vector -group2 '[0,0,0] plus [0,1,0]'
to calculate angles with respect to the Y axis (and equally well with respect to any arbitrary fixed vector, by just modifying the selection). This syntax is already a valid selection, but unfortunately it causes a crash in the selection engine. That should be relatively easily fixable, though.