build_inp restructured for flexible modeling