SAN FRANCISCO — Six days after six UC Santa Barbara students were killed by a troubled 20-year-old man, UC President Janet Napolitano said the university will lead research to develop an implantable device that will retrain the brains of the mentally ill.

Napolitano said a team of scientists and physicians at UC San Francisco this week received a $26 million federal grant to create a device that will retrain the brain as it recovers from certain illnesses related to mental health disorders.

“Having spent part of this week down at UC Santa Barbara that pursuing mental health (problems) seems more pressing than ever,” Napolitano said Thursday in remarks to an audience attending a New York Times sponsored “Health For Tomorrow” conference at UCSF Mission Bay campus.

The UCSF group will lead a team that will involve more than a dozen scientists, engineers and physicians from UC Berkeley, Cornell University and New York University, and also include work with the Lawrence Livermore National Laboratory. It is part of a $100 million Obama Administration initiative to fund technological treatments for neurological and psychiatric diseases, according to an article on the UCSF website.

The Santa Barbara City College student who stabbed three students and fatally shot three others Friday night produced a YouTube video and a rambling 137-page manifesto before carrying out his murderous rampage. Elliot Rodger — who acknowledged his loneliness and unfulfilled sexual desires — pledged his “revenge against humanity,” destroying the kinds of popular young men and women who he said had rejected him and led to his misery.

Among the dead were three UC Santa Barbara students from the Bay Area: Cheng Yuan “James” Hong, 20, and George Chen, 19, both from San Jose, and Weihan “David” Wang, 20, of Fremont. Hong and Chen were listed on the lease as Rodger’s roommates. All three were killed in the apartment.

Napolitano said the mass killing not only raised the issue surrounding the adequacy of mental health treatment but reinforces the university system’s resolve around “the best ways to drive home and educate students about how we treat each other.”

Meanwhile, the UCSB campus health services department will continue to help students through their grief. All UC campuses have lowered their flags to half-staff through June 1.

Classes resumed Wednesday, and finals and commencement exercises will occur as scheduled, according to a UCSB spokesman.

Contact Tracy Seipel at 408-920-5343. Follow her at Twitter.com/taseipel.