def run_scf(self): fn = "water_sto3g.hdf5" if os.path.isfile(fn): return fn mol = gto.M( atom=""" O 0 0 0 H 0 0 1.795239827225189 H 1.693194615993441 0 -0.599043184453037 """, basis='sto-3g', unit="Bohr" ) mf = scf.RHF(mol) mf.conv_tol = 1e-11 mf.conv_tol_grad = 1e-10 mf.kernel() return atd.dump_pyscf(mf, fn)
def run_scf(self): fn = "cn_sto3g.hdf5" if os.path.isfile(fn): return fn mol = gto.M( atom=""" C 0 0 0 N 0 0 2.2143810738114829 """, spin=1, basis='sto-3g', unit="Bohr", ) mf = scf.UHF(mol) mf.conv_tol = 1e-11 mf.conv_tol_grad = 1e-10 mf.diis = scf.EDIIS() mf.diis_space = 5 mf.max_cycle = 500 mf.kernel() return atd.dump_pyscf(mf, fn)
## --------------------------------------------------------------------- import sys from pyscf import gto, scf from static_data import xyz from os.path import dirname, join sys.path.insert(0, join(dirname(__file__), "adcc-testdata")) import adcctestdata as atd # noqa: E402 # Run SCF in pyscf and converge super-tight using an EDIIS mol = gto.M(atom=xyz["h2o"], basis='def2-tzvp', unit="Bohr") mf = scf.RHF(mol) mf.conv_tol = 1e-13 mf.conv_tol_grad = 1e-12 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() h5f = atd.dump_pyscf(mf, "h2o_def2tzvp_hfdata.hdf5") # Store configuration parameters for interesting cases to generate # reference data for. The data is stored as a stringified dict. h5f["reference_cases"] = str({ "gen": {}, "cvs": { "core_orbitals": 1 }, })
sys.path.insert(0, join(dirname(__file__), "adcc-testdata")) import adcctestdata as atd # noqa: E402 # Run SCF in pyscf and converge super-tight using an EDIIS mol = gto.M(atom=xyz["cn"], basis='cc-pvdz', unit="Bohr", spin=1, verbose=4) mf = scf.UHF(mol) mf.conv_tol = 1e-12 mf.conv_tol_grad = 1e-12 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 600 mf = scf.addons.frac_occ(mf) mf.kernel() h5f = atd.dump_pyscf(mf, "cn_ccpvdz_hfdata.hdf5") h5f["reference_cases"] = str({ "gen": {}, "cvs": { "core_orbitals": 1 }, "fc": { "frozen_core": 1 }, "fv": { "frozen_virtual": 3 }, }) # Since CN has some symmetry some energy levels are degenerate,
from geometry import xyz from os.path import dirname, join sys.path.insert(0, join(dirname(__file__), "adcc-testdata")) import adcctestdata as atd # noqa: E402 # Run SCF in pyscf and converge super-tight using an EDIIS mol = gto.M( atom=xyz["ch2nh2"], basis='sto-3g', unit="Bohr", spin=1, # =2S, ergo doublet verbose=4) mf = scf.UHF(mol) mf.diis = scf.EDIIS() mf.conv_tol = 1e-14 mf.conv_tol_grad = 1e-12 mf.diis_space = 6 mf.max_cycle = 500 mf = scf.addons.frac_occ(mf) mf.kernel() h5f = atd.dump_pyscf(mf, "ch2nh2_sto3g_hfdata.hdf5") h5f["reference_cases"] = str({ "gen": {}, "cvs": { "core_orbitals": 2 }, })
## adcc-testdata is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with adcc-testdata. If not, see <http://www.gnu.org/licenses/>. ## ## --------------------------------------------------------------------- import os import adcctestdata as atd from pyscf import gto, scf if not os.path.isfile("hf3.hdf5"): mol = gto.M( atom='H 0 0 0;' 'F 0 0 2.5', basis='6-31G', unit="Bohr", spin=2 # =2S, ergo triplet ) mf = scf.UHF(mol) mf.conv_tol = 1e-14 mf.grad_conv_tol = 1e-10 mf.kernel() atd.dump_pyscf(mf, "hf3.hdf5") atd.dump_reference("hf3.hdf5", "adc2", "hf3_sf_adc2.hdf5", n_states_full=2, n_spin_flip=5, print_level=100)
import adcctestdata as atd from pyscf import gto, scf if not os.path.isfile("water.hdf5"): mol = gto.M(atom=""" O 0 0 0 H 0 0 1.795239827225189 H 1.693194615993441 0 -0.599043184453037 """, basis='def2-tzvp', unit="Bohr") mf = scf.RHF(mol) mf.conv_tol = 1e-13 mf.conv_tol_grad = 1e-12 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() atd.dump_pyscf(mf, "water.hdf5") atd.dump_reference("water.hdf5", "adc2", "water_fc_adc2.hdf5", n_states_full=2, n_singlets=5, n_triplets=3, print_level=100, frozen_core=[0, 43])
from os.path import dirname, join from static_data import xyz sys.path.insert(0, join(dirname(__file__), "adcc-testdata")) import adcctestdata as atd # noqa: E402 # Run SCF in pyscf and converge super-tight using an EDIIS mol = gto.M( atom=xyz["hf"], basis='6-31G', unit="Bohr", spin=2, # =2S, ergo triplet verbose=4 ) mf = scf.UHF(mol) mf.diis = scf.EDIIS() mf.conv_tol = 1e-14 mf.conv_tol_grad = 1e-12 mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() h5f = atd.dump_pyscf(mf, "hf3_631g_hfdata.hdf5") h5f["reference_cases"] = str({ "gen": {}, "fc": {"frozen_core": 1}, "fv": {"frozen_virtual": 3}, })
sys.path.insert(0, join(dirname(__file__), "adcc-testdata")) import adcctestdata as atd # noqa: E402 # Run SCF in pyscf and converge super-tight using an EDIIS mol = gto.M( atom=xyz["h2o"], basis='sto-3g', unit="Bohr" ) mf = scf.RHF(mol) mf.conv_tol = 1e-13 mf.conv_tol_grad = 1e-12 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() h5f = atd.dump_pyscf(mf, "h2o_sto3g_hfdata.hdf5") # Store configuration parameters for interesting cases to generate # reference data for. The data is stored as a stringified dict. h5f["reference_cases"] = str({ "gen": {}, "cvs": {"core_orbitals": 1}, "fc": {"frozen_core": 1}, "fv": {"frozen_virtual": 1}, "fv-cvs": {"core_orbitals": 1, "frozen_virtual": 1}, "fc-fv": {"frozen_core": 1, "frozen_virtual": 1}, })
## along with adcc-testdata. If not, see <http://www.gnu.org/licenses/>. ## ## --------------------------------------------------------------------- import os import adcctestdata as atd from pyscf import gto, scf if not os.path.isfile("water_uhf.hdf5"): mol = gto.M( atom=""" O 0 0 0 H 0 0 1.795239827225189 H 1.693194615993441 0 -0.599043184453037 """, basis='cc-pvdz', unit="Bohr" ) mf = scf.UHF(mol) mf.conv_tol = 1e-13 mf.conv_tol_grad = 1e-12 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() atd.dump_pyscf(mf, "water_uhf.hdf5") atd.dump_reference("water_uhf.hdf5", "adc2", "water_uhf_adc2.hdf5", n_states_full=2, n_states=8, print_level=100)
from os.path import dirname, join sys.path.insert(0, join(dirname(__file__), "adcc-testdata")) import adcctestdata as atd # noqa: E402 # Run SCF in pyscf and converge super-tight using an EDIIS mol = gto.M(atom=xyz["h2s"], basis='6311+g**', unit="Bohr", verbose=4) mf = scf.RHF(mol) mf.conv_tol = 1e-12 mf.conv_tol_grad = 1e-12 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 100 mf.kernel() h5f = atd.dump_pyscf(mf, "h2s_6311g_hfdata.hdf5") core = "core_orbitals" fc = "frozen_core" fv = "frozen_virtual" h5f["reference_cases"] = str({ "gen": {}, # noqa: E201, E202 "cvs": { core: 1, }, # noqa: E201, E202 "fc": { fc: 1, }, # noqa: E201, E202 "fv": { fv: 3 }, # noqa: E201, E202
from pyscf import gto, scf from os.path import dirname, join from static_data import xyz sys.path.insert(0, join(dirname(__file__), "adcc-testdata")) import adcctestdata as atd # noqa: E402 # Run SCF in pyscf and converge super-tight using an EDIIS mol = gto.M(atom=xyz["r2methyloxirane"], basis='sto-3g', unit="Bohr", verbose=4) mf = scf.RHF(mol) mf.diis = scf.EDIIS() mf.conv_tol = 1e-13 mf.conv_tol_grad = 1e-12 mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() h5f = atd.dump_pyscf(mf, "methox_sto3g_hfdata.hdf5") h5f["reference_cases"] = str({ "gen": {}, "cvs": { "core_orbitals": 1 }, })
## ## --------------------------------------------------------------------- import os import adcctestdata as atd from pyscf import gto, scf if not os.path.isfile("cn.hdf5"): mol = gto.M( atom=""" C 0 0 0 N 0 0 2.2143810738114829 """, basis='cc-pvdz', unit="Bohr", spin=1, verbose=4, ) mf = scf.UHF(mol) mf.conv_tol = 1e-11 mf.conv_tol_grad = 1e-10 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() atd.dump_pyscf(mf, "cn.hdf5") atd.dump_reference("cn.hdf5", "adc2", "cn_adc2.hdf5", n_states_full=3, n_states=5, print_level=100)
## along with adcc-testdata. If not, see <http://www.gnu.org/licenses/>. ## ## --------------------------------------------------------------------- import os import adcctestdata as atd from pyscf import gto, scf if not os.path.isfile("water_small.hdf5"): mol = gto.M( atom=""" O 0 0 0 H 0 0 1.795239827225189 H 1.693194615993441 0 -0.599043184453037 """, basis='3-21g', unit="Bohr" ) mf = scf.RHF(mol) mf.conv_tol = 1e-13 mf.conv_tol_grad = 1e-12 mf.diis = scf.EDIIS() mf.diis_space = 3 mf.max_cycle = 500 mf.kernel() atd.dump_pyscf(mf, "water_small.hdf5") atd.dump_reference("water_small.hdf5", "adc2", "water_small_adc2.hdf5", n_states_full=2, n_singlets=5, n_triplets=3, print_level=100)