::A Python script to calculate
This repository contains a Jupyter Notebook (f3.ipynb
) that calculates the
The pyf4
.
The
where f3.ipynb
notebook.
The value of
-
$F_3 \approx 0$ : Complete ice or hydrate structure -
$F_3 \approx 0.1$ : Liquid water
Since the
You can see the raw |
Rolling average plot (blue line) clearly shows the phase transition of water molecules from liquid-like to hydrate-like structure. |
- Calculates the
$F_3$ order parameter for each frame in a water molecule trajectory - Plots the raw
$F_3$ values over the trajectory frames - Computes and plots a moving average of the
$F_3$ values for smoother visualization
-
Clone the repository to your local machine:
git clone https://github.com/wjgoarxiv/pyf3.git
-
Open
f3.ipynb
in your Jupyter environment. -
Place your water molecule trajectory file (e.g.,
prod_trjconv_SOL.gro
) in thesource_trj
directory. -
Run the 1. Execute this if the
.gro
file has not been segregated section to segregate the trajectory GRO file into separate GRO files (per frame). Check the./segregated/
folder for the segregatedframe_*.gro
files. -
Run the 2. Run and find $F_3$ values per frame section to calculate the
$F_3$ order parameter per frame. The output will look like this:1,0.4389346229676665 2,0.28983631108624514 3,0.3388557641759112 4,0.30041182383830684 5,0.32874678710502075 6,0.37484584539364757 7,0.3465822660775157 8,0.36003490845337816 ...
-
Check the generated CSV file named
frame_f3_values.csv
. -
Run the 3. Plot
$F_3$ - frame graph section to generate plots. You can find the (1) raw plot and (2) rolling average plot. It is recommended to use the rolling average plot for your research, as the raw data might contain outlier values outside the expected$F_3$ values for liquid water, ice, or hydrates.
-
Computer Simulation of the Crystal Growth and Dissolution of Natural Gas Hydrates
-
Molecular characteristics of H2O in hydrate/ice/liquid water mixture
-
A parallel algorithm of F3/F4 order parameters for molecular dynamics
This project is licensed under the MIT License.
Feel free to explore the code and adapt it to your specific needs. If you have any questions or suggestions, please open an issue or contact me.
Thank you for your visit!