Beispiel #1
0
    def test_degenerate_3(self):

        configurations = [
            [[1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 1, 0, 0]],
            [[1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 0]],
            [[1, 1, 1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0, 0]],
            [[1, 1, 1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 0, 1, 0]],
            [[1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0, 0, 0]],
            [[1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 0, 1, 0, 0]],
        ]

        for conf_alpha, conf_beta in configurations:

            print(conf_alpha, conf_beta)

            wf_results = WfnSympy(
                coordinates=self.data['coordinates'],
                symbols=self.data['symbols'],
                basis=self.data['basis'],
                axis=[
                    -0.5634811520306573, 0.5937396995245904,
                    -0.5744233286650642
                ],
                axis2=[
                    -0.5910397590456458, -0.5756503475754583,
                    0.5650652002764983
                ],
                alpha_mo_coeff=self.data['mo_coefficients']['alpha'],
                group='Td',
                alpha_occupancy=conf_alpha,
                beta_occupancy=conf_beta,
            )

            wf_results.print_alpha_mo_IRD()
            wf_results.print_wf_mo_IRD()

            wf_alpha = np.round(wf_results.wf_IRd_a, decimals=2)
            wf_beta = np.round(wf_results.wf_IRd_b, decimals=2)
            wf_total = np.round(wf_results.wf_IRd, decimals=2)

            print(wf_alpha, wf_beta, wf_total)

            self.assertTupleEqual(tuple(wf_alpha), (0., 0., 0., 1., 0.))
            self.assertTupleEqual(tuple(wf_beta), (0., 0., 0., 1., 0.))
            self.assertTupleEqual(tuple(wf_total), (0., 0., 0., 0.5, 0.5))
Beispiel #2
0
wf_results = WfnSympy(
    coordinates=[[0.0000000000, 0.0000000000, -0.0428008531],
                 [-0.7581074140, 0.0000000000, -0.6785995734],
                 [0.7581074140, 0.000000000, -0.6785995734]],
    symbols=['O', 'H', 'H'],
    basis=basis,
    alpha_mo_coeff=mo_coefficients[:5],
    alpha_occupancy=[0, 1, 1, 0, 0],
    beta_occupancy=[1, 1, 1, 1, 1],
    group='c2v')

wf_results.print_alpha_mo_IRD()
wf_results.print_overlap_mo_alpha()
wf_results.print_overlap_wf()
wf_results.print_wf_mo_IRD()


def get_orbital_state(orbital_soev):
    state_orb = SymmetryBase(group='c2v',
                             rep=pd.Series(orbital_soev,
                                           index=["E", "C2", "sv_xz",
                                                  "sd_yz"]))
    return state_orb


o1 = get_orbital_state(wf_results.mo_SOEVs_a[0])
o2 = get_orbital_state(wf_results.mo_SOEVs_a[1])
o3 = get_orbital_state(wf_results.mo_SOEVs_a[2])
o4 = get_orbital_state(wf_results.mo_SOEVs_a[3])
o5 = get_orbital_state(wf_results.mo_SOEVs_a[4])