sampledoc

Oligo-methylthiopheneΒΆ

Generate structure and quantum input

Generate a .xyz file, a Gaussian .com input file and a submission script ”.pbs” for thiophene by running

donoracceptorsystems.py  "thiophene  ( R_methane  )" -b  BuildingBlocks -r 5 -p "180 0 "

will generate oligomers with n=1-5 repeat units with sulfurs of thiophene in the trans configuration, see oligothiophene for -p usage

mols/thiophene_R_methane_/acc1_thiophene_R_methane__n1.xyz
...
mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.xyz

The Gaussian input files are also created for each oligomer:

mols/thiophene_R_methane_/acc1_thiophene_R_methane__n1.com
mols/thiophene_R_methane_/acc1_thiophene_R_methane__n1.pbs
...
mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.com
mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.pbs

Generate topology files

The .xyz file is read in to get the atomic positions and atom types, and a .itp file “conj.itp” is read in to get a set of reference Force Field parameters. The conj.itp file contains parameters from the OPLSaa force-field that is included in the GROMACS release.

For LAMMPS input generation run xyz2data.py:

xyz2data.py  --in_itp conj.itp
  --in_xyz  mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.xyz
  --out_data  mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.data

This creates the .data formated LAMMPS input file:

mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.data

And input files for a GROMACS run are generated xyz2gromacs.py:

xyz2gromacs.py --in_itp conj.itp
   --in_xyz  mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.xyz
   --out_gro mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.gro
   --out_top mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.top
   --out_itp  acc1_thiophene_n5.itp

This creates the GROMACS input files:

mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.gro
mols/thiophene_R_methane_/acc1_thiophene_R_methane__n5.top
acc1_thiophene_n5.itp

where the .gro file includes the structural information, the .top file is the connectivity file and the new .itp file contains the Force-field parameters for the molecule.

Note

This entire example can be executed by running:

oligomethylthiophene.sh

in tools/examples. Needed files and scripts are * donoracceptor.com.template * donoracceptor.pbs.template * conj.itp * xyz2data.py * xyz2gromacs.py