Skip to content

Commit

Permalink
Move legacy.py out of main library (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefsmeets authored May 27, 2024
1 parent ab88cee commit d74f5c8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
4 changes: 0 additions & 4 deletions docs/api/gemdat_legacy.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ nav:
- gemdat: api/gemdat.md
- gemdat.collective: api/gemdat_collective.md
- gemdat.io: api/gemdat_io.md
- gemdat.legacy: api/gemdat_legacy.md
- gemdat.plots: api/gemdat_plots.md
- gemdat.rdf: api/gemdat_rdf.md
- gemdat.simulation_metrics: api/gemdat_simulation_metrics.md
Expand Down
42 changes: 29 additions & 13 deletions src/gemdat/legacy.py → scripts/analyse_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,22 @@ def analyse_md(

jumps = Jumps(transitions=transitions)

plots.displacement_per_element(trajectory=trajectory)
plots.displacement_per_atom(trajectory=diff_trajectory)
plots.displacement_histogram(trajectory=diff_trajectory)
plots.frequency_vs_occurence(trajectory=diff_trajectory)
plots.vibrational_amplitudes(trajectory=diff_trajectory)
plots.jumps_vs_distance(jumps=jumps, jump_res=jump_res)
plots.jumps_vs_time(jumps=jumps)
plots.collective_jumps(jumps=jumps)
plots.jumps_3d(jumps=jumps)

_tmp = plots.jumps_3d_animation( # Assignment needed to not desctruct animation before plt.show()
figs = [
plots.displacement_per_element(trajectory=trajectory),
plots.displacement_per_atom(trajectory=diff_trajectory),
plots.displacement_histogram(trajectory=diff_trajectory),
plots.frequency_vs_occurence(trajectory=diff_trajectory),
plots.vibrational_amplitudes(trajectory=diff_trajectory),
plots.jumps_vs_distance(jumps=jumps, jump_res=jump_res),
plots.jumps_vs_time(jumps=jumps),
plots.collective_jumps(jumps=jumps),
plots.jumps_3d(jumps=jumps),
]
if show_plots:
for fig in figs:
fig.show()

_tmp = plots.jumps_3d_animation(
jumps=jumps,
t_start=start_end[0],
t_stop=start_end[1],
Expand Down Expand Up @@ -133,7 +138,18 @@ def analyse_md(
max_dist=rdf_max_dist,
resolution=rdf_res,
)
for rdfs in rdf_data.values():
plots.radial_distribution(rdfs)

figs = [plots.radial_distribution(rdfs) for rdfs in rdf_data.values()]
if show_plots:
for fig in figs:
fig.show()

return trajectory


if __name__ == '__main__':
analyse_md(
vasp_xml='vasprun.xml',
diff_elem='Li',
material='argyrodite',
)

0 comments on commit d74f5c8

Please sign in to comment.