robocrystallographer icon indicating copy to clipboard operation
robocrystallographer copied to clipboard

Issue with self.get_component_makeup_summary() for few materials

Open kdmsit opened this issue 2 years ago • 3 comments

I tried to dump textual description of a few MP crystals and found for a few crystals like 'VSe2', 'MoW3(SeS3)2', 'Mo3W(Se3S)2' etc I am getting the following error :

Traceback (most recent call last): File "/dstore/home/kdas/Crystal_Multi_Modal/src_text/script_mat_desc.py", line 41, in description = describer.describe(condensed_structure) File "/home/kdas/anaconda3/envs/mattext/lib/python3.10/site-packages/robocrys/describe/describer.py", line 130, in describe description["component_makeup"] = self.get_component_makeup_summary() File "/home/kdas/anaconda3/envs/mattext/lib/python3.10/site-packages/robocrys/describe/describer.py", line 251, in get_component_makeup_summary en.join(orientations), s_direction File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function File "pydantic/decorator.py", line 133, in pydantic.decorator.ValidatedFunction.call File "pydantic/decorator.py", line 130, in pydantic.decorator.ValidatedFunction.init_model_instance File "pydantic/main.py", line 342, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for Join words -> 0 str type expected (type=type_error.str)

Why it is happening?

kdmsit avatar Oct 31 '22 18:10 kdmsit

Hi, I encountered the same issue when attempting to generate the description for VSe2. Have you managed to resolve the problem?

shrimonmuke0202 avatar Jul 26 '23 11:07 shrimonmuke0202

Hi, I found the same issue when deal with all two two-dimensional structures, --no-makeup args maybe help to obtain results, but the two-dimensional descriptions are missing.

There is an alternative approach that can be used to modify the source code as well:

vi .../xx/robocrys/describe/describer.py +247

comp_desc += " oriented in the {} {}".format(
    orientations[0], s_direction
    #en.join(orientations), s_direction
    )

pincher-chen avatar Oct 29 '23 03:10 pincher-chen

@pincher-chen Hello! I encountered the same issue when attempting to generate the description. I have a question. Would modifying the code as you suggested ignore cases where there are multiple elements in orientations because you only used orientations[0]? Thank you for your kind response!

Hi, I found the same issue when deal with all two two-dimensional structures, --no-makeup args maybe help to obtain results, but the two-dimensional descriptions are missing.

There is an alternative approach that can be used to modify the source code as well:

vi .../xx/robocrys/describe/describer.py +247

comp_desc += " oriented in the {} {}".format( orientations[0], s_direction #en.join(orientations), s_direction )

rookiexiong7 avatar Feb 29 '24 13:02 rookiexiong7

Thanks for raising this. It has been fixed in the most recent version.

utf avatar Apr 25 '24 20:04 utf