Creating branched Polymers

Branched polymers are another topology that is enabled in PySoftK. Generally, branched polymers are a set of secondary polymer chains linked to a primary backbone. PySoftK builds this topology by employing the user-supplied atomic placeholder as an indicator of the number of branch points from the primary backbone present in this structure. Thus, for instance, a backbone with four placeholders will generate a model where four branches (arms) are attached at the regions on the backbone indicated by the user. The command Bd(core,arm,atom).branched_polymer(FF,ff_iter) is used to generate a branched polymer with a backbone of core and arms described by arm.

The inputted structures for core and arm can be simple monomers and therefore inputted as previously discussed or they can be resultant structures from any of the other commands and then inputted into the branched function. Incorporation can be carried out using the current PySoftK structure as part of the module topology pysoftk.topologies.branched function.

First, we need to import the initial molecules and read it using RDKit, as shownin the following snippet:

from rdkit import Chem
from rdkit.Chem import AllChem

core=Chem.MolFromSmiles("BrN(Br)CCN(Br)Br")
arm=Chem.MolFromSmiles("C(CC(=O)OCCOC(=O)CCBr)Br")

Then, we can create a branched topology, by using the following commands:

from pysoftk.topologies.branched import *

bran=Bd(core,arm,"Br").branched_polymer()

The new molecular unit (stored in the variable bran) can be used to replicate and form a polymer with a given desired architecture. To print the structure in XYZ format, one needs to add the following lines of conde as can be seen in this snipet:

from pysoftk.format_printers.format_mol import *
Fmt(bran).xyz_print("branched.xyz")

By using a common visualization program (such as VMD), the built structure branched.xyz can be displayed and the result as presented above

../_images/branched.png

Figure Branched polymer with 4 arms.