コード例 #1
0
ファイル: cfmatrix_test.py プロジェクト: nixworks/quantarhei
    def setUp(self, verbose=False):
        """Initializes the calculation
    
        """

        self.verbose = verbose

        self.time = qr.TimeAxis(0, 1000, 1.0)
        self.temperature = 300
        pars1 = dict(ftype="OverdampedBrownian",
                     reorg=30,
                     cortime=100,
                     T=self.temperature)
        pars2 = dict(ftype="OverdampedBrownian",
                     reorg=80,
                     cortime=200,
                     T=self.temperature)

        self.cf1 = qr.CorrelationFunction(self.time, pars1)
        self.cf2 = qr.CorrelationFunction(self.time, pars2)
コード例 #2
0
ファイル: demo_abs.py プロジェクト: xuanleng/quantarhei
#
# Create aggregate of the two molecules
#
agg = qr.Aggregate(molecules=[m1, m2])

#
# Define time span of the calculation
#
time = qr.TimeAxis(0.0, 10000, 1.0)

#
# Define bath correlation function
#
cpar = dict(ftype="OverdampedBrownian", cortime=30, reorg=200, T=300)
with qr.energy_units("1/cm"):
    cf = qr.CorrelationFunction(time, cpar)

#
# Set the correlation function to the transitions on the molecules
#
m1.set_transition_environment((0, 1), cf)
m2.set_transition_environment((0, 1), cf)

#
# Build the aggregate
#
agg.build()

#
# Calculate absorption spectrum
#
コード例 #3
0
t13Count = 300
t2s = qr.TimeAxis(0.0, t2Count, t2Step)
t13 = qr.TimeAxis(0.0, t13Count, t13Step)
timeTotal = qr.TimeAxis(0.0, 3 * t13Count, t13Step)

two_pi = np.pi * 2
proteinDis = 8.7
difference = 0.6
temperature = 300

params = dict(ftype="OverdampedBrownian",
              T=temperature,
              reorg=reorganisation,
              cortime=100.0)
with qr.energy_units('1/cm'):
    cf = qr.CorrelationFunction(timeTotal, params)
    #cf = CorrelationFunction(ta, params)

#######################################################################
# Creation of the aggregate basic
#######################################################################

while difference > 0.1:
    t = np.linspace(0, two_pi, numMol + 1)
    x = r * np.cos(t)
    y = r * np.sin(t)
    circle = np.c_[x, y]

    artificialDis = math.sqrt(((circle[0][0] - circle[1][0])**2) +
                              ((circle[0][1] - circle[1][1])**2))
    difference = abs(artificialDis - proteinDis)
コード例 #4
0
ファイル: demo6_absorption.py プロジェクト: saayeh/quantarhei
"""
cfce_params1 = dict(ftype="OverdampedBrownian",
                    reorg=20.0,
                    cortime=100.0,
                    T=100,
                    matsubara=20)

en = 12000.0

e_units = qr.energy_units("1/cm")

with e_units:
    m = qr.Molecule("Molecule", [0.0, en])
    with qr.energy_units("1/cm"):
        cfce1 = qr.CorrelationFunction(ta, cfce_params1)

m.set_egcf((0, 1), cfce1)
m.set_dipole(0, 1, [0.0, 1.0, 0.0])

a1 = qr.AbsSpect(ta, m)

with qr.energy_units("1/cm"):
    a1.calculate(rwa=en)

HH = m.get_Hamiltonian()
with qr.frequency_units("1/cm"):
    print(HH)
    a1.plot(axis=[11500, 12500, 0, numpy.max(a1.data) * 1.1])

save_load = False
コード例 #5
0
    m2 = qr.Molecule([0.0, 12300.0])

    #  correlation functions the environment
    #
    cfce_params1 = dict(ftype="OverdampedBrownian",
                        reorg=40.0,
                        cortime=100.0,
                        T=100,
                        matsubara=20)
    cfce_params2 = dict(ftype="OverdampedBrownian",
                        reorg=40.0,
                        cortime=100.0,
                        T=100,
                        matsubara=20)

    cfce1 = qr.CorrelationFunction(t_axis, cfce_params1)
    cfce2 = qr.CorrelationFunction(t_axis, cfce_params2)

    m1.set_transition_environment((0, 1), cfce1)
    m2.set_transition_environment((0, 1), cfce2)

# we create an aggregate from the two molecules
agg = qr.Aggregate(molecules=[m1, m2])

# we set transition dipole moment orientations for the two molecules
m1.set_dipole(0, 1, [1.0, 0.8, 0.8])
m2.set_dipole(0, 1, [0.8, 0.8, 0.0])

# resonance coupling is set by hand
with qr.energy_units("1/cm"):
    agg.set_resonance_coupling(0, 1, 100.0)
コード例 #6
0
    for i_m in range(N_molecules):
        mod = qr.Mode(vomega)
        mols[i_m].add_Mode(mod)
        mod.set_nmax(0, Ng_max)
        mod.set_nmax(1, Ne_max)
        mod.set_HR(1, hr_fac)

# Bath correlation functions
timea = qr.TimeAxis(0.0, 1000, 1.0)
cfpar = dict(ftype="OverdampedBrownian",
             reorg=30,
             cortime=100,
             T=300,
             matsubara=100)
with qr.energy_units("1/cm"):
    cf = qr.CorrelationFunction(timea, cfpar)

# set bath correlation functions to the molecules
for i_m in range(N_molecules):
    mols[i_m].set_transition_environment((0, 1), cf)

# aggregate of molecules
agg = qr.Aggregate(mols)

agg.set_coupling_by_dipole_dipole()

# Building the aggregate
qr.log_report("Building aggregate")
agg.build()
qr.log_report("...done")
コード例 #7
0
ファイル: demo_2D_dimer.py プロジェクト: gharib85/quantarhei
#
# Setting up laboratory
#
lab = lab_settings(lab_settings.FOUR_WAVE_MIXING)
a_0 = numpy.array([1.0, 0.0, 0.0], dtype=numpy.float64)
lab.set_laser_polarizations(a_0,a_0,a_0,a_0)

#
# System-bath interaction
#
   
tsbi = qr.TimeAxis(0.0, 3*Nr, 1.0)
params = dict(ftype="OverdampedBrownian", T=300, reorg=100.0, cortime=50.0)
with qr.energy_units('1/cm'):
    cf = qr.CorrelationFunction(tsbi, params)
    
params2 = dict(ftype="UnderdampedBrownian", T=300, reorg=10.0, freq=150.0,
               gamma=1.0/10000.0)
with qr.energy_units('1/cm'):
    cf2 = qr.CorrelationFunction(tsbi, params2)
    
#cf.add_to_data(cf2)

##
## Set system-bath interaction
##
#mol1.set_transition_environment((0,1),cf)
#mol2.set_transition_environment((0,1),cf)
#mol3.set_transition_environment((0,1),cf)
コード例 #8
0
    agg.set_resonance_coupling(0, 1, 80.0)
    agg.set_resonance_coupling(0, 2, 100.0)

#   Interaction with the bath is set through bath correlation functions
timea = qr.TimeAxis(0.0, 500, 1.0)
cpar1 = dict(ftype="OverdampedBrownian-HighTemperature",
             reorg=50,
             cortime=50,
             T=300)
cpar2 = dict(ftype="OverdampedBrownian-HighTemperature",
             reorg=50,
             cortime=50,
             T=300)

with qr.energy_units("1/cm"):
    cfce1 = qr.CorrelationFunction(timea, cpar1)
    cfce2 = qr.CorrelationFunction(timea, cpar2)

m1.set_transition_environment((0, 1), cfce1)
m2.set_transition_environment((0, 1), cfce1)
m3.set_transition_environment((0, 1), cfce2)

#    Aggregate is built
agg.build()

###############################################################################
#
#    Definition of the hierarchy
#
###############################################################################
コード例 #9
0
    m.set_energy(1, 12320.0)
    m = agg.get_Molecule_by_name("BChl6")
    m.set_energy(1, 12593.0)
    m = agg.get_Molecule_by_name("BChl7")
    m.set_energy(1, 12353.0)

#
# Set resonance coupling by dipole-dipole method
#
agg.set_coupling_by_dipole_dipole(epsr=1.21)

# Setting spectral density to all molecules
tmax = qr.TimeAxis(0.0, 1000, 1.0)
param = dict(ftype="OverdampedBrownian", reorg=50, cortime=50, T=300)
with qr.energy_units("1/cm"):
    cfce = qr.CorrelationFunction(tmax, param)

for mol in agg.monomers:
    mol.set_transition_environment((0, 1), cfce)

#
# Build the aggregate
#
agg.build()

#
# Now we can start simulations
#
H = agg.get_Hamiltonian()

with energy_units("1/cm"):
コード例 #10
0
                  cortime=100,
                  T=77,
                  matsubara=100)
cfP_params = dict(ftype="OverdampedBrownian",
                  reorg=700,
                  cortime=120,
                  T=77,
                  matsubara=100)
cfCT_params = dict(ftype="OverdampedBrownian",
                   reorg=3600,
                   cortime=20,
                   T=77,
                   matsubara=200)

with qr.energy_units("1/cm"):
    cfA = qr.CorrelationFunction(time, cfA_params)
    cfH = qr.CorrelationFunction(time, cfH_params)
    cfP = qr.CorrelationFunction(time, cfP_params)
    cfCT = qr.CorrelationFunction(time, cfCT_params)

PM.set_transition_environment((0, 1), cfP)
PL.set_transition_environment((0, 1), cfP)
BM.set_transition_environment((0, 1), cfA)
BL.set_transition_environment((0, 1), cfA)
HL.set_transition_environment((0, 1), cfH)
HM.set_transition_environment((0, 1), cfH)
PCT_M.set_transition_environment((0, 1), cfCT)
PCT_L.set_transition_environment((0, 1), cfCT)

agg.build(mult=2)
#agg.save("RC_Model_40_4_adjusted_CT_no_vibrations_built.hdf5")