A module to calculate various structural order parameter related to water molecules. This project initiated with the aim to
distinguish between different polymorphs of ice.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
SolOrder is purposed to calculate simple structural property based order parameter of water molecules in MD simulation output. This module is validated for gromacs output files.
Currently it can calculate Four body structural order parameter (
This module uses few optimized modules such as MDAnalysis, pandas, numba, numpy etc. to fast-track the calculation of OPs. They are listed in requirements.txt
file. You can install them using either pip or conda. Like below...
- MDAnalysis
pip install MDAnalysis
You may not need to install the module. Just clone the repository and import them locally. To install the SolOrder module globally you can do either of the following ways .
- Clone the repo
git clone https://github.com/dmighty007/SolOrder.git cd SolOrder python setup.py install
- Or you can install directly from pypi store..
pip install SolOrder
For more examples, please refer to the Documentation
######## Import two classes from the module...
from SolOrder import OrderParameter as OP
from SolOrder import eFingerprint as E
########## Basic modules....
import numpy as np
import MDAnalysis as mda
import seaborn as sns
import matplotlib.pyplot as plt
########## The MDAnalysis universe object...
u = mda.Universe("sH.gro")
u
<Universe with 7344 atoms>
######## Create the object..
obj = OP(u)
########## Dihedral angle distribution...
obj.get_dihedrals()
sns.kdeplot(obj.dihedrals, bw_method = 0.05)
F4 order parameter is a mathematical function of the total number of water molecules and the torsion angle between the O-H bond of two water molecules, such that oxygen atoms of both water molecules have a distance that is less than 0.3 nm. This particular parameter can discriminate between bulk liquid water, ice, and sI crystal. It has a value of -0.4, -0.04, and 0.7 for bulk liquid water, regular ice, and sI hydrate crystals respectively.It is given as..
obj.F4()
sns.kdeplot(obj.f4, bw_method = 0.05)
The below is the most common type of tetrahedral order 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.
obj.OTO()
sns.kdeplot(obj.tetra_orient,bw_method = 0.05)
Similar to orientational tetrahedral order. But here, the variance of the radial distance between the central water oxygen atom and the four nearest neighbors are calculated. THe value of
obj.TTO()
sns.kdeplot(obj.tetra_trans,bw_method = 0.05)
The local-structure-index (LSI) is defined for each molecule i by ordering the
nearest neighbors j according to increasing distance to reference molecule i as
Here
obj.LSI()
sns.kdeplot(obj.lsi,bw_method = 0.05)
obj.MinimumAngle()
sns.kdeplot(np.cos(obj.minAngles),bw_method = 0.05)
Entropy is a global property, hence, to define alocal order parameter, it is projected onto each particle i as :
where
entropy = E(u)
entropy.Entropy()
0%| | 0/1836 [00:00<?, ?it/s]
entropy.localEntropy()
0%| | 0/1836 [00:00<?, ?it/s]
sns.kdeplot(entropy.le, bw_method = 0.05)
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Dibyendu Maity - @MAITYDIBYENDU99 - [email protected]
Project Link: https://github.com/dmighty007/SolOrder
Below are the references, basically from where the ideas and algorithms are taken. We might want to benchmark with their results!!
- Investigating the quasi-liquid layer on ice surfaces: a comparison of order parameters
- Mining of Effective Local Order Parameters to Classify Ice Polymorphs
- Characterization of the Local Structure in Liquid Water by Various Order Parameters
- Simulations of the methane hydrate/methane gas interface near hydrate forming conditions conditions