Various ways to analyze and visualize solvation shell structures, which wraps PyVista
. Meant primarily for analyzing the outputs produced by LAMMPS here.
You can install solvis
from PyPI like so:
pip install solvis-tools
We use micromamba
as the package manager, but feel free to use your own poison. Create and activate the environment.
micromamba create -f environment.yml
micromamba activate solvisenv
In order to install the code, run the following in the top-level directory:
pip install -e .
Each example is self-contained. Mostly, they show how to handle interactive plotting. To close the interactive window, press q.
To run tests (which are inside the tests
directory), written with pytest
, run the following command from the top-level directory:
pytest -v
In order to debug tests using pdb
, you can write the command breakpoint()
inside the Python
files (in tests
) wherever you want to set a breakpoint. Then, run pytest --pdb
. This will stop the code at the line where you put the breakpoint()
command.
To see more verbose output from pytest
, including tests that pass, you can run pytest -rA
.
Note that test_hydrogen_bond.py
and test_plot_octahedral_shell.py
actually compare the results of images created for a single hydrogen bond and for an octahedral shell showing hydrogen bonds formed by the acceptor seventh molecule, respectively. The images compared against are present in the top-level image_cache_dir
directory.
To view a coverage report, run the following from the top-level directory:
pytest --cov=solvis tests/