Open xiaowangfeng opened 7 months ago
Please post the entire error message and traceback, including the code you are trying to run. It is impossible to answer your question otherwise.
This package never tries to import pymatgen.plotting
(which I'm pretty sure does not exist anyway) so it must be some other code that is triggering it.
from pymatgen.io.cif import CifParser from pymatgen.plotting import BSPlotter import matplotlib.pyplot as plt
parser = CifParser("mp-6127.cif") structure = parser.get_structures()[0]
analyzer = SpacegroupAnalyzer(structure) structure = analyzer.get_primitive_standard_structure()
plotter = BSPlotter(structure) plotter.show()
plt.savefig("structure.png")
that‘s all. please tell how to improve it thanks
Dear @xiaowangfeng ,
It feels like a lot of code is actually missing to do the required tasks. There are tutorials around the MP that you might find helpful: https://youtube.com/playlist?list=PLTjFYVNE7LTi6kGvPAF7DDQYj0KDL-vQL&si=w8y5_SacASkgo9pG
Or use the matsci Forum for further help: https://matsci.org
In general, your requests need to be much more specific, also for the forum. Here, the issues are meant for actual software bugs, not general help requests.
I hope you can understand this.
Sorry, I am a novice to materials chemistry. I downloaded some data through materials project and wanted to realize the visualization of.cif through pymatgen, but the code kept giving errors. In desperation, I want to ask for help through here, thank you
Once again, I'm sorry for my behavior
I very well understand this. This is why I am pointing to the tutorials that have been made for the purpose and the forum that can be used to ask questions. :)
how to solve the question, I want to visualize .cif file.