Modeling and result-visualization are key points to
computational chemistry workflows, and GaussView (GView) excels in these areas.
However, due to its status as commercial software, GView’s applications are
limited. PolyGView is a collection of Python scripts that extends GView’s
capabilities, ensuring users can perform modeling and result-visualization in
the simplest and most powerful way possible.
PolyGView is available on Windows, Linux and macOS, but
some configuration is required. Taking Linux as example, add the following to
~/.bashrc:
gview.py() {
source /opt/g16/bsd/g16.profile
export GAUSS_MEMDEF=8GB
/path/to/gv/gview.py "$@"
}
export PATH=$PATH:/path/to/polygview
export g16root='/opt/'
export GAUSS_SCRDIR='/opt/g16/scratch'
export GV_ROOT='/path/to/gv' You need to create an environment with NumPy and
RDkit. If you are working with a Linux machine, it is recommended that you
grant all scripts executable permissions and replace the shebangs in all the
scripts with the path to the Python interpreter of the environment, it will
enable you to use scripts in any scenario.
Usage: gview.py input.[xyz|gjf|log|out|cif|fch|cdxml|...]
Compared to the original GView, gview.py supports the following features without
affecting its original functionality:
XYZ files are the most commonly used 3D model files in
quantum chemistry calculations and first-principle calculations. One can
visualize and edit single-frame XYZ files directly using gview.py input.xyz,
similar to handling GJF files, supporting both isolated and periodic systems.
For mature computational chemistry packages such as
ORCA, PySCF (through geomeTRIC) and CP2K, although the XYZ trajectory files
generated by them contain limited info (compared to their output files), most
issues can still be resolved by analyzing them with gview.py. gview.py
visualizes energy and displacement of the trajectory and, can be used in
conjunction with mdf.py to analyze the positional fluctuations of
individual atoms within the trajectory, is well-suited for studying geometric
optimization, potential surface scans, and comparisons of local minima across
potential surfaces, etc.
The irreplaceable value of analyzing multi-frame XYZ
trajectory files lies in the fact that it is applicable to any program, at any
computational level, and for any keyword-based task.
If you have install
OfakeG in GView directory, gview.py can
directly call it to visualize ORCA output files just like Gaussian output files.
Unlike a direct call to OfakeG, gview.py add the |Force on Nucleus| data when
working on ORCA geometric optimization tasks, etc. It can be visualized under
Results -> Atom properties.
gview.py automatically recognizes Gaussian/ORCA output
files.
If you have install MfakeG in GView directory, gview.py can call it to visualize vibration modes in CP2K MOLDEN format files.
RDKit can accurately and rapidly convert ChemDraw 2D structures into 3D structures; it supports hydrogen addition and molecular force field optimization, and—most critically—it is capable of distinguishing between stereoconfigurations. gview.py can invoke it to model 3D structures based on .cdxml files, it's the most powerful and straightforward method for converting 2D models into 3D models.
Convert GJF files to XYZ files, supporting isolated and
periodic systems. Usage: gjf2xyz.py input.gjf.
Export the last frame in a multi-frame XYZ file as a
single-frame XYZ file. If the multi-frame XYZ file was generated by CP2K, it
will export a single-frame XYZ file containing cell information. Usage:
xyzdump.py multi.xyz single.xyz.
Calculate the Distance MAXD (dMAXD) and Distance RMSD
(dRMSD) between two specified conformers of the same molecule (provided via two
XYZ files), which is used to discrabe the differences between the two conformers.
dRMSD is dimensionally consistent and remains invariant under translational and
rotational transformations. Usage: drmsd.py conf1.xyz conf2.xyz.
Calculate the Mean Distance Fluctuation (MDF) of atoms
within a molecular trajectory (provided via a multi-frame XYZ file). MDF is
dimensionally consistent and remains invariant under translational and
rotational transformations. Usage: mdf.py traj.xyz