-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Decond calculates the decomposed transport quantity of fluid by decomposing the Green-Kubo formula as described in J. Chem. Phys. 141, 044126 (2014). The data for calculating the time correlation functions in the formula are provided by the molecular dynamics simulations (MD).
Decond package consists of two parts:
- A Fortran program (
decond
) that reads in an MD trajectory and outputs the decomposed correlation data. - A Python script (
dec
) that reads in the decomposed correlation and outputs the analysis results.
In addition, several Python scripts that demonstrate how to read and plot the analysis results are included in the python/plot/
directory. Users can create their own plotting scripts based on these examples.
Throughout the wiki, "decond" will refer to the Fortran binary
decond
, while "Decond" will refer to the whole Decond project includingdecond
anddec
.
If one knows Git, one can simply run git clone
to clone the whole repository to the directory where Decond is to be installed. Let's call the directory <Decond>
.
git clone https://github.com/decond/decond.git <Decond>
Or, if Git is not an option, one can download Decond from https://github.com/decond/decond/releases and extract the files to <Decond>
. For example,
wget https://github.com/decond/decond/archive/v0.4.3.tar.gz
tar -zxvf v0.4.3
mv decond-0.4.3/* <Decond>/
Note that
<Decond>
should be replaced with the real directory path that the user chose, such as$HOME/decond
.
One can skip compiling
decond
if onlydec
is needed. On a personal computer, for example, one usually does not rundecond
but may want to analyze the data withdec
.
-
Prepare the dependent libraries
-
Customized XTC library
The source is included at<Decond>/fortran/lib/xdrfile-1.1.4-d
. (Details...) -
Parallel HDF5 library
It may already be available on your system. (Details...) -
FFTW library
It may already be available on your system. (Details...)
-
-
Manually edit the file
<Decond>/fortran/Makefile
to suit your environment (Details...) and compile withmake
cd <Decond>/fortran make
decond
should then be ready to use in the<Decond>/bin
directory.
-
The easiest way is to download and install Anaconda Python Distribution. (Remember to download the Python 3+ version.) Alternatively, one can install Python 3, SciPy, and h5py on one's own. Not an easy task, though.
-
Set the environment variable
PYTHONPATH=<Decond>/python:$PYTHONPATH
so that Decond Python package is searchable in Python. To make it set automatically in the future, add the following line to~/.bashrc
:export PYTHONPATH=<Decond>/python:$PYTHONPATH
-
To use
dec
more conveniently, one can setdec
in thePATH
by adding the following line to~/.bashrc
:export PATH=<Decond>/bin:$PATH
Then
dec
can simply be run bydec -h
-h
means to show the help message ofdec
, which is used simply for testing purposes hereAlternatively, without setting the
PATH
, one should rundec
by its full path<Decond>/bin/dec -h
or if Python 3 is not in the
PATH
,<path/to/python3> <Decond>/bin/dec -h
Before running decond
, one needs to prepare the necessary MD files for input. Currently, decond
supports the trajectory files of .trr
format and any XYZ-compatible trajectory (.xyz
).
- Trajectory
decond
reads GROMACS.trr
file for both positions and velocities. So don't forget to set both nstxout and nstvout when generating trajectories. Please refer to Refs. [1] and [2] for the details of MD procedures.
-
Log file (optional)
decond
reads.log
file just for the system temperature, which will be recorded in the output fordec
to calculate the transport quantity. Optionally, one can choose to input the temperature value manually. -
Topology (optional for monoatomic ionic systems)
decond
reads the topology file for the ion charges and for calculating the center of mass of each ion molecule. If the ionic system only consists of monoatomic ions (e.g. NaCl), one can choose not to use the topology file and manually specify the charges and indexes of ions, instead.If the topology file is "self-content" (without using any
#include
directive), it can be fed todecond
directly. Otherwise, users have to preprocess the topology file withcpp
, first. For example:cpp topology.top topology.cpp.top
It is because
decond
only reads the given topology file stupidly without following any#include
directive. Since it does no harm to preprocess an already "self-content" topology, it may be wise to runcpp
first for all topology files anyhow.cpp
stands for C Preprocessor
When the input MD files are ready, one can start to run decond
. decond
reads in the MD files and outputs the decomposed correlation data.
-
Input
Please read Using decond for details about the input options ofdecond
. -
Output
-
The default output filename of
decond
iscorr.c5
, which can be changed via the-o <filename>
option. Please read Correlation data file (corr.c5) for details about the format ofcorr.c5
. -
decond
also prints information to standard output for users to validate their input data and to estimate the program running time. Please read decond standard output for details.
-
corr.c5
contains the decomposed correlation data, which have to be processed by dec
to give the decomposed physical quantity of interest. The default output name for the resulting processed file is decond.d5
. Please read Processed correlation data file (decond.d5) for the data format of decond.d5
.
One has to use dec
with the five subcommands: new
, add
, fit
, window
, and report
. Except report
, all the other commands essentially read in corr.c5
and/or decond.d5
files and then output new decond.d5
file. Please read Using dec for the usage of each command, or click any of the commands below:
-
dec new
: create a new decond file (decond.d5
) fromcorr.c5
data -
dec add
: add morecorr.c5
data based on an existingdecond.d5
-
dec fit
: change fitting ranges based on an existingdecond.d5
-
dec window
: change binning window based on an existingdecond.d5
-
dec report
: show an overall report ofdecond.d5
to the standard output
The data in decond.d5
can be visualized in several ways.
-
Since
decond.d5
is just an HDF5 file, users can read and manipulate the HDF5 data through any HDF5 tools or programming interfaces (C, C++, Fortran, Java, or Python ... etc.) they like. Thus plot the data with any tool that the users are familiar with. -
If the users are not familiar with HDF5 format, they can choose to use the plotting Python scripts that are included in Decond. Please read Using plotting scripts for details.
Please cite Decond with the following publications:
[1] J. Chem. Phys. 141, 044126 (2014)
[2] J. Chem. Phys. 141, 244507 (2014)