示例#1
0
from pyqchem.parsers.parser_rasci import parser_rasci as rasci_parser
from pyqchem import get_output_from_qchem, Structure, QchemInput
from pyqchem.file_io import build_fchk
from pyqchem.symmetry import get_symmetry_le
from pyqchem.qchem_core import redefine_calculation_data_filename
from pyqchem.utils import _set_zero_to_coefficients, get_plane
from pyqchem.utils import is_transition, get_ratio_of_condition
from pyqchem.units import DEBYE_TO_AU
from pyqchem.tools import print_excited_states, plot_rasci_state_configurations
from pyqchem.plots import plot_diabatization
import numpy as np

redefine_calculation_data_filename('diabatic_naphtalene.pkl')

# define dimer
coor_monomer1 = [[2.4610326539, 0.7054950347, -0.0070507104],
                 [1.2697800226, 1.4213478618, 0.0045894884],
                 [0.0071248839, 0.7134976955, 0.0071917580],
                 [-1.2465927908, 1.4207541565, 0.0039025332],
                 [2.4498274919, -0.7358510124, 0.0046346543],
                 [3.2528295760, 1.2280710625, -0.0312673955],
                 [1.3575083440, 2.3667492466, 0.0220260183],
                 [-1.2932627225, 2.3688000888, -0.0152164523],
                 [3.2670227933, -1.2176289251, 0.0251089819],
                 [-2.4610326539, -0.7054950347, 0.0070507104],
                 [-1.2697800226, -1.4213478618, -0.0045894884],
                 [-0.0071248839, -0.7134976955, -0.0071917580],
                 [1.2465927908, -1.4207541565, -0.0039025332],
                 [-2.4498274919, 0.7358510124, -0.0046346543],
                 [-3.2528295760, -1.2280710625, 0.0312673955],
                 [-1.3575083440, -2.3667492466, -0.0220260183],
示例#2
0
from pyqchem.qchem_core import get_output_from_qchem, create_qchem_input, redefine_calculation_data_filename
from pyqchem.parsers.parser_rasci_basic import basic_rasci
from pyqchem.parsers.parser_optimization import basic_optimization
from pyqchem.structure import Structure
from pyqchem.test import standardize_dictionary
import yaml
import unittest
import os, sys

if sys.version_info[0] == 2:
    redefine_calculation_data_filename('test_data_py2.pkl')
else:
    redefine_calculation_data_filename('test_data_py3.pkl')

if 'USER' in os.environ and os.environ['USER'] == 'travis':
    recalculate = False
else:
    recalculate = True


class HydrogenTest(unittest.TestCase):
    def setUp(self):
        self.assertDictEqual.__self__.maxDiff = None

        # generate molecule
        self.molecule = Structure(coordinates=[[0.0, 0.0, 0.0],
                                               [0.0, 0.0, 1.5]],
                                  symbols=['H', 'H'],
                                  charge=0,
                                  multiplicity=1)
示例#3
0
from pyqchem import Structure, QchemInput, get_output_from_qchem
from pyqchem.qchem_core import redefine_calculation_data_filename
from pyqchem.parsers.parser_optimization import basic_optimization
from pyqchem.parsers.parser_cis import basic_cis
from pyqchem.parsers.parser_rasci import parser_rasci
from pyqchem.basis import get_basis_from_ccRepo
from pyqchem.file_io import build_fchk
from pyqchem.errors import OutputError

redefine_calculation_data_filename('soc_benzo_2_ras.pkl')

coordinates = [[-0.49800797,  0.41832669,  0.00000000],
               [ 0.72930903,  0.41832669,  0.00000000],
               [-1.31920411,  1.72110714,  0.00000000],
               [-2.71298836,  1.66723263,  0.00000000],
               [-0.66872148,  2.95532032,  0.00026620],
               [-3.45673426,  2.84793521, -0.00001025],
               [-1.41217483,  4.13550038, -0.00026053],
               [ 0.43007141,  2.99754789,  0.00046401],
               [-2.80629666,  4.08169051, -0.00073971],
               [-4.55559312,  2.80544226,  0.00024612],
               [-0.89955468,  5.10831249, -0.00038580],
               [-3.39213342,  5.01230158, -0.00037769],
               [-1.31920411, -0.88445377,  0.00005409],
               [-2.71298836, -0.83057926,  0.00005185],
               [-0.66872148, -2.11866695, -0.00016087],
               [-3.45673426, -2.01128184,  0.00011112],
               [-1.41217483, -3.29884699,  0.00041485],
               [ 0.43007141, -2.16089453, -0.00035693],
               [-2.80629666, -3.24503710,  0.00089180],
               [-4.55559312, -1.96878890, -0.00014701],
示例#4
0
from pyqchem.qchem_core import get_output_from_qchem, redefine_calculation_data_filename
from pyqchem.qc_input import QchemInput
from pyqchem.structure import Structure
from pyqchem.parsers.parser_rasci import parser_rasci as parser_rasci
from pyqchem.basis import get_basis_from_ccRepo, trucate_basis, basis_to_txt
import numpy as np
from pyqchem.errors import OutputError

redefine_calculation_data_filename('test_soc3s.pkl')

as_c_triplet = [[3, 1], 4, 1]
as_c_singlet = [[2, 2], 4, 1]
atom_c = Structure(coordinates=[[0.0, 0.0, 0.0]],
                   symbols=['C'],
                   charge=-1,
                   multiplicity=4,
                   name='C')

as_o_triplet = [[4, 2], 4, 1]
as_o_singlet = [[3, 3], 4, 1]
atom_o = Structure(coordinates=[[0.0, 0.0, 0.0]],
                   symbols=['O'],
                   charge=-2,
                   multiplicity=1,
                   name='O')

as_si_triplet = [[7, 5], 8, 1]
as_si_singlet = [[6, 6], 8, 1]
atom_si = Structure(coordinates=[[0.0, 0.0, 0.0]],
                    symbols=['Si'],
                    charge=-1,
示例#5
0
from pyqchem.qchem_core import get_output_from_qchem, create_qchem_input, redefine_calculation_data_filename, QchemInput
from pyqchem.parsers.parser_rasci import parser_rasci
from pyqchem.parsers.parser_optimization import basic_optimization
from pyqchem.structure import Structure
from pyqchem.test import standardize_dictionary
import yaml
import unittest
import os, sys

redefine_calculation_data_filename('test_data.db')

#if 'USER' in os.environ and os.environ['USER'] == 'travis':
recalculate = False
remake_tests = False
dir_path = os.path.dirname(os.path.realpath(__file__))


class HydrogenTest(unittest.TestCase):
    def setUp(self):
        self.assertDictEqual.__self__.maxDiff = None

        # generate molecule
        self.molecule = Structure(coordinates=[[0.0, 0.0, 0.0],
                                               [0.0, 0.0, 1.5]],
                                  symbols=['H', 'H'],
                                  charge=0,
                                  multiplicity=1)

    def test_srdft(self):

        # create qchem input