Skip to content

Commit

Permalink
update best practice
Browse files Browse the repository at this point in the history
  • Loading branch information
simongravelle committed Jan 21, 2024
1 parent 892245c commit 3e136b0
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 95 deletions.
6 changes: 6 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#!/bin/bash

cd references/
python3 filter-reference.py
cd ..

make clean
make html
76 changes: 0 additions & 76 deletions docs/references/filter-reference.ipynb

This file was deleted.

30 changes: 30 additions & 0 deletions docs/references/filter-reference.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python
# coding: utf-8

zotero_file = open("from-zotero.bib", "r")
cleaned_file = open("../source/references.bib", "w")

for line in zotero_file:

if "journaltitle =" in line:
line = line.replace("journaltitle", "journal")

if ("date =" in line) & (("urldate =" not in line)):
if "-" in line:
year = line.split("-")[0].split("{")[1]
else:
year = line.split("}")[0].split("{")[1]
assert len(year) == 4
line = " year = {"+year+"},\n"

if ("shortjournal =" not in line) & \
("keywords =" not in line) & \
("abstract =" not in line) & \
("urldate =" not in line) & \
("langid =" not in line) & \
("file =" not in line):

cleaned_file.write(line)

zotero_file.close()
cleaned_file.close()
26 changes: 26 additions & 0 deletions docs/references/from-zotero.bib
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ @article{aidasQuantumMechanicsMolecular2013
file = {/home/simon/snap/zotero-snap/common/Zotero/storage/WIEB8525/Aidas et al. - 2013 - A quantum mechanicsmolecular dynamics study of el.pdf}
}

@book{allenComputerSimulationLiquids2017,
title = {Computer Simulation of Liquids},
author = {Allen, M. P. and Tildesley, D. J.},
date = {2017},
edition = {Second edition},
publisher = {{Oxford University Press}},
location = {{Oxford, United Kingdom}},
isbn = {978-0-19-880319-5 978-0-19-880320-1},
pagetotal = {626},
keywords = {Data processing,Liquids,Mathematical models,Molecular dynamics,Monte Carlo method}
}

@article{amayuelasMechanismWaterIntrusion2023,
title = {Mechanism of {{Water Intrusion}} into {{Flexible ZIF-8}}: {{Liquid Is Not Vapor}}},
shorttitle = {Mechanism of {{Water Intrusion}} into {{Flexible ZIF-8}}},
Expand Down Expand Up @@ -1091,6 +1103,20 @@ @article{frauxStructureDynamicsThermodynamics2019
file = {/home/simon/snap/zotero-snap/common/Zotero/storage/SKTCJED5/Fraux et al. - 2019 - Structure, Dynamics, and Thermodynamics of Intrude.pdf}
}

@book{frenkelUnderstandingMolecularSimulation2002,
title = {Understanding Molecular Simulation: From Algorithms to Applications},
shorttitle = {Understanding Molecular Simulation},
author = {Frenkel, Daan and Smit, Berend},
date = {2002},
series = {Computational Science Series},
edition = {2nd ed},
number = {Volume 1},
publisher = {{Academic press}},
location = {{San Diego}},
isbn = {978-0-12-267351-1},
langid = {english}
}

@article{friesMonteCarloCalculation1983,
title = {Monte {{Carlo}} Calculation of the Intermolecular Dipolar Spin Relaxation in a Liquid Solution},
author = {Fries, P. H. and Belorizky, E.},
Expand Down
24 changes: 24 additions & 0 deletions docs/source/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ @article{aidasQuantumMechanicsMolecular2013
url = {http://xlink.rsc.org/?DOI=C2CP41993A},
}

@book{allenComputerSimulationLiquids2017,
title = {Computer Simulation of Liquids},
author = {Allen, M. P. and Tildesley, D. J.},
year = {2017},
edition = {Second edition},
publisher = {{Oxford University Press}},
location = {{Oxford, United Kingdom}},
isbn = {978-0-19-880319-5 978-0-19-880320-1},
pagetotal = {626},
}

@article{amayuelasMechanismWaterIntrusion2023,
title = {Mechanism of {{Water Intrusion}} into {{Flexible ZIF-8}}: {{Liquid Is Not Vapor}}},
shorttitle = {Mechanism of {{Water Intrusion}} into {{Flexible ZIF-8}}},
Expand Down Expand Up @@ -784,6 +795,19 @@ @article{frauxStructureDynamicsThermodynamics2019
url = {https://pubs.acs.org/doi/10.1021/acs.jpcc.9b02718},
}

@book{frenkelUnderstandingMolecularSimulation2002,
title = {Understanding Molecular Simulation: From Algorithms to Applications},
shorttitle = {Understanding Molecular Simulation},
author = {Frenkel, Daan and Smit, Berend},
year = {2002},
series = {Computational Science Series},
edition = {2nd ed},
number = {Volume 1},
publisher = {{Academic press}},
location = {{San Diego}},
isbn = {978-0-12-267351-1},
}

@article{friesMonteCarloCalculation1983,
title = {Monte {{Carlo}} Calculation of the Intermolecular Dipolar Spin Relaxation in a Liquid Solution},
author = {Fries, P. H. and Belorizky, E.},
Expand Down
30 changes: 21 additions & 9 deletions docs/source/theory/best-practice.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Best practice
=============

Choosing the force field
------------------------
Choosing the right force field
------------------------------

.. container:: justify

Expand All @@ -14,12 +14,12 @@ Choosing the force field
it is important to keep in mind that force fields are often parametrized
to reproduce thermodynamic quantities, such as solvation energy.
However, NMR relaxation times depend on both structural
and dynamical quantities, differences between experiments
and simulations can be expected for the less accurate force field.
and dynamical quantities, and large differences between experiments
and simulations are expected for poorly accurate force fields.

.. container:: justify

Here, as an illustration, the NMR relaxation time :math:`T_1`
As an illustration, the NMR relaxation time :math:`T_1`
of bulk water was measured as a function of the temperature
for three different water models:
:math:`\text{TIP4P}-\epsilon` :cite:`fuentes-azcatlNonPolarizableForceField2014`,
Expand Down Expand Up @@ -61,10 +61,22 @@ Simulation accuracy

.. container:: justify

Since NMR relaxation rate measurements are sensitive both thermodynamic and dynamic quantities,
it is important to ensure the accuracy of the simulation.
For instance, the cut-off for the Lennard-Jones (LJ) interaction has a slight impact
on the value of the inter-molecular :math:`T_1^\text{inter}` :cite:`gravelleNMRInvestigationWater2023`.
NMR relaxation measurements are sensitive both thermodynamic and dynamic quantities,
and it is therefore important to ensure the accuracy of the molecular simulation.
Several parameters are known to affect the accuracy of the simulations,
such as the force field (as discussed previously), the time step, the cut-offs,
or the sampling time :math:`frenkelUnderstandingMolecularSimulation2002, allenComputerSimulationLiquids2017`.

.. container:: justify

As an illustration, the NMR relaxation time :math:`T_1`
of bulk water was measured as a function of the LJ cut-off.
Our results show that, for the smallest cut-off,
the inter-molecular :math:`T_1^\text{inter}` is slightly
under-estimated, which is mainly due to an over-estimation
of the inter-molecular characteristic time :math:`\tau_\text{inter}`.
These observations are consistent
with previous measurements :cite:`gravelleNMRInvestigationWater2023`.

.. image:: ../figures/illustrations/bulk-water/effect_cutoff-dark.png
:class: only-dark
Expand Down
15 changes: 5 additions & 10 deletions docs/source/theory/context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Context
water and other small molecules :cite:`lippensT1RelaxationTime1993, calero1HNuclearSpin2015, singerMolecularDynamicsSimulations2017, singerNMRSpinrotationRelaxation2018, philipsProtonNMRRelaxation2019, singerElucidatingNMRRelaxation2020`.
MDS are also used to study the NMR relaxation properties of molecules confined within
nanoporous materials :cite:`khudozhitkovDynamicsPropenePropane2020, gravelleNMRInvestigationWater2023`,
as well as large polymer molecules, lipid membranes, and proteins.
as well as large polymer molecules, lipid membranes, proteins,
or glass transition phenomenon of glycerol :cite:`becherMolecularDynamicsSimulations2021`.

.. container:: justify

Expand All @@ -31,13 +32,7 @@ Context
:cite:`philipsQuadrupolarNMRRelaxation2020, chubakNMRRelaxationRates2021`,
which is beyond the scope of the present contribution.
Monte carlo simulations have also been used :cite:`friesMonteCarloCalculation1983`,
although in that case some care must be taken to extract time dependant quantities
although, in that case, some care must be taken to extract time-dependant quantities
such as autocorrelation functions :cite:`huitemaCanMonteCarlo1999`. Recently,
the possibility to calculate NMR relaxation rate from coarse grained models was also
discussed :cite:`gravelleAssessingValidityNMR2023`.

.. container:: justify

Authors have also directly combined simulations and experiments, for instance to study
glass transition phenomenon of glycerol :cite:`becherMolecularDynamicsSimulations2021`,
water confined within salt crusts :cite:`gravelleNMRInvestigationWater2023`
the possibility to calculate NMR relaxation rate from coarse grained models
whose atomic details were reconstructed a posteriori was demonstrated :cite:`gravelleAssessingValidityNMR2023`.

0 comments on commit 3e136b0

Please sign in to comment.