5 Minutes Tutorial¶
System¶
- Obtain the trajectory from the molecular dynamics production run.
Note
Example system : 550 TIP3P water molecules with box length of 25.5 Å * 25.5 Å * 25.5 Å

2. Generate the xyz file (input for the order package) from the trajectory with the atoms (O or center of mass) necessary to calculate the local structure.
Note
This xyz file should include all the water Oxygen atoms and all the other atoms that are cosidered as the closest neighbors. Make sure to follow the following file format for the xyz file. In this example the central Oxygen atoms of water are named as “OW”.
Line #1 : Number of atoms
Line #2 : BoxlenghtX(Space)BoxlenghtY(Space)BoxlenghtZ
Line #3 & onwards : Symbol assigned by the user for the central atom and the other atoms that can be considered as the closest neighbors

3. Commands available in the package
$order [input] [-h] [-t TASK] [-c CENTER] [-b BINS] [-f FREQUENCY] [-p PLOT]
input
File name of the xyz file
-h
Show this help message and exit
-t TASK
Specification of the type of task that you need to perform. TASK can
be oto or tto or avc (default: oto).
If you need to perform multiple tasks simultaneously use a "," to
separate the tasks. (Ex : tto,oto)
-c CENTER
Type of center atom (default: 'O')
(In the example mentioned above the center is 'OW')
-b BINS
Number of bins for the parameter (default: 100)
-f FREQUENCY
Compute the parameter every n frame(s) in the xyz file(default: 1)
-p PLOT
Turn on / off of plotting (default: on)
Orientational Tetrahedral Order (OTO)¶
This is the most common type of tetrahedral ordr paramater that is being used. This order parameter uses the four closest water Oxygen neighbors for the calculation. The value of q can rang from 0 to 1, where 0 is for an ideal gas and 1 is for a regular tetrahedron.
q = Orientational tetrahedral order parameter
ψjk = Angle formed by the Oxygen atom under consideration & the two nearest neighbor atoms j & k
$order test.xyz -t oto -c 'OW' -f 5

Translational Tetrahedral Order (TTO)¶
Similar to orientational tetrahedral order. But here, the variance of the radial distnace between the central water Oxygen atom and the four nearest neighbors are calculated. THe value of Skis close to 1 and quals 1 for the perfect tetrahedron. As the local tetrahedral nature increases, Skbecomes more closer to 1.
Sk = Translational tetrahedral order parameter
rk = Radial distance from the cental Oxygen atom to the k th peripheral closest neighbor
\(\bar{r}\) = Arithmatic mean of the four radial distances
$order test.xyz -t tto -c 'OW' -f 5
You can get the average Skvalue for your system by getting the average value of the raw_data output file.
Average value for Skfor the example is 0.998892128
Asphericity of the Voronoi Cell (AVC)¶
Asphericity parameter (\(\eta\)) can be used to characterize the shape of the Voronoi polyhedron. This value is independent of the size of the polyhedron. The value of \(\eta\) for a perfect sphere the is 1, for ice is 2.25 and for a regular tetrahedron it is 3.31. [Duboué-Dijon2015]
\(\eta\) = Asphericity parameter
A = Area of the polyhedron
V = Volume of the polyhedron
$order test.xyz -t avc -c 'OW' -f 5

[Duboué-Dijon2015] | DOI: 10.1021/acs.jpcb.5b02936 |
API Reference¶
order package¶
Submodules¶
order.XYZ module¶
order.avc module¶
-
class
order.avc.
VoronoiCell
(filename, center, bins=100)¶ Bases:
order.oto.Orientational
asphericity of the Voronoi cell
-
asphericity
(freq=1)¶ compute asphericity of the Voronoi cell
-
compute_vc
(points)¶ compute the Voronoi cell
-
polyhedron
(coords, j, L)¶ find the polyhedron for center molecule
-
wrap_box
(c_coord, coords, L)¶ wrap the simulation box
-
order.lsi module¶
order.order module¶
order.oto module¶
Orientational Tetrahedral Order q¶
-
class
order.oto.
Orientational
(trajectory, center, bins=100)¶ Bases:
object
orientational tetrahedral order parameter
-
four_neighbors
(coords, L)¶ compute four nearest water oxygen neighbors
-
orientational_param
(freq=1)¶ compute orientational order parameter
-
out_put
(taskname='oto', param_name='Q')¶ output raw data and distribution
-
order.plot module¶
order.tto module¶
Translational Tetrahedral Order Sk¶
-
class
order.tto.
Translational
(filename, center, bins=100)¶ Bases:
order.oto.Orientational
translational tetrahedral order parameter
-
translational_param
(freq=1)¶ compute translational order parameter
-
order.util module¶
-
order.util.
cos_angle
(v1, v2)¶ compute the cos angle of two giving vectors
-
order.util.
output_end
(t_start, t_end)¶ print total running time
-
order.util.
output_interface_info
(input_info)¶ print interface task information
-
order.util.
output_ionic_info
(input_info)¶ print ionic conductivity task information
-
order.util.
output_system_info
(filename, n_atoms, n_frames)¶ print system information
-
order.util.
output_task
(name, freq, bins, center)¶ print task information
-
order.util.
output_welcome
()¶ print welcome information
-
order.util.
pbc
(dx, dy, dz, L)¶ periodic boundary conditions
Module contents¶
Order¶
Getting started¶
Installation:¶
$ pip install iorder
or
$ git clone https://github.com/ipudu/order
$ cd order
$ python setup.py install
Running:¶
# calculate bar parmeter for center atom of O
$ order foo.xyz -t bar -c 'O' -f 100 -b 100
Feature Support¶
Order is ready to calculate several geometric order parameters:
- Orientational Tetrahedral Order
- Translational Tetrahedral Order
- Asphericity of the Voronoi Cell
- Ionic Conductivity
- and more
Contributing¶
Contributions to this library are always welcome and highly appreciated.