예제 #1
0
 def __init__(self, composition, cost, name, reference):
     """
     Args:
         composition:
             Composition as a pymatgen.core.structure.Composition
         cost:
             Cost (per mol, NOT per kg) of the full Composition
         name:
             Optional parameter to name the entry. Defaults to the reduced
             chemical formula as in PDEntry.
         reference:
             Reference data as BiBTeX string
     """
     super(CostEntry, self).__init__(composition, cost, name)
     if reference and not is_valid_bibtex(reference):
         raise ValueError(
             "Invalid format for cost reference! Should be BibTeX string.")
     self.reference = reference
예제 #2
0
파일: cost.py 프로젝트: blondegeek/pymatgen
 def __init__(self, composition, cost, name, reference):
     """
     Args:
         composition:
             Composition as a pymatgen.core.structure.Composition
         cost:
             Cost (per mol, NOT per kg) of the full Composition
         name:
             Optional parameter to name the entry. Defaults to the reduced
             chemical formula as in PDEntry.
         reference:
             Reference data as BiBTeX string
     """
     super().__init__(composition, cost, name)
     if reference and not is_valid_bibtex(reference):
         raise ValueError(
             "Invalid format for cost reference! Should be BibTeX string.")
     self.reference = reference