示例#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
 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