Couple of things though - they set him that trap and tracked him to his house, was that because they wanted to eat him, or because the recurrent infected human character wanted his girlfriend back? Smith took the fact that the guy exposed himself (briefly) to UV as a sign that all human characteristics had broken down (too voraciously hungry to care about risks) when it seemed to me that the motivation was just the opposite.
That's because they were trying to deal with the "Who's the real monster?" theme of the original "I Am Legend" novella, and did so again when Neville and the Brazillian woman survivor confront the wall of Polaroid photos of the deceased infected "human trials" he'd conducted.
Of course, in the movie they played with that theme so half-heartedly, it barely made any sense.
In the novella, Neville isn't a doctor, just a run-of-the-mill middle class factory worker, he does some research with what he learns in the abandoned libraries about biology and disease, but he spends most of the time simply killing the infected during the day to try and get some peace and safety at night. The infected are rather insane to varying degrees, but can reason and speak, at least well enough to try various ways (the women use sexual displays, which he finds the worst) to tempt him out of his fortified house.
You never know for sure, but Neville's research and the story suggest that the plague is a bacterium that was responsible for all the vampire myths in history, but had been naturally held in check until (nuclear) wars, overpopulation, etc. of the 20th century made it run amok. There were also two kinds of infected. Those who were actually dead, and driven almost totally by the bacteria, and those who were partially alive living with the bacteria in symbiosis.
At the end, you learn the symbiotic type of infected are learning to cope, and forming a government, and cleaning up the city outside Neville's daylight travel radius. The woman "survivor" he meets is really a spy with makeup, and they then come for him, as he's the "legendary monster" now, who kills them during the day with impunity, just like our legends of vampires, werewolves etc. terrorized humanity at night.
The female vampire spy turns out to be their leader, and out of sympathy and understanding his viewpoint as the last survivor, offers him a suicide pill before he's lynched to quell the new vampire population's fears. Which then they tried to mirror somewhat in the movie with Neville blowing himself up with the grenade.