Skip to content

Commit d4906cd

Browse files
committed
Absolute radical changes to avoid conflicts with pymatgen
1 parent 7c67a0e commit d4906cd

File tree

2 files changed

+909
-909
lines changed

2 files changed

+909
-909
lines changed

atomate/utils/utils.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from pymatgen.core.composition import Composition
1515

1616
from fireworks import Workflow
17-
from pymatgen.alchemy.materials import TransformedStructure
17+
#from pymatgen.alchemy.materials import TransformedStructure
1818

1919
__author__ = 'Anubhav Jain, Kiran Mathew'
2020
@@ -135,24 +135,24 @@ def get_logger(name, level=logging.DEBUG, log_format='%(asctime)s %(levelname)s
135135
return logger
136136

137137

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
156156

157157

158158
def get_fws_and_tasks(workflow, fw_name_constraint=None, task_name_constraint=None):

0 commit comments

Comments
 (0)