本文整理汇总了Python中pymatgen.phasediagram.entries.PDEntryIO类的典型用法代码示例。如果您正苦于以下问题:Python PDEntryIO类的具体用法?Python PDEntryIO怎么用?Python PDEntryIO使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PDEntryIO类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
module_dir = os.path.dirname(os.path.abspath(__file__))
(self.elements, self.entries) = PDEntryIO.from_csv(
os.path.join(module_dir, "pdentries_test.csv"))
self.pd = GrandPotentialPhaseDiagram(self.entries, {Element("O"): -5},
self.elements)
self.pd6 = GrandPotentialPhaseDiagram(self.entries, {Element("O"): -6})
示例2: test_read_csv
def test_read_csv(self):
module_dir = os.path.dirname(os.path.abspath(__file__))
(elements,
entries) = PDEntryIO.from_csv(os.path.join(module_dir,
"pdentries_test.csv"))
self.assertEqual(elements,
[Element('Li'), Element('Fe'), Element('O')],
"Wrong elements!")
self.assertEqual(len(entries), 492, "Wrong number of entries!")
示例3: setUp
def setUp(self):
(elements, entries) = PDEntryIO.from_csv(os.path.join(module_dir, "pdentries_test.csv"))
self.pd = PhaseDiagram(entries)
self.plotter = PDPlotter(self.pd, show_unstable=True)
entrieslio = [e for e in entries
if len(e.composition) < 3 and ("Fe" not in e.composition)]
self.pd_formation = PhaseDiagram(entrieslio)
self.plotter_formation = PDPlotter(self.pd_formation, show_unstable=True)
entries.append(PDEntry("C", 0))
self.pd3d = PhaseDiagram(entries)
self.plotter3d = PDPlotter(self.pd3d, show_unstable=True)
示例4: setUp
def setUp(self):
module_dir = os.path.dirname(os.path.abspath(__file__))
(elements, entries) = PDEntryIO.from_csv(os.path.join(module_dir,
"pdentries_test.csv"))
self.pd = PhaseDiagram(entries)
self.analyzer = PDAnalyzer(self.pd)
示例5: setUp
def setUp(self):
(elements, entries) = PDEntryIO.from_csv(os.path.join(module_dir, "pdentries_test.csv"))
self.pd = PhaseDiagram(entries)
self.plotter = PDPlotter(self.pd)