Section Calculation Modes::Optimal Control
If the target is the exclusion of several targets, ("OCTTargetOperator = oct_exclude_states") then you must declare which states are to be excluded, by setting the OCTExcludedStates variable. It must be a string in "list" format: "1-8", or "2,3,4-9", for example. Be careful to include in this list only states that have been calculated in a previous "gs" or "unocc" calculation, or otherwise the error will be silently ignored.
call parse_variable(namespace, 'OCTExcludedStates', '1', tg%excluded_states_list)