Loading [MathJax]/extensions/tex2jax.js
occ
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Open Computational Chemistry

Welcome

Welcome to the official API documentation for the Open Computational Chemistry project.

Note that this is the documentation for the code - not how to use the programs. If you are looking for tutorials, please visit the website:

A simple Hartree-Fock program

Here's a very brief example, indicative of the overall design of the program, implementing a very simple spin-restricted Hartree-Fock program.

#include <occ/qm/hf.h>
#include <occ/qm/scf.h>
#include <occ/io/xyz.h>
int main(int argc, char argv**) {
using occ::scf::SCF;
// read in a molecule from a file
auto mol = occ::io::molecule_from_xyz_file("water.xyz");
// load the Gaussian-type basis set for the molecule
auto bs = occ::qm::AOBasis::load(mol.atoms(), "6-31G");
// Initialize a Hartree-Fock object for restricted spinorbitals
// with this basis set
HartreeFock<SpinorbitalKind::Restricted> hf(bs);
// Initialize an SCF object to evaluate the ground state.
SCF<HartreeFock, SpinorbitalKind::Restricted> scf(hf);
// Perform the SCF iterations and get the resulting ground state energy.
double e = scf.compute_scf_energy();
return 0;
}
static AOBasis load(const AtomList &atoms, const std::string &name)
Definition hf.h:16
occ::core::Molecule molecule_from_xyz_file(const std::string &)
SpinorbitalKind
Definition spinorbital.h:8