Theoretical study of neutral and reduced hexacyanobutadiene