Description
This program is used to build a polymer chain (both homopolymer and copolymer) with different tacticity. Polymers are described in the xml library that comes with polybuild. Single chain of regular and statistic copolymers, as well as iso-, syndio- or a-tactic polymers can be created with polybuild.
Requirements
Openbabel is required in order to create the TINKER xyz structure for the polymer chain converting the smiles string. TINKER is strongly recommended in order to minimize the geometry or the polymer chain. Both openbabel and TINKER are available free of charge.
Features, known issues and limitations
Main features:
- Statistic distribution of repeating units in the polymer chain.
- Size of the polymer chain determined by length or weight.
- Smiles representation of the polymer chain, as well as TINKER XYZ.
- Optimization of the generated structure wth TINKER.
- Backup of files that are going to be overwritten. The most recent backup has the highest progressive number (e.g. peo.mm2_bak-1).
- MAC OS X 10.6.2 users can experiment a really slow response of openbabel. It is not fault of polybuild. Try to convert manually the file with the smile notation using babel with the option —gen3d and you will see that is this step that takes a long while.
Known issues and limitations:
- There is no interactive way to extend or modify the xml library. You have to do it by hand. Also, mind to keep the original structure of the library, or be prepare to do dirty job with the code.
- Output is smiles and tinker xyz format only. You can use then openbabel or other software to convert the polymer structure in other formats.
- Only a single polymer chain is generated. Polymer melts or crystals cannot be built directly with polybuild. Force fields have to use the same name of the TINKER forcefields.
- The syntax used to launch openbabel and TINKER is for unix based systems only (linux/unix/mac os x). This will be fixed soon.
Syntax
To run polybuild simply type
polybuild [options]
The available options are:
—version
show program's version number and exit.
-h, —help
show this help message and exit.
-c, —credits
display credits.
-p, —polymer
specify the polymer to build. -p list will display the available polymers and force fields in the selected xml library.
-m, —mass / -l, —length
set the mass or the length of the polymer chain.
-f, —forcefield
specify for which force field the polymer chain must be built. Use -p list to display the available force fields for the desired polymer.
—statistic
select a particular statistic to build an atactic polymer chain. Use —statistic list to display the statistics available.
—smilesonly
generate and save in a file the smile representation of the polymer.
-o, —optimize
optimize the polymer chain with TINKER using the minimize algorithm.
-g, —rmsgradient
set rms gradient for the optimization of geometry. By default is 0.01
-k, —keyfile
specify which key file must be used for the optimization of geometry.
—openbabelpath
specify the global path for openbabel. The path can be written in the script modifying the babel parameter. The use of this flag will make polybuild ignore the value of the babel parameter in the script.
—tinkerpath
specify the global path for TINKER executable. The path can be written in the script modifying the tnkdir parameter. The use of this flag will make polybuild ignore the value of the tnkdir parameter in the script.
—libxmlpath
specify the global path for xml library containing the different building units used to build the different polymers. The path can be written in the script modifying the libxml parameter. The use of this flag will make polybuild ignore the value of the tnkdir parameter in the script.
Polybuild will produce two files named after the name, name, of the polymer and the force field ,ff, as in the xml library:
- name.smiles : the smile format for the polymer chain
- name.ff : the TINKER structure for the polymer chain
The xml library
Polybuild uses a xml library to build the polymer chain. In the library, the polymers building block are defined as below
</polymers>
<polymer>
<name>peo</name>
<structure>isotactic</structure>
<scheme>A</scheme>
<head>
<smi>[H]</smi>
</head>
<r_unit>
<monomer>
<name>A</name>
<mass>44</mass>
<smi>C([H])([H])C([H])([H])O</smi>
</monomer>
</r_unit>
<tail>
<smi>[H]</smi>
</tail>
<forcefields>
<forcefield>
<ffname>mm2</ffname>
<at_head>5</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>1 5 5 1 5 5 6</at_mon>
</monomer>
</at_unit>
<at_tail>21</at_tail>
</forcefield>
<forcefield>
<ffname>mm3</ffname>
<at_head>5</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>1 5 5 1 5 5 6</at_mon>
</monomer>
</at_unit>
<at_tail>21</at_tail>
</forcefield>
</forcefields>
</polymer>
<polymer>
<name>pp-iso</name>
<structure>isotactic</structure>
<scheme>A</scheme>
<head>
<smi>[H]C([H])([H])</smi>
</head>
<r_unit>
<monomer>
<name> A</name>
<mass>42</mass>
<smi>C([H])(C([H])([H])[H])C([H])([H])</smi>
</monomer>
</r_unit>
<tail>
<smi>[H]</smi>
</tail>
<forcefields>
<forcefield>
<ffname>mm2</ffname>
<at_head>5 1 5 5</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>1 5 1 5 5 5 1 5 5</at_mon>
</monomer>
</at_unit>
<at_tail>5</at_tail>
</forcefield>
<forcefield>
<ffname>mm3</ffname>
<at_head>5 1 5 5</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>1 5 1 5 5 5 1 5 5</at_mon>
</monomer>
</at_unit>
<at_tail>5</at_tail>
</forcefield>
<forcefield>
<ffname>oplsaa</ffname>
<at_head>6 1 6 6</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>2 6 1 6 6 6 2 6 6</at_mon>
</monomer>
</at_unit>
<at_tail>6</at_tail>
</forcefield>
</forcefields>
</polymer>
</polymers>
The piece of code above defines the building blocks for polyethylene oxide and polypropylene isotactic.
Each polymer is define between the tags <polymer>…</polymers> and has a head group, <head>…</head», a repeating unit, <r_unit>…</r_unit>, and a tail group <tail>…</tail». Head and tail groups are defined by their smiles and are used to begin and terminate the polymer chain. The repeating unit is the building block of the polymer and it is repeated n-times till the proper polymer length or polymer mass is reached. The repeating unit can be composed by one or more monomers, <monomer>…</monomer>, which are defined by their name, smile notation and mass. The name of the monomer is used to define the scheme of the polymer, <scheme>…</scheme>/, and are repeated according to it. For example, is two monomers A and B are defined and the scheme is A B, then the sequence of the monomers along the polymer chain will be A B A B A B … For a scheme AA BB, the sequence of the monomers will be A A B B A A B B …
<polymer>
<name>pp-iso</name>
<structure>isotactic</structure>
<scheme>A</scheme>
<head>
<smi>[H]C([H])([H])</smi>
</head>
<r_unit>
<monomer>
<name> A</name>
<mass>42</mass>
<smi>C([H])(C([H])([H])[H])C([H])([H])</smi>
</monomer>
</r_unit>
<tail>
<smi>[H]</smi>
</tail>
Since different force fields have different atom types definition, more force fields can be defined between the tags <forcefields>…</forcefields>. For each force field, <forcefield>…</forcefield> the proper atom types are given for all the atoms in the head group, in the monomers and in the tail group.
<forcefield>
<ffname>oplsaa</ffname>
<at_head>6 1 6 6</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>2 6 1 6 6 6 2 6 6</at_mon>
</monomer>
</at_unit>
<at_tail>6</at_tail>
</forcefield>
The examples above are for isotactic polymers: to build syndiotactic or atactic polymers, two monomers must be defined in the repeating unit. This two monomers differs in the configuration of the chiral atom. See the example below for the case of polypropylene syndiotactic.
<polymer>
<name>pp-sindio</name>
<structure>sindio</structure>
<scheme>A B</scheme>
<head>
<smi>[H]C([H])([H])</smi>
</head>
<r_unit>
<monomer>
<name>A</name>
<mass>42</mass>
<smi>C([H])(C([H])([H])[H])C([H])([H])</smi>
</monomer>
<monomer>
<name>B</name>
<mass>42</mass>
<smi>C(C([H])([H])[H])([H])C([H])([H])</smi>
</monomer>
</r_unit>
<tail>
<smi>[H]</smi>
</tail>
<forcefields>
<forcefield>
<ffname>mm2</ffname>
<at_head>5 1 5 5</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>1 5 1 5 5 5 1 5 5</at_mon>
</monomer>
<monomer>
<name>B</name>
<at_mon>1 1 5 5 5 5 1 5 5</at_mon>
</monomer>
</at_unit>
<at_tail>5</at_tail>
</forcefield>
<forcefield>
<at_head>5 1 5 5</at_head>
<ffname>mm3</ffname>
<at_unit>
<monomer>
<name>A</name>
<at_mon>1 5 1 5 5 5 1 5 5</at_mon>
</monomer>
<monomer>
<name>B</name>
<at_mon>1 1 5 5 5 5 1 5 5</at_mon>
</monomer>
</at_unit>
<at_tail>5</at_tail>
</forcefield>
<forcefield>
<ffname>oplsaa</ffname>
<at_head>6 2 6 6</at_head>
<at_unit>
<monomer>
<name>A</name>
<at_mon>2 6 1 6 6 6 2 6 6</at_mon>
</monomer>
<monomer>
<name>B</name>
<at_mon>2 1 6 6 6 6 2 6 6</at_mon>
</monomer>
</at_unit>
<at_tail>6</at_tail>
</forcefield>
</forcefields>
</polymer>
Since the polymer scheme is A B, the two monomers having different configuration are alternate in the polymer, giving a syndiotactic polymer.
Atactic polymers are built using the polymer definition for the case of syndiotactic polymer. The difference is the the two monomers are alternated in a statistic way: randomly or with a statistic of Bernoulli. The statistic of Bernoulli is based on m and r diads probabilities Pm and Pr=1-Pm, respectively. For this statistic, Pm=0.25 and Pr=0.75.
More polymers and/or force fields can easily been added to the library, as far as the way the polymers are defined is consistent with what presented here.
Troubleshooting
Paths
Polybuild can fail if the paths for openbabel, TINKER and/or the xml library with the polymer definitions are wrong. You can fix this either specifying the proper path by using the proper flags, —openbabelpath, —tinkerpath and —libxmlpath respectively, or setting the proper paths directly in the code.
TINKER optimization failure
Check your TINKER key file, the path or the compilation of the TINKER executables.
Charges
It can happen that the polymer chain is not neutral. This it depends by the way you build the polymer, i.e. which head/tail groups and building block you have define, and by the force field used. Usually, this can be easily fixed by correcting the atom types of the terminal atoms.
As example, let's have a look to the case of the polyethylene oxide, defined as below:
<name>peo</name>
<structure>isotactic</structure>
<scheme>A</scheme>
<head>
<smi>[H]</smi>
</head>
<r_unit>
<monomer>
<name>A</name>
<mass>44</mass>
<smi>C([H])([H])C([H])([H])O</smi>
</monomer>
</r_unit>
<tail>
<smi>[H]</smi>
</tail>
If OPLS-AA force field is used, different atom types are used for CH2 and CH3 groups. Since the head group is an hydrogen, the combination of the head group and the first monomer results in a CH3 group. Thus, the atom type for the first carbon atom in the structure must be changed from 2 to 1, according to OPLS-AA force field. This is not a big issue when you want to optimize the structure of the polymer directly from polybuild: in this case will be more a cleanup of the structure rather than a real, rigorous optimization of geometry. Anyway, a warning message is displayed when polybuild terminates without errors.
CONTACTS
You like this program? You have suggestions? You want to submit your own polymer library? Drop me a mail at minoiaa_at_gmail.com or leave a comment.
LICENSE and TERMS OF USE
You are free to use, modify and redistribute polybuild and the xml libraries as far as you keep them free as in beer.
As free(as in beer)ware software, polybuild comes with _ABSOLUTE_ _NO_ (as in NOTHING, NADA, NICTHS, NIENTE, RIEN) WARRANTY. The author is _NOT_ responsible if those software will erase your hard disks, empty your bank account, stole your car, seduce your wife, shave your dog or make any kind of mess and damages, including loss of data or worst. By using polybuild and its libraries, you _ACCEPT_ these terms.
DOWNLOADS
Download polybuild and a basic xml library here. The library allows to create polymer chains of:
- polyethylene oxide, with TINKER MM2 and MM3 force fields;
- polypropylene iso-, syndio and a-tactic, with TINKER MM2, MM3 and OPLS-AA force fields;
- pdmaema iso-, syndio and a-tactic, with TINKER MM2, MM3 and OPLS-AA force fields;
More polymers coming soon.
Rate this page:
Post preview:
Close preview