Skip to content

Dirac4pi/PolyGView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolyGView (GView for Everything)

    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() {
source /opt/g16/bsd/g16.profile
python3 /path/to/gv/gview.py "$@"
}
alias gjf2xyz='python3 /path/to/gv/gjf2xyz.py'
alias xyzdump='python3 /path/to/gv/xyzdump.py'
alias drmsd='python3 /path/to/gv/drmsd.py'
alias mdf='python3 /path/to/gv/mdf.py'

    NumPy is required in the environment.

gview.py

    Usage: gview input.[xyz|gjf|log|out|cif|fch|cdxml|...] Compared to the original GView, gview.py supports the following features without affecting its original functionality:

1. Edit of Single-Frame XYZ Files

    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.

2. Visualization of Multi-Frame XYZ Trajectories

    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.

3. Visualization of ORCA Output Files

    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.

4. Visualization of CP2K MOLDEN Files

    If you have install MfakeG in GView directory, gview.py can call it to visualize vibration modes in CP2K MOLDEN format files.

5. Modeling Based on ChemDraw 2D Structures

    If you have install Obabel 2.4.x and add it to $PATH, gview.py can invoke it to model 3D structures based on ChemDraw .cdxml files, it's the simplest method for converting 2D models into 3D models.

gjf2xyz.py

    Convert GJF files to XYZ files, supporting isolated and periodic systems. Usage: gjf2xyz input.gjf.

xyzdump.py

    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 multi.xyz single.xyz.

drmsd.py

    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 conf1.xyz conf2.xyz.

$$ \begin{aligned} \text{dRMSD} &= \sqrt{\frac{2}{N(N-1)} \sum_{i \lt j}^{N} (d_{ij,A} - d_{ij,B})^2} \\ \text{dMAXD} &= \max_{i \lt j} |d_{ij,A} - d_{ij,B}| \end{aligned} $$

mdf.py

    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 traj.xyz

$$ MDF_i = \frac{1}{N-1} \sum_{j \neq i}^{N} \sqrt{\langle d_{ij}^2 \rangle - \langle d_{ij} \rangle^2} $$

Releases

No releases published

Packages

 
 
 

Contributors

Languages