Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
CalystaT committed Sep 7, 2023
1 parent 2404556 commit 4fbb42b
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 1,271 deletions.
2 changes: 2 additions & 0 deletions docs/tutorials/MD_workbook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"metadata": {},
"source": [
"## Plotting the planar and macroscopic average \n",
"The approach to calculating the planar and macroscopic average is taken from [Peressi's paper](https://doi.org/10.1088/0022-3727/31/11/002). \n",
"\n",
"We can calculate the planar and macroscopic potential average of a material using the function `md.plotting.plot_planar_average`. This function can post-process different output files, including `CHGCAR`, `LOCPOT`, `.cube` and `gulp.out`:"
]
},
Expand Down
Empty file removed macrodensity/build.sh
Empty file.
6 changes: 4 additions & 2 deletions macrodensity/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package:
version: 1.0.0

source:
url:
url: https://files.pythonhosted.org/packages/f8/5c/f60e9d8a1e77005f664b76ff8aeaee5bc05d0a91798afd7f53fc998dbc47/Click-7.0.tar.gz
sha256: 5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7


build:
number: 0
script: build.sh # Path to the build script
script:

requirements:
build:
Expand Down
12 changes: 8 additions & 4 deletions macrodensity/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def plot_field_at_point(
# grad_mag=np.linalg.norm( [grad_y,grad_y,grad_z], axis=3)

## This function in Macrodensity averages Efield ACROSS Z for Slab calculations
# xx,yy,grd = pot.create_plotting_mesh(NGX,NGY,NGZ,plane_coeff,grad_mag) #AVG over full volume
xx,yy,grd = md.create_plotting_mesh(NGX,NGY,NGZ,plane_coeff,grad_mag) #AVG over full volume

# Here we construct the same xx,yy,grd variables with a SLICE, forming a plane in XY at particular ZSLICE
xx, yy = np.mgrid[0:NGX, 0:NGY]
Expand Down Expand Up @@ -834,12 +834,16 @@ def plot_active_plane(
Note:
- The function reads the electrostatic potential from the specified VASP LOCPOT
file.
file.
- The active plane is determined by sampling the potential in a cube around the
cube_origin point.
cube_origin point.
- The cutoff_varience parameter sets the threshold for distinguishing active and
non-active cubes based on their variance in potential.
non-active cubes based on their variance in potential.
- The function creates a contour plot of the electric field on the active plane.
- It also plots the planar average of the electric field and potential throughout the material.
"""
# ------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 4fbb42b

Please sign in to comment.