本文整理汇总了Python中pymatgen.phasediagram.entries.PDEntryIO.from_csv方法的典型用法代码示例。如果您正苦于以下问题:Python PDEntryIO.from_csv方法的具体用法?Python PDEntryIO.from_csv怎么用?Python PDEntryIO.from_csv使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymatgen.phasediagram.entries.PDEntryIO
的用法示例。
在下文中一共展示了PDEntryIO.from_csv方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from pymatgen.phasediagram.entries import PDEntryIO [as 别名]
# 或者: from pymatgen.phasediagram.entries.PDEntryIO import from_csv [as 别名]
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
# 需要导入模块: from pymatgen.phasediagram.entries import PDEntryIO [as 别名]
# 或者: from pymatgen.phasediagram.entries.PDEntryIO import from_csv [as 别名]
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
# 需要导入模块: from pymatgen.phasediagram.entries import PDEntryIO [as 别名]
# 或者: from pymatgen.phasediagram.entries.PDEntryIO import from_csv [as 别名]
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
# 需要导入模块: from pymatgen.phasediagram.entries import PDEntryIO [as 别名]
# 或者: from pymatgen.phasediagram.entries.PDEntryIO import from_csv [as 别名]
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
# 需要导入模块: from pymatgen.phasediagram.entries import PDEntryIO [as 别名]
# 或者: from pymatgen.phasediagram.entries.PDEntryIO import from_csv [as 别名]
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)