This package contains a massively-parallel hybrid Density Functional Theory/Monte-Carlo (DFT/MC) simulation code, designed to work out the equilibrium cholesteric behaviour of lyotropic liquid crystals from their microscopic mesogen properties.
It includes a high-performance and versatile implementation of the algorithm introduced by Belli et al., with additional support for Straley’s perturbative approach. The full details of the model and underlying theory can be found here, and its extension to flexible particle models is extensively discussed here.
It further contains an original bounding volume hierarchy based on principal component analysis, efficiently generating and traversing binary trees of bounding structures to speed up energy calculations by several orders of magnitude for complex, highly-anisotropic particle models. The details and performance of the procedure are presented here.
An implementation of the RAPID collision detection library, developed by Manocha et al., is also provided for efficient overlap queries between sets of complex triangle meshes in hard-body systems.
- The Eigen high-performance linear algebra library (>= 3.3)
gcc
>= 4.9 with an associatedmpicc
wrapper, provided by:- a working MPI implementation, e.g. OpenMPI
Checkout the source code from the repository through either svn
or direct download, then:
cd distruc-chiraldft-code # enter the project folder
make libs # build RAPID mesh collision and SphericalFunctions libraries
make -j4 # compile chiralDFT in parallel using 4 threads
This will build the chiraldft
executable into the newly created bin
folder.
Note that if you chose to install the Eigen library headers or mpicc
linker in custom locations, you may need to change the relevant fields in the makefile to the chosen install paths.
To run the code:
cd bin
mpirun -np <number_of_cores> ./chiraldft
with <number_of_cores>
the number of available cores you wish to use for the simulation.
On most recent Intel® processors (Core™ i5 and later generations), setting <number_of_cores>
to 8 will yield maximum performance, using the 4 physical cores + 4 virtual cores through Hyper-threading. However, doing so will stress your CPU to 100%, so don't attempt to run this on your laptop for extended periods of time.
Some very limited options to be set in the include/params.hpp
file:
- set the
MESOGEN
symbol to whichever particle geometry you fancy (the list of supported models is provided in the file) - set the
FULL_RUN
switch to either 0 for a purely perturbative run or 1 for a full sweep of the chiral free energy landscape. Bear in mind that the full run is VERY expensive (especially for theDNADuplex
particle type), so don’t try it on your home computer.
Don’t forget to recompile the code after modifying any of these flags.
Note that the DNADuplex
particle type requires as input a DNA trajectory file generated by the oxDNA model, formatted using the pre_process.py
script located in the resources/processing
folder.
A couple plotting utilities to be found in the resources
folder (requires gnuplot
>= 5.0):
utils/display_wireframe
conjures up a 3d interactive viewer for the chosen particle (not supported for DNA, tesselated or flexible particle models)plots/plot_landscape3d
plots the 3d free energy surface as a function of both particle density and macroscopic pitch (only forFULL_RUN=1
).
Note that the lists above are far from exhaustive - don’t hesitate to contact me for information about the more advanced options and functionalities.