本文整理匯總了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)