Skip to content

Commit

Permalink
new commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Herb committed Oct 14, 2024
1 parent 9e9d5ad commit b5dce5f
Show file tree
Hide file tree
Showing 53 changed files with 22,618 additions and 205 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ environment_long.yml
test_script.py
info.txt
.coverage
.pre-commit-config.yaml

*.egg-info/
dist/
Expand All @@ -22,5 +23,5 @@ data/processed/
data/figures/
data/logging.log

.ipynb_checkpoints/
__pycache__/
__pycache__
.ipynb_checkpoints
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<img src="https://img.shields.io/badge/version-0.1.4-blue"
alt="Release"></a>
<a href='https://coveralls.io/github/dehe1011/QuantumDNA?branch=main'>
<img src='https://coveralls.io/repos/github/dehe1011/QuantumDNA/badge.svg?branch=main'
<img src='https://coveralls.io/repos/github/dehe1011/QuantumDNA/badge.svg?branch=main'
alt='Coverage Status' /></a>
<a href='https://github.com/dehe1011/QuantumDNA/actions/workflows/code-quality.yml'>
<img src='https://img.shields.io/github/actions/workflow/status/dehe1011/QuantumDNA/code-quality.yml?branch=main'
<img src='https://img.shields.io/github/actions/workflow/status/dehe1011/QuantumDNA/code-quality.yml?branch=main'
alt='GitHub Workflow Status' /></a>
<a href='https://github.com/psf/black'>
<img src='https://img.shields.io/badge/code%20style-black-000000.svg'
Expand All @@ -27,7 +27,7 @@

---

# QuantumDNA
# QuantumDNA

**Author: [Dennis Herb](https://github.com/dehe1011)**

Expand Down Expand Up @@ -57,12 +57,12 @@ Welcome to QuantumDNA, a powerful and flexible tool designed to calculate lifeti

**July 2024**

* Added a graphical user interface (GUI) to the package such that it is easily accessible for users who are less familiar with computer science. The user interface is based on the [customtkinter](https://customtkinter.tomschimansky.com/) package by Tom Schimansky.
* Added a graphical user interface (GUI) to the package such that it is easily accessible for users who are less familiar with computer science. The user interface is based on the [customtkinter](https://customtkinter.tomschimansky.com/) package by Tom Schimansky.
* Added a Jupyter Notebook [`0_Paper`](docs/tutorials/0_Paper.ipynb) that reproduces all figures contained in our paper (and the supplementary) [D. Herb, M. Rossini and J. Ankerhold, *Physical Review E 109*, 064413 (2024).](https://doi.org/10.1103/PhysRevE.109.064413)
* Added a [documentation](https://quantumdna.readthedocs.io/en/latest/) available on Read the Docs
* Added a [documentation](https://quantumdna.readthedocs.io/en/latest/) available on Read the Docs


## Getting started
## Getting started

### Quick Installation

Expand All @@ -76,7 +76,7 @@ To ensure compatibility and avoid conflicts with other packages, we recommend us

### Example Program

To test QuantumDNA, you can run the following simple example where the exciton lifetime and the average charge separation of a double-stranded GCG DNA sequence are calculated. You can try different sequences, tight-binding models, and keyword arguments to investigate how these factors affect the exciton lifetime and average charge separation. For example, you might find that in general more uniform sequences show higher values. Do you know the reason for this observation?
To test QuantumDNA, you can run the following simple example where the exciton lifetime and the average charge separation of a double-stranded GCG DNA sequence are calculated. You can try different sequences, tight-binding models, and keyword arguments to investigate how these factors affect the exciton lifetime and average charge separation. For example, you might find that in general more uniform sequences show higher values. Do you know the reason for this observation?

```python

Expand All @@ -87,23 +87,23 @@ upper_strand = 'GCG'
tb_model_name = 'ELM'
kwargs = dict(unit='rad/ps', relax_rate=3, source='Hawke2010')

# calculation
# calculation
lifetime = calc_lifetime(upper_strand, tb_model_name, **kwargs)
dipole = calc_dipole(upper_strand, tb_model_name, **kwargs)

# output
# output
print(f"Exciton lifetime {lifetime} fs")
print(f"Average charge separation {dipole} A")
```


## Documentation

The documentation for the [latest release](https://quantumdna.readthedocs.io/en/latest/) is available for reading on Read The Docs. The [package website](https://dehe1011.github.io/QuantumDNA/) contains general information about the project and planned future developments.
The documentation for the [latest release](https://quantumdna.readthedocs.io/en/latest/) is available for reading on Read The Docs. The [package website](https://dehe1011.github.io/QuantumDNA/) contains general information about the project and planned future developments.

### Tutorials

The code contains some tutorials and demonstrations to better understand and explore the functionalities.
The code contains some tutorials and demonstrations to better understand and explore the functionalities.

In the [`docs/tutorials`](docs/tutorials) folder you can find the notebook [`0_Paper`](docs/tutorials/0_Paper.ipynb) that contains and reproduces all the figures contained in [D. Herb, M. Rossini and J. Ankerhold, Ultrafast excitonic dynamics in DNA: Bridging correlated quantum dynamics and sequence dependence.](https://arxiv.org/abs/2402.16892)

Expand Down
Binary file modified docs/figures/partial6.pdf
Binary file not shown.
Binary file added docs/figures/user_interface_figures/menu_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions docs/tutorials/0_Paper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "03930215-8844-4878-98f0-cbac38fbbbb9",
"metadata": {},
"outputs": [],
Expand All @@ -36,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "78711552",
"metadata": {},
"outputs": [],
Expand All @@ -53,7 +53,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "4115c17a-a794-4831-a19f-2dc10df39399",
"metadata": {},
"outputs": [],
Expand All @@ -72,7 +72,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "50577b3b",
"metadata": {},
"outputs": [
Expand All @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "689d1a67",
"metadata": {},
"outputs": [
Expand All @@ -126,7 +126,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "93d0879d-9fce-465f-87aa-0cd256f19f4c",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -178,7 +178,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "2c638d79-f1f3-4d0f-bf2a-2d0391d35b29",
"metadata": {},
"outputs": [
Expand Down
28 changes: 14 additions & 14 deletions docs/tutorials/4_Parallelized_Calculations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 2,
"id": "701251bd-48c7-4c02-84cf-378a24e29d27",
"metadata": {},
"outputs": [],
Expand All @@ -61,24 +61,24 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 3,
"id": "9d307305-05b9-41e6-ae89-1c56e4cbc055",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████████████████████████████████████████████████████████████████████████████| 64/64 [00:14<00:00, 4.40it/s]\n",
"100%|██████████████████████████████████████████████████████████████████████████████████| 64/64 [00:06<00:00, 10.28it/s]\n",
"100%|██████████████████████████████████████████████████████████████████████████████████| 64/64 [00:06<00:00, 10.05it/s]\n"
"100%|██████████████████████████████████████████████████████████████████████████████████| 64/64 [00:13<00:00, 4.90it/s]\n",
"100%|██████████████████████████████████████████████████████████████████████████████████| 64/64 [00:05<00:00, 11.16it/s]\n",
"100%|██████████████████████████████████████████████████████████████████████████████████| 64/64 [00:05<00:00, 10.97it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time: 27.55949354171753s\n"
"Time: 25.176501274108887s\n"
]
}
],
Expand Down Expand Up @@ -113,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 5,
"id": "5825e2c8-14e6-495e-97bf-0eb4dc286010",
"metadata": {},
"outputs": [],
Expand All @@ -129,7 +129,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 6,
"id": "12a216d1-2cc9-4ace-85fe-b3f1c75673a0",
"metadata": {},
"outputs": [],
Expand All @@ -139,7 +139,7 @@
" return {key: value / total for key, value in data.items()}\n",
"\n",
"# consider only the lower strand average exciton population\n",
"exciton_transfer_lower_dict = {key: value[1] for key, value in exciton_transfer_dict.items()}\n",
"exciton_transfer_lower_dict = {key: value[1]['exciton'] for key, value in exciton_transfer_dict.items()}\n",
"\n",
"dicts = [lifetime_dict, dipole_dict, dipole_moment_dict, exciton_transfer_lower_dict]\n",
"labels = ['Exciton lifetime', 'Charge separation', 'Dipole moment', 'Exciton Transfer']\n",
Expand All @@ -149,15 +149,15 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 7,
"id": "c7a4b7ce-e199-4c95-bd3a-b57d910c7aec",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Dennis Herb\\AppData\\Local\\Temp\\ipykernel_26812\\631330690.py:6: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.\n",
"C:\\Users\\Dennis Herb\\AppData\\Local\\Temp\\ipykernel_31124\\631330690.py:6: UserWarning: set_ticklabels() should only be used with a fixed number of ticks, i.e. after set_ticks() or using a FixedLocator.\n",
" ax.set_xticklabels(labels = dna_seqs, rotation=90)\n"
]
},
Expand Down Expand Up @@ -185,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 9,
"id": "546d66e0-59c3-4020-bb20-856f0228b368",
"metadata": {},
"outputs": [
Expand All @@ -211,8 +211,8 @@
"pop_upper_strand, pop_lower_strand = calc_exciton_transfer(upper_strand, tb_model_name, average=False, **kwargs)\n",
"\n",
"fig, ax = plt.subplots()\n",
"ax.plot(pop_upper_strand, label='upper strand')\n",
"ax.plot(pop_lower_strand, label='lower strand')\n",
"ax.plot(pop_upper_strand['exciton'], label='upper strand')\n",
"ax.plot(pop_lower_strand['exciton'], label='lower strand')\n",
"ax.legend()\n",
"plt.show()"
]
Expand Down
13 changes: 6 additions & 7 deletions qDNA/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
__version__ = '0.1.4'
__version__ = "0.1.4"

from .tools import *
from .dna_seq import *

from .utils import *
from .model import *
from .environment import *
from .dynamics import *
from .environment import *
from .evaluation import *
from .plotting import *
from .gui import *
from .model import *
from .plotting import *
from .tools import *
from .utils import *
5 changes: 3 additions & 2 deletions qDNA/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ham_kwargs_default:
source: 'Hawke2010'
description: '2P'
particles: ['electron','hole','exciton']
unit: 'rad/ps'
unit: 'rad/ps'
interaction_param: 0. # in rad/ps
relaxation: True
nn_cutoff: True
Expand All @@ -36,10 +36,11 @@ diss_kwargs_default:
spectral_density: 'debye'
exponent: 1.

me_kwargs_default:
me_kwargs_default:
t_steps: 500.
t_end: 3. # ps
t_unit: 'ps'
init_e_state: '(0, 0)'
init_h_state: '(0, 0)'
deloc_init_state: False
solver_method: 'adams'
Loading

0 comments on commit b5dce5f

Please sign in to comment.