finalcif 178__tar.gz → 180__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {finalcif-178 → finalcif-180}/.run/compile_ui_files.run.xml +3 -2
- finalcif-180/.run/finalcif_start.run.xml +28 -0
- {finalcif-178 → finalcif-180}/PKG-INFO +8 -8
- finalcif-180/finalcif/__init__.py +3 -0
- {finalcif-178 → finalcif-180}/finalcif/appwindow.py +10 -4
- {finalcif-178 → finalcif-180}/finalcif/cif/checkcif/checkcif.py +52 -7
- {finalcif-178 → finalcif-180}/finalcif/cif/hkl.py +31 -28
- {finalcif-178 → finalcif-180}/finalcif/equip_property/author_loop_templates.py +33 -13
- {finalcif-178 → finalcif-180}/pyproject.toml +7 -7
- {finalcif-178 → finalcif-180}/uv.lock +355 -252
- finalcif-178/finalcif/__init__.py +0 -3
- finalcif-178/run_and_capture.py +0 -30
- {finalcif-178 → finalcif-180}/.gitattributes +0 -0
- {finalcif-178 → finalcif-180}/.githooks/pre-push +0 -0
- {finalcif-178 → finalcif-180}/.gitignore +0 -0
- {finalcif-178 → finalcif-180}/.python-version +0 -0
- {finalcif-178 → finalcif-180}/.ruff.toml +0 -0
- {finalcif-178 → finalcif-180}/.run/Make Documentation MAC.run.xml +0 -0
- {finalcif-178 → finalcif-180}/.run/make documentation Windows.run.xml +0 -0
- {finalcif-178 → finalcif-180}/AGENTS.md +0 -0
- {finalcif-178 → finalcif-180}/CODE_OF_CONDUCT.md +0 -0
- {finalcif-178 → finalcif-180}/CONTRIBUTING.md +0 -0
- {finalcif-178 → finalcif-180}/Finalcif_installer_win.spec +0 -0
- {finalcif-178 → finalcif-180}/Finalcif_linux_onefile.spec +0 -0
- {finalcif-178 → finalcif-180}/Finalcif_mac.spec +0 -0
- {finalcif-178 → finalcif-180}/LICENSE.md +0 -0
- {finalcif-178 → finalcif-180}/README.md +0 -0
- {finalcif-178 → finalcif-180}/finalcif/app_path.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/all_cif_dicts.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/atoms.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/checkcif/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cif_dict_foo.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cif_file_io.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cif_keyword_mapping.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cif_order.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cod/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cod/deposit.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cod/deposit_check.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cod/deposition_list.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cod/doi.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cod/upload.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/cod/website_parser.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/core_dict.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/modulation_dict.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/powder_dict.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/reference.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/restraints_dict.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/text.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/twin_dict.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/cif/vrf_entry.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/ciforder/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/ciforder/order.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/ciforder/order_ui.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/ciforder/order_ui.ui +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/bruker_data.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/bruker_frame.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/ccdc_mail.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/data.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/p4p_reader.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/sadabs.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/saint.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/shelx_lst.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/datafiles/utils.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/equip_property/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/equip_property/equipment.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/equip_property/properties.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/equip_property/tools.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/finalcif_start.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/block_combobox.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/checkcif_browser.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/cif_table_model.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/cif_table_view.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/combobox.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/custom_classes.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/dialogs.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/edit_button.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/equipmenttable.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/file_editor.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/finalcif_gui_ui.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/finalcif_gui_ui.ui +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/import_selector.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/import_selector_ui.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/import_selector_ui.ui +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/loop_creator.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/loop_creator_ui.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/loop_creator_ui.ui +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/loops.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/mainstackwidget.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/mixins.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/new_key_dialog.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/new_key_dialog_ui.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/new_key_dialog_ui.ui +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/plaintextedit.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/playground.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/propertytable.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/shelx_navigation.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/single_line_textedit.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/spell_check_edit.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/squeeze_dialog.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/syntax_highlighter.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/text_templates_ui.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/text_templates_ui.ui +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/text_value_editor.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/timers.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/validators.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/vrf_classes.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/gui/vzs_viewer.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/icon/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/icon/finalcif.png +0 -0
- {finalcif-178 → finalcif-180}/finalcif/icon/finalcif2.ico +0 -0
- {finalcif-178 → finalcif-180}/finalcif/icon/finalcif2.png +0 -0
- {finalcif-178 → finalcif-180}/finalcif/icon/multitable.ico +0 -0
- {finalcif-178 → finalcif-180}/finalcif/icon/multitable.png +0 -0
- {finalcif-178 → finalcif-180}/finalcif/icon/multitable.xcf +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/archive_report.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/gui/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/gui/mainwindow.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/gui/mainwindow.ui +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/references.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/report_text.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/symm.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/report/templated_report.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/bootstrap/bootstrap.min.css +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/machines/D8_VENTURE.cif +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/mathml2omml.xsl +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/miew/LICENSES +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/miew/Miew.css +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/miew/Miew.min.js +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/miew/lodash.min.js +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/miew/three.js +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/report.tex +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/report.tmpl +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/report2.tex +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/report_default.docx +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/report_fastmolwidget.tmpl +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/template1.docx +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/template_for_multitable.docx +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/template_text.docx +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/template_without_text.docx +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/templates.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/FakePlasTeX/FakeContext.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/FakePlasTeX/FakeTokenizer.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/FakePlasTeX/README.md +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/FakePlasTeX/TokenizerPassThru.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/LICENSE +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/u2l.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/unicode-math-table.tex +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/unicode2latex/unicode-math-xetex.sty +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/xsl/convert.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/xsl/xmltohtml.xsl +0 -0
- {finalcif-178 → finalcif-180}/finalcif/template/xsl/xmltolatex.xsl +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/__init__.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/chemparse.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/download.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/dsrmath.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/formal_charge.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/misc.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/mol_file_writer.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/options.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/platon.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/pupdate.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/selfupdate.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/settings.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/shred.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/solvents.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/space_groups.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/spgr_format.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/squeeze.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/statusbar.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/sumformula.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif/tools/z_from_packing.py +0 -0
- {finalcif-178 → finalcif-180}/finalcif.exe +0 -0
- {finalcif-178 → finalcif-180}/githooks/pre-push +0 -0
- {finalcif-178 → finalcif-180}/platon/README.txt +0 -0
- {finalcif-178 → finalcif-180}/platon/compile_platon.bat +0 -0
- {finalcif-178 → finalcif-180}/platon/platon_special.exe +0 -0
- {finalcif-178 → finalcif-180}/platon/platon_special.f +0 -0
- {finalcif-178 → finalcif-180}/pylock.toml +0 -0
- {finalcif-178 → finalcif-180}/run_finalcif +0 -0
- {finalcif-178 → finalcif-180}/run_finalcif.bat +0 -0
- {finalcif-178 → finalcif-180}/screenshots/finalcif_checkcif.png +0 -0
- {finalcif-178 → finalcif-180}/screenshots/finalcif_details.png +0 -0
- {finalcif-178 → finalcif-180}/screenshots/finalcif_loops.png +0 -0
- {finalcif-178 → finalcif-180}/screenshots/finalcif_loops2.png +0 -0
- {finalcif-178 → finalcif-180}/screenshots/finalcif_main.png +0 -0
- {finalcif-178 → finalcif-180}/screenshots/finalcif_report.png +0 -0
- {finalcif-178 → finalcif-180}/screenshots/finalcif_responses.png +0 -0
- {finalcif-178 → finalcif-180}/screenshots/loops_column_buttons.png +0 -0
- {finalcif-178 → finalcif-180}/work/compare_z_platon.py +0 -0
- {finalcif-178 → finalcif-180}/work/diagnose_1519506.py +0 -0
- {finalcif-178 → finalcif-180}/work/diagnose_z.py +0 -0
- {finalcif-178 → finalcif-180}/work/investigate_failures.py +0 -0
- {finalcif-178 → finalcif-180}/work/validate_cod.py +0 -0
- {finalcif-178 → finalcif-180}/work/validate_zprime.py +0 -0
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
<env name="PYTHONUNBUFFERED" value="1" />
|
|
9
9
|
</envs>
|
|
10
10
|
<option name="SDK_HOME" value="" />
|
|
11
|
-
<option name="
|
|
11
|
+
<option name="SDK_NAME" value="~\Downloads\FinalCif\.venv" />
|
|
12
|
+
<option name="WORKING_DIRECTORY" value="$ContentRoot$" />
|
|
12
13
|
<option name="IS_MODULE_SDK" value="true" />
|
|
13
14
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
14
15
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
15
|
-
<option name="DEBUG_JUST_MY_CODE" value="true" />
|
|
16
16
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
|
17
17
|
<option name="RUN_TOOL" value="false" />
|
|
18
|
+
<option name="RUN_AS_SCRIPT" value="false" />
|
|
18
19
|
<option name="SCRIPT_NAME" value="scripts/compile_ui_files.py" />
|
|
19
20
|
<option name="PARAMETERS" value="" />
|
|
20
21
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<component name="ProjectRunConfigurationManager">
|
|
2
|
+
<configuration default="false" name="finalcif_start" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
|
3
|
+
<module name="finalcif" />
|
|
4
|
+
<option name="ENV_FILES" value="" />
|
|
5
|
+
<option name="INTERPRETER_OPTIONS" value="" />
|
|
6
|
+
<option name="PARENT_ENVS" value="true" />
|
|
7
|
+
<envs>
|
|
8
|
+
<env name="PYTHONUNBUFFERED" value="1" />
|
|
9
|
+
</envs>
|
|
10
|
+
<option name="SDK_HOME" value="" />
|
|
11
|
+
<option name="SDK_NAME" value="~\Downloads\FinalCif\.venv" />
|
|
12
|
+
<option name="WORKING_DIRECTORY" value="$ContentRoot$/finalcif" />
|
|
13
|
+
<option name="IS_MODULE_SDK" value="true" />
|
|
14
|
+
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
15
|
+
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
16
|
+
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
|
17
|
+
<option name="RUN_TOOL" value="true" />
|
|
18
|
+
<option name="RUN_AS_SCRIPT" value="false" />
|
|
19
|
+
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/finalcif/finalcif_start.py" />
|
|
20
|
+
<option name="PARAMETERS" value="" />
|
|
21
|
+
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
22
|
+
<option name="EMULATE_TERMINAL" value="false" />
|
|
23
|
+
<option name="MODULE_MODE" value="false" />
|
|
24
|
+
<option name="REDIRECT_INPUT" value="false" />
|
|
25
|
+
<option name="INPUT_FILE" value="" />
|
|
26
|
+
<method v="2" />
|
|
27
|
+
</configuration>
|
|
28
|
+
</component>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: finalcif
|
|
3
|
-
Version:
|
|
3
|
+
Version: 180
|
|
4
4
|
Summary: CIF file editor
|
|
5
5
|
Project-URL: Homepage, https://dkratzert.de/finalcif.html
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/dkratzert/FinalCif/issues
|
|
@@ -12,27 +12,27 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
14
14
|
Requires-Python: >=3.12
|
|
15
|
-
Requires-Dist: certifi==2026.
|
|
15
|
+
Requires-Dist: certifi==2026.10.23
|
|
16
16
|
Requires-Dist: chardet
|
|
17
17
|
Requires-Dist: charset-normalizer
|
|
18
|
-
Requires-Dist: docxcompose
|
|
19
|
-
Requires-Dist: docxtpl[subdoc]
|
|
18
|
+
Requires-Dist: docxcompose==2.2.0
|
|
19
|
+
Requires-Dist: docxtpl[subdoc]==0.20.2
|
|
20
20
|
Requires-Dist: fastmolwidget>=1.2.0
|
|
21
21
|
Requires-Dist: gemmi>=0.7.5
|
|
22
22
|
Requires-Dist: html2text
|
|
23
23
|
Requires-Dist: lxml>=6.1.1
|
|
24
|
-
Requires-Dist: numpy==2.
|
|
24
|
+
Requires-Dist: numpy==2.5.5
|
|
25
25
|
Requires-Dist: packaging==26.3
|
|
26
26
|
Requires-Dist: pefile
|
|
27
27
|
Requires-Dist: pybind11>=3
|
|
28
28
|
Requires-Dist: pyenchant
|
|
29
29
|
Requires-Dist: pyside6-essentials
|
|
30
30
|
Requires-Dist: python-docx
|
|
31
|
-
Requires-Dist: qtawesome
|
|
32
|
-
Requires-Dist: qtpy
|
|
31
|
+
Requires-Dist: qtawesome==1.4.2
|
|
32
|
+
Requires-Dist: qtpy==2.4.3
|
|
33
33
|
Requires-Dist: requests
|
|
34
34
|
Requires-Dist: shelxfile>=24
|
|
35
|
-
Requires-Dist: urllib3==2.
|
|
35
|
+
Requires-Dist: urllib3==2.8.0
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
37
37
|
|
|
38
38
|

|
|
@@ -51,7 +51,7 @@ from finalcif import VERSION
|
|
|
51
51
|
from finalcif.app_path import application_path
|
|
52
52
|
from finalcif.cif.cif_file_io import CifContainer, GemmiError, has_cif2_header
|
|
53
53
|
from finalcif.cif.cod.deposit import CODdeposit
|
|
54
|
-
from finalcif.cif.text import utf8_to_str, quote
|
|
54
|
+
from finalcif.cif.text import utf8_to_str, quote, retranslate_delimiter
|
|
55
55
|
from finalcif.datafiles.bruker_data import BrukerData
|
|
56
56
|
from finalcif.datafiles.ccdc_mail import CCDCMail
|
|
57
57
|
from finalcif.equip_property.author_loop_templates import AuthorLoops
|
|
@@ -687,7 +687,7 @@ class AppWindow(QMainWindow):
|
|
|
687
687
|
self.textedit.ui.cifKeyLineEdit.setText(loop_column_name)
|
|
688
688
|
for n in range(i.loop.length()):
|
|
689
689
|
value = i.loop[n, 0]
|
|
690
|
-
text_list.append(gemmi.cif.as_string(value))
|
|
690
|
+
text_list.append(retranslate_delimiter(gemmi.cif.as_string(value)))
|
|
691
691
|
self.textedit.add_textfields(text_list)
|
|
692
692
|
|
|
693
693
|
def export_text_template(self) -> None:
|
|
@@ -1187,6 +1187,9 @@ class AppWindow(QMainWindow):
|
|
|
1187
1187
|
def _checkcif_failed(self, txt: str) -> None:
|
|
1188
1188
|
self.ui.CheckCifLogPlainTextEdit.appendHtml(f'<b>{txt}</b>')
|
|
1189
1189
|
|
|
1190
|
+
def _log_checkcif_not_finished(self) -> None:
|
|
1191
|
+
self._checkcif_failed('CheckCIF failed to finish. Please try it at https://checkcif.iucr.org/ instead.')
|
|
1192
|
+
|
|
1190
1193
|
def _log_checkcif(self, txt: str) -> None:
|
|
1191
1194
|
self.ui.CheckCifLogPlainTextEdit.appendPlainText(txt)
|
|
1192
1195
|
app.processEvents()
|
|
@@ -1251,8 +1254,7 @@ class AppWindow(QMainWindow):
|
|
|
1251
1254
|
parser = MyHTMLParser(self.htmlfile.read_text())
|
|
1252
1255
|
except FileNotFoundError:
|
|
1253
1256
|
# happens if checkcif fails, e.g. takes too much time.
|
|
1254
|
-
self.
|
|
1255
|
-
'Please try it at https://checkcif.iucr.org/ instead.</b>')
|
|
1257
|
+
self._log_checkcif_not_finished()
|
|
1256
1258
|
return
|
|
1257
1259
|
|
|
1258
1260
|
self.checkcif_browser = CheckCifBrowser(parent=self, checkdef=self.checkdef)
|
|
@@ -1408,6 +1410,10 @@ class AppWindow(QMainWindow):
|
|
|
1408
1410
|
if self.pdf_htmlfile is None:
|
|
1409
1411
|
return
|
|
1410
1412
|
self._resolve_structure_factor_upload(self.pdf_htmlfile)
|
|
1413
|
+
if not self.pdf_htmlfile.exists():
|
|
1414
|
+
self._log_checkcif_not_finished()
|
|
1415
|
+
self.pdf_htmlfile = None
|
|
1416
|
+
return
|
|
1411
1417
|
self.ckf.show_pdf_report()
|
|
1412
1418
|
self.ui.CheckCifLogPlainTextEdit.appendPlainText('PDF Checkcif report finished.')
|
|
1413
1419
|
with suppress(OSError):
|
|
@@ -13,6 +13,7 @@ import sys
|
|
|
13
13
|
import time
|
|
14
14
|
from collections.abc import Callable
|
|
15
15
|
from contextlib import suppress
|
|
16
|
+
from html import escape
|
|
16
17
|
from html.parser import HTMLParser
|
|
17
18
|
from pathlib import Path
|
|
18
19
|
from urllib.parse import urljoin
|
|
@@ -22,6 +23,7 @@ from qtpy.QtCore import QThread, Signal
|
|
|
22
23
|
from requests import Response
|
|
23
24
|
from requests.exceptions import MissingSchema
|
|
24
25
|
|
|
26
|
+
from finalcif import VERSION
|
|
25
27
|
from finalcif.cif.cif_file_io import CifContainer
|
|
26
28
|
from finalcif.cif.vrf_entry import VRFEntry
|
|
27
29
|
from finalcif.gui.dialogs import show_general_warning
|
|
@@ -35,6 +37,10 @@ SUBMIT_WITHOUT_HKL_NAME = 'Qsubmitnow'
|
|
|
35
37
|
#: Maximum difference in seconds between the modification time of a CIF file and a
|
|
36
38
|
#: structure factor file in order to regard them as belonging together.
|
|
37
39
|
MAX_FCF_TIME_DIFFERENCE = 3600.0
|
|
40
|
+
#: Maximum number of characters of a server error page shown to the user.
|
|
41
|
+
MAX_ERROR_TEXT_LENGTH = 600
|
|
42
|
+
#: Identifies FinalCif honestly to the CheckCIF server.
|
|
43
|
+
REQUEST_HEADERS = {'User-Agent': f'FinalCif/{VERSION} ({sys.platform}; +https://dkratzert.de/finalcif.html)'}
|
|
38
44
|
|
|
39
45
|
|
|
40
46
|
class HtmlForm:
|
|
@@ -162,7 +168,8 @@ def find_matching_fcf_file(cif_file: Path,
|
|
|
162
168
|
|
|
163
169
|
|
|
164
170
|
def _post_form(form: HtmlForm, base_url: str, files: dict | None = None) -> str:
|
|
165
|
-
response = requests.post(form.url(base_url), data=form.payload, files=files,
|
|
171
|
+
response = requests.post(form.url(base_url), data=form.payload, files=files, headers=REQUEST_HEADERS,
|
|
172
|
+
timeout=900)
|
|
166
173
|
response.raise_for_status()
|
|
167
174
|
return response.text
|
|
168
175
|
|
|
@@ -267,10 +274,10 @@ class CheckCif(QThread):
|
|
|
267
274
|
t1 = time.perf_counter()
|
|
268
275
|
self.progress.emit('Report request sent. Please wait...')
|
|
269
276
|
req = self._do_the_server_request(headers, temp_cif)
|
|
270
|
-
if req:
|
|
277
|
+
if req is not None:
|
|
271
278
|
self.progress.emit('request finished')
|
|
272
279
|
if req.status_code != 200:
|
|
273
|
-
self.failed.emit(
|
|
280
|
+
self.failed.emit(server_error_message(req))
|
|
274
281
|
else:
|
|
275
282
|
t2 = time.perf_counter()
|
|
276
283
|
time.sleep(0.1)
|
|
@@ -286,7 +293,8 @@ class CheckCif(QThread):
|
|
|
286
293
|
def _do_the_server_request(self, headers: dict, temp_cif: bytes) -> Response | None:
|
|
287
294
|
req = None
|
|
288
295
|
try:
|
|
289
|
-
req = requests.post(self.checkcif_url, files={'file': temp_cif}, data=headers,
|
|
296
|
+
req = requests.post(self.checkcif_url, files={'file': temp_cif}, data=headers,
|
|
297
|
+
headers=REQUEST_HEADERS, timeout=900)
|
|
290
298
|
except requests.exceptions.ReadTimeout:
|
|
291
299
|
message = r"Checkcif server took too long. Try it at 'https://checkcif.iucr.org' directly."
|
|
292
300
|
self.failed.emit(message)
|
|
@@ -297,6 +305,8 @@ class CheckCif(QThread):
|
|
|
297
305
|
message = "The checkcif server is not reachable. Is your network connection working?<br>" \
|
|
298
306
|
"The server URL might also have changed..."
|
|
299
307
|
self.failed.emit(message)
|
|
308
|
+
except requests.exceptions.RequestException as e:
|
|
309
|
+
self.failed.emit(f'CheckCIF request failed: {escape(str(e))}')
|
|
300
310
|
return req
|
|
301
311
|
|
|
302
312
|
def _open_pdf_result(self) -> None:
|
|
@@ -339,6 +349,40 @@ def fix_iucr_urls(content: str):
|
|
|
339
349
|
return re.sub(r'\s+src\s*=\s*"//', ' src="https://', href)
|
|
340
350
|
|
|
341
351
|
|
|
352
|
+
class _PageTextParser(HTMLParser):
|
|
353
|
+
"""Collects the visible text of an HTML page."""
|
|
354
|
+
_invisible_tags = frozenset({'script', 'style', 'title'})
|
|
355
|
+
|
|
356
|
+
def __init__(self, html: str) -> None:
|
|
357
|
+
super().__init__()
|
|
358
|
+
self._parts: list[str] = []
|
|
359
|
+
self._invisible_depth = 0
|
|
360
|
+
self.feed(html)
|
|
361
|
+
|
|
362
|
+
def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
|
|
363
|
+
if tag in self._invisible_tags:
|
|
364
|
+
self._invisible_depth += 1
|
|
365
|
+
|
|
366
|
+
def handle_endtag(self, tag: str) -> None:
|
|
367
|
+
if tag in self._invisible_tags and self._invisible_depth:
|
|
368
|
+
self._invisible_depth -= 1
|
|
369
|
+
|
|
370
|
+
def handle_data(self, data: str) -> None:
|
|
371
|
+
if not self._invisible_depth and data.strip():
|
|
372
|
+
self._parts.append(' '.join(data.split()))
|
|
373
|
+
|
|
374
|
+
@property
|
|
375
|
+
def text(self) -> str:
|
|
376
|
+
return ' '.join(self._parts)
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
def server_error_message(response: Response) -> str:
|
|
380
|
+
"""HTML message for a failed CheckCIF request including the explanation of the server."""
|
|
381
|
+
message = f'CheckCIF server answered with HTTP {response.status_code} {response.reason or ""}'.rstrip()
|
|
382
|
+
text = _PageTextParser(response.text).text[:MAX_ERROR_TEXT_LENGTH]
|
|
383
|
+
return f'{message}:<br>{escape(text)}' if text else f'{message}.'
|
|
384
|
+
|
|
385
|
+
|
|
342
386
|
class MyHTMLParser(HTMLParser):
|
|
343
387
|
def __init__(self, data):
|
|
344
388
|
self.pdf_link = ''
|
|
@@ -350,7 +394,7 @@ class MyHTMLParser(HTMLParser):
|
|
|
350
394
|
self.feed(data)
|
|
351
395
|
|
|
352
396
|
def get_pdf(self) -> bytes | None:
|
|
353
|
-
return requests.get(self.pdf_link, timeout=10).content
|
|
397
|
+
return requests.get(self.pdf_link, headers=REQUEST_HEADERS, timeout=10).content
|
|
354
398
|
|
|
355
399
|
def handle_starttag(self, tag: str, attrs: str) -> None:
|
|
356
400
|
# if tag and tag not in ('font', 'div', 'link', 'meta', 'html', 'table', 'td') and attrs:
|
|
@@ -372,7 +416,7 @@ class MyHTMLParser(HTMLParser):
|
|
|
372
416
|
|
|
373
417
|
def save_image(self, image_file: Path) -> None:
|
|
374
418
|
try:
|
|
375
|
-
image = requests.get(self.imageurl, timeout=10).content
|
|
419
|
+
image = requests.get(self.imageurl, headers=REQUEST_HEADERS, timeout=10).content
|
|
376
420
|
except MissingSchema:
|
|
377
421
|
print('debug: Got no image from checkcif server.')
|
|
378
422
|
image = b''
|
|
@@ -381,7 +425,8 @@ class MyHTMLParser(HTMLParser):
|
|
|
381
425
|
|
|
382
426
|
def get_ckf(self) -> str:
|
|
383
427
|
try:
|
|
384
|
-
return requests.get(self.structure_factor_report,
|
|
428
|
+
return requests.get(self.structure_factor_report, headers=REQUEST_HEADERS,
|
|
429
|
+
timeout=10).content.decode('latin1', 'ignore')
|
|
385
430
|
except MissingSchema:
|
|
386
431
|
return ''
|
|
387
432
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import re
|
|
4
3
|
from collections import namedtuple
|
|
5
4
|
from collections.abc import Sequence
|
|
6
5
|
from pathlib import Path
|
|
@@ -40,45 +39,36 @@ class HKL:
|
|
|
40
39
|
"""
|
|
41
40
|
Adds the hkl data from a SHELX hkl file as local loop.
|
|
42
41
|
"""
|
|
43
|
-
hkl_width = self._get_hkl_width()
|
|
44
42
|
loop_header = ['index_h',
|
|
45
43
|
'index_k',
|
|
46
44
|
'index_l',
|
|
47
45
|
'F_squared_meas' if self.hklf_type != 3 else 'F_meas',
|
|
48
46
|
'F_squared_sigma' if self.hklf_type != 3 else 'F_sigma',
|
|
49
47
|
'scale_group_code']
|
|
50
|
-
loop: Loop =
|
|
51
|
-
|
|
52
|
-
for line in self._hkl_file.splitlines(keepends=False):
|
|
53
|
-
|
|
54
|
-
if not
|
|
48
|
+
loop: Loop | None = None
|
|
49
|
+
width = 0
|
|
50
|
+
for line_number, line in enumerate(self._hkl_file.splitlines(keepends=False), start=1):
|
|
51
|
+
row = line.split()
|
|
52
|
+
if not row:
|
|
55
53
|
continue
|
|
56
|
-
#
|
|
57
|
-
if
|
|
58
|
-
|
|
59
|
-
# there is no scale group in other reflections
|
|
60
|
-
loop.add_row(splitline[:hkl_width])
|
|
54
|
+
# Without a 0 0 0 terminator, embedded HKL data may end with CIF metadata:
|
|
55
|
+
if not _is_reflection(row) or len(row) < width:
|
|
56
|
+
print(f'HKL data ends at invalid line {line_number}: {line}')
|
|
61
57
|
break
|
|
62
|
-
|
|
63
|
-
loop.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
if loop is None:
|
|
59
|
+
loop = self.block.init_loop('_refln_', loop_header[:len(row)])
|
|
60
|
+
width = loop.width()
|
|
61
|
+
# Truncate, because some programs add a batch number only to the terminating reflection:
|
|
62
|
+
loop.add_row(row[:width])
|
|
63
|
+
if _is_zero_reflection(row):
|
|
64
|
+
# Data after the 0 0 0 reflection is not part of the hkl file.
|
|
65
|
+
break
|
|
66
|
+
if loop is None:
|
|
67
|
+
raise ValueError('No valid HKL reflections found.')
|
|
67
68
|
|
|
68
69
|
def __repr__(self) -> str:
|
|
69
70
|
return self.hkl_as_cif[:250]
|
|
70
71
|
|
|
71
|
-
def _trim_header_to_hkl_width(self, loop_header: list[str]) -> list[str]:
|
|
72
|
-
hkl_with = self._get_hkl_width()
|
|
73
|
-
trimmed_header = loop_header[:hkl_with]
|
|
74
|
-
return trimmed_header
|
|
75
|
-
|
|
76
|
-
def _get_hkl_width(self) -> int:
|
|
77
|
-
first_lines = self._hkl_file[:150].strip().splitlines(keepends=False)
|
|
78
|
-
if len(first_lines) > 1:
|
|
79
|
-
return len(first_lines[1].split())
|
|
80
|
-
return len(first_lines[0].split())
|
|
81
|
-
|
|
82
72
|
def get_hkl_min_max(self) -> Limit:
|
|
83
73
|
hkl: gemmi.ReflnBlock = gemmi.hkl_cif_as_refln_block(self.block)
|
|
84
74
|
miller = hkl.make_miller_array()
|
|
@@ -87,6 +77,19 @@ class HKL:
|
|
|
87
77
|
return Limit(h_max=h_max, h_min=h_min, k_max=k_max, k_min=k_min, l_max=l_max, l_min=l_min)
|
|
88
78
|
|
|
89
79
|
|
|
80
|
+
def _is_reflection(row: list[str]) -> bool:
|
|
81
|
+
"""Whether a split hkl line starts with three integer indices, the intensity and its sigma."""
|
|
82
|
+
try:
|
|
83
|
+
int(row[0]), int(row[1]), int(row[2]), float(row[3]), float(row[4])
|
|
84
|
+
except (ValueError, IndexError):
|
|
85
|
+
return False
|
|
86
|
+
return True
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _is_zero_reflection(row: list[str]) -> bool:
|
|
90
|
+
return not (int(row[0]) or int(row[1]) or int(row[2]))
|
|
91
|
+
|
|
92
|
+
|
|
90
93
|
def calculate_rint(hkl_file: str, space_group: str, *, cell: Sequence[float] | None = None,
|
|
91
94
|
resolution: tuple[float, float] | None = None, hklf: int = 4,
|
|
92
95
|
twst: int | None = None) -> float | None:
|
|
@@ -7,6 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
# and you think this stuff is worth it, you can buy me a beer in return.
|
|
8
8
|
# ----------------------------------------------------------------------------
|
|
9
9
|
import re
|
|
10
|
+
from bisect import bisect
|
|
10
11
|
from dataclasses import dataclass
|
|
11
12
|
from enum import Enum
|
|
12
13
|
from pathlib import Path
|
|
@@ -15,15 +16,15 @@ from typing import TYPE_CHECKING
|
|
|
15
16
|
import gemmi.cif
|
|
16
17
|
from qtpy import QtCore
|
|
17
18
|
from qtpy.QtWidgets import QListWidgetItem, QMenu
|
|
18
|
-
from gemmi.cif import
|
|
19
|
+
from gemmi.cif import as_string
|
|
19
20
|
|
|
20
21
|
from finalcif.cif.cif_file_io import CifContainer
|
|
21
22
|
from finalcif.cif.text import utf8_to_str, quote, retranslate_delimiter, string_to_utf8
|
|
22
23
|
from finalcif.equip_property.tools import read_document_from_cif_file
|
|
24
|
+
from finalcif.gui.custom_classes import Column
|
|
23
25
|
from finalcif.gui.dialogs import cif_file_save_dialog, show_general_warning, cif_file_open_dialog
|
|
24
26
|
from finalcif.gui.finalcif_gui_ui import Ui_FinalCifWindow
|
|
25
27
|
from finalcif.gui.timers import single_shot
|
|
26
|
-
from finalcif.tools.misc import grouper
|
|
27
28
|
from finalcif.tools.settings import FinalCifSettings
|
|
28
29
|
|
|
29
30
|
if TYPE_CHECKING:
|
|
@@ -151,25 +152,44 @@ class AuthorLoops:
|
|
|
151
152
|
|
|
152
153
|
def save_author_to_loop(self) -> None:
|
|
153
154
|
author = self.get_author_info()
|
|
154
|
-
row = [author.name, author.address, author.email, author.phone, author.orcid, author.iucr_id, author.footnote]
|
|
155
155
|
author_loop_tags = self.get_author_loop(author)
|
|
156
|
+
row = [author.name, author.address, author.email, author.phone, author.orcid, author.iucr_id,
|
|
157
|
+
author.footnote][:len(author_loop_tags)]
|
|
156
158
|
table: gemmi.cif.Table = self.cif.block.find(author_loop_tags)
|
|
157
|
-
if
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
if author.contact_author and self._any_key_is_pair(author_loop_tags):
|
|
160
|
+
# Contact author items are not loopable in coreCIF, so the existing pairs get overwritten:
|
|
161
|
+
self._set_main_table_values(author_loop_tags, row)
|
|
162
|
+
self.app.status_bar.show_message('Contact author was set in the main table.', 15)
|
|
163
|
+
elif table.width():
|
|
164
|
+
if tuple(row) in [tuple(table_row) for table_row in table]:
|
|
160
165
|
self.app.status_bar.show_message('This author already exists.', 15)
|
|
161
|
-
print('dbg> Author already exists.')
|
|
162
166
|
return
|
|
163
|
-
|
|
164
|
-
gemmi_loop = self.cif.init_loop(author_loop_tags)
|
|
165
|
-
table = self.cif.block.find(author_loop_tags)
|
|
166
|
-
if gemmi_loop.width() < len(row):
|
|
167
|
-
row = row[:gemmi_loop.width()]
|
|
168
|
-
if row not in table:
|
|
167
|
+
table.ensure_loop()
|
|
169
168
|
table.append_row(row)
|
|
169
|
+
self._remove_keys_from_main_table(author_loop_tags)
|
|
170
|
+
else:
|
|
171
|
+
self.cif.init_loop(author_loop_tags).add_row(row)
|
|
170
172
|
self.app.ui.loops_page.make_loops_tables()
|
|
171
173
|
self.show_authors_list()
|
|
172
174
|
|
|
175
|
+
def _any_key_is_pair(self, keys: list[str]) -> bool:
|
|
176
|
+
return any(self.cif.block.find_pair(key) for key in keys)
|
|
177
|
+
|
|
178
|
+
def _set_main_table_values(self, keys: list[str], values: list[str]) -> None:
|
|
179
|
+
main_table = self.app.ui.cif_main_table
|
|
180
|
+
for key, value in zip(keys, values, strict=True):
|
|
181
|
+
if not main_table.has_key(key):
|
|
182
|
+
self.app.add_row(key, '?', position=bisect(main_table.model().vheaderitems, key))
|
|
183
|
+
text = retranslate_delimiter(as_string(value)) or '?'
|
|
184
|
+
main_table.setText(key=key, column=Column.EDIT, txt=text)
|
|
185
|
+
|
|
186
|
+
def _remove_keys_from_main_table(self, keys: list[str]) -> None:
|
|
187
|
+
"""Removes rows of keys that were converted from pairs into a loop."""
|
|
188
|
+
main_table = self.app.ui.cif_main_table
|
|
189
|
+
for key in keys:
|
|
190
|
+
if main_table.has_key(key):
|
|
191
|
+
main_table.delete_row(main_table.row_from_key(key))
|
|
192
|
+
|
|
173
193
|
def get_author_info(self) -> Author:
|
|
174
194
|
if self.ui.authorEditTabWidget.currentWidget().objectName() == 'page_publication':
|
|
175
195
|
name = quote(utf8_to_str(self.ui.FullNameLineEdit.text()))
|
|
@@ -32,7 +32,7 @@ classifiers = [
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
dependencies = [
|
|
35
|
-
"certifi==2026.
|
|
35
|
+
"certifi==2026.10.23",
|
|
36
36
|
"chardet",
|
|
37
37
|
"gemmi>=0.7.5",
|
|
38
38
|
"html2text",
|
|
@@ -41,18 +41,18 @@ dependencies = [
|
|
|
41
41
|
"pybind11>=3",
|
|
42
42
|
"python-docx",
|
|
43
43
|
"packaging==26.3",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"numpy==2.
|
|
44
|
+
"qtawesome==1.4.2",
|
|
45
|
+
"qtpy==2.4.3",
|
|
46
|
+
"numpy==2.5.5",
|
|
47
47
|
"requests",
|
|
48
|
-
"urllib3==2.
|
|
49
|
-
"docxtpl[subdoc]
|
|
48
|
+
"urllib3==2.8.0",
|
|
49
|
+
"docxtpl[subdoc]==0.20.2",
|
|
50
50
|
"shelxfile>=24",
|
|
51
51
|
"fastmolwidget>=1.2.0", # needs set_model_source/ResidualDensityControls and the web submodule
|
|
52
52
|
"pyenchant",
|
|
53
53
|
"charset-normalizer",
|
|
54
54
|
"pyside6-essentials",
|
|
55
|
-
"docxcompose
|
|
55
|
+
"docxcompose==2.2.0",
|
|
56
56
|
]
|
|
57
57
|
|
|
58
58
|
[dependency-groups]
|