Charge density plot with py4vasp
Posted: Mon May 15, 2023 6:20 pm
Dear fellows,
I followed the procedure described by martin.schlipf in https://w-ww.vasp.at/forum/viewtopic.php?t=18533 to plot the charge density using py4vasp:
Best regards,
Renan Lira.
I followed the procedure described by martin.schlipf in https://w-ww.vasp.at/forum/viewtopic.php?t=18533 to plot the charge density using py4vasp:
and it worked very well. However, since the resulting image shows the charge density as an opaque grey surface, it is not very interesting to see (first image below), because the atom is hidden inside. Is there any way to make the surface semi-transparent, so that the atom inside can be seen (similarly to the second image below)? Other than that, is it possible to show multiple isosurfaces in the same plot (similarly to the third image below)?from py4vasp import Calculation
import h5py
calc = Calculation.from_path("path_to_your_VASP_calculation")
fig = calc.structure.plot()
with h5py.File(calc.path() / "vaspwave.h5", "r") as h5f:
fig.show_isosurface(h5f["charge/charge"][0], isolevel=0.2)
fig
Best regards,
Renan Lira.