Scientists have unraveled in unprecedented detail the cascade of events that go wrong in brain cells affected by HIV, a virus whose assault on the nervous system continues unabated despite antiviral medications that can keep the virus at bay for years in the rest of the body.