|
11 | 11 | from pymatgen.core.composition import Composition
|
12 | 12 |
|
13 | 13 | from fireworks import Workflow
|
14 |
| -#from pymatgen.alchemy.materials import TransformedStructure |
| 14 | +from pymatgen.alchemy.materials import TransformedStructure |
15 | 15 |
|
16 | 16 | __author__ = "Anubhav Jain, Kiran Mathew"
|
17 | 17 |
|
@@ -137,24 +137,10 @@ def get_logger(
|
137 | 137 | return logger
|
138 | 138 |
|
139 | 139 |
|
140 |
| -#def get_meta_from_structure(structure): |
141 |
| -# if isinstance(structure, TransformedStructure): |
142 |
| -# structure = structure.final_structure |
143 |
| -# |
144 |
| -# comp = structure.composition |
145 |
| -# elsyms = sorted(set([e.symbol for e in comp.elements])) |
146 |
| -# meta = {'nsites': structure.num_sites, |
147 |
| -# 'elements': elsyms, |
148 |
| -# 'nelements': len(elsyms), |
149 |
| -# 'formula': comp.formula, |
150 |
| -# 'formula_pretty': comp.reduced_formula, |
151 |
| -# 'formula_reduced_abc': Composition(comp.reduced_formula) |
152 |
| -# .alphabetical_formula, |
153 |
| -# 'formula_anonymous': comp.anonymized_formula, |
154 |
| -# 'chemsys': '-'.join(elsyms), |
155 |
| -# 'is_ordered': structure.is_ordered, |
156 |
| -# 'is_valid': structure.is_valid()} |
157 |
| -# return meta |
| 140 | +def get_meta_from_structure(structure): |
| 141 | + if isinstance(structure, TransformedStructure): |
| 142 | + structure = structure.final_structure |
| 143 | + |
158 | 144 |
|
159 | 145 | comp = structure.composition
|
160 | 146 | elsyms = sorted({e.symbol for e in comp.elements})
|
|
0 commit comments