Build molecular structures for TINKER
Index >> next

Notes&Credits

This is not part of the official documentation of TINKER program package, but have been ideated by me for this wiki. If you do use these tutorials for teaching, please consider to acknowledge Chembytes and spread the word.
You are welcome to improve the tutorial, and, if you do it, please consider to help me improve Chembytes and send me your tutorial or become member of Chembytes and write it yourself. Don't worry, you will be properly acknowledged for your work.

Intro

In this tutorial you will learn how to prepare input structures for TINKER. TINKER can
work with two types of input files: internal and cartesian coordinates files. We already
discuss in a previous tutorial how to work with internal coordinates; in this tutorial
we will work with cartesian coordinates (.xyz) files only.

TINKER XYZ/ARC files

A typical input file for TINKER is shown below for the molecule of Ethanol (CH3CH2OH).
(see ethanol.xyz in tinker/example dir)

9  Ethanol
    1  C     -0.231579   -0.350841   -0.037475     1     2     4     5     6
    2  C      0.229441    0.373160    1.224850     1     1     3     7     8
    3  O      0.868228   -0.551628    2.114423     6     2     9
    4  H      0.619613   -0.833754   -0.565710     5     1
    5  H     -0.709445    0.352087   -0.754607     5     1
    6  H     -0.976393   -1.144198    0.191635     5     1
    7  H     -0.628785    0.860022    1.736350     5     2
    8  H      0.952253    1.174538    0.962081     5     2
    9  H      0.204846   -1.119563    2.483509    21     3

The TINKER xyz format is quite easy to understand:
  1. In the first line the total number of atoms in the structure is given, followed by an optional comment or title.
  2. Follow one line for each atom in the structure. Each line has the number of the atom in the structure, the atom symbol, the X-, Y- and Z-coordinate, the atom type used in the force field to describe the atom, and the connectivity, i.e. the list of atom numbers connect to it.

In the example above, the atom 1 is a Carbon atom, C, having X-, Y- and Z-coordinates of -0.231579, -0.350841 and -0.037475
respectively, is described by the atom type 1 in the MM3 forcefield, and is bounded to atom 2, 4, 5 and 6.

TINKER xyz files, as opposite to pdb and Gromacs gro structures, are fixed format multicolumn files: a
single space is enough to separate the column. TINKER arc files usually indicates a trajectory file, where the
XYZ structures for each frame of the trajectory are appended one below the others. Below an example for a
two-frames trajectory:

9  Ethanol
    1  C     -0.231579   -0.350841   -0.037475     1     2     4     5     6
    2  C      0.229441    0.373160    1.224850     1     1     3     7     8
    3  O      0.868228   -0.551628    2.114423     6     2     9
    4  H      0.619613   -0.833754   -0.565710     5     1
    5  H     -0.709445    0.352087   -0.754607     5     1
    6  H     -0.976393   -1.144198    0.191635     5     1
    7  H     -0.628785    0.860022    1.736350     5     2
    8  H      0.952253    1.174538    0.962081     5     2
    9  H      0.204846   -1.119563    2.483509    21     3
9  Ethanol
    1  C     -0.231579   -0.350841   -0.037475     1     2     4     5     6
    2  C      0.229441    0.373160    1.224850     1     1     3     7     8
    3  O      0.868228   -0.551628    2.114423     6     2     9
    4  H      0.619613   -0.833754   -0.565710     5     1
    5  H     -0.709445    0.352087   -0.754607     5     1
    6  H     -0.976393   -1.144198    0.191635     5     1
    7  H     -0.628785    0.860022    1.736350     5     2
    8  H      0.952253    1.174538    0.962081     5     2
    9  H      0.204846   -1.119563    2.483509    21     3

It is worthy to show the difference between a TINKER XYZ file and a standard XYZ file:

***** TINKER XYZ *****
9  Ethanol
    1  C     -0.231579   -0.350841   -0.037475     1     2     4     5     6
    2  C      0.229441    0.373160    1.224850     1     1     3     7     8
    3  O      0.868228   -0.551628    2.114423     6     2     9
    4  H      0.619613   -0.833754   -0.565710     5     1
    5  H     -0.709445    0.352087   -0.754607     5     1
    6  H     -0.976393   -1.144198    0.191635     5     1
    7  H     -0.628785    0.860022    1.736350     5     2
    8  H      0.952253    1.174538    0.962081     5     2
    9  H      0.204846   -1.119563    2.483509    21     3

***** XYZ *****
9
Ethanol
C     -0.231579   -0.350841   -0.037475
C      0.229441    0.373160    1.224850
O      0.868228   -0.551628    2.114423
H      0.619613   -0.833754   -0.565710
H     -0.709445    0.352087   -0.754607
H     -0.976393   -1.144198    0.191635
H     -0.628785    0.860022    1.736350
H      0.952253    1.174538    0.962081
H      0.204846   -1.119563    2.483509

Software like VMD can be mistaken by the xyz file extension and try to load a TINKER file as XYZ file, causing the
program to fail loading the structure. For VMD, you can either load the structure choosing the TINKER format from the GUI,
or launch VMD loading a tinker structures directly from the terminal:
[user@desktop] vmd -tinker ethanol.xyz

Building structures for TINKER: the ethanol molecule

TINKER does not come with a molecular editor, therefore you have to find other ways to build TINKER structures. In this
first part of the tutorial, different ways to obtain a TINKER XYZ structure will be explored, all using freeware software.
If you have, you can use build the system using a 3D molecular builders such Hyperchem, Materials Studio, Avogadro,
Argus Lab etc. Since building a molecule using such software is straightforward, you can skip to the second part of the tutorial.

Method 1: From SMILES to TINKER XYZ.

What you need is an text editor and babelfish or ChemAxon molconvert utility. SMILES stands for Simplified Molecular Input Line
Entry System, and define a typographical method, using printable characters, for entering and representing molecules and reactions.
You should read this page in order to learn the notation. The advantage of using the SMILES notation is that you can build even complicate molecules without using a graphical software, you do not have to worry about coordinates, etc. Utilities such openbabel and molconvert can convert SMILES molecules into 3D molecules. The fastest way to describe the ethanol using SMILES is to write the following in a text file:

 CCO

and save the file as ethanol.smiles. SMILES molecules should be red from left to right: the sequence of the characters determine the order of the atoms in the structure. In our case, we have describe only the sequence of the atoms composing the molecule backbone, while neglecting the hydrogens. Let's now use openbabel to generate the 3D molecule in PDB format. Just type in a terminal the following command:

[user@desktop]$ babel --gen3D -ismiles ethanol.smiles -opdb ethanol.pdb

You can visualize the structure with molden or vmd, and ethanol.pdb should look like:

COMPND    UNNAMED
AUTHOR    GENERATED BY OPEN BABEL 2.2.3
HETATM    1  C   LIG     1       1.005  -0.001   0.004  1.00  0.00           C
HETATM    2  C   LIG     1       2.520   0.002   0.001  1.00  0.00           C
HETATM    3  O   LIG     1       3.004   1.337   0.012  1.00  0.00           O
HETATM    4  H   LIG     1       0.618  -1.022   0.011  1.00  0.00           H
HETATM    5  H   LIG     1       0.617   0.518  -0.877  1.00  0.00           H
HETATM    6  H   LIG     1       0.622   0.530   0.881  1.00  0.00           H
HETATM    7  H   LIG     1       2.912  -0.507  -0.885  1.00  0.00           H
HETATM    8  H   LIG     1       2.906  -0.508   0.890  1.00  0.00           H
HETATM    9  H   LIG     1       2.666   1.777  -0.786  1.00  0.00           H
CONECT    1    2    4    5    6
CONECT    2    1    3    7    8
CONECT    3    2    9
CONECT    4    1
CONECT    5    1
CONECT    6    1
CONECT    7    2
CONECT    8    2
CONECT    9    3
MASTER        0    0    0    0    0    0    0    0    9    0    9    0
END

As you can see, hydrogens have been added the backbone described in ethanol.smiles.1

Now that you have generated the PDB file, you can convert it into TINKER XYZ format using the TINKER program pdbxyz. Before do
it, it is useful to create a proper key file, containing at least the force field you want to use. In our case, as for the original
molecule in the tinker/example directory, let's use the MM3 force field. Generate a minimal key file as following:

[user@desktop]$ echo "parameters /your/tinker/path/params/mm3"> ethanol.key

and now convert the PDB as following:

[user@desktop]$ pdbxyz ethanol.pdb -k ethanol.key

If everything went fine, you should find a new file in your directory, called ethanol.xyz, which should look like this one:

9
     1  C      1.005000   -0.001000    0.004000     0     2     4     5     6
     2  C      2.520000    0.002000    0.001000     0     1     3     7     8
     3  O      3.004000    1.337000    0.012000     0     2     9
     4  H      0.618000   -1.022000    0.011000     0     1
     5  H      0.617000    0.518000   -0.877000     0     1
     6  H      0.622000    0.530000    0.881000     0     1
     7  H      2.912000   -0.507000   -0.885000     0     2
     8  H      2.906000   -0.508000    0.890000     0     2
     9  H      2.666000    1.777000   -0.786000     0     3

The main difference with the original xyz file in the tinker/example directory, is that the atom types have not been assigned. Assign the proper atom types is the trickiest part.
As told before, the order of the atoms in the structures is given by the sequence of characters in the SMILES string. This is
important if for some reason you do not want to have all the hydrogen atoms at the end of your structure. Try to convert the
following SMILES string into TINKER XYZ:

C([H])([H])([H])C([H])([H])O([H])

What has changed in the new structure?

Method 2: From 2d sketch to TINKER XYZ.

Another way to create small molecules is to sketch them in 2D and then save them as PDB and proceed as before. If you do not have
it already, I suggest you to install ChemAxon MarvinBeans,
a freeware chemical environment where to sketch and visualize molecular structures. Also, you will have the molconvert utility, similar to openbabel, but usually faster.
Open marvin sketch and sketch the ethanol molecule in 2D. Then from the menu Structure->Add choose add explicit hydrogens to add all the hydrogen atoms. Now all you have to do is clean the structure in 3D (Structure->Clean 3d->Clean in 3D) and save as pdb. You should and up with a file similar to the one below:

HEADER    PROTEIN                                 03-OCT-10   NONE
TITLE     NULL
COMPND    NULL
SOURCE    NULL
KEYWDS    NULL
EXPDTA    NULL
AUTHOR    Marvin
REVDAT   1   03-OCT-10         0
HETATM    1  C   UNK     0      -0.005  -0.289  -0.297  0.00  0.00           C+0
HETATM    2  C   UNK     0       1.376   0.127   0.237  0.00  0.00           C+0
HETATM    3  O   UNK     0       1.472   1.546   0.257  0.00  0.00           O+0
HETATM    4  H   UNK     0      -0.790   0.115   0.344  0.00  0.00           H+0
HETATM    5  H   UNK     0      -0.090  -1.376  -0.316  0.00  0.00           H+0
HETATM    6  H   UNK     0      -0.143   0.093  -1.310  0.00  0.00           H+0
HETATM    7  H   UNK     0       2.162  -0.279  -0.402  0.00  0.00           H+0
HETATM    8  H   UNK     0       1.517  -0.258   1.249  0.00  0.00           H+0
HETATM    9  H   UNK     0       2.368   1.735   0.604  0.00  0.00           H+0
CONECT    1    2    4    5    6
CONECT    2    3    1    7    8
CONECT    3    2    9
CONECT    4    1
CONECT    5    1
CONECT    6    1
CONECT    7    2
CONECT    8    2
CONECT    9    3
MASTER        0    0    0    0    0    0    0    0    9    0   16    0
END

Use TINKER pdbxyz as before (remember to generate the key file) and you should have now a file like this one:

9  PROTEIN                                 03-OCT-10   NONE
1  C     -0.005000   -0.289000   -0.297000     0     2     4     5     6
2  C      1.376000    0.127000    0.237000     0     1     3     7     8
3  O      1.472000    1.546000    0.257000     0     2     9
4  H     -0.790000    0.115000    0.344000     0     1
5  H     -0.090000   -1.376000   -0.316000     0     1
6  H     -0.143000    0.093000   -1.310000     0     1
7  H      2.162000   -0.279000   -0.402000     0     2
8  H      1.517000   -0.258000    1.249000     0     2
9  H      2.368000    1.735000    0.604000     0     3

Again the structure is correct, but the atom types have not be assigned.

Assigning atom types

In the first part of this tutorial, you have seen how generate TINKER xyz using two different and quite flexible methods. What is missing at this stage are the atom types. Atom types are "labels" used in any force field to label an atom depending of its nature (e.g. a carbon, an hydrogen, a nitrogen, etc.) and its chemical environment (e.g., a carbon sp2, sp3, a carbon in a carbonyl or in a ester group, etc.). Labels are different from one force field to another, so it is difficult to develop a program able to assign atom types in an accurate way for all the possible molecules and force fields. Molden, for example, can be used to assign TINKER MM3, Amber, Charmm and Amoeba atom types in a quite accurate way. Also, you can interactively assign atom types if something is missing or wrong. To do this open the TINKER XYZ file with moleden and press the FF icon. A new window called Atom Attribute Windows should pop out: click on Tinker MM3 button to open a selection
menu, choose Tinker MM3. You can display the atom type assigned using the label Force F.Type in the main control window.
If everything went ok, you can save the structure clicking on Write button and choosing TINKER as format. Below is a comparison of the MOLDEN output with the example molecule in TINKER:

**** Original TINKER example ****
9  Ethanol
    1  C     -0.231579   -0.350841   -0.037475     1     2     4     5     6
    2  C      0.229441    0.373160    1.224850     1     1     3     7     8
    3  O      0.868228   -0.551628    2.114423     6     2     9
    4  H      0.619613   -0.833754   -0.565710     5     1
    5  H     -0.709445    0.352087   -0.754607     5     1
    6  H     -0.976393   -1.144198    0.191635     5     1
    7  H     -0.628785    0.860022    1.736350     5     2
    8  H      0.952253    1.174538    0.962081     5     2
    9  H      0.204846   -1.119563    2.483509    21     3

**** From MOLDEN ****
         9  molden generated tinker .xyz (mm3 param.)
1  C    -0.005000   -0.289000   -0.297000      1  2  4  5  6
2  C     1.376000    0.127000    0.237000      1  1  3  7  8
3  O     1.472000    1.546000    0.257000      6  2  9
4  H    -0.790000    0.115000    0.344000      5  1
5  H    -0.090000   -1.376000   -0.316000      5  1
6  H    -0.143000    0.093000   -1.310000      5  1
7  H     2.162000   -0.279000   -0.402000      5  2
8  H     1.517000   -0.258000    1.249000      5  2
9  H     2.368000    1.735000    0.604000     21  3

If you work with other force fields and/or you do not have molden, you have to assign the atom types manually. In the tinker/params directory are stored the TINKER force fields in a human readable format. For example, if you edit the mm3.prm file you will find at the beginning the atom type definition:

      #############################
      ##                                                       ##
      ##  Atom Type Definitions                       ##
      ##                                                      ##
      #############################

atom          1    C     "CSP3 ALKANE"                  6    12.000    4
atom          2    C     "CSP2 ALKENE"                  6    12.000    3
atom          3    C     "CSP2 CARBONYL"                6    12.000    3
atom          4    C     "CSP ALKYNE"                   6    12.000    2
atom          5    H     "EXCEPT ON N,O,S"              1     1.008    1
atom          6    O     "C-O-H, C-O-C, O-O"            8    15.995    2
atom          7    O     "O=C CARBONYL"                 8    15.995    1
atom          8    N     "NSP3"                         7    14.003    3
atom          9    N     "NSP2"                         7    14.003    3
atom         10    N     "NSP"                          7    14.003    1
atom         11    F     "FLUORIDE"                     9    18.998    1
....

This part of the force field describe the atom types (second column) as function of the atom symbol (3rd column), a description of the atomic chemical environment (4th column), atomic number and mass (5th and 6th column) and number of bonds formed with other atoms (7th column). This should allow you to determine which atom type you should assign to each atom in your structure. Please note that other force fields may have a different way to define the atom types, but for all of them you will find a similar table in the file.

The theory behind the assignment of the atom types is a vast and complex and cannot be covered deeply in this practical tutorial, in particular because it strongly depend by the nature of the system to model.
Some practical example will given in the next part of the tutorial.

Complex structures.

In this part of the tutorial you will see how you can build more complex structures, such as polymers, liquids, surfaces and crystals.

Polyethylene oxide (PEO)

In the first part of the tutorial, we saw how to build a simple molecule using SMILES string. This is a also a convenient way to build polymers (even though the conversion can be a slow depending to the size of the polymer). The corresponding polymer to the ethanol is the polyethylene oxide. The monomer is -CH2CH2O- and its SMILES can be CCO or C([H])([H])C([H])([H])O.
A ten monomers polymer can have the following SMILES strings:

CCOCCOCCOCCOCCOCCOCCOCCOCCOCCO

or, making explicit the hydrogen atoms:

[H]C([H])([H])C([H])([H])OC([H])([H])C([H])([H])OC([H])([H])C([H])([H])OC([H])([H])C([H])([H])OC([H])([H])C([H])([H])O
C([H])([H])C([H])([H])OC([H])([H])C([H])([H])OC([H])([H])C([H])([H])OC([H])([H])C([H])([H])OC([H])([H])C([H])([H])O[H]

It is that simple. The difference between explicit the hydrogens or not is that having all the hydrogens at the end makes really difficult the assignment of the atom types. The bottom line is that if you are going to build a polymer, you should explicit the hydrogens, as in the example above. Now you have a molecule of 72 atoms, and babel can be a bit too slow, so, if you have installed MarvinBeans, you can use molconvert to generate the pdb file and pdbxyz to get the TINKER XYZ file:

[user@desktop]$ molconvert -3 pdb peo.smiles -o peo.pdb
[user@desktop]$ pdbxyz peo.pdb -k peo.key

Obtaining something like (here just the beginning of the file is displayed)

72  PROTEIN                                 03-OCT-10   NONE
 1  H     -2.826000    4.899000   -0.068000     0     2
 2  C     -2.700000    3.817000   -0.155000     0     1     3     4     5
 3  H     -2.979000    3.508000   -1.165000     0     2
 4  H     -3.359000    3.324000    0.562000     0     2
 5  C     -1.239000    3.426000    0.125000     0     2     6     7     8
 6  H     -0.589000    3.932000   -0.597000     0     5
 7  H     -0.971000    3.747000    1.137000     0     5
 8  O     -1.135000    1.996000   -0.004000     0     5     9
 9  C      0.183000    1.483000    0.231000     0     8    10    11    12
10  H      0.510000    1.720000    1.247000     0     9
11  H      0.892000    1.905000   -0.486000     0     9
12  C      0.160000   -0.046000    0.064000     0     9    13    14    15
...

Again the atom types are not assigned. Molden can still be used to generate the proper atom types:

        72  molden generated tinker .xyz (mm3 param.)
 1  H    -2.826000    4.899000   -0.068000      5   2
 2  C    -2.700000    3.817000   -0.155000      1   1   3   4   5
 3  H    -2.979000    3.508000   -1.165000      5   2
 4  H    -3.359000    3.324000    0.562000      5   2
 5  C    -1.239000    3.426000    0.125000      1   2   6   7   8
 6  H    -0.589000    3.932000   -0.597000      5   5
 7  H    -0.971000    3.747000    1.137000      5   5
 8  O    -1.135000    1.996000   -0.004000      6   5   9
 9  C     0.183000    1.483000    0.231000      1   8  10  11  12
10  H     0.510000    1.720000    1.247000      5   9
11  H     0.892000    1.905000   -0.486000      5   9
12  C     0.160000   -0.046000    0.064000      1   9  13  14  15
...

An easier and faster way to build is to use the freeware python script YASC polybuild
which use this approach to generate polymers. A library is used to read the structure of the monomer only and the atom types for the atoms that are in the monomer. The library can be extended by the user to handle new polymers. Tacticity is also taken into account, allowing to build isotactic, syndiotactic and atactic (with different statistics) polymers.

Liquid boxes

To generate a solvent box of homogenous liquids all you need to have is the structure of a single solvent molecules, preferably with the proper atom types already assigned. If you are interested in building a solvent box at the right density, and you do know the volume of your box, use YASC vol2mol to know the number of molecules you should have in your box. Once you know how many molecules you need, use TINKER xyzedit to build the solvent box. Let's work with the ethanol molecule we built before.
The density of liquid ethanol is 0.789g/cm^3 and the mass of the ethanol is about 46g/mol. Let's suppose to work with a cubic box with side of 20 Angstroms: the volume is then 8000e-24 cm^3. To know the number of molecules you have to put in the box to match the experimental density use vol2mol as following:

[user@desktop]$ vol2mol -rho 0.789 -mass 46 -vol 8000e-24

The answer is 83 molecules. Now use TINKER xyzedit to build hte box:

[user@desktop]$ xyzedit ethanol.xyz -k ethanol.key

The following menu is prompted:

The XYZ Coordinate Editing Facility can Provide :

   (1) Offset the Numbers of the Current Atoms
   (2) Deletion of Individual Specified Atoms
   (3) Deletion of Specified Types of Atoms
   (4) Deletion of Atoms outside Cutoff Range
   (5) Insertion of Individual Specified Atoms
   (6) Replace Old Atom Type with a New Type
   (7) Assign Connectivities based on Distance
   (8) Convert Units from Bohrs to Angstroms
   (9) Invert thru Origin to give Mirror Image
  (10) Translate All Atoms by an X,Y,Z-Vector
  (11) Translate Center of Mass to the Origin
  (12) Translate a Specified Atom to the Origin
  (13) Translate and Rotate to Inertial Frame
  (14) Move to Specified Rigid Body Coordinates
  (15) Move Stray Molecules into Periodic Box
  (16) Create and Fill a Periodic Boundary Box
  (17) Soak Current Molecule in Box of Solvent
  (18) Append a Second XYZ file to Current One

Number of the Desired Choice [<CR>=Exit] :

Answer at the many questions like that:

Number of the Desired Choice [<CR>=Exit] :  16

Enter Number of Molecules in Box :  83

Enter Periodic Box Dimensions (X,Y,Z) :  20 20 20

New Coordinates written to :  ethanol.xyz_2

The solvent box is written in ethanol.xyz_2; you should rename this file in a more meaningfull way, like box20x20x20.xyz. The solvent box looks like:

747  molden generated tinker .xyz (mm3 param.)
  1  C     10.310211   16.406593   13.127559     1     2     4     5     6
  2  C     11.691211   16.822593   13.661559     1     1     3     7     8
  3  O     11.787211   18.241593   13.681559     6     2     9
  4  H      9.525211   16.810593   13.768559     5     1
  5  H     10.225211   15.319593   13.108559     5     1
  6  H     10.172211   16.788593   12.114559     5     1
  7  H     12.477211   16.416593   13.022559     5     2
  8  H     11.832211   16.437593   14.673559     5     2
  9  H     12.683211   18.430593   14.028559    21     3
...

and you can visualize it with molden. As you can see, the original atom types are maintaining for all the molecules.

Graphite slabs and carbon nanotubes

In this part we will see how to build rectangular slabs of graphite and carbon nanotubes. In both cases, let's use the python script YASC buildCstruct to build the systems and YASC fixtnkatypes to assign the atom types.

To build a periodic graphite slab of 100x100 angstrom, just do:

[user@desktop]$ buildCstrunc -s hopg -g 100 100 -p temp.xyz >graph100x100.README

The README file should look like:

HOPG graphite: a=  100.82  b=  102.06975409
Periodic (if apply) (ang): a=  102.24  b=  103.299510163
Atoms:  4032

showing the actual size of the surface (to be used in the TINKER key file to properly set the size of the periodic box) and the number of atoms. Now, to fix the atom types (50 for the MM3 force field) run fixtnkatypes:

[user@desktop]$ fixtnkatypes -a 50 -r 1 4032 -o grap100x100.xyz temp.xyz

This is for one slab. Now, we want to simulate the surface using three slab of graphite, therefore we will use TINKER xyzedit to merge and shift the slab three times:

[user@desktop]$ xyzedit graph100x100.xyz -k graph100x100.key

and this time we will use the combination of option 10 and 18 (remember to press enter after each command) shown below:

 Number of the Desired Choice [<CR>=Exit] :  10

 Enter Translation Vector Components :  1.42 0 3.5

 Number of the Desired Choice [<CR>=Exit] :  18

 Enter Cartesian Coordinate File Name :  grap100x100.xyz

 Number of the Desired Choice [<CR>=Exit] :  10

 Enter Translation Vector Components :  -1.42 0 3.5

 Number of the Desired Choice [<CR>=Exit] :  18

 Enter Cartesian Coordinate File Name :  grap100x100.xyz

 Number of the Desired Choice [<CR>=Exit] :  

 New Coordinates written to File :  grap100x100.xyz_2

First, we shift the slab along X of 1.42 Angstroms and along Z of 3.5 (this is the distance between the parallel slabs of graphite). Then we merge the shifted slab with the original one, still saved in graph100x100.xyz. Now, in memory we have two slabs merged together. We shift those two of -1.42 Angstroms along X and, again, of 3.5 along Z and merge them with the original slab. Now in memory there are three slabs. Press Enter to save the structure in graph100x100.xyz_2 and rename it using a meaningful name.

With buildCstruct, you can build infinite (periodic) armchair (n,n) and zigzag (n,0) single walled nanotube (SWNT):

[user@desktop]$ buildCstruct -s armcnt/zigzagcnt -g n l temp.xyz >buildCstruct.log

where n and l are the index n for the nanotube and l is its length. Again, atom types can be fixed using fixtnkatypes as before.

A multiwalled nanotube (MWNT) can be built merging together with xyzedit the different nanotubes generated as SWNT using buildCstruct. BuildCstruct can build non-periodic structures too: in this case hydrogens will be added at the edges of the structures. Also note that chiral (n,m) and capped nanotubes cannot be built using this program.

Molecules on surface

A bare surface is not that interesting: usually you want to make some molecules interact with it. There are two ways to do this: either use (i) TINKER xyzedit or (ii) VMD. As example, let's take the ethanol molecule and the graphite surface build before. If you do use TINKER xyzedit, generate new coordinates using one of the following options to make the coordinates of the two molecules "compatible":

(11) Translate Center of Mass to the Origin
(12) Translate a Specified Atom to the Origin

Then, you can shift and merge the two new molecules obtained before. If you use VMD, you can load the two structures and move one molecule with respect to the other in the desired position. This way is easier than using xyzedit, as soon as you do not have to build a system with high precision. Once you have moved the molecule in the new position, save its coordinates as XYZ and use YASC modtnkxyz to create the TINKER XYZ structure (keeping the atom types of the original structure). Move the ethanol molecule close to the surface and save its coordinates as temp.xyz. Now use modtnkxyz as following:

[user@desktop]$ modtnkxyz temp.xyz ethanol.xyz newxyz_ethanol.xyz

newxyz_ethanol.xyz is the molecules you should use with xyzedit to merge with the surface, as shown earlier in this tutorial.

Comments

Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +

Index >> next
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License