from pyscfimportgto,scf mol=gto.M(atom='''H000;H000.5;H00.50.5;H00.50''', basis='sto3g')mf=scf.UHF(mol)mf.kernel()# Exchange the occupanciesofalphaHOMOand alphaLUMOmf.mo_occ[0,1]=0mf.mo_occ[0,2]=1dm=mf.make_rdm1(mf.mo_coeff,mf.mo_occ)mf.kernel(dm) 此外,PySCF 支持从...
/usr/bin/env python'''CCSD with k-point sampling or at an individual k-point'''fromfunctoolsimportreduceimportnumpyfrompyscf.pbcimportgto,scf,cccell=gto.Cell()cell.atom='''C 0.000000000000 0.000000000000 0.000000000000C 1.685068664391 1.685068664391 1.685068664391'''cell.basis='gth-szv'cell.pseudo=...
pyscf输入文件:import numpy from pyscf import gto, scf,symm,cc,tools from pyscf.cc import ccsd_...
Finally, export MOs into fch file via the py2fch module. For example, # lines not changed above dm = mf.make_rdm1() mf.max_cycle = 10 mf.kernel(dm) py2fch('h2o_cc-pVDZ.fch',nbf,nif,mf.mo_coeff,'a',mf.mo_occ,True) You may wonder why not directly use py2fch. This is be...
make_rdm1()) # SOS PT2 contribution e_pt2 = get_LT_SOS_PT2_restricted(mf_scf, auxbasis) e_pt2 *= c_pt2 return e_nscf + e_pt2 Some numerical discrepency occurs, which may originates from laplace-transform grid setting. # XYGJOS QChem: -76.1460262831 # PySCF: -76.1460283380 ...
make_rdm1(mo_coeff, mo_occ) fock = self.get_hcore(mol) + self.get_veff(self.mol, dm1) orbsym = symm.label_orb_symm(self, mol.irrep_id, mol.symm_orb, mo_coeff, self.get_ovlp(), False) orbsym = numpy.asarray(orbsym) sym_allow = orbsym.reshape(-1,1) == orbsym occidxa...
[1] casdm1, casdm2 = mc.fcisolver.make_rdm12(mc.ci, mc.ncas, mc.nelecas) rdm1, rdm2 = mcscf.addons._make_rdm12_on_mo(casdm1, casdm2, mc.ncore, mc.ncas, nmo) den_file = 'n2_cas.den' fspt = open(den_file,'w') fspt.write('CCIQA ENERGY = 0.000000000000 THE VIRIAL...