Hi all,
I am trying to run the MagneticStructureEnumerator class.To do this I installed enum.x and makeStr.py to my path in anaconda ,However I am still getting the error :-
“RuntimeError: EnumlibAdaptor requires the executables ‘enum.x’ or ‘multienum.x’ and ‘makestr.x’ or ‘makeStr.py’ to be in the path. Please download the library at http://enum.sourceforge.net/ and follow the instructions in the README to compile these two executables accordingly.”
How do I resolve this issue?
Thanks
Hi @ek_2k09,
You probably haven’t got these in your PATH. You can check your PATH by running the following inside your notebook or environment:
import os
print(os.environ)
The enum.x
etc. needs to be inside one of those directories listed.
Best,
Matt
Thanks a lot sir it worked! However I am now getting the error “%1 is not a valid Win32 application” ,inspite of my enumlib and makeStr.py working perfectly.Is there any way I can resolve this?
1 Like
Unfortunately I haven’t seen that error before. Does enum.x
work on its own?
yep. However I still tried to reinstall it.While reinstalling it I got the error “makefile doesnt have flags for this compiler” , I have not added any flags.
my compiler is gfortran ,my linux terminal is ubuntu
How can I resolve this?
I’m not a maintainer of enumlib so I can’t help you there I’m afraid! Might be worth asking the enumlib maintainers?
Best,
Matt
Thanks a lot. There appears to be an error in my jupyter itself regardless of how many times I reinstall it.
Are there any other IDEs I can run my code on?
Update I am now getting the error :-
AttributeError Traceback (most recent call last)
in
24
25 from pymatgen.analysis.magnetism.analyzer import MagneticStructureEnumerator
—> 26 SmFeO3_mag = MagneticStructureEnumerator(SmFeO3_Mn_prop)
27 print(SmFeO3_mag)
28
~/anaconda3/lib/python3.7/site-packages/pymatgen/analysis/magnetism/analyzer.py in init(self, structure, default_magmoms, strategies, automatic, truncate_by_symmetry, transformation_kwargs)
797 self.transformations = self._generate_transformations(self.sanitized_structure)
798 self._generate_ordered_structures(
→ 799 self.sanitized_structure, self.transformations
800 )
801
~/anaconda3/lib/python3.7/site-packages/pymatgen/analysis/magnetism/analyzer.py in _generate_ordered_structures(self, sanitized_input_structure, transformations)
1110 for origin, trans in self.transformations.items():
1111 structures_to_add = trans.apply_transformation(
→ 1112 self.sanitized_structure, return_ranked_list=self.num_orderings
1113 )
1114 ordered_structures, ordered_structures_origins = _add_structures(
~/anaconda3/lib/python3.7/site-packages/pymatgen/transformations/advanced_transformations.py in apply_transformation(self, structure, return_ranked_list)
943 t = EnumerateStructureTransformation(**enum_kwargs)
944
→ 945 alls = t.apply_transformation(structure, return_ranked_list=return_ranked_list)
946
947 # handle the fact that EnumerateStructureTransformation can either
~/anaconda3/lib/python3.7/site-packages/pymatgen/transformations/advanced_transformations.py in apply_transformation(self, structure, return_ranked_list)
458 except EnumError:
459 warnings.warn(“Unable to enumerate for max_cell_size = {}”.format(max_cell_size))
→ 460 structures = adaptor.structures
461 if structures:
462 break
AttributeError: ‘EnumlibAdaptor’ object has no attribute ‘structures’
How do I resolve this issue?
Hi @mkhorton I resolved the error however my print statement is displaying <pymatgen.analysis.magnetism.analyzer.MagneticStructureEnumerator object at 0x7f179dbff850>
How do I view this output?