Skip to content

Commit

Permalink
Blacken
Browse files Browse the repository at this point in the history
  • Loading branch information
vatai committed Mar 19, 2024
1 parent 9bf1505 commit 58b3569
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
19 changes: 7 additions & 12 deletions examples/kinetics_fad_semiclassical.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#! /usr/bin/env python
import matplotlib.pyplot as plt # TODO REMOVE THIS
import numpy as np

from radicalpy.classical import Rate, RateEquations
from radicalpy.experiments import semiclassical_kinetics_mary
from radicalpy.plot import (plot_3d_results,
plot_bhalf_time)
from radicalpy.plot import plot_3d_results, plot_bhalf_time
from radicalpy.simulation import LiouvilleSimulation, Molecule, SemiclassicalSimulation
from radicalpy.utils import Bhalf_fit


def main():
# Kinetic simulation of FAD at pH 2.1.
# For FAD quenching: uncomment the three quenching kinetic parameters.
Expand Down Expand Up @@ -119,7 +120,9 @@ def main():

rate_eq = RateEquations(base)
mat = rate_eq.matrix.todense()
rho0 = np.array([0, 0, 1/3, 1/3, 1/3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
rho0 = np.array(
[0, 0, 1 / 3, 1 / 3, 1 / 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
)
time = np.arange(0, 10e-6, 10e-9)
Bs = np.arange(0, 30)

Expand All @@ -129,15 +132,7 @@ def main():

num_samples = 40
results = semiclassical_kinetics_mary(
sim,
num_samples,
rho0,
ts=time,
Bs=Bs,
D=0,
J=0,
kinetics=mat,
relaxations=[]
sim, num_samples, rho0, ts=time, Bs=Bs, D=0, J=0, kinetics=mat, relaxations=[]
)

plot_3d_results(results, factor=1e6)
Expand Down
5 changes: 3 additions & 2 deletions examples/kinetics_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
import graphviz
import matplotlib.pyplot as plt
import numpy as np
from radicalpy.classical import (Rate, RateEquations, latex_eqlist_to_align,
latexify, reaction_scheme)

from radicalpy.classical import (Rate, RateEquations, latex_eqlist_to_align, latexify,
reaction_scheme)


def main():
Expand Down

0 comments on commit 58b3569

Please sign in to comment.