Skip to content

Commit

Permalink
Updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
JackWetherell committed Aug 24, 2022
1 parent c070512 commit fbe69b6
Show file tree
Hide file tree
Showing 24 changed files with 222 additions and 133 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ We provide a [tutorial](https://github.com/iDEA-org/iDEA/blob/master/tutorial/tu

## Papers You Can Reproduce With iDEA

1. Advantageous nearsightedness of many-body perturbation theory contrasted with Kohn-Sham density functional theory.
[paper](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.99.045129), [reprint](https://jackwetherell.github.io/files/nearsightedness.pdf), [preprint](https://arxiv.org/pdf/1812.02661.pdf), [code](https://github.com/JackWetherell/advantageous-nearsightedness).
1. "Advantageous nearsightedness of many-body perturbation theory contrasted with Kohn-Sham density functional theory", J. Wetherell, M. J. P. Hodgson, L. Talirz, and R. W. Godby, Physical Review B 99 045129 (2019).
[paper](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.99.045129), [reprint](https://jackwetherell.github.io/files/nearsightedness.pdf), [preprint](https://arxiv.org/pdf/1812.02661.pdf), [code](https://github.com/JackWetherell/advantageous-nearsightedness).

More coming soon...

Expand Down
2 changes: 1 addition & 1 deletion build/lib/iDEA/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def softened_interaction_alternative(
r"""
Constructs the alternative softened interaction potential.
.. math:: v_\mathrm{int}(x,x') = \frac{s}{\sqrt{x-x'}^{2} + a}
.. math:: v_\mathrm{int}(x,x') = \frac{s}{{(\sqrt{x-x'} + a)}^{2}}
| Args:
| x: np.ndarray, x grid.
Expand Down
1 change: 1 addition & 0 deletions build/lib/iDEA/methods/hartree.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

kinetic_energy_operator = iDEA.methods.non_interacting.kinetic_energy_operator
external_potential_operator = iDEA.methods.non_interacting.external_potential_operator
propagate_step = iDEA.methods.non_interacting.propagate_step


def hartree_potential_operator(s: iDEA.system.System, n: np.ndarray) -> np.ndarray:
Expand Down
1 change: 1 addition & 0 deletions build/lib/iDEA/methods/hartree_fock.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
kinetic_energy_operator = iDEA.methods.non_interacting.kinetic_energy_operator
external_potential_operator = iDEA.methods.non_interacting.external_potential_operator
hartree_potential_operator = iDEA.methods.hartree.hartree_potential_operator
propagate_step = iDEA.methods.non_interacting.propagate_step


def exchange_potential_operator(s: iDEA.system.System, p: np.ndarray) -> np.ndarray:
Expand Down
1 change: 1 addition & 0 deletions build/lib/iDEA/methods/hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
exchange_correlation_potential_operator = (
iDEA.methods.lda.exchange_correlation_potential_operator
)
propagate_step = iDEA.methods.non_interacting.propagate_step


def hamiltonian(
Expand Down
1 change: 1 addition & 0 deletions build/lib/iDEA/methods/lda.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
kinetic_energy_operator = iDEA.methods.non_interacting.kinetic_energy_operator
external_potential_operator = iDEA.methods.non_interacting.external_potential_operator
hartree_potential_operator = iDEA.methods.hartree.hartree_potential_operator
propagate_step = iDEA.methods.non_interacting.propagate_step


class HEG:
Expand Down
12 changes: 6 additions & 6 deletions build/lib/iDEA/methods/non_interacting.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,13 @@ def propagate(
Propagate a set of orbitals forward in time due to a dynamic local pertubation.
| Args:
| s: iDEA.system.System, System object.
| state: iDEA.state.SingleBodyState, State to be propigated.
| v_ptrb: np.ndarray, Local perturbing potential on the grid of t and x values, indexed as v_ptrb[time,space].
| s: iDEA.system.System, System object.
| state: iDEA.state.SingleBodyState, State to be propigated.
| v_ptrb: np.ndarray, Local perturbing potential on the grid of t and x values, indexed as v_ptrb[time,space].
| t: np.ndarray, Grid of time values. \n
| hamiltonian_function: Callable, Hamiltonian function [If None this will be the non_interacting function]. (default = None)
| restricted: bool, Is the calculation restricted (r) on unrestricted (u). (default=False)
| name: str, Name of method. (default = "non_interacting")
| hamiltonian_function: Callable, Hamiltonian function [If None this will be the non_interacting function]. (default = None)
| restricted: bool, Is the calculation restricted (r) on unrestricted (u). (default=False)
| name: str, Name of method. (default = "non_interacting")
| Returns:
| evolution: iDEA.state.SingleBodyEvolution, Solved time-dependent evolution.
Expand Down
4 changes: 3 additions & 1 deletion build/lib/iDEA/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,9 @@ def exchange_energy(
elif len(p.shape) == 3:
E_x = np.zeros(shape=p.shape[0], dtype=complex)
for j in range(E_x.shape[0]):
E_x[j] = 0.5 * np.tensordot(p[j, :, :].T, v_x[j, :, :], axes=2) * s.dx * s.dx
E_x[j] = (
0.5 * np.tensordot(p[j, :, :].T, v_x[j, :, :], axes=2) * s.dx * s.dx
)
return E_x.real

else:
Expand Down
5 changes: 4 additions & 1 deletion build/lib/iDEA/reverse_engineering.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def reverse_propagation(

# Reverse propagation.
for j, ti in enumerate(
tqdm(t, desc="iDEA.reverse_engineering.reverse_propagation: reversing propagation")
tqdm(
t,
desc="iDEA.reverse_engineering.reverse_propagation: reversing propagation",
)
):
if j != 0:

Expand Down
2 changes: 1 addition & 1 deletion build/lib/iDEA/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(
r"""
State of particles in a many-body state.
This is described by a spatial part
This is described by a spatial part
.. math:: \psi(x_1,x_2,\dots,x_N)
on the spatial grid, and a spin
part on the spin grid
Expand Down
Binary file added dist/iDEA_latest-1.0.0-py3.8.egg
Binary file not shown.
Binary file modified iDEA/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/__pycache__/observables.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/__pycache__/reverse_engineering.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/__pycache__/state.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/methods/__pycache__/hartree.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/methods/__pycache__/hartree_fock.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/methods/__pycache__/hybrid.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/methods/__pycache__/interacting.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/methods/__pycache__/lda.cpython-310.pyc
Binary file not shown.
Binary file modified iDEA/methods/__pycache__/non_interacting.cpython-310.pyc
Binary file not shown.
246 changes: 127 additions & 119 deletions iDEA_latest.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
Expand Up @@ -5,128 +5,136 @@ Summary: interacting Dynamic Electrons Approach (iDEA)
Home-page: https://idea-org.github.io/
Author: Jack Wetherell
Author-email: [email protected]
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/iDEA-org/iDEA/issues
Description: # <img src="docs/logo.png" alt="" width="70"/> iDEA - The interacting Dynamic Electrons Approach

Exploring exact and approximate methods for many-electron quantum mechanics.

![pip](https://img.shields.io/pypi/v/iDEA-latest)
![tag](https://img.shields.io/github/v/tag/iDEA-org/iDEA)
[![Documentation Status](https://readthedocs.org/projects/idea-interacting-dynamic-electrons-approach/badge/?version=latest)](https://idea-interacting-dynamic-electrons-approach.readthedocs.io/en/latest/?badge=latest)
![Issues](https://img.shields.io/github/issues/iDEA-org/iDEA)
![Pull Requests](https://img.shields.io/github/issues-pr/iDEA-org/iDEA)

**iDEA (interacting Dynamic Electrons Approach) is a high-performance, user friendly, free software framework in python for state-of-the-art research, experiments, testing and education in many-body quantum physics with a focus on reproducibility, interactivity and simplicity.**

[Homepage](https://idea-org.github.io/)

[View on GitHub](https://github.com/iDEA-org/iDEA)

![demo](demo.gif)

## Installation

### User

To install the [latest version of the iDEA code](https://pypi.org/project/iDEA-latest/):

`pip install iDEA-latest`

To add iDEA to your poetry environment:

`poetry add iDEA-latest`

### Developer

If you would like to develop iDEA, first fork this git repository, and then clone from there.

Add the upstream repository: `git remote add upstream https://github.com/iDEA-org/iDEA.git`

And then install locally: `python setup.py install`

## Documentation

For full details of usage please see our [tutorial](https://github.com/iDEA-org/iDEA/blob/master/tutorial/tutorial.ipynb). The full API documentation is available at [readthedocs](https://idea-interacting-dynamic-electrons-approach.readthedocs.io/en/latest/).

## Features

Some of iDEA's features:
- Exact solution of the many-electron problem by solving the static and time-dependent Schrödinger equation, including exact exchange and correlation.
- Exact solutions which approach the degree of exchange and correlation in realistic systems.
- Free choice of external potential that may be time-dependent, on an arbitrarilty dense spatial grid, for any number of electron with any spin configuration.
- Implementation of various approximate methods (established and novel) for comparison, including:
- Non-interacting electrons
- Hartree theory
- Restricted and unrestricted Hartree-Fock
- The Local Density Approximation (LDA)
- Hybrid functionals
- Implementation of all common observables.
- Reverse-engineering to solve potential inversion, from exact Kohn-Sham DFT and beyond.
- Fully parallelised using OpenBLAS.
- Fully parallelised for all cuda supporting GPUS.

## Example

In order to solve the Schrödinger equation for the two electron atom for the ground-state charge density and total energy:

```
import iDEA
system = iDEA.system.systems.atom
ground_state = iDEA.methods.interacting.solve(system, k=0)
n = iDEA.observables.density(system, state=ground_state)
E = ground_state.energy

import matplotlib.pyplot as plt
print(E)
plt.plot(system.x, n, 'k-')
plt.show()
```

## Tutorial

We provide a [tutorial](https://github.com/iDEA-org/iDEA/blob/master/tutorial/tutorial.ipynb) where you can learn how to use the iDEA code in your research and teaching projects.

## Papers You Can Reproduce With iDEA

1. Advantageous nearsightedness of many-body perturbation theory contrasted with Kohn-Sham density functional theory.
[paper](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.99.045129), [reprint](https://jackwetherell.github.io/files/nearsightedness.pdf), [preprint](https://arxiv.org/pdf/1812.02661.pdf), [code](https://github.com/JackWetherell/advantageous-nearsightedness).

More coming soon...

The development and applications of the iDEA code from 2010 to 2021 is documented [here](https://www-users.york.ac.uk/~rwg3/idea.html).

## Teaching

iDEA can also be used to create teaching content, visualisations and expositions> For example, see the following [YouTube video created using iDEA](https://www.youtube.com/watch?v=JaSVguMFA-M&ab_channel=JackWetherell).

iDEA was used to create teaching content for the [Density Functional Theory MOOC on Coursera](https://www.coursera.org/learn/density-functional-theory).

## Developers

<img src="docs/dev.png" alt="" width="500"/>

## Contributors

We thank all of the developers, PhD students, masters students, summer project interns and researchers for thier key contributions to iDEA:

Sean Adamson, Jacob Chapman, Thomas Durrant, Razak Elmaslmane, Mike Entwistle, Rex Godby, Matt Hodgson, Piers Lillystone, Aaron Long, Robbie Oliver, James Ramsden, Ewan Richardson, Matthew Smith, Leopold Talirz and Jack Wetherell.

## Getting Involved

To get involved:
- Raising issues and pull requests here is greatly appreciated!
- We can add any papers that can be fully reproduced by iDEA to our dedicated page by sending your open access paper to [email protected].
- We provide a [template](https://github.com/iDEA-org/iDEA-project-template) to get you started!

## Dependencies

iDEA supports `python 3.8+` along with the following dependences:
```
numpy >= "1.22.3"
scipy >= "1.8.0"
matplotlib >= "3.5.1"
jupyterlab >= "3.3.2"
tqdm >= "4.64.0"
```

<img src="docs/logos.png" alt="" width="200"/>

Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: COPYING.txt

# <img src="docs/logo.png" alt="" width="70"/> iDEA - The interacting Dynamic Electrons Approach

![pip](https://img.shields.io/pypi/v/iDEA-latest)
![tag](https://img.shields.io/github/v/tag/iDEA-org/iDEA)
[![Documentation Status](https://readthedocs.org/projects/idea-interacting-dynamic-electrons-approach/badge/?version=latest)](https://idea-interacting-dynamic-electrons-approach.readthedocs.io/en/latest/?badge=latest)
![Issues](https://img.shields.io/github/issues/iDEA-org/iDEA)
![Pull Requests](https://img.shields.io/github/issues-pr/iDEA-org/iDEA)

**iDEA (interacting Dynamic Electrons Approach) is a high-performance, user friendly, free software framework in python for state-of-the-art research, experiments, testing and education in many-body quantum physics with a focus on reproducability, interactivity and simplicity.**

[View on GitHub](https://github.com/iDEA-org/iDEA)

![demo](demo.gif)

The principle goal of the iDEA code is to improve the accuracy of approximations within fundamental theories of many-electron quantum mechanics. It has a central role in a number of research projects related to many-particle quantum mechanics for electrons in matter.

Some of iDEA's features:
- Exact solution of the many-electron problem by solving the static and time-dependent Schrödinger equation, including exact exchange and correlation.
- Exact solutions which approach the degree of exchange and correlation in realistic systems.
- Free choice of external potential that may be time-dependent, on an arbitrarilty dense spatial grid, for any number of electron with any spin configuration.
- Implementation of various approximate methods (established and novel) for comparison, including:
- Non-interacting electrons
- Hartree theory
- Restricted and unrestricted Hartree-Fock
- The Local Density Approximation (LDA)
- Hybrid functionals
- Implementation of all common observables.
- Reverse-engineering to solve potential inversion, from exact Kohn-Sham DFT and beyond.
- Fully parallelised using OpenBLAS.
- Fully parallelised for all cuda supporting GPUS.

## Depenencies

iDEA supports `python 3.8+` along with the follwing dependences:
```
numpy >= "1.22.3"
scipy >= "1.8.0"
matplotlib >= "3.5.1"
jupyterlab >= "3.3.2"
tqdm >= "4.64.0"
```

<img src="docs/logos.png" alt="" width="200"/>

## Installation

### User

To install the [latest version of the iDEA code](https://pypi.org/project/iDEA-latest/):

`pip install iDEA-latest`

To add iDEA to your poetry environment:

`poetry add iDEA-latest`

### Developer

If you would like to develop iDEA, first fork this git repository, and then clone from there.

Add the upstream repository: `git remote add upstream https://github.com/iDEA-org/iDEA.git`

And then install locally: `python setup.py install`

## Documentation

For full details of usage please see our [tutorial](https://github.com/iDEA-org/iDEA/blob/master/tutorial/tutorial.ipynb). The full API documentation is available at [readthedocs](https://idea-interacting-dynamic-electrons-approach.readthedocs.io/en/latest/).

## Example

In order to solve the Schrödinger equation for the two electron atom for the ground-state charge density and total energy:

```
import iDEA
system = iDEA.system.systems.atom
ground_state = iDEA.methods.interacting.solve(system, k=0)
n = iDEA.observables.density(system, state=ground_state)
E = ground_state.energy

import matplotlib.pyplot as plt
print(E)
plt.plot(system.x, n, 'k-')
plt.show()
```

## Tutorial

We provide a [tutorial](https://github.com/iDEA-org/iDEA/blob/master/tutorial/tutorial.ipynb) where you can learn how to use the iDEA code in your research and teaching projects.

## Papers You Can Reproduce With iDEA

1. Advantageous nearsightedness of many-body perturbation theory contrasted with Kohn-Sham density functional theory.
[paper](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.99.045129), [reprint](https://jackwetherell.github.io/files/nearsightedness.pdf), [preprint](https://arxiv.org/pdf/1812.02661.pdf), [code](https://github.com/JackWetherell/advantageous-nearsightedness).

More coming soon...

## Teaching

iDEA can also be used to create teaching content, visualisations and expositions> For example, see the following [YouTube video created using iDEA](https://www.youtube.com/watch?v=JaSVguMFA-M&ab_channel=JackWetherell).

## Developers

<img src="docs/dev.png" alt="" width="500"/>

## Contributors

We thank all of the developers, PhD students, masters students, summer project interns and researchers for thier key contributions to iDEA:

Sean Adamson, Jacob Chapman, Thomas Durrant, Razak Elmaslmane, Mike Entwistle, Rex Godby, Matt Hodgson, Piers Lillystone, Aaron Long, Robbie Oliver, James Ramsden, Ewan Richardson, Matthew Smith, Leopold Talirz and Jack Wetherell.

## Getting Involved

To get involved:
- Raising issues and pull requests here is greatly appreciated!
- We can add any papers that can be fully reproduced by iDEA to our dedicated page by sending your open access paper to [email protected].
- We provide a [template](https://github.com/iDEA-org/iDEA-project-template) to get you started!
Loading

0 comments on commit fbe69b6

Please sign in to comment.