This project is a lightweight Python plugin for psi4 package for automated reading, parsing, conversion and basic molecular operations on chemical formats, including xyz, mol, cif and SMILES.
The tool enables some standalone transformations of molecules, including adding explicit hydrogens, mutating atoms/bonds and getting basical chemical properties (like molar mass or total charge), and parsing between the above file formats. It also allows for interactive molecule visualisations in Jupyter notebooks.
To use the tool, you need to have Conda installed (Miniconda is completely sufficient). Then simply run:
cd PsiMol
conda env create -f environment.yml
conda activate psimol-env
pip install .PsiMol can be simply imported within Python scripts. Example:
import psimol
molecule = psimol.Molecule.from_xyz('file_path')
molecule.add_hydrogens()
print(molecule.molar_mass)For more examples of PsiMol usage, see psimol/tutorial.ipynb notebook.
PsiMol is also available as a command-line tool with multiple functionalities. Example:
psimol add_hydrogens -i file -o file_with_H --format xyzThe source for PsiMol's documentation, written with MkDocs, is available under docs.
A pre-generated copy of the documentation is available under docs/site.
The pre-generated copy of the documentation should be up to date with the documentation source, but you may rebuild documentation with the following commands:
pip install mkdocstrings-python
cd PsiMol
mkdocs build --clean --no-directory-urls -f docs/mkdocs.yml