The qc package#
The curated reference for the public qc surface. Signatures show the common keyword arguments; rare
numerical knobs are IOP keys.
Building a checkpoint#
qc.chk.new(atom, ao, *, ao_rep="spherical", charge=0, spin=1, unit="angstrom", ric=None, rijk=None, iop=None, backend=...)Create a checkpoint from a molecular input.
atomis the mol-spec string;aois a basis name or a per-atom dict;spinis the Gaussian multiplicity2S+1;unitis"angstrom"(default) or"bohr";ric/rijkare the RI auxiliary bases;iopis the fine-grained options dict. Returns a checkpoint.qc.chk.load(path)/mychk.save(path)Restore / persist a checkpoint (HDF5
.qch5).mychk.with_iop({...})Return a new checkpoint with overlaid IOP keys.
Workflow verbs#
Each verb adds a pending step and returns a new checkpoint; .run() materializes results. Every verb has
a functional form qc.verb(mychk, ...) and a method form mychk.verb(...) — identical.
verb |
key arguments |
adds |
|---|---|---|
|
|
an initial-guess step |
|
the ERI strategy |
an integral-materialization step |
|
the SCF controls |
an SCF step |
|
|
a correlation step |
|
— |
mock method steps |
|
— |
analytic nuclear gradient |
|
geomeTRIC controls |
a geometry-optimization step |
.run(*, log=None, log_style="modern", plot=False, nthread=None, nmpi=1, hosts=None, comm=None, log_rank="root")Execute pending steps.
logstreams the transcript ("stdout"/path/object);nthread/nmpi/hosts/commset parallelism (Part IV).
Result accessors#
After .run() (details in Checkpoints):
mychk.scf.energy / .converged / .ncycle / .energy_elec / .energy_components / .gradient / .stability
mychk.lct.energy / .e_corr / .e_os / .e_ss
mychk.opt.converged / .energy / .e_traj / .gmax_traj / .grms_traj
mychk.natom / .symbols / .charge / .spin / .nelectron() / .coordinates() / .nuclear_energy()
mychk.log(format=) / .show() / .run_events()
qc.prop — molecular properties#
qc.prop.<group>.<leaf>(mychk) (≡ mychk.prop.<group>.<leaf>()), lazily computed and cached. The 14 groups:
group |
group |
||
|---|---|---|---|
|
atomic charges |
|
QTAIM topology / basins |
|
bond orders |
|
ELF/LOL basins |
|
electric moments, polarizability |
|
aromaticity indices |
|
reactivity, Fukui |
|
orbital analysis |
|
NBO / IAO / IBO |
|
spin density, ⟨S²⟩ |
|
electrostatic potential |
|
DOS, gap, band center |
|
real-space grid fields (NCI/IGM) |
|
geometric analysis |
scf(..., prop=True|preset|[refs]) computes a bundle eagerly. See the
properties suite.
Other namespaces#
qc.iop — options registry: qc.iop.list(), qc.iop.describe(key), qc.iop.defaults()
(reference).
qc.basis — basis data: qc.basis.baslib_filename (229 names), qc.basis.nwchem_format(inpdata, description=, ecp=) (reference).
qc.view — visualization: mychk.view3d(field|orbital|orbitals, ...), mychk.mo_cube(...),
mychk.orbitals, mychk.plot_nci(), mychk.plot_convergence(), mychk.plot_field_plane(...), and
.to_html() (Visualization).
Lower-level (rarely needed directly): qc.array (N-D arrays, eigh, elementwise/reduction ops),
qc.mol (the molecular data model), qc.utils (e.g. qc.utils.quatdiag), qc.integrals (experimental
libcint-backed shell/tensor helpers).
Optional modules (feature-gated, guarded by sentinels): qc.xc (libxc functionals; qc.XC_ENABLED),
qc.pcm (PCM solvation context; qc.PCM_ENABLED), the Rust MPI-direct functions (qc.MPI_DIRECT_ENABLED),
and the GPU path (qc.GPU_ENABLED).
Sentinels#
import qc
qc.XC_ENABLED, qc.PCM_ENABLED, qc.MPI_DIRECT_ENABLED, qc.GPU_ENABLED
Each is True only if the corresponding feature was compiled into your build. A default build has
XC_ENABLED == PCM_ENABLED == MPI_DIRECT_ENABLED == True and GPU_ENABLED == False (the GPU path is opt-in;
GPU chapter).
That is the public surface. From here, the guide chapters show each piece in context, and the reference sections give the exhaustive details.