Optimization of wave function and geometry in the finite basis Hartree-Fock method | Synapse