gdev7 / mBUD

GNU General Public License v3.0
4 stars 1 forks source link

Convert error when use source code #1

Open Andy6M opened 1 year ago

Andy6M commented 1 year ago

Dear Author. When I try to convert my cif file using the web side, the conversion works fine. But when I use the source code (mBUD.py) for conversion, it reports an error. How can I fix it? Best wishes Andy

ValueError: could not convert string to float: '13.058(6)'

The cif input is as followed:

####################################################################### #

Cambridge Crystallographic Data Centre

CCDC

# ####################################################################### #

If this CIF has been generated from an entry in the Cambridge

Structural Database, then it will include bibliographic, chemical,

crystal, experimental, refinement or atomic coordinate data resulting

from the CCDC's data processing and validation procedures.

# #######################################################################

data_ABUFUA _chemical_formula_moiety '(C12 H12 Fe1 O6)n' _chemical_name_systematic
catena-((\m~2~-3,3'-(1,4-Phenylene)bis(acrylato))-diaqua-iron) _symmetry_cell_setting monoclinic _symmetry_space_group_name_H-M 'P 21/c' _symmetry_Int_Tables_number 14 _space_group_nameHall '-P 2ybc' loop _symmetry_equiv_pos_site_id _symmetry_equiv_pos_as_xyz 1 x,y,z 2 -x,1/2+y,1/2-z 3 -x,-y,-z 4 x,1/2-y,1/2+z _cell_length_a 13.058(6) _cell_length_b 6.386(3) _cell_length_c 7.409(3) _cell_angle_alpha 90 _cell_angle_beta 90.001(7) _cell_angle_gamma 90 _cell_volume 617.825 _exptl_crystal_colour orange _exptl_crystal_description prism _cell_formula_unitsZ 2 loop _atom_site_label _atom_site_type_symbol _atom_site_fract_x _atom_site_fract_y _atom_site_fract_z _atom_site_U_iso_or_equiv _atom_site_thermal_displacetype Fe1 Fe 0.5000 0.0000 0.5000 0.0199 Uani C1 C 0.3552(5) 0.2471(10) 0.2500(9) 0.0193 Uani O1 O 0.4105(4) 0.0892(8) 0.2698(7) 0.0330 Uani C2 C 0.2062(6) 0.0625(13) 0.3762(11) 0.0353 Uani H1 H 0.2489 -0.0535 0.3850 0.0430 Uiso C3 C 0.0733(6) -0.1515(12) 0.5219(12) 0.0367 Uani H2 H 0.1219 -0.2572 0.5332 0.0440 Uiso C4 C 0.1002(6) 0.0359(13) 0.4382(12) 0.0363 Uani C5 C 0.2470(6) 0.2364(13) 0.3088(12) 0.0373 Uani H3 H 0.2063 0.3552 0.2982 0.0450 Uiso O2 O 0.3870(5) 0.4193(8) 0.1875(8) 0.0383 Uani C6 C 0.0239(7) 0.1830(14) 0.4120(13) 0.0437 Uani H4 H 0.0385 0.3051 0.3486 0.0530 Uiso Fe2 Fe -0.5000 0.0000 0.5000 0.0199 Uani Fe3 Fe -0.5000 -0.5000 1.0000 0.0199 Uani Fe4 Fe 0.5000 0.5000 0.0000 0.0199 Uani C7 C -0.3552(5) -0.2471(10) 0.7500(9) 0.0193 Uani O4 O -0.4105(4) -0.0892(8) 0.7302(7) 0.0330 Uani C8 C -0.2062(6) -0.0625(13) 0.6238(11) 0.0353 Uani H7 H -0.2489 0.0535 0.6150 0.0430 Uiso C9 C -0.0733(6) 0.1515(12) 0.4781(12) 0.0367 Uani H8 H -0.1219 0.2572 0.4668 0.0440 Uiso C10 C -0.1002(6) -0.0359(13) 0.5618(12) 0.0363 Uani C11 C -0.2470(6) -0.2364(13) 0.6912(12) 0.0373 Uani H9 H -0.2063 -0.3552 0.7018 0.0450 Uiso O6 O -0.3870(5) -0.4193(8) 0.8125(8) 0.0383 Uani C12 C -0.0239(7) -0.1830(14) 0.5880(13) 0.0437 Uani H10 H -0.0385 -0.3051 0.6514 0.0530 Uiso loop _atom_site_aniso_label _atom_site_aniso_U_11 _atom_site_aniso_U_22 _atom_site_aniso_U_33 _atom_site_aniso_U_23 _atom_site_aniso_U_13 _atom_site_aniso_U12 Fe1 0.0156(6) 0.0187(7) 0.0254(7) 0.0006(6) 0.0026(5) 0.0024(5) C1 0.014(3) 0.023(3) 0.021(3) 0.002(3) 0.001(2) -0.002(3) O1 0.037(3) 0.027(3) 0.035(3) 0.005(2) -0.006(2) 0.005(2) C2 0.027(4) 0.042(4) 0.037(4) 0.003(3) 0.011(3) -0.003(3) C3 0.019(3) 0.033(4) 0.058(5) 0.011(4) 0.003(4) 0.001(3) C4 0.023(4) 0.038(4) 0.048(5) 0.008(4) 0.009(3) -0.008(3) C5 0.024(4) 0.037(4) 0.051(5) 0.008(4) 0.009(4) -0.002(3) O2 0.043(3) 0.025(3) 0.047(3) 0.004(2) 0.024(3) -0.004(2) C6 0.039(5) 0.039(5) 0.053(5) 0.016(4) 0.015(4) -0.009(4) Fe2 0.0156 0.0187 0.0254 0.0006 0.0026 0.0024 Fe3 0.0156 0.0187 0.0254 -0.0006 0.0026 -0.0024 Fe4 0.0156 0.0187 0.0254 -0.0006 0.0026 -0.0024 C7 0.014 0.023 0.021 0.002 0.001 -0.002 O4 0.037 0.027 0.035 0.005 -0.006 0.005 C8 0.027 0.042 0.037 0.003 0.011 -0.003 C9 0.019 0.033 0.058 0.011 0.003 0.001 C10 0.023 0.038 0.048 0.008 0.009 -0.008 C11 0.024 0.037 0.051 0.008 0.009 -0.002 O6 0.043 0.025 0.047 0.004 0.024 -0.004 C12 0.039 0.039 0.053 0.016 0.015 -0.009 loop _geom_bond_atom_site_label_1 _geom_bond_atom_site_label_2 _geom_bond_site_symmetry_1 _geom_bond_site_symmetry_2 Fe1 O1 1_555 1_555 C1 O1 1_555 1_555 C2 H1 1_555 1_555 C3 H2 1_555 1_555 C4 C2 1_555 1_555 C5 C1 1_555 1_555 H3 C5 1_555 1_555 O2 C1 1_555 1_555 C6 C4 1_555 1_555 H4 C6 1_555 1_555 Fe2 O4 1_555 1_555 Fe3 O6 1_555 1_555 Fe4 O2 1_555 1_555 C7 O4 1_555 1_555 C8 H7 1_555 1_555 C9 C6 1_555 1_555 H8 C9 1_555 1_555 C10 C8 1_555 1_555 C11 C7 1_555 1_555 H9 C11 1_555 1_555 O6 C7 1_555 1_555 C12 C3 1_555 1_555 H10 C12 1_555 1_555 C2 C5 1_555 1_555 C3 C4 1_555 1_555 C8 C11 1_555 1_555 C9 C10 1_555 1_555 C10 C12 1_555 1_555

END

prosunprescience commented 1 year ago

What I understood is that somehow cif2cell did not work properly. Please check if cif2cell is working properly. Please check with this cif2cell command. cif2cell -f mofname.cif -p cif -o convertedmofname.cif where cif2cell is the cif2cell executable, mofname.cif is the input file and convertedmofname.cif is the output file. If it works then the input ciffile works fine and the code should execute properly.