---
# System prepended metadata

title: Jonar's bachelor thesis

---

# Jonar's bachelor thesis

## 2020-04-24

* Suggestion for layout for thesis.
* Generalization of the current Python code:

  - Position and radius of sphere as input parameters.
  - Non-unit charge.
  - Position of the charge (_not_ always in the center of the  sphere)
  - Multiple charges (later).

## 2020-05-04

To try with the more general code:
* Larger quadratures
* Change the radius of the sphere
* Change the position of the sphere
* Change the position of the charge
* Change the value of the charge
* Use multiple charges inside the single sphere

Each of these tests should be written in a _separate_ function.

* Plot the absolute difference between the sum of the `sigma` vector and the total charge in the sphere as a function of the number of points used in the quadrature.

## 2020-05-08

The code needs to be generalized to also handle IEF.

- Create a function to generate the D matrix.
- Rename `solve` to `cosmo`.
- Create a functioni similar to `solve` but for IEF and call it `ief`.

#### Testing

Use `q=1` and `position = [0, 0, z]` and vary `z` from `0.0` and `R-0.2`, where `R` is the radius of the cavity: 
- Collect the results for `np.sum(Sigma)`. Make a plot
- Collect the solvation energy and make a plot.
![](https://i.imgur.com/1JK6QZg.png)
  This is a scalar product of the vector of potentials and apparent surface charges.

Use a dipole `q=1` at `(a,0,z)` and `q=-1` at `(-a,0,z)` with `a=0.1`. Vary `z` as before and collect `np.sum(Sigma)` and the energy.
  
These tests can be repeated for different quadratures.




