Skip to content

Commit

Permalink
Fixed formulas for NAOs
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Mar 13, 2024
1 parent 0c001fd commit 7fa4818
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions trex.org
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,19 @@
outside of the grid. The reference points are stored in ~nao_grid_r~
and ~nao_grid_phi~. Additionaly, a separate spline for the first and second
derivative of $u(\mathbf{r})$ can be stored in ~nao_grid_grad~ and ~nao_grid_lap~.
Storing them in this form allows to calculate the actual gradients and
Laplacian easily as follows:
Storing them in this form allows to calculate the actual first and
second derivatives easily as follows:

\[
\nabla_{x_i} \phi = \frac{x_i}{r^2}\left( u^\prime\left(r\right) - \frac{u\left(r\right)}{r}\right)
\frac{\partial \phi}{\partial x} = \frac{x}{r^2}\left( u^\prime\left(r\right) - \frac{u\left(r\right)}{r}\right)
\]
\[
\Delta \phi = \frac{1}{r^3}\left(x^2 u^{\prime\prime}(r) + \left( 3x^2-r^2\right) \left( \frac{u(r)}{r^2} - \frac{u'(r)}{r}\right) \right)
\frac{\partial^2 \phi}{\partial x^2} = \frac{1}{r^3}\left(x^2 u^{\prime\prime}(r) + \left( 3x^2-r^2\right) \left( \frac{u(r)}{r^2} - \frac{u'(r)}{r}\right) \right)
\]

The index of the first data point for each shell is stored in
~nao_grid_start~, the number of data points per spline
is stored in ~nao_grid_size~ for convenience.
The index of the first data point for each shell is stored in
~nao_grid_start~, the number of data points per spline is stored
in ~nao_grid_size~ for convenience.

What kind of spline is used can be provided in the ~interpolator_kind~ field.
For example, FHI-aims uses a cubic spline, so the ~interpolator_kind~ is
Expand All @@ -299,7 +299,7 @@
will return the value of $u(\mathbf{r})$ at the $i$th reference point.
A radius is converted to this scale by (note the zero-indexing)
\[
i_{log} = \frac{1}{c} \cdot \log{\frac{r}{r_0}}
i_{\log} = \frac{1}{c} \cdot \log \left( \frac{r}{r_0} \right)
\]
where
\[
Expand Down

0 comments on commit 7fa4818

Please sign in to comment.