From 58b3569592dacb2b1a8d2f655f1c2a566f9fe42b Mon Sep 17 00:00:00 2001 From: Emil VATAI Date: Tue, 19 Mar 2024 09:33:42 +0900 Subject: [PATCH] Blacken --- examples/kinetics_fad_semiclassical.py | 19 +++++++------------ examples/kinetics_simple.py | 5 +++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/examples/kinetics_fad_semiclassical.py b/examples/kinetics_fad_semiclassical.py index d14b5e4..37eed20 100644 --- a/examples/kinetics_fad_semiclassical.py +++ b/examples/kinetics_fad_semiclassical.py @@ -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. @@ -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) @@ -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) diff --git a/examples/kinetics_simple.py b/examples/kinetics_simple.py index f3f47a7..4be02e3 100644 --- a/examples/kinetics_simple.py +++ b/examples/kinetics_simple.py @@ -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():