Exemplo n.º 1
0
def run(**extra):
    res = molsturm.hartree_fock(water,
                                basis_type="gaussian/libint",
                                basis_set_name="def2-svp",
                                **extra)

    molsturm.print_convergence_summary(res)
    molsturm.print_energies(res)
    molsturm.print_mo_occupation(res)
    molsturm.print_quote(res)
    return res
Exemplo n.º 2
0
def run_matrix_free(system, basis, extra={}):
    params = molsturm.ScfParameters()
    params.system = system
    params.basis = basis
    params["guess/method"] = "random"
    params["guess/eigensolver/method"] = "arpack"
    params["scf/eigensolver/method"] = "arpack"
    params["scf/n_eigenpairs"] = 2 * (basis.size // 2)
    params.update(extra)

    res = molsturm.self_consistent_field(params)
    molsturm.print_convergence_summary(res)
    molsturm.print_energies(res)
    molsturm.print_mo_occupation(res)
    molsturm.print_quote(res)
    return res
Exemplo n.º 3
0
def main():
    carbon = molsturm.System("c")
    carbon.multiplicity = 3

    params = molsturm.ScfParameters()
    params.system = carbon
    params.basis = molsturm.construct_basis("sturmian/atomic/cs_reference_pc",
                                            params.system, k_exp=3.3, n_max=4,
                                            l_max=3)
    params["scf/eigensolver/method"] = "lapack"
    params["scf/print_iterations"] = True
    params["guess/eigensolver/method"] = "lapack"

    res = molsturm.self_consistent_field(params)
    molsturm.print_convergence_summary(res)
    molsturm.print_energies(res)
    molsturm.print_mo_occupation(res)
    molsturm.print_quote(res)
    return res
Exemplo n.º 4
0
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with molsturm. If not, see <http://www.gnu.org/licenses/>.
##
## ---------------------------------------------------------------------
## vi: tabstop=2 shiftwidth=2 softtabstop=2 expandtab

import molsturm
import molsturm.posthf

sys = molsturm.System(["beryllium"], [[0, 0, 0]])
bas = molsturm.construct_basis("sturmian/atomic",
                               sys,
                               k_exp=2.1,
                               n_max=11,
                               l_max=0,
                               backend="cs_reference_pc")
res = molsturm.hartree_fock(sys, bas, conv_tol=1e-10, print_iterations=True)

molsturm.print_convergence_summary(res)
molsturm.print_energies(res)
molsturm.print_mo_occupation(res)
print()

res_adc = molsturm.posthf.mp2(res)
print("MP2 energy", res_adc["energy_mp2"])
print("tot energy", res_adc["energy_ground_state"])

molsturm.print_quote(res)