Classical density functional theory code
Project description
CDFTPY: Python package for performing classical density functional theory calculations for molecular liquids
Marat Valiev and Gennady Chuev
Introduction
Classical Density Functional Theory (CDFT) is a
rigrous theoretical framework that builds statistical mechanics
model of molecular liquid system in terms of its average density.
The cdftpy
python package provides implementation of two CDFT methods -
the Renormalized Site Density Functional Theory (RSDFT) and Reference
Interaction Site Model (RISM). At this stage of development, the code
allows to investigate the problem of ion solvation providing free energy
of solvation and solvent density profiles around the ion.
Running from command line
First steps
Running CDFT calculaton from the command line requires an input file. Simple example of what it may look like for Cl- solvation calculation is given below:
<solute>
#name sigma(A) eps(kj/mol) charge(e)
Cl 4.83 0.05349244 -1.0
Once the input file has been prepared, CDFT calculation can be run
using cdft1d
executable script as shown below
cdft1d <input_file>
In this simple case, RSDFT calculation will be performed using s2
water model. The output will contain solvation free energy as well as peak
analysis of solvent density around the ion, e.g.
....
-----------------------------
Self-consistent cycle
-----------------------------
iter d_g Free Energy
0 4.21e+00 -8.2510119
10 9.02e-01 -195.0800613
20 1.17e-02 -297.0235445
30 2.71e-03 -297.1768922
40 2.87e-06 -296.7840683
41 8.80e-08 -296.7836460
Reached convergence, d_g < 1e-07
Total Free Energy -296.783646
----------------------------------
Solvent density structure analysis
----------------------------------
O 1st peak position/height: 3.13 4.68
O 2nd peak position/height: 5.93 1.38
O 1st min position/height: 4.44 0.54
H 1st peak position/height: 2.16 8.00
H 2nd peak position/height: 4.93 1.29
H 1st min position/height: 3.26 0.37
Single ion solvation calculation with RSDFT flavor of CDFT can be performed as
where example input file for Cl- ion is given by
<solute>
#name sigma(A) eps(kj/mol) charge(e)
Cl 4.83 0.05349244 -1.0
<simulation>
solvent s2
method rsdft
tol 1.0E-7
max_iter 200
output_rate 10
rcoul 1.25
rmax 100
The output will contain solvation free energy as well as peak analysis of solvent density around the ion, e.g.
...
-----------------------------
Self-consistent cycle
-----------------------------
iter d_g Free Energy
0 1.13e+00 -258.8752239
10 4.14e+01 -4839.5648029
20 9.29e-02 -292.7447959
30 1.53e-03 -301.9588939
40 7.17e-05 -301.5734464
50 2.65e-07 -301.5653213
53 9.82e-08 -301.5653695
Reached convergence, d_g < 1e-07
Total Free Energy -301.565369 kj/mol
----------------------------------
Solvent density structure analysis
----------------------------------
O 1st peak position/height: 3.12 4.785
O 2nd peak position/height: 5.91 1.384
O 1st min position/height: 4.43 0.543
H 1st peak position/height: 2.15 8.291
H 2nd peak position/height: 4.92 1.301
H 1st min position/height: 3.24 0.359
The same calculation but with RISM methodology can be run as
cdft1d -m rism INPUT_FILE
Calculation options
There are number options that may be used with cdft1d
. The complete list
of those can be displayed by running
cdft1d --help
The choice of the calculation method, as mentioned earlier, is affected through -m
option, which will default to RSDFT calculation.
The choice of solvent is controlled by -s
option, with default being the s2
model. For example, the use of hcl
solvent can accomplished by
cdft1d -s hcl INPUT_FILE
To examine calculation results in greater detail, we can use -d
option.
Used by itself
cdft1d -d INPUT_FILE
it will open interactive dashboard in the dafault browser, where one can interactively examine solvent density profiles, solute-solvent potential of mean force, and solvent electrostatic potentials. Alternatively, the dashboard can be saved to html file (e.g. analysis.html)
cdft1d -d analysis.html INPUT_FILE
which can be opened at a later point. The content of dashboard will depend on the type of the calculation. For example, for single ion solvation calculation it will look like this and for multiple parameter calculation as this
References
G.N. Chuev, M. V. Fedotova and M. Valiev, Renormalized site density functional theory, J. Stat. Mech. (2021) 033205, https://doi.org/10.1088/1742-5468/abdeb3
G.N. Chuev, M. V. Fedotova and M. Valiev, Chemical bond effects in classical site density functional theory of inhomogeneous molecular liquids. J. Chem Phys. 2020 Jan 31;152(4):041101, https://doi.org/10.1063/1.5139619
M. Valiev and G.N. Chuev, Site density models of inhomogeneous classical molecular liquids, J. Stat. Mech. (2018) 093201, https://doi.org/10.1088/1742-5468/aad6bf
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cdftpy-1.0.0.tar.gz
.
File metadata
- Download URL: cdftpy-1.0.0.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cfdf6987135154515b97703d4a0ede892c669b53f11c97b1650668cace7a0d0 |
|
MD5 | 9cd50104fc8e2ae0433465d1344a96d3 |
|
BLAKE2b-256 | e184282a545bd97f7e9251867141fe0adf66e037cd906ae140b0d90c0431b72d |
File details
Details for the file cdftpy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: cdftpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98731cd54fddcb5b0ebb01e861d1d0d444615cc7e79de4e1d14736121d160bbb |
|
MD5 | 1c5020cf675f78070242c8bbfc16d578 |
|
BLAKE2b-256 | 3922ee427962770ed5852d1d1f982a8b16046999d5925733a90fc33d2c407a31 |