Skip to content

Commit

Permalink
Minor cleanups and corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
wangenau committed Feb 3, 2021
1 parent 809153b commit 98deebd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The package comes with functions to visualize meshes. The function :func:`plot_m
>>> mesh = dft.Grids(mol)
>>> mesh.level = 0
>>> mesh.build()
>>> plot_mesh_3d(mesh=mesh, weight=True)
>>> plot_mesh_3d(mesh, weight=True)
.. figure:: _images/plot_mesh_3d.png
:align: center
Expand All @@ -125,7 +125,7 @@ The grid can be projected to a given plane, and the grid points can be scaled by
.. code-block:: python
>>> from var_mesh import plot_mesh_2d
>>> plot_mesh_2d(mesh=mesh, weight=5, plane='xz')
>>> plot_mesh_2d(mesh, weight=5, plane='xz')
.. figure:: _images/plot_mesh_2d.png
:align: center
Expand Down Expand Up @@ -170,7 +170,7 @@ The script for this example can be downloaded :download:`here </../examples/04_p
Mode option
===========

The ``mode`` parameter will change the format of the final grid output. These outputs can be reused in the respective codes. Currently, the mode ``pyscf``, ``erkale``, and ``gamess`` are supported (case-insensitive).
The ``mode`` parameter will change the format of the final grid output. These outputs can be reused in the respective codes. Currently, the mode ``'pyscf'``, ``'erkale'``, and ``'gamess'`` are supported (case-insensitive).

.. code-block:: python
Expand All @@ -188,11 +188,11 @@ If the code does not support different grids for different atom types, the preci
>>> var_mesh(mesh, precise=True, mode='erkale')
mode=ERKALE:
WARN: The precise option will have no effect when using gamess mode
WARN: The precise parameter has no effect when using 'gamess' mode.
ERKALE grid: DFTGrid 60 -302
Also, only the largest atom grid will be used in an optimization step. Thus, the atom grids will differ from the default ``pyscf`` mode and will be the same for every atom type.
Also, only the largest atom grid will be used in an optimization step. Thus, the atom grids will differ from the default ``'pyscf'`` mode and will be the same for every atom type.

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions examples/03_helper_functions/03_helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
mesh.build()

# Plot the mesh with helper functions
plot_mesh_3d(mesh=mesh, weight=True)
plot_mesh_2d(mesh=mesh, weight=5, plane='xz')
plot_mesh_3d(mesh, weight=True)
plot_mesh_2d(mesh, weight=5, plane='xz')
7 changes: 4 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
| 02_custom_grids | Custom grids, verbosity level, and grid parameters |
| 03_helper_functions | Plot grids |
| 04_precise_option | Show impact of the precise option |
| 05_mesh_time | Time the mesh generation for different thresholds |
| 06_calculation_time | Mesh generation time vs SCF calculation time |
| 07_pyflosic_usage | Usage with PyFLOSIC (needs extra packages) |
| 05_mode_option | Show the functionality of the mode option |
| 06_mesh_time | Time the mesh generation for different thresholds |
| 07_calculation_time | Mesh generation time vs SCF calculation time |
| 08_pyflosic_usage | Usage with PyFLOSIC (needs extra packages) |
2 changes: 1 addition & 1 deletion var_mesh/gen_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def var_mesh(mesh, thres=1e-6, precise=True, mode='pyscf'):
log.error('The mode parameter has to be one of \'%s\'.',
'\', \''.join(supported))
if mode != 'pyscf' and precise:
log.warn('The precise parameter has no effect when using %s mode.',
log.warn('The precise parameter has no effect when using \'%s\' mode.',
mode)

# Create calculator to generate the initial density
Expand Down

0 comments on commit 98deebd

Please sign in to comment.