-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Viscosity examples #62
base: develop
Are you sure you want to change the base?
Conversation
corrected
modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR @cesaremalosso! Very neat. 👍
Here a couple of requests to finalize it.
examples/06_example_cepstrum_viscosity_h2o.ipynb
- To be consistent with the other examples, could you please use the
i_o
module to load the data file? Like this:
- To be consistent with the other examples, could you please use the
jfile = st.i_o.TableFile('./data/h2o/h2o.dat')
jfile.read_datalines()
DT_FS = 1 # time step [fs]
TEMPERATURE = np.mean(jfile.data['Temp']) # temperature [K] (983.173 K)
VOLUME = 1918.4149658 # volume [A^3]
print(DT_FS, TEMPERATURE, VOLUME)
j = st.StressCurrent(np.column_stack([jfile.data['s_xy'], jfile.data['s_xz'], jfile.data['s_yz']]),
UNITS='real', DT_FS=DT_FS, TEMPERATURE=TEMPERATURE, VOLUME=VOLUME)
- There is a typo in the first line of
examples/data/h2o/lammps/h2o.in
. It should be:
Temp s_xy s_xz s_yz
- Could you also try to setup a test? For reference, to see how it works, you can check the silica case in test_notebooks.py (you will need to add a function in that file, and the results of cepstral analysis in the
tests/test_notebook
folder. - If you feel brave, you could even setup another test alongside those in test_as_example.py. But I can help you out on this!
@@ -10,7 +10,8 @@ The `data` folder contains the trajectories, obtained from classical NVE molecul | |||
These examples show how to use the `sportran` package in a Python script, step by step, to analyse a time series and perform cepstral analysis. Some of the tools and plot functions of the code are presented. | |||
|
|||
* [01 - Silica (single component)](01_example_cepstrum_singlecomp_silica.ipynb): analysis of solid amorphous silica, a one-component system. | |||
* [02 - Liquid NaCl (multi-component)](02_example_cepstrum_doublecomp_NaCl.ipynb): analysis of molten NaCl, a two-component system. | |||
* [02 - Liquid NaCl (multi-)](02_example_cepstrum_doublecomp_NaCl.ipynb): analysis of molten NaCl, a two-component system. | |||
* [06 - Liquid h2o (viscosity)](06_example_cesptrum_viscosity_h2o.ipynb) : computation of the shear viscosity of liquid water. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* [06 - Liquid h2o (viscosity)](06_example_cesptrum_viscosity_h2o.ipynb) : computation of the shear viscosity of liquid water. | |
* [06 - Liquid H2O (viscosity)](06_example_cesptrum_viscosity_h2o.ipynb) : computation of the shear viscosity of liquid water. |
@@ -10,7 +10,8 @@ The `data` folder contains the trajectories, obtained from classical NVE molecul | |||
These examples show how to use the `sportran` package in a Python script, step by step, to analyse a time series and perform cepstral analysis. Some of the tools and plot functions of the code are presented. | |||
|
|||
* [01 - Silica (single component)](01_example_cepstrum_singlecomp_silica.ipynb): analysis of solid amorphous silica, a one-component system. | |||
* [02 - Liquid NaCl (multi-component)](02_example_cepstrum_doublecomp_NaCl.ipynb): analysis of molten NaCl, a two-component system. | |||
* [02 - Liquid NaCl (multi-)](02_example_cepstrum_doublecomp_NaCl.ipynb): analysis of molten NaCl, a two-component system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* [02 - Liquid NaCl (multi-)](02_example_cepstrum_doublecomp_NaCl.ipynb): analysis of molten NaCl, a two-component system. | |
* [02 - Liquid NaCl (multi-component)](02_example_cepstrum_doublecomp_NaCl.ipynb): analysis of molten NaCl, a two-component system. |
|
||
####################################### | ||
### Read Structure | ||
####################################### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the lines
#######################################
### Read Structure
#######################################
or move read_data "h2o_64.init"
under it, if it works for LAMMPS.
######################################################################### | ||
|
||
thermo ${thermo_print_interval} | ||
thermo_style custom temp c_thermo_press[4] c_thermo_press[5] c_thermo_press[6] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see where you defined a compute thermo_press
. Maybe that line got lost?
Added examples for the computation of viscosity