Script to generate topology and geometry files of arbitrarily long P3HT chains (note only that the number of monomers in the chain must be a multiple of 2). The output files are in GROMACS format (itp and gro for the topology and geometry, respectively).
Force fields:
Two force fields are available:
1. The GROMOS 53A6-based parameters published in [JACS, 2017, DOI: 10.1021/jacs.6b11717];
2. The "Q-Forced" parameters (still relying on the GROMOS 53A6 Lennard-Jones parameters) published in [Chemrxiv2020, DOI: 10.26434/chemrxiv.12277931]; this version is recommended for use in combination with subsequent quantum chemical calculations.
Use: unzip PolyP3HT.zip
cd 2017RA-JACS ./PolyP3HT.sh 12
where 12 is the desired number of monomers. Note that the files shift-resnr.py, residuetypes.dat, p3ht_dimer_repeat_unit_50atoms.gro, header, and top2itp.sh must be in the folder where the script is being executed along with the directory p3ht_gromos_v_2017RA-JACS.ff/which contains the force field. The commands are analogous for the 2020RA-qforce version.
The standard version of the script runs on Linux. A version which runs on macOS is also included.
The example-outcome.zip contains the files which should be obtained in the case of a 6-mer and 16-mer if the script runs fine (in both force field versions).
More:
To contribute or raise an issue, here's a GitHub page: https://github.com/ricalessandri/PolyP3HT
Finally, for an example on how to employ the force field, see:
https://doi.org/10.6084/m9.figshare.5051593
Funding
Netherlands Organisation for Scientific Research NWO (Graduate Programme Advanced Materials, No. 022.005.006)