|
14 | 14 | from pymatgen.core.composition import Composition
|
15 | 15 |
|
16 | 16 | from fireworks import Workflow
|
17 |
| -from pymatgen.alchemy.materials import TransformedStructure |
| 17 | +#from pymatgen.alchemy.materials import TransformedStructure |
18 | 18 |
|
19 | 19 | __author__ = 'Anubhav Jain, Kiran Mathew'
|
20 | 20 |
|
@@ -135,24 +135,24 @@ def get_logger(name, level=logging.DEBUG, log_format='%(asctime)s %(levelname)s
|
135 | 135 | return logger
|
136 | 136 |
|
137 | 137 |
|
138 |
| -def get_meta_from_structure(structure): |
139 |
| - if isinstance(structure, TransformedStructure): |
140 |
| - structure = structure.final_structure |
141 |
| - |
142 |
| - comp = structure.composition |
143 |
| - elsyms = sorted(set([e.symbol for e in comp.elements])) |
144 |
| - meta = {'nsites': structure.num_sites, |
145 |
| - 'elements': elsyms, |
146 |
| - 'nelements': len(elsyms), |
147 |
| - 'formula': comp.formula, |
148 |
| - 'formula_pretty': comp.reduced_formula, |
149 |
| - 'formula_reduced_abc': Composition(comp.reduced_formula) |
150 |
| - .alphabetical_formula, |
151 |
| - 'formula_anonymous': comp.anonymized_formula, |
152 |
| - 'chemsys': '-'.join(elsyms), |
153 |
| - 'is_ordered': structure.is_ordered, |
154 |
| - 'is_valid': structure.is_valid()} |
155 |
| - return meta |
| 138 | +#def get_meta_from_structure(structure): |
| 139 | +# if isinstance(structure, TransformedStructure): |
| 140 | +# structure = structure.final_structure |
| 141 | +# |
| 142 | +# comp = structure.composition |
| 143 | +# elsyms = sorted(set([e.symbol for e in comp.elements])) |
| 144 | +# meta = {'nsites': structure.num_sites, |
| 145 | +# 'elements': elsyms, |
| 146 | +# 'nelements': len(elsyms), |
| 147 | +# 'formula': comp.formula, |
| 148 | +# 'formula_pretty': comp.reduced_formula, |
| 149 | +# 'formula_reduced_abc': Composition(comp.reduced_formula) |
| 150 | +# .alphabetical_formula, |
| 151 | +# 'formula_anonymous': comp.anonymized_formula, |
| 152 | +# 'chemsys': '-'.join(elsyms), |
| 153 | +# 'is_ordered': structure.is_ordered, |
| 154 | +# 'is_valid': structure.is_valid()} |
| 155 | +# return meta |
156 | 156 |
|
157 | 157 |
|
158 | 158 | def get_fws_and_tasks(workflow, fw_name_constraint=None, task_name_constraint=None):
|
|
0 commit comments