Skip to content

High-level module for ultra-fast structural optimisation and property calculations of organic co-polymers.

License

Notifications You must be signed in to change notification settings

LiamWilbraham/polyhts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polyhts ☀️

Python library for ultra-fast structural optimisation and property calculations of organic co-polymers. This code was developed while doing my post-doc in the Zwijnenburg group, https://www.zwijnenburg-group.org/.

polyhts takes base functionality from:

  • rdkit : transforms SMILES strings into monomer building blocks
  • stk : constructs linear co-polymer structures from these building blocks
  • xtb : optimises geometries, calculates properties

Combining the above, polyhts can be used for high-speed, accurate screening of organic co-polymer compositions, both for property screening and quick, exploratory calculations. Currently supported properties are:

  • Ionisation potentials (IP)
  • Electron affinities (EA)
  • Excitation energies & oscillator strengths
  • Solvation free energies

Though, in principle, any property that can be calculated via xtb or stda can be obtained.

Functionality

polyhts calculations start by defining a Session, in which information like co-polymer repeat unit length, number of repeat units that will be used to construct a polymer chain, number of conformers to be explored and solvent type are specified.

For example, we can start a Session in which we will construct polymers with 4 repeat units (each of which are 2 monomers long) and explore 100 conformers while applying an implicit solvent model for benzene:

session = polyhts.Session('my_session', 2, 4,  100, solvent='benzene')

This way, we can explore co-polymer compositions with arbitrary repeat unit complexity and polymer chain length.

1. Combinatorial Screening

Within this session, we can screen all combinations of pre-supplied monomer unit SMILES from a text file:

session.screen('smiles-list.txt', nprocs=20)

where smiles-list.txt has the format:

0001 smiles1
0002 smiles2
0003 smiles3
 .     .
 .     .
 .     .

Note that, not only will all compositions of monomers be screened, but all permutations of a given compositions as well (e.g. AABB as well as ABAB).

This created a directory called 'my_session', containing one sub-directory for all the co-polymers screened. Here you can find the starting and optimised structures. Lastly, within 'my_session', there will be an output file containing all results.

2. Fix one monomer, screen possible co-monomers (under construction)

3. Just one Polymer

We can also calculate properties for a single co-polymer, where we supply a list of smiles explicitly, where the length of this list is equivalent to the repeat unit length:

session.calc_polymer_properties(['c1c(Br)cc(Br)cc1', 'c1c(Br)cc(Br)cc1'], 'polymer-name')

Following the stk documentation, Br atoms are places within SMILES strings where monomer units are to be connected to one another.

Installation

clone the repo and then:

$ cd polyhts
$ pip install -r requirements.txt
$ pip install -e .

You will also need to install RDKit, which can be installed via conda:

$ conda install -c rdkit rdkit

references

  • [1] J. Chem. Inf. Model. 2015, 121, 2562-2574
  • [2] J. Chem. Theory Comput. 2017, 13, 1989-2009
  • [3] Comput. Theor. Chem. 2014, 1040, 45-53
  • [4] J. Chem. Phys. 2016, 145, 054103

requirements

About

High-level module for ultra-fast structural optimisation and property calculations of organic co-polymers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages