-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0d4a4f
commit 1362761
Showing
10 changed files
with
145 additions
and
97 deletions.
There are no files selected for viewing
Binary file modified
BIN
+26.1 KB
(120%)
docs/source/figures/illustrations/bulk-water/effect_L_on_R1-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+26.2 KB
(120%)
docs/source/figures/illustrations/bulk-water/effect_L_on_R1-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+214 KB
(190%)
docs/source/figures/illustrations/bulk-water/effect_of_anisotropy-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+214 KB
(190%)
docs/source/figures/illustrations/bulk-water/effect_of_anisotropy-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+39.9 KB
(120%)
docs/source/figures/illustrations/bulk-water/water_spectrum-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+39.9 KB
(120%)
docs/source/figures/illustrations/bulk-water/water_spectrum-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions
52
examples/illustrations/bulk-water-tip4p-anisotropic/analysis.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
import numpy as np | ||
import MDAnalysis as mda | ||
import nmrformd | ||
|
||
import sys, os, git | ||
current_path = os.getcwd() | ||
git_repo = git.Repo(current_path, search_parent_directories=True) | ||
git_path = git_repo.git.rev_parse("--show-toplevel") | ||
|
||
sys.path.append(git_path + '/examples/shared/') | ||
from utilities import save_result, measure_N, measure_R1 | ||
|
||
path = "/data/nmrformd-data/bulk-water-tip4p-vs-temperature/raw_data/" | ||
run = True | ||
R1_intra = 1e-5 | ||
R1_inter = 1e-5 | ||
T = 300 | ||
while run: | ||
# Read current status | ||
name_intra = "N4000_intra_T" + str(T) + "K" | ||
name_inter = "N4000_inter_T" + str(T) + "K" | ||
n_intra = measure_N(name_intra) | ||
n_inter = measure_N(name_inter) | ||
# Import MDA universe | ||
datapath = path + "N4000_" + str(T) + "K/" | ||
u = mda.Universe(datapath+"prod.tpr", datapath+"prod.xtc") | ||
hydrogen = u.select_atoms("name HW1 HW2") | ||
n_hydrogen = hydrogen.n_atoms | ||
if n_intra < n_hydrogen: | ||
# Calculated NMR properties | ||
intra = nmrformd.NMR(u, atom_group = hydrogen, | ||
neighbor_group = hydrogen, | ||
type_analysis = "intra_molecular", isotropic=False, | ||
number_i = 1) | ||
save_result(intra, name = name_intra, aniso=True) | ||
if np.random.random() < 0.2: | ||
inter = nmrformd.NMR(u, atom_group = hydrogen, | ||
neighbor_group = hydrogen, | ||
type_analysis = "inter_molecular", isotropic=False, | ||
number_i = 1) | ||
save_result(inter, name = name_inter, aniso=True) | ||
else: | ||
run = False | ||
# Print information | ||
R1_intra = measure_R1(name_intra) | ||
R1_inter = measure_R1(name_inter) | ||
print("T =", T, "K --", n_intra, n_hydrogen, | ||
"R1:", np.round(R1_intra,2), np.round(R1_inter,2), | ||
"T1:", np.round(1/(R1_intra+R1_inter),2)) |
Binary file added
BIN
+313 KB
examples/illustrations/bulk-water-tip4p-anisotropic/raw_data/N4000_inter_T300K.npy
Binary file not shown.
Binary file added
BIN
+313 KB
examples/illustrations/bulk-water-tip4p-anisotropic/raw_data/N4000_intra_T300K.npy
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.