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

Add calc_displacements_ellipsoid function #87

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
18 changes: 11 additions & 7 deletions doped/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,16 +1313,19 @@ def sc_entry_energy(self):

def plot_site_displacements(
self,
separated_by_direction: Optional[bool] = False,
relative_to_defect: Optional[bool] = False,
separated_by_direction: bool = False,
relative_to_defect: bool = False,
vector_to_project_on: Optional[list] = None,
use_plotly: Optional[bool] = False,
mpl_style_file: Optional[PathLike] = "",
use_plotly: bool = False,
style_file: Optional[PathLike] = "",
):
"""
Plot the site displacements as a function of distance from the defect
site.

Set ``use_plotly = True`` to get an interactive ``plotly`` plot, useful
for analysis!

Args:
separated_by_direction (bool):
Whether to plot the site displacements separated by the
Expand All @@ -1337,8 +1340,9 @@ def plot_site_displacements(
(e.g. [0, 0, 1]). Defaults to None (e.g. the displacements are calculated
in the cartesian basis x, y, z).
use_plotly (bool):
Whether to use plotly (True) or matplotlib (False).
mpl_style_file (PathLike):
Whether to use ``plotly`` (``True``) or ``matplotlib`` (``False``).
Defaults to ``False``. Set to ``True`` to get an interactive plot.
style_file (PathLike):
Path to a matplotlib style file to use for the plot. If None,
uses the default doped style file.
"""
Expand All @@ -1350,7 +1354,7 @@ def plot_site_displacements(
relative_to_defect=relative_to_defect,
vector_to_project_on=vector_to_project_on,
use_plotly=use_plotly,
style_file=mpl_style_file,
style_file=style_file,
)


Expand Down
Loading
Loading