Ulf Lorenz - 2021-01-28
  • summary: Kinetic operator for Jacobi coordinates --> External kinetic energy operators should not silently disable internal ones
  • Description has changed:

Diff:

--- old
+++ new
@@ -1,4 +1,13 @@
-Mir ist bei kin.jacobi allerdings etwas Unangenehmes aufgefallen. Wenn man den anstellt, dann wird die Rotations-Kinetische Energie ausgestellt. Das ist soweit in Ordnung, allerdings extrem versteckt,
-naemlich in subsasgn.m beim Setzen von dof_c. 
-Sollte man den Code vielleicht dort rausnehmen und in der entsprechenden Demo explizit die kinetische
-Energie fuer die Rotation ausschalten?
+Wavepacket currently features two "external"  kinetic energy operators: kin.jacobi and kin.triatomic.
+
+Both operators are setup such that they incorporate the "normal" kinetic energy operators of the grids. This has mostly convenience reasons. They still apply at least the Cartesian kinetic energies (d^2/dx^2), but with special reduced masses. To avoid error-prone calculation of these masses by the user and synchronizing with parameters exclusive to the additional kinetic energy, we simply turn the normal kinetic energy operators off and include them in the external kinetic energy.
+
+In kin.triatomic, this is done in init_kin(), in kin.jacobi, this is done even more opaquely in subsasgn.m (only for the rotational degree of freedom).
+
+Nowadays, I (Ulf) think that this approach is wrong. The problem is that this crucial behavior is completely hidden from the user, and not even easy to figure out if you know the code.
+
+Suggestion:
+
+* The user must explicitly disable the normal kinetic energy by setting "space.dof{i}.nokin = true", otherwise it is always run.
+* kin.triatomic and kin.jacobi fail with a descriptive error message (stating that nokin should be set to true) if the corresponding grid's kinetic energies is not disabled.
+* Optionally, you could add an override to the kinetic energy operators to the effect that they do _not_ complain if nokin is not set properly. Maybe there are special users that want them as part of a more complex kinetic energy operator, though that seems doubtful