2
$\begingroup$

I can convert a CHGCAR file on the NxNxN grid into a 3D array of shape (N,N,N) for better handling, if that helps. At the end of the day, I want plot/visualize the charge density with Python.

$\endgroup$
5
  • 2
    $\begingroup$ My concern with this question at the moment is that it more or less asks "how do I plot 3D data with Python" which I think would be better suited for StackOverflow since its a general programming question. You should clarify what issues you are having with this that are specific to matter modeling. $\endgroup$
    – Tyberius
    Jun 23 at 22:31
  • 1
    $\begingroup$ I agree with you, but people in StackOverflow do not necessarily know what a CHGCAR file is, or how it looks like or why it is generated, hence might not be better equipped to answer. $\endgroup$
    – Pranoy Ray
    Jun 23 at 22:46
  • 1
    $\begingroup$ Is it necessary? Almost all the published papers plot CHGCAR with vesta. $\endgroup$
    – Jack
    Jun 23 at 23:14
  • 1
    $\begingroup$ I think the prior two questions about format and forming the 3D array give most of what you would need in terms of the CHGCAR file. You have the density as a 3D array, the format one explains how to find the coordinate corresponding to each value. You just need to decide what type of plot you want to make and pass these to the appropriate matplotlib (or seaborn, etc) function. $\endgroup$
    – Tyberius
    Jun 23 at 23:52
  • $\begingroup$ @Tyberius I don't think we have to send people to SO for questions like this. We've had people ask how to find a string in a VASP output file. We've had people ask what supercomputers are available in various countries. We've had people ask whether they should try to build an HPC system with 32-128 cores. We've had people ask whether or not 2-3 laptops can be combined to make a supercomptuer. Many of these are "general" HPC questions or Hardware Recommendations questions, and there was a question about software to combine two images:Graphics.SE, SR.SE $\endgroup$ Jun 25 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.