-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update volume.py #160
Update volume.py #160
Conversation
New function to plot the density of diffusion atoms using plotly
I have added the function to plot the density of diffusion atoms using plotly and save as .html. However, I didn't integrate it with the class. Please guys check it |
Thanks! No worries that it is not integrated, this is something we will take care of. I'll get back to this. |
I have moved the code to the Usagefrom gemdat import Trajectory
from gemdat.volume import trajectory_to_volume
VASP_XML = '/home/stef/md-analysis-matlab-example-short/vasprun.xml'
equilibration_steps = 1250
diffusing_element = 'Li'
trajectory = Trajectory.from_vasprun(VASP_XML)
trajectory = trajectory[equilibration_steps:]
diff_trajectory = trajectory.filter(diffusing_element)
density_resolution = 0.3
vol = trajectory_to_volume(
trajectory=diff_trajectory,
resolution=density_resolution,
)
structure = vol.to_structure()
from gemdat import plots
plots.density(vol, structure) Todo
Follow-up
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Nice! Thank you! |
If I understand correctly the points are coordinates of Li during simulation now? Because initially the points were coordinates of sites. I probably can load the structure created from .cif to plot points as sites, but then lattice and cart_coord will not match the simulation cell |
It can be whatever you want 😅 site_stucture = load_known_material('argyrodite', supercell=(2,1,1))
plots.density(vol, site_structure) Yeah, that the lattices don't match is an issue I can't do much about. You could create a new structure with the simulation lattice and the coordinates from the cif. |
New function to plot the density of diffusion atoms using plotly