Replicate a P3HT and C60 molecule with benzene as a solvent for an MD runΒΆ

In this example a we use the script to read in the structure from a LAMMPS input files of a P3HT, C60 and benzene.


./   -v
--mol1_data  mols/thiophene_R_hexane_/
--mol1_n 10
--mol2_data mols/C60/
--mol2_n 10
--mol3_data mols/benzene/
--mol3_n 50
--out_data  mols/
--out_xyz mols/

This reads in the structures of P3HT (thiophene_R_hexane) with five repeat units and replicates it randomly in space 10 times. Similarly for C60 is replicated randomly in space 10 times to make a 1:1 mixed phase. Benzene is treated as a solvent and is replicated on a grid for faster replicatation. For each benzene added the distance between the benzene and the already added P3HT and C60 molecules is calculated, and if benzene is within the cutoff it is not added to the grid point. The new mixed phase LAMMPS input file:



This entire example can be executed by running:

in tools/examples. Needed files and scripts are


This example requires output from previous examples