begin to implement the MWEditorEnergy using AD.