-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the pyRISM wiki!
The wiki will show you how to install, use and set up a minimal workflow for RISM calculations with pyRISM.
Clone the repository:
git clone https://github.com/2AUK/pyRISM.git
Then cd
into the cloned directory and build the code:
pip install -r requirements.txt .
Or if you want to install it in development mode:
pip install -r requirements.txt -e .
pyRISM can be used as a CLI tool with the command pyrism
:
pyRISM [INPUT.toml] -w [all|duv]
pyRISM will silently run a calculation. Passing all
to the -w
flag will output all results from pyRISM (the solvent-solvent and solute-solute correlation functions and the solvation free energy density).
-w duv
only outputs the solvation free energy density.
If you want pyRISM to output some system and iteration information, the verbosity flag can be be passed as such:
pyRISM [INPUT.toml] -v -w [all|duv]
Currently, the API for pyRISM is very minimal (this will change in the future). A simple calculation can be run from a python script as such:
from pyrism import RismController
mol = RismController("input.toml")
mol.initialise_controller()
mol.do_rism() # or mol.do_rism(verbose=True) if you want system and iteration information
mol.write_output() # or mol.write_output(duv_only=True) if you only want to output the solvation free energy density
Once the RISM problem as been solved, the converged solutions can be accessed with the data_vv
and data_uv
(if a solute-solvent problem was defined) fields:
mol.data_vv.c # the direct correlation function for the solvent-solvent problem
mol.data_uv.t # the indirect correlation function for the solute-solvent problem (if available)
The following fields are available to the data_vv
and data_uv
classes:
Field | Meaning |
---|---|
data_vv.c | Direct Correlation Function |
data_vv.t | Indirect Correlation Function |
data_vv.h | Total Correlation Function |
data_vv.g | Radial Distribution Function |
data_vv.w | Intramolecular Correlation Function |
data_vv.p | Densities Matrix (not available for data_uv due to infinite dilution approximation) |
data_vv.u | Total Potential Energy |
data_vv.u_sr | Short-range Potential Energy |
data_vv.ur_lr | Long-range Potential Energy in Real Space |
data_vv.uk_lr | Long-range Potential Energy in Fourier Space |
data_vv.B | Thermodynamic Beta |
data_vv.grid.npts | Number of Point on Grid |
data_vv.grid.radius | Radius over which RISM problem is solved (in Angstroms) |
data_vv.grid.ri | Real Space Grid (npts in size) |
data_vv.grid.ki | Fourier Space Grid (npts in size) |
data_vv.grid.d_r | Real Space Grid Spacing |
data_vv.grid.d_k | Fourier Space Grid Spacing |