Certain kinds of methods, e.g. coupled cluster, can be quite compactly defined by defining a stationary energy functional (Lagrangian) and then obtaining all relevant working equations by means of differentiating it w.r.t. different parameters.
The big advantage is that this approach easily gives access to more than just the ground state equations. Using higher-order derivatives we can get the equations for linear-response and friends. I suppose it would also come in handy as a tool for creating analytic gradients for a given method.
Ideally, such a feature would fulfill
- Automatic index symmetry deduction of the derivative
- Ability to explicitly specify elements (variables, tensors, etc.) that shall be considered constant
- Ability to specify implicit dependencies of elements. That is, if we differentiate an expression w.r.t.
A but the expression contains B which itself depends on A (either directly in its definition or indirectly due to how its specific values came to be), we should apply the chain rule to take this into account. Presumably two interfaces are in order. One that by default doesn't assume any implicit dependencies (but for which we can optionally define them) and one that by default assumes everything might depend on everything (but for which we can use the "mark as constant" feature to make explicit that certain derivatives are zero).
Certain kinds of methods, e.g. coupled cluster, can be quite compactly defined by defining a stationary energy functional (Lagrangian) and then obtaining all relevant working equations by means of differentiating it w.r.t. different parameters.
The big advantage is that this approach easily gives access to more than just the ground state equations. Using higher-order derivatives we can get the equations for linear-response and friends. I suppose it would also come in handy as a tool for creating analytic gradients for a given method.
Ideally, such a feature would fulfill
Abut the expression containsBwhich itself depends onA(either directly in its definition or indirectly due to how its specific values came to be), we should apply the chain rule to take this into account. Presumably two interfaces are in order. One that by default doesn't assume any implicit dependencies (but for which we can optionally define them) and one that by default assumes everything might depend on everything (but for which we can use the "mark as constant" feature to make explicit that certain derivatives are zero).