ocal documentation¶
ocal is a program for the calculation of the orbital tail fraction (OTF) and the
participation ratio (PR) of organic semiconductor molecules.
Overview¶
Starting from a molecular or crystal structure file, ocal generates a Gaussian
input, runs a geometry optimization, converts the checkpoint file, and generates
molecular-orbital cube files for the four frontier orbitals (NLUMO, LUMO, HOMO,
NHOMO). It then computes the OTF and the PR for each orbital, together with the
supplementary PR/V.
The OTF quantifies how much of a frontier orbital spills out of the molecular van der
Waals volume, i.e. how much of it is available for intermolecular overlap. PR has the
dimension of volume and expresses the volume the orbital effectively occupies, i.e.
how widely the orbital is delocalized. As a supplementary quantity, ocal also reports
the dimensionless PR/V, which normalizes PR by the molecular volume \(V\).
Definitions¶
The OTF is the integral of the squared absolute value of the wavefunction over the region outside the van der Waals radii of the atoms:
The participation ratio PR (in ų) and the PR/V are defined as
where
\(\psi\) is the normalized molecular orbital,
\(V_\mathrm{vdW}\) is the union of the van der Waals spheres of all atoms (a point lies outside it when its distance to every atom exceeds that atom’s van der Waals radius), and
\(V\) is the volume of \(V_\mathrm{vdW}\).
Note
The molecule is always treated as a neutral closed-shell singlet (charge/spin fixed
to 0 1), and the functional and basis set are fixed to B3LYP/6-31G(d,p) so
that OTF and PR values remain comparable with previously published results.
The molecular volume \(V\) used for the supplementary PR/V is always integrated
on a cubic grid with a fixed spacing of 0.2 Å, so that PR/V values remain comparable
as well.
Requirements¶
Python 3.11 or newer
NumPy 2.0.2 or newer
Pandas 2.3.3 or newer
Gaussian 16 (the
g16,formchk, andcubegenexecutables must be on$PATH)
Installation¶
ocal is distributed on PyPI under the name yu-ocal (the import name and the
command name are both ocal):
pip install yu-ocal
NumPy and Pandas are installed automatically; Gaussian 16 is not included and must be installed separately.
Verify the installation with:
ocal --help
Basic usage¶
ocal <filename> [options]
ocal accepts three classes of input and enters the pipeline at the corresponding
stage:
Input |
Extensions |
Pipeline stages executed |
|---|---|---|
Structure file |
|
gjf generation → Gaussian (Opt=Tight) → formchk → cubegen → OTF, PR |
Formatted checkpoint |
|
cubegen → OTF, PR |
Cube file |
|
OTF, PR only |
For .fchk and .cube input, -s, --skip-gaussian is required; conversely it
is rejected for structure-file input. A .cube input must be a Gaussian cubegen
MO cube with a Bohr-unit, orthogonal grid; other grids are rejected.
Options¶
Option |
Default |
Description |
|---|---|---|
|
|
Number of CPUs used by Gaussian and |
|
|
Amount of memory in GB used by Gaussian. |
|
off |
Skip the Gaussian calculation and reuse existing results. |
Examples¶
# Full run from a molecular structure
ocal xxx.xyz
# Use 8 CPUs and 16 GB memory
ocal xxx.mol -c 8 -m 16
# Start from an existing Gaussian formatted checkpoint file
ocal xxx.fchk -s
# Compute OTF and PR for a single cube file that already exists
ocal xxx_HOMO.cube -s
The full usage manual, including the description of the generated files and troubleshooting notes, is available in the README.