F terms and D terms in string theory