forked from BoothGroup/ebcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26801a1
commit 270303d
Showing
4 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import numpy as np | ||
from pyscf import gto, scf | ||
|
||
from ebcc import EBCC | ||
|
||
mol = gto.Mole() | ||
mol.atom = "H 0 0 0; F 0 0 1.1" | ||
mol.basis = "cc-pvdz" | ||
mol.build() | ||
|
||
mf = scf.RHF(mol) | ||
mf.kernel() | ||
|
||
ccsd = EBCC(mf) | ||
ccsd.kernel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import numpy as np | ||
from pyscf import gto, scf | ||
|
||
from ebcc import EBCC | ||
|
||
np.random.seed(123) | ||
|
||
mol = gto.Mole() | ||
mol.atom = "H 0 0 0; F 0 0 1.1" | ||
mol.basis = "cc-pvdz" | ||
mol.build() | ||
|
||
mf = scf.RHF(mol) | ||
mf.kernel() | ||
|
||
# Define boson energies and couplings to AO density: | ||
nbos = 5 | ||
nmo = mf.mo_occ.size | ||
g = np.random.random((nbos, nmo, nmo)) * 0.03 | ||
omega = np.random.random((nbos,)) * 5.0 | ||
|
||
# ,-------- Fermionic ansatz | ||
# | ,------ Bosonic excitation amplitudes | ||
# | | ,---- Rank of fermions in coupling term | ||
# | | | ,-- Rank of bosons in coupling term | ||
# v v v v | ||
# ____ _ _ _ | ||
# CCSD-S-1-1: One-boson amplitudes and one-boson-one-fermion coupling | ||
ccsd = EBCC( | ||
mf, | ||
ansatz="CCSD", | ||
boson_excitations="S", | ||
fermion_coupling_rank=1, | ||
boson_coupling_rank=1, | ||
omega=omega, | ||
g=g, | ||
) | ||
ccsd.kernel() | ||
|
||
# ,--------- Fermionic ansatz | ||
# | ,------ Bosonic excitation amplitudes | ||
# | | ,---- Rank of fermions in coupling term | ||
# | | | ,-- Rank of bosons in coupling term | ||
# v v v v | ||
# ____ __ _ _ | ||
# CCSD-SD-1-1: Two-boson amplitudes and one-boson-one-fermion coupling | ||
ccsd = EBCC( | ||
mf, | ||
ansatz="CCSD", | ||
boson_excitations="SD", | ||
fermion_coupling_rank=1, | ||
boson_coupling_rank=1, | ||
omega=omega, | ||
g=g, | ||
) | ||
ccsd.kernel() | ||
|
||
# ,--------- Fermionic ansatz | ||
# | ,------ Bosonic excitation amplitudes | ||
# | | ,---- Rank of fermions in coupling term | ||
# | | | ,-- Rank of bosons in coupling term | ||
# v v v v | ||
# ____ __ _ _ | ||
# CCSD-SD-1-2: Two-boson amplitudes and two-boson-one-fermion coupling | ||
ccsd = EBCC( | ||
mf, | ||
ansatz="CCSD", | ||
boson_excitations="SD", | ||
fermion_coupling_rank=1, | ||
boson_coupling_rank=2, | ||
omega=omega, | ||
g=g, | ||
) | ||
ccsd.kernel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import numpy as np | ||
from pyscf import gto, scf | ||
|
||
from ebcc import UEBCC | ||
|
||
mol = gto.Mole() | ||
mol.atom = "H 0 0 0; F 0 0 1.1" | ||
mol.basis = "cc-pvdz" | ||
mol.build() | ||
|
||
mf = scf.UHF(mol) | ||
mf.kernel() | ||
|
||
ccsd = UEBCC(mf) | ||
ccsd.kernel() | ||
|
||
eom = ccsd.ip_eom() | ||
eom.kernel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import numpy as np | ||
from pyscf import gto, scf | ||
|
||
from ebcc import EBCC | ||
|
||
mol = gto.Mole() | ||
mol.atom = "H 0 0 0; F 0 0 1.1" | ||
mol.basis = "cc-pvdz" | ||
mol.build() | ||
|
||
mf = scf.RHF(mol) | ||
mf.kernel() | ||
|
||
ccsd = EBCC(mf, ansatz="CC2") | ||
ccsd.kernel() | ||
|