‘If I Stay’ and ‘The Equalizer’ star Chloë Grace Moretz has signed on to take the lead in ‘Brain on Fire,’ the next directorial effort from Irish writer-director Gerard Barrett (‘Glassland,’ ‘Pilgrim Hill’ ).

Based on the bestselling memoir by Susannah Cahalan, the drama chronicles a young woman’s descent into insanity. Moretz replaces Dakota Fanning, who had to drop out due to a scheduling conflict.

Thomas Mann (‘Me and Earl and the Dying Girl’) is on board to co-star, with Charlize Theron serving as producer.