Fixtnkatypes

Description

Fixtnkatypes is a python script to assign atom types for atoms in TINKER XYZ structures by using templates or user specified atom types.

Requirements

Ficxtnkatypes requires python installed

Syntax

To run fixtnkatypes simply type:

fixtnkatypes [options] infile

The available options are:

—version

show program's version number and exit.

-h, —help

show this help message and exit.

-c, —credits

display credits.

-r RANGE, —range=RANGE

Select the atomic range in which assign atom types.

-a ATOMTYPE, —atomtype=ATOMTYPE

apply the atom type ATOMTYPE in the selected atomic range.

-t TEMPLATE, —template=TEMPLATE

apply the atom types in the specified atomic range as they appear in the TINKER structure TEMPLATE.

-s SETUP, —setup=SETUP

read a setup file containing more atom types assignments (see Example section).

-o OUTPUT, —output=OUTPUT

specify the output file.

infile

is the name of the input file.

Examples

Templates

Templates are TINKER structures (TINKER XYZ files) where at each atom is assigned the proper atom type for a given force field.
The template is then applyed to the input structure in order to correct the atom types in the specified range. A template typical is a molecule and is used when the very same molecule is replicated in the space to form, for instance, a molecular self-assembly.
Let's suppose to have a tinker box of 100 molecules of water with no or wrong atom types (box.unk). Also, we have 100 molecules of methane. To assign mm3 atom types to the water molecules in the box, let's use as template a single water molecule (having the very same internal atomic structure of those in the box) where mm3 atom types are assigned to the atoms.
If the water molecules are the first 300 atoms in the box, we can then use the following sintax:

fixtnkatypes -t water.mm3 -r 1 300 -o box.mm3 box.unk

Here we have applied the template water.mm3 to box.unk in the range from atom 1 to 300 and saved the box with the mm3 atom types in box.mm3

In the same way, we can assign the mm3 atom types for hexane molecules using a template hexane.mm3:

fixtnkatypes -t methane.mm3 -r 301 700 -o finalbox.mm3 box.mm3

here we have applied the template to all the methane molecules and used as box the one created before, where we have fixed the atom types for water. The final structure, in finalbox.mm3, has mm3 atom types for all the atoms.

Direct assignment of an atom type

Sometimes, the use of a template is not worthy, since we have only a kind of atom in a structure (or ina part of it). Let suppose to have created a carbon nanotube or a sheet of HOPG graphite: all the atoms have the same atom types if the structure is periodic.
We can avoid to use a template and assign directly the proper atom type to the atoms in the proper range.
Let's assign mm3 atom types to all the 6000 atoms forming a carbon nanotube. This will do the trick:

fixtnkatypes -a 50 -r 1 6000 -o cnt.mm3 cnt.unk

Use a Setup file

We saw before the example of the solvent box containing a mixture of water and methane. We can assign the atom types for both king of molecules in one go using a setup file and running fixtnkatypes with the flag -s.

A setup file is just a fle containing a list of fixtnkatypes tasks, one per line.
For the example of the box, a valid setup file is:

-t water.mm3 -r 1 300
-t methane.mm3 -r 301 700

then use the command:
fixtnkatypes -s setup -o finalbox.mm3 box.unk

This will give the same result seen before for the use of templates, but just in one go.

LICENSE and TERMS OF USE

You are free to use, modify and redistribute fixtnkatypes as far as you keep them free as in beer.
As free(as in beer)ware software, fixtnkatypes 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

You can download fixtnkatypes here


Rate this page:

rating: 0+x

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
{"cc_re__cc_re__cc_by_sa_3_0": ["t:;\" id=\"bug-report-button\" onclick=\"WIKIDOT.page.listeners.pageBugReport(event)\">Report a bug</a>\n    &nbsp;|\n    <a href=\"javascript:;\" id=\"abuse-report-button\" onclick=\"WIKIDOT.page.listeners.flagPageObjectionable(event)\">Flag as objectionable</a>\n</div>\nPowered by <a href=\"http://www.wikidot.com\">Wikidot.com</a> \n            </div>\n            \n                <div id=\"license-area\" class=\"license-area\">\n                    Unless otherwise stated, the content of this page is licensed under <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 License</a>\n                </div>\n            \n            \n            \n\n\n\n            <div id=\"extrac-div-1\"><span></span></div><div id=\"extrac-div-2\"><span></span></div><div id=\"extrac-div-3\"><span></span></div>\n            \n            \n            \n            \n                \n            \n        </div>\n        \n    </div>\n<!-- These extra divs/spans may be used as catch-alls to add extra imagery. -->\n<div id=\"extra-div-1\"><span></span></div><d"]}