Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve comments and remove Poisson example #236

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/grid/angular.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class AngularGrid(Grid):
d\theta d\phi \approx \sum_{i}^{N} w_i f(\phi_i, \theta_i),

where :math:`S^2` is the unit-sphere, :math:`\theta_i \in [0, 2\pi]`
and :math:`\phi_i \in [0, \pi)` and quadrature points and :math:`w^{ang}_i`
and :math:`\phi_i \in [0, \pi)` are quadrature points and :math:`w^{ang}_i`
are the quadrature weights of :math:`N` grid points.

Two types of angular grids are supported: Lebedev-Laikov grid and symmetric
Expand Down Expand Up @@ -405,7 +405,8 @@ def degree(self):

@property
def use_spherical(self):
r"""bool: If True, then symmetric spherical t-design is used else Lebedev-Laikov grid."""
r"""bool: If False, the Lebedev-Laikov angular grid is used. If True, the symmetric spherical
t-design angular grid are used."""
return self._use_spherical

@staticmethod
Expand Down
20 changes: 0 additions & 20 deletions src/grid/poisson.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,26 +364,6 @@ def solve_poisson_bvp(
callable(ndarray(N, 3) -> float) :
The solution to Poisson equaiton/potential :math:`g : \mathbb{R}^3 \rightarrow \mathbb{R}`.

Examples
--------
>>> # Set up of the radial grid
>>> radial_grid = Trapezoidal(10000)
>>> # Set up the atomic grid with degree 10 at each radial point. Molecular grid works as well.
>>> degree = 10
>>> atomic_grid = AtomGrid(radial, degrees=[degree])
>>> # Set the charge distribution to be unit-charge density and evaluate on atomic grid points.
>>> def charge_distribution(x, alpha=0.1):
>>> r = np.linalg.norm(x, axis=1)
>>> return (alpha / np.pi)**(3.0 / 2.0) * np.exp(-alpha * r**2.0)
>>> func_vals = charge_distribution(atomic_grid.points)
>>> # Solve the Poisson equation with Becke transformation
>>> transform = BeckeRTransform(1e-6, 1.5, trim_inf=True)
>>> potential = solve_poisson_bvp(
>>> atgrid, func_vals, InverseRTransform(tf), include_origin=True,
>>> remove_large_pts=1e6, ode_params={"tol" : 1e-6, "max_nodes": 20000},
>>> )
>>> actual = potential(atgrid.points)

References
----------
.. [1] Becke, A. D., & Dickson, R. M. (1988). Numerical solution of Poisson`s equation in
Expand Down
Loading