Incorporating particle flexibility in a density functional description of nematics and cholesterics. (17th November 2018)