Orbital viewer for OpenMolcas
Pegamoid is an orbital viewer especially suited for use with OpenMolcas. It can be used to view orbitals and quickly select active spaces for use in CASSCF or RASSCF calculations.
The following formats can be opened:
HDF5 files, as generated by some (Open)Molcas modules like SCF or RASSCF, if compiled with HDF5 support.
InpOrb files, generated by some (Open)Molcas modules like SCF or RASSCF, provided an HDF5 file for the same system was opened first.
Luscus files, generated by the GRID_IT module.
Grid files (ASCII), generated by the GRID_IT module.
Cube files (formatted).
For HDF5, InpOrb and Molden files, orbitals are computed on the fly from the basis set, and it is possible to change the sampling resolution and shape and size of the sampled volume. Luscus, grid and cube files contain precomputed volumetric data and only the existing data can be displayed.
Depending on availability in the input file, the following features and objects are supported:
Selection of orbital.
Selection of spin.
Selection of symmetry irrep.
Natural average or state-specific orbitals.
Electron density and Laplacian.
Natural average or state-specific spin orbitals.
Natural difference orbitals.
Difference, attachment and detachment density.
Natural transition orbitals.
Hole and particle density.
For any orbital or density, gradient lines can be computed and displayed (particularly significant for the electron density). Densities can be computed for reduced subsets of orbitals (for instance, only for the active orbitals), and the user can write arbitrary notes for each orbital.
The value, opacity, colors and texture properties used to display isurfaces can be adjusted and the display of the following elements can be toggled:
Positive and negative parts of the isosurface.
Nuclei and bonds.
Finally, the type of orbital (inactive, active...) can be changed and the orbitals saved in the following formats usable in the (Open)Molcas programs:
or the current volumetric data or snapshot can be saved as:
The recommended way to install Pegamoid is by using the
pip install Pegamoid
(you may also want to add the flags
There are other ways to get Pegamoid. One is cloning the git repository, e.g.
git clone https://gitlab.com/Jellby/Pegamoid.git
Another way, since Pegamoid is contained in a single python script, is downloading only the script file pegamoid.py.
Once the program is fetched, it can be run directly or through a python interpreter, no installation is needed, i.e.
However, the script has some requirements (this should be taken care of by
pip, if you use it) that must be installed for it to work:
Python 2 or python 3 (at least versions 2.7 and 3.4 have been tested).
Qt with python bindings. PyQt 4, PyQt 5 and Pyside have been tested. It is recommended to install the python module qtpy (needed for Pyside).
VTK with python bindings. Version 8.1.0 has been tested, earlier versions will most likely not work.
The numpy and h5py python modules.
Other python modules that may not be installed by default, it should be clear which ones, if any, are needed when trying to run Pegamoid.
Use of scratch disk space
To speed up the display of several orbitals and the computation of densities,
Pegamoid uses some scratch disk space to store the computed basis functions. A
pegamoid.cache will be created in a temporary location (typically
/tmp directory). For grids with many points and with many basis
functions, this file could grow very large and even use up all available disk
space. The maximum scratch size is by default 1 GiB, it can be changed through
the environment variable
for a maximum size of 100 MB. If the scratch size is not enough to hold all basis functions at the current resolution, it will only be used when computing the densities. In the "About" window you can find the instance-specific temporary path, as well as the maximum cache size, the scratch size currently in use, and the recommended size to allow keeping a cache all basis functions. The scratch file and directory are removed on a clean exit, but if the program crashes or is otherwise abnormally interrupted, they may be left behind.
Use with a remote connection
Production calculations are usually not run on the local machine, but on some remote server like a supercomputer. To view/save/modify orbital files, it is always possible to transfer the files between the local and remote machines. It is, however, more convenient to run Pegamoid directly on the remote machine and have the graphical interface display in the local machine. Unfortunately, there are some difficulties that make this nontrivial.
First, the different requirements may not be installed in the remote system. A
possible solution is installing them for the user account with e.g.
pip install --user. In this case it will probably be easier to install qtpy
and Pyside instead of PyQt.
Then, the VTK visualization uses some advanced OpenGL features that may not be
available with all graphical drivers and it could be challenging to make it
work through a remote connection. We have had success running Pegamoid with
vglrun inside a
ThinLinc session, or a VNC
session opened directly from an ssh connection. The specific needs and working
solution will probably depend on the hardware and software available in the
In some systems there are display issues in the 3D window, where some elements are wrongly drawn "on top" of others (this does not refer to the atom names, which are always on top). This problem has been seen with PyQt 5, and it's usually solved by switching to PyQt 4 or installing QtOpenGL support (in the "About" dialog, check if the "Qt API" line says "with QtOpenGL").
Issues with the "Transform" and "Texture" windows not appearing have also been reported in some PyQt 4 versions. It is unclear at the moment what is the reason for this.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|Pegamoid-2.2.1-py2-none-any.whl (59.2 kB) Copy SHA256 hash SHA256||Wheel||py2|
|Pegamoid-2.2.1-py3-none-any.whl (59.2 kB) Copy SHA256 hash SHA256||Wheel||py3|
|Pegamoid-2.2.1.tar.gz (59.5 kB) Copy SHA256 hash SHA256||Source||None|