molforge-studio 7.4.3__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.
- molforge_studio-7.4.3/LICENSE +93 -0
- molforge_studio-7.4.3/MANIFEST.in +7 -0
- molforge_studio-7.4.3/PKG-INFO +215 -0
- molforge_studio-7.4.3/README.md +174 -0
- molforge_studio-7.4.3/main.py +71 -0
- molforge_studio-7.4.3/molforge/__init__.py +19 -0
- molforge_studio-7.4.3/molforge/ai/__init__.py +15 -0
- molforge_studio-7.4.3/molforge/ai/deepseek_harness.py +185 -0
- molforge_studio-7.4.3/molforge/ai/mcp/desktop_client.py +38 -0
- molforge_studio-7.4.3/molforge/ai/mcp/desktop_service.py +121 -0
- molforge_studio-7.4.3/molforge/ai/mcp/mcp_server.py +780 -0
- molforge_studio-7.4.3/molforge/ai/mcp_bridge.py +945 -0
- molforge_studio-7.4.3/molforge/ai/observation.py +152 -0
- molforge_studio-7.4.3/molforge/ai/tools.py +455 -0
- molforge_studio-7.4.3/molforge/application/__init__.py +22 -0
- molforge_studio-7.4.3/molforge/application/ai/__init__.py +1 -0
- molforge_studio-7.4.3/molforge/application/ai/deepseek_client.py +293 -0
- molforge_studio-7.4.3/molforge/application/ai/observation.py +161 -0
- molforge_studio-7.4.3/molforge/application/ai/tools.py +200 -0
- molforge_studio-7.4.3/molforge/application/ai_proposals.py +166 -0
- molforge_studio-7.4.3/molforge/application/bio_selection.py +143 -0
- molforge_studio-7.4.3/molforge/application/builtin_commands.py +1445 -0
- molforge_studio-7.4.3/molforge/application/calculators/__init__.py +10 -0
- molforge_studio-7.4.3/molforge/application/calculators/base.py +143 -0
- molforge_studio-7.4.3/molforge/application/calculators/calchem_engine.py +67 -0
- molforge_studio-7.4.3/molforge/application/calculators/calchem_subprocess_worker.py +109 -0
- molforge_studio-7.4.3/molforge/application/calculators/gaussian_engine.py +59 -0
- molforge_studio-7.4.3/molforge/application/calculators/gaussian_job_spec.py +240 -0
- molforge_studio-7.4.3/molforge/application/calculators/orca_engine.py +92 -0
- molforge_studio-7.4.3/molforge/application/calculators/qc_input_generator.py +300 -0
- molforge_studio-7.4.3/molforge/application/calculators/registry.py +29 -0
- molforge_studio-7.4.3/molforge/application/calculators/rest_engine.py +262 -0
- molforge_studio-7.4.3/molforge/application/command_bus.py +139 -0
- molforge_studio-7.4.3/molforge/application/commands.py +55 -0
- molforge_studio-7.4.3/molforge/application/conformers.py +143 -0
- molforge_studio-7.4.3/molforge/application/document_session.py +156 -0
- molforge_studio-7.4.3/molforge/application/events.py +74 -0
- molforge_studio-7.4.3/molforge/application/fragment_catalog.py +422 -0
- molforge_studio-7.4.3/molforge/application/fragment_commands.py +268 -0
- molforge_studio-7.4.3/molforge/application/geometry_commands.py +84 -0
- molforge_studio-7.4.3/molforge/application/history.py +105 -0
- molforge_studio-7.4.3/molforge/application/internal_coordinates.py +293 -0
- molforge_studio-7.4.3/molforge/application/invalidation.py +1174 -0
- molforge_studio-7.4.3/molforge/application/jobs.py +185 -0
- molforge_studio-7.4.3/molforge/application/measurement.py +167 -0
- molforge_studio-7.4.3/molforge/application/measurement_targets.py +264 -0
- molforge_studio-7.4.3/molforge/application/modeling_commands.py +61 -0
- molforge_studio-7.4.3/molforge/application/plugins.py +197 -0
- molforge_studio-7.4.3/molforge/application/ports/editor2d.py +85 -0
- molforge_studio-7.4.3/molforge/application/reaction.py +75 -0
- molforge_studio-7.4.3/molforge/application/selection.py +164 -0
- molforge_studio-7.4.3/molforge/application/selection_commands.py +31 -0
- molforge_studio-7.4.3/molforge/application/trajectory.py +120 -0
- molforge_studio-7.4.3/molforge/application/trajectory_analysis.py +231 -0
- molforge_studio-7.4.3/molforge/application/workspace_registry.py +226 -0
- molforge_studio-7.4.3/molforge/core/__init__.py +12 -0
- molforge_studio-7.4.3/molforge/core/conformer.py +45 -0
- molforge_studio-7.4.3/molforge/core/molecule.py +150 -0
- molforge_studio-7.4.3/molforge/core/orbital.py +33 -0
- molforge_studio-7.4.3/molforge/core/properties.py +43 -0
- molforge_studio-7.4.3/molforge/domain/__init__.py +12 -0
- molforge_studio-7.4.3/molforge/domain/biomolecule.py +99 -0
- molforge_studio-7.4.3/molforge/domain/chemical_summary.py +129 -0
- molforge_studio-7.4.3/molforge/domain/chemistry.py +13 -0
- molforge_studio-7.4.3/molforge/domain/coordinate_store.py +164 -0
- molforge_studio-7.4.3/molforge/domain/coordination.py +133 -0
- molforge_studio-7.4.3/molforge/domain/custom_fragments.py +255 -0
- molforge_studio-7.4.3/molforge/domain/document.py +469 -0
- molforge_studio-7.4.3/molforge/domain/element_reference.json +598 -0
- molforge_studio-7.4.3/molforge/domain/elements.py +188 -0
- molforge_studio-7.4.3/molforge/domain/ids.py +58 -0
- molforge_studio-7.4.3/molforge/domain/massive_system.py +246 -0
- molforge_studio-7.4.3/molforge/domain/periodic.py +116 -0
- molforge_studio-7.4.3/molforge/domain/provenance.py +115 -0
- molforge_studio-7.4.3/molforge/domain/topology.py +364 -0
- molforge_studio-7.4.3/molforge/infrastructure/__init__.py +23 -0
- molforge_studio-7.4.3/molforge/infrastructure/hpc/cluster_config.py +122 -0
- molforge_studio-7.4.3/molforge/infrastructure/hpc/remote_executor.py +212 -0
- molforge_studio-7.4.3/molforge/infrastructure/hpc/slurm_generator.py +93 -0
- molforge_studio-7.4.3/molforge/io/__init__.py +35 -0
- molforge_studio-7.4.3/molforge/io/calchem_bridge.py +407 -0
- molforge_studio-7.4.3/molforge/io/calculators.py +893 -0
- molforge_studio-7.4.3/molforge/io/cclib_adapter.py +422 -0
- molforge_studio-7.4.3/molforge/io/conformers.py +183 -0
- molforge_studio-7.4.3/molforge/io/cube_reader.py +215 -0
- molforge_studio-7.4.3/molforge/io/custom_fragments.py +79 -0
- molforge_studio-7.4.3/molforge/io/format_matrix.py +157 -0
- molforge_studio-7.4.3/molforge/io/gemmi_adapter.py +150 -0
- molforge_studio-7.4.3/molforge/io/history_skill.py +46 -0
- molforge_studio-7.4.3/molforge/io/mdanalysis_adapter.py +155 -0
- molforge_studio-7.4.3/molforge/io/mforge_storage.py +261 -0
- molforge_studio-7.4.3/molforge/io/multiwfn_driver.py +614 -0
- molforge_studio-7.4.3/molforge/io/openbabel_adapter.py +265 -0
- molforge_studio-7.4.3/molforge/io/openbabel_handler.py +33 -0
- molforge_studio-7.4.3/molforge/io/rdkit_adapter.py +1865 -0
- molforge_studio-7.4.3/molforge/io/readers/__init__.py +10 -0
- molforge_studio-7.4.3/molforge/io/readers/cube_reader.py +71 -0
- molforge_studio-7.4.3/molforge/io/readers/gjf_reader.py +110 -0
- molforge_studio-7.4.3/molforge/io/readers/glog_reader.py +45 -0
- molforge_studio-7.4.3/molforge/io/readers/mol2_reader.py +36 -0
- molforge_studio-7.4.3/molforge/io/readers/mol_reader.py +56 -0
- molforge_studio-7.4.3/molforge/io/readers/pdb_reader.py +39 -0
- molforge_studio-7.4.3/molforge/io/readers/smi_reader.py +40 -0
- molforge_studio-7.4.3/molforge/io/readers/xyz_reader.py +47 -0
- molforge_studio-7.4.3/molforge/io/registry.py +128 -0
- molforge_studio-7.4.3/molforge/io/writers/__init__.py +7 -0
- molforge_studio-7.4.3/molforge/io/writers/gjf_writer.py +68 -0
- molforge_studio-7.4.3/molforge/io/writers/pdb_writer.py +37 -0
- molforge_studio-7.4.3/molforge/io/writers/png_writer.py +31 -0
- molforge_studio-7.4.3/molforge/io/writers/svg_writer.py +111 -0
- molforge_studio-7.4.3/molforge/io/writers/xyz_writer.py +39 -0
- molforge_studio-7.4.3/molforge/rendering/__init__.py +21 -0
- molforge_studio-7.4.3/molforge/rendering/benchmark.py +121 -0
- molforge_studio-7.4.3/molforge/rendering/bridge.py +60 -0
- molforge_studio-7.4.3/molforge/rendering/contracts.py +119 -0
- molforge_studio-7.4.3/molforge/rendering/glyph_scene.py +279 -0
- molforge_studio-7.4.3/molforge/rendering/ketcher_bridge.py +131 -0
- molforge_studio-7.4.3/molforge/rendering/ketcher_id_mapping.py +110 -0
- molforge_studio-7.4.3/molforge/rendering/materials.py +127 -0
- molforge_studio-7.4.3/molforge/rendering/molstar_backend.py +245 -0
- molforge_studio-7.4.3/molforge/rendering/native_labels.py +134 -0
- molforge_studio-7.4.3/molforge/rendering/orbitals.py +139 -0
- molforge_studio-7.4.3/molforge/rendering/vtk_backend.py +2294 -0
- molforge_studio-7.4.3/molforge/runtime.py +29 -0
- molforge_studio-7.4.3/molforge/server/__init__.py +1 -0
- molforge_studio-7.4.3/molforge/server/api_bridge.py +947 -0
- molforge_studio-7.4.3/molforge/ui/__init__.py +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/caffeine_2d.svg +150 -0
- molforge_studio-7.4.3/molforge/ui/assets/caffeine_3d_preview.svg +209 -0
- molforge_studio-7.4.3/molforge/ui/assets/caffeine_preview.json +302 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/atom.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/bond.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/cleanup.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/export.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/fragments.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/history.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/jobs.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/measure.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/molecules.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/overview.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/ring.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/search.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/select.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/settings.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/icons/templates.svg +1 -0
- molforge_studio-7.4.3/molforge/ui/assets/molforge_logo.ico +0 -0
- molforge_studio-7.4.3/molforge/ui/assets/molforge_logo.png +0 -0
- molforge_studio-7.4.3/molforge/ui/atom_labels.py +92 -0
- molforge_studio-7.4.3/molforge/ui/bio_structure_dialog.py +57 -0
- molforge_studio-7.4.3/molforge/ui/conformer_dialog.py +151 -0
- molforge_studio-7.4.3/molforge/ui/dialogs/__init__.py +2 -0
- molforge_studio-7.4.3/molforge/ui/dialogs/aim_qtaim_dialog.py +533 -0
- molforge_studio-7.4.3/molforge/ui/dialogs/calchem_orbitals_dialog.py +287 -0
- molforge_studio-7.4.3/molforge/ui/dialogs/element_fragments.py +130 -0
- molforge_studio-7.4.3/molforge/ui/dialogs/gaussian_calculation_setup.py +308 -0
- molforge_studio-7.4.3/molforge/ui/dialogs/hpc_job_dialog.py +427 -0
- molforge_studio-7.4.3/molforge/ui/dialogs/vibrational_spectrum_dialog.py +381 -0
- molforge_studio-7.4.3/molforge/ui/editor2d_widget.py +1803 -0
- molforge_studio-7.4.3/molforge/ui/element_picker.py +218 -0
- molforge_studio-7.4.3/molforge/ui/gmv_window_manager.py +65 -0
- molforge_studio-7.4.3/molforge/ui/gromacs_job_dialog.py +47 -0
- molforge_studio-7.4.3/molforge/ui/hotkeys.py +107 -0
- molforge_studio-7.4.3/molforge/ui/i18n.py +237 -0
- molforge_studio-7.4.3/molforge/ui/live_llm_dialog.py +135 -0
- molforge_studio-7.4.3/molforge/ui/llm_config_dialog.py +103 -0
- molforge_studio-7.4.3/molforge/ui/modeling_actions.py +176 -0
- molforge_studio-7.4.3/molforge/ui/molstar_widget.py +98 -0
- molforge_studio-7.4.3/molforge/ui/molstar_window.py +85 -0
- molforge_studio-7.4.3/molforge/ui/panels.py +2966 -0
- molforge_studio-7.4.3/molforge/ui/qc_result_dialog.py +1924 -0
- molforge_studio-7.4.3/molforge/ui/render3d_widget.py +1579 -0
- molforge_studio-7.4.3/molforge/ui/scrolling.py +52 -0
- molforge_studio-7.4.3/molforge/ui/settings_panel.py +330 -0
- molforge_studio-7.4.3/molforge/ui/shells/__init__.py +4 -0
- molforge_studio-7.4.3/molforge/ui/shells/base_shell.py +72 -0
- molforge_studio-7.4.3/molforge/ui/shells/document_tabs.py +715 -0
- molforge_studio-7.4.3/molforge/ui/shells/studio_2d.py +339 -0
- molforge_studio-7.4.3/molforge/ui/shells/studio_3d.py +401 -0
- molforge_studio-7.4.3/molforge/ui/shells/studio_split.py +370 -0
- molforge_studio-7.4.3/molforge/ui/shells/workflow_inputs.py +698 -0
- molforge_studio-7.4.3/molforge/ui/theme.py +719 -0
- molforge_studio-7.4.3/molforge/ui/trajectory_window.py +333 -0
- molforge_studio-7.4.3/molforge/ui/views.py +892 -0
- molforge_studio-7.4.3/molforge/ui/vtk_multiview_widget.py +141 -0
- molforge_studio-7.4.3/molforge/ui/welcome_window.py +223 -0
- molforge_studio-7.4.3/molforge/ui/window.py +3320 -0
- molforge_studio-7.4.3/molforge/workflows/__init__.py +25 -0
- molforge_studio-7.4.3/molforge/workflows/assets/OSC_MD_workflows/templates/01-MD/delete_solvent.py +216 -0
- molforge_studio-7.4.3/molforge/workflows/assets/OSC_MD_workflows/templates/02-RDF/extract_atoms.py +60 -0
- molforge_studio-7.4.3/molforge/workflows/assets/OSC_MD_workflows/templates/02-RDF/extract_atoms_example.py +22 -0
- molforge_studio-7.4.3/molforge/workflows/assets/OSC_MD_workflows/templates/03-/321/205/320/260/320/226/321/207/320/267/320/277/321/205/320/227/320/260/321/204/342/225/234/320/245/analysis_mol.py +244 -0
- molforge_studio-7.4.3/molforge/workflows/assets/OSC_MD_workflows/templates/04-/321/204/342/225/221/320/234/321/207/342/225/227/342/224/244/321/205/320/277/320/226/321/205/342/225/221/320/266/rms_roughness.py +33 -0
- molforge_studio-7.4.3/molforge/workflows/assets/OSC_MD_workflows/templates/04-/321/204/342/225/221/320/234/321/207/342/225/227/342/224/244/321/205/320/277/320/226/321/205/342/225/221/320/266/xpm_2.py +117 -0
- molforge_studio-7.4.3/molforge/workflows/assets/OSC_MD_workflows/templates/09-/321/211/320/220/320/257/321/207/320/236/320/227/marcus_rate.py +60 -0
- molforge_studio-7.4.3/molforge/workflows/assets/esp-surface-analysis/scripts/compute_descriptors.py +134 -0
- molforge_studio-7.4.3/molforge/workflows/assets/esp-surface-analysis/scripts/parse_surfanalysis.py +58 -0
- molforge_studio-7.4.3/molforge/workflows/assets/esp-surface-analysis/scripts/plot_esp_hist.py +115 -0
- molforge_studio-7.4.3/molforge/workflows/assets/homo-lumo-plot/extract_orb_energy.py +57 -0
- molforge_studio-7.4.3/molforge/workflows/assets/homo-lumo-plot/make_level_plot.py +76 -0
- molforge_studio-7.4.3/molforge/workflows/assets/homo-lumo-plot/run_pipeline.py +84 -0
- molforge_studio-7.4.3/molforge/workflows/assets/osc-energy-level-diagram/scripts/extract_levels.py +60 -0
- molforge_studio-7.4.3/molforge/workflows/assets/osc-energy-level-diagram/scripts/make_editable_pptx.py +122 -0
- molforge_studio-7.4.3/molforge/workflows/assets/osc-energy-level-diagram/scripts/make_energy_table.py +66 -0
- molforge_studio-7.4.3/molforge/workflows/assets/osc-energy-level-diagram/scripts/make_level_lines_diagram.py +148 -0
- molforge_studio-7.4.3/molforge/workflows/assets/osc-energy-level-diagram/scripts/make_rectangle_diagram.py +148 -0
- molforge_studio-7.4.3/molforge/workflows/assets/osc-energy-level-diagram/scripts/verify_from_log.py +45 -0
- molforge_studio-7.4.3/molforge/workflows/dipole_analysis.py +32 -0
- molforge_studio-7.4.3/molforge/workflows/esp_surface.py +36 -0
- molforge_studio-7.4.3/molforge/workflows/gromacs_submit.py +167 -0
- molforge_studio-7.4.3/molforge/workflows/homo_lumo_plot.py +59 -0
- molforge_studio-7.4.3/molforge/workflows/igmh_interaction.py +111 -0
- molforge_studio-7.4.3/molforge/workflows/md_rdf_analysis.py +134 -0
- molforge_studio-7.4.3/molforge/workflows/md_studio.py +255 -0
- molforge_studio-7.4.3/molforge/workflows/osc_energy_diagram.py +24 -0
- molforge_studio-7.4.3/molforge/workflows/planarity_analysis.py +66 -0
- molforge_studio-7.4.3/molforge/workflows/reorganization_energy.py +166 -0
- molforge_studio-7.4.3/molforge/workflows/scientific_workflows.py +650 -0
- molforge_studio-7.4.3/molforge_studio.egg-info/PKG-INFO +215 -0
- molforge_studio-7.4.3/molforge_studio.egg-info/SOURCES.txt +225 -0
- molforge_studio-7.4.3/molforge_studio.egg-info/dependency_links.txt +1 -0
- molforge_studio-7.4.3/molforge_studio.egg-info/entry_points.txt +3 -0
- molforge_studio-7.4.3/molforge_studio.egg-info/requires.txt +15 -0
- molforge_studio-7.4.3/molforge_studio.egg-info/top_level.txt +2 -0
- molforge_studio-7.4.3/pyproject.toml +75 -0
- molforge_studio-7.4.3/requirements.txt +6 -0
- molforge_studio-7.4.3/setup.cfg +4 -0
- molforge_studio-7.4.3/setup.py +9 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work.
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean any work of authorship, including
|
|
48
|
+
the original version of the Work and any modifications or additions
|
|
49
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
50
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
51
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
52
|
+
the copyright owner.
|
|
53
|
+
|
|
54
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
55
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
56
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
57
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
58
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
59
|
+
Work and such Derivative Works in Source or Object form.
|
|
60
|
+
|
|
61
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
62
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
63
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
64
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
65
|
+
and otherwise transfer the Work.
|
|
66
|
+
|
|
67
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
68
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
69
|
+
modifications, and in Source or Object form, provided that You
|
|
70
|
+
meet the following conditions:
|
|
71
|
+
|
|
72
|
+
(a) You must give any other recipients of the Work or
|
|
73
|
+
Derivative Works a copy of this License; and
|
|
74
|
+
|
|
75
|
+
(b) You must cause any modified files to carry prominent notices
|
|
76
|
+
stating that You changed the files; and
|
|
77
|
+
|
|
78
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
79
|
+
that You distribute, all copyright, patent, trademark, and
|
|
80
|
+
attribution notices from the Source form of the Work; and
|
|
81
|
+
|
|
82
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
83
|
+
distribution, then any Derivative Works that You distribute must
|
|
84
|
+
include a readable copy of the attribution notices contained
|
|
85
|
+
within such NOTICE file.
|
|
86
|
+
|
|
87
|
+
Copyright 2026 MolForge Team (yangdw2024)
|
|
88
|
+
|
|
89
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
90
|
+
you may not use this file except in compliance with the License.
|
|
91
|
+
You may obtain a copy of the License at
|
|
92
|
+
|
|
93
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: molforge-studio
|
|
3
|
+
Version: 7.4.3
|
|
4
|
+
Summary: MolForge Studio: Unified molecular science workstation (2D sketcher, 3D modeler, quantum chemistry & MD, LLM assistant)
|
|
5
|
+
Author-email: MolForge Team <yangdw2021@gmail.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/yangdw2024/MolForge
|
|
8
|
+
Project-URL: Repository, https://github.com/yangdw2024/MolForge.git
|
|
9
|
+
Project-URL: Issues, https://github.com/yangdw2024/MolForge/issues
|
|
10
|
+
Keywords: chemistry,molecular-editor,chemdraw,chem3d,gaussview,vmd,multiwfn,quantum-chemistry,computational-chemistry
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: numpy>=1.24
|
|
28
|
+
Requires-Dist: rdkit>=2023.09
|
|
29
|
+
Requires-Dist: PyQt6>=6.5
|
|
30
|
+
Requires-Dist: pyvista>=0.40
|
|
31
|
+
Requires-Dist: pyvistaqt>=0.11
|
|
32
|
+
Requires-Dist: scipy>=1.10
|
|
33
|
+
Provides-Extra: ai
|
|
34
|
+
Requires-Dist: requests>=2.28; extra == "ai"
|
|
35
|
+
Requires-Dist: pydantic>=2.0; extra == "ai"
|
|
36
|
+
Provides-Extra: all
|
|
37
|
+
Requires-Dist: matplotlib>=3.7; extra == "all"
|
|
38
|
+
Requires-Dist: requests>=2.28; extra == "all"
|
|
39
|
+
Requires-Dist: pydantic>=2.0; extra == "all"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# MolForge
|
|
43
|
+
|
|
44
|
+
**AI-native Molecular Workbench**
|
|
45
|
+
|
|
46
|
+
下一代分子科学工作台,目标是碾压 ChemDraw / Chem3D / GaussView / VMD。
|
|
47
|
+
|
|
48
|
+
## 快速启动
|
|
49
|
+
|
|
50
|
+
### 方式 1:双击运行
|
|
51
|
+
```
|
|
52
|
+
run_molforge.bat
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 方式 2:命令行
|
|
56
|
+
```bash
|
|
57
|
+
cd E:\YDW\Trae_Chemdraw\MolForge
|
|
58
|
+
D:\YDW\Trae_Gromacs\miniconda3\envs\molforge-webengine\python.exe scripts\run_ui.py
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 当前版本(v1.0 Alpha)已实现
|
|
62
|
+
|
|
63
|
+
### 架构
|
|
64
|
+
- 四层架构:domain / application / rendering / ui / io / ai
|
|
65
|
+
- 统一 MoleculeDocument
|
|
66
|
+
- 命令总线(CommandBus)+ 撤销/重做
|
|
67
|
+
- 事件系统(EventBus)
|
|
68
|
+
- 选择服务(SelectionService)
|
|
69
|
+
|
|
70
|
+
### UI
|
|
71
|
+
- 深色主题(#09121E 背景)
|
|
72
|
+
- 三栏布局:左侧导航 + 中央工作区 + 右侧面板
|
|
73
|
+
- 字体 14px
|
|
74
|
+
- 强调色 #66DEC9
|
|
75
|
+
- 右侧 5 个 Tab:属性检查、AI 助手、任务、历史、设置
|
|
76
|
+
|
|
77
|
+
### 2D 编辑器
|
|
78
|
+
- 自研 QPainter 2D 绘制
|
|
79
|
+
- RDKit 化学引擎
|
|
80
|
+
- 原子、键、环、电荷
|
|
81
|
+
- 快捷键支持
|
|
82
|
+
|
|
83
|
+
### 3D 查看器
|
|
84
|
+
- VTK 渲染后端
|
|
85
|
+
- 球棍 / CPK / 表面模式
|
|
86
|
+
- PBR 材质
|
|
87
|
+
- SSAO 环境遮蔽
|
|
88
|
+
- 交互式点选
|
|
89
|
+
- 旋转 / 缩放 / 平移
|
|
90
|
+
|
|
91
|
+
### AI 助手
|
|
92
|
+
- AI 工具注册表(权限分级)
|
|
93
|
+
- 提案审批系统
|
|
94
|
+
- 可回滚的操作
|
|
95
|
+
- 分子摘要查询
|
|
96
|
+
|
|
97
|
+
### 其他
|
|
98
|
+
- 完整元素周期表(120 种元素)
|
|
99
|
+
- 格式保真矩阵
|
|
100
|
+
- 科学溯源系统
|
|
101
|
+
- 插件 SDK
|
|
102
|
+
- 国际化(中文)
|
|
103
|
+
- 快捷键配置
|
|
104
|
+
- .mforge 原生格式
|
|
105
|
+
|
|
106
|
+
## 示例分子
|
|
107
|
+
|
|
108
|
+
| 分子 | 化学式 | 原子数 |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| 咖啡因 | C₈H₁₀N₄O₂ | 24 |
|
|
111
|
+
| 阿司匹林 | C₉H₈O₄ | 13 |
|
|
112
|
+
| 苯 | C₆H₆ | 12 |
|
|
113
|
+
| 乙醇 | C₂H₆O | 9 |
|
|
114
|
+
| 葡萄糖 | C₆H₁₂O₆ | 24 |
|
|
115
|
+
| 甲烷 | CH₄ | 5 |
|
|
116
|
+
| 水 | H₂O | 3 |
|
|
117
|
+
|
|
118
|
+
## 项目结构
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
MolForge/
|
|
122
|
+
├── molforge/ # 主代码包
|
|
123
|
+
│ ├── domain/ # 领域层
|
|
124
|
+
│ │ ├── document.py # MoleculeDocument
|
|
125
|
+
│ │ ├── topology.py # 分子拓扑
|
|
126
|
+
│ │ ├── coordinate_store.py # 坐标存储
|
|
127
|
+
│ │ ├── elements.py # 元素周期表(120 种)
|
|
128
|
+
│ │ ├── ids.py # 稳定 ID
|
|
129
|
+
│ │ ├── provenance.py # 科学溯源
|
|
130
|
+
│ │ └── biomolecule.py # 生物分子
|
|
131
|
+
│ ├── application/ # 应用层
|
|
132
|
+
│ │ ├── command_bus.py # 命令总线
|
|
133
|
+
│ │ ├── selection.py # 选择服务
|
|
134
|
+
│ │ ├── measurement.py # 测量三件套
|
|
135
|
+
│ │ ├── builtin_commands.py # 内置命令
|
|
136
|
+
│ │ ├── ai_proposals.py # AI 提案系统
|
|
137
|
+
│ │ ├── plugins.py # 插件 SDK
|
|
138
|
+
│ │ ├── invalidation.py # 失效机制
|
|
139
|
+
│ │ ├── jobs.py # 任务中心
|
|
140
|
+
│ │ ├── events.py # 事件系统
|
|
141
|
+
│ │ ├── reaction.py # 化学反应
|
|
142
|
+
│ │ ├── trajectory.py # 轨迹播放
|
|
143
|
+
│ │ ├── bio_selection.py # 生物分子选择
|
|
144
|
+
│ │ └── ports/ # 端口接口
|
|
145
|
+
│ ├── rendering/ # 渲染层
|
|
146
|
+
│ │ ├── vtk_backend.py # VTK 后端
|
|
147
|
+
│ │ ├── molstar_backend.py # Mol* 后端
|
|
148
|
+
│ │ ├── contracts.py # Renderer3D 接口
|
|
149
|
+
│ │ ├── materials.py # 材质预设
|
|
150
|
+
│ │ ├── orbitals.py # 分子轨道
|
|
151
|
+
│ │ ├── benchmark.py # 性能基准
|
|
152
|
+
│ │ ├── ketcher_bridge.py # Ketcher 桥接
|
|
153
|
+
│ │ └── ketcher_id_mapping.py # Ketcher ID 映射
|
|
154
|
+
│ ├── ui/ # UI 层
|
|
155
|
+
│ │ ├── window.py # 主窗口
|
|
156
|
+
│ │ ├── panels.py # 面板组件
|
|
157
|
+
│ │ ├── render3d_widget.py # 3D 渲染组件
|
|
158
|
+
│ │ ├── editor2d_widget.py # 2D 编辑器组件
|
|
159
|
+
│ │ ├── settings_panel.py # 设置面板
|
|
160
|
+
│ │ ├── element_picker.py # 元素选择器
|
|
161
|
+
│ │ ├── theme.py # 主题样式
|
|
162
|
+
│ │ ├── hotkeys.py # 快捷键
|
|
163
|
+
│ │ ├── i18n.py # 国际化
|
|
164
|
+
│ │ └── views.py # 视图
|
|
165
|
+
│ ├── io/ # 输入输出层
|
|
166
|
+
│ │ ├── rdkit_adapter.py # RDKit 适配器
|
|
167
|
+
│ │ ├── mforge_storage.py # .mforge 格式
|
|
168
|
+
│ │ ├── conformers.py # 构象生成
|
|
169
|
+
│ │ ├── cclib_adapter.py # cclib 适配
|
|
170
|
+
│ │ ├── calculators.py # 计算引擎
|
|
171
|
+
│ │ └── format_matrix.py # 格式保真矩阵
|
|
172
|
+
│ └── ai/ # AI 层
|
|
173
|
+
│ ├── observation.py # AI 观察
|
|
174
|
+
│ └── tools.py # Tool Registry
|
|
175
|
+
├── scripts/ # 运行脚本
|
|
176
|
+
├── docs/ # 文档
|
|
177
|
+
├── build/ # 构建脚本
|
|
178
|
+
└── release/ # 发布材料
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## 开发路线图
|
|
182
|
+
|
|
183
|
+
### P0(已完成基本框架)
|
|
184
|
+
- [x] 四层架构
|
|
185
|
+
- [x] MoleculeDocument
|
|
186
|
+
- [x] CommandBus
|
|
187
|
+
- [x] VTK 渲染
|
|
188
|
+
- [x] 2D/3D 联动
|
|
189
|
+
- [x] AI 工具闭环
|
|
190
|
+
|
|
191
|
+
### P1(进行中)
|
|
192
|
+
- [ ] 完整元素周期表 UI
|
|
193
|
+
- [ ] 构象搜索
|
|
194
|
+
- [ ] 分子轨道可视化
|
|
195
|
+
- [ ] 计算结果工作区
|
|
196
|
+
- [ ] 大分子基础支持
|
|
197
|
+
|
|
198
|
+
### P2(规划中)
|
|
199
|
+
- [ ] 百万原子交互
|
|
200
|
+
- [ ] 长轨迹播放
|
|
201
|
+
- [ ] 插件生态
|
|
202
|
+
- [ ] AI 科研自动化
|
|
203
|
+
|
|
204
|
+
## 许可证
|
|
205
|
+
|
|
206
|
+
内部研究使用,暂不对外分发。
|
|
207
|
+
|
|
208
|
+
## 致谢
|
|
209
|
+
|
|
210
|
+
- RDKit
|
|
211
|
+
- VTK
|
|
212
|
+
- PyVista
|
|
213
|
+
- PyQt6
|
|
214
|
+
- Ketcher
|
|
215
|
+
- Mol*
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# MolForge
|
|
2
|
+
|
|
3
|
+
**AI-native Molecular Workbench**
|
|
4
|
+
|
|
5
|
+
下一代分子科学工作台,目标是碾压 ChemDraw / Chem3D / GaussView / VMD。
|
|
6
|
+
|
|
7
|
+
## 快速启动
|
|
8
|
+
|
|
9
|
+
### 方式 1:双击运行
|
|
10
|
+
```
|
|
11
|
+
run_molforge.bat
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### 方式 2:命令行
|
|
15
|
+
```bash
|
|
16
|
+
cd E:\YDW\Trae_Chemdraw\MolForge
|
|
17
|
+
D:\YDW\Trae_Gromacs\miniconda3\envs\molforge-webengine\python.exe scripts\run_ui.py
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 当前版本(v1.0 Alpha)已实现
|
|
21
|
+
|
|
22
|
+
### 架构
|
|
23
|
+
- 四层架构:domain / application / rendering / ui / io / ai
|
|
24
|
+
- 统一 MoleculeDocument
|
|
25
|
+
- 命令总线(CommandBus)+ 撤销/重做
|
|
26
|
+
- 事件系统(EventBus)
|
|
27
|
+
- 选择服务(SelectionService)
|
|
28
|
+
|
|
29
|
+
### UI
|
|
30
|
+
- 深色主题(#09121E 背景)
|
|
31
|
+
- 三栏布局:左侧导航 + 中央工作区 + 右侧面板
|
|
32
|
+
- 字体 14px
|
|
33
|
+
- 强调色 #66DEC9
|
|
34
|
+
- 右侧 5 个 Tab:属性检查、AI 助手、任务、历史、设置
|
|
35
|
+
|
|
36
|
+
### 2D 编辑器
|
|
37
|
+
- 自研 QPainter 2D 绘制
|
|
38
|
+
- RDKit 化学引擎
|
|
39
|
+
- 原子、键、环、电荷
|
|
40
|
+
- 快捷键支持
|
|
41
|
+
|
|
42
|
+
### 3D 查看器
|
|
43
|
+
- VTK 渲染后端
|
|
44
|
+
- 球棍 / CPK / 表面模式
|
|
45
|
+
- PBR 材质
|
|
46
|
+
- SSAO 环境遮蔽
|
|
47
|
+
- 交互式点选
|
|
48
|
+
- 旋转 / 缩放 / 平移
|
|
49
|
+
|
|
50
|
+
### AI 助手
|
|
51
|
+
- AI 工具注册表(权限分级)
|
|
52
|
+
- 提案审批系统
|
|
53
|
+
- 可回滚的操作
|
|
54
|
+
- 分子摘要查询
|
|
55
|
+
|
|
56
|
+
### 其他
|
|
57
|
+
- 完整元素周期表(120 种元素)
|
|
58
|
+
- 格式保真矩阵
|
|
59
|
+
- 科学溯源系统
|
|
60
|
+
- 插件 SDK
|
|
61
|
+
- 国际化(中文)
|
|
62
|
+
- 快捷键配置
|
|
63
|
+
- .mforge 原生格式
|
|
64
|
+
|
|
65
|
+
## 示例分子
|
|
66
|
+
|
|
67
|
+
| 分子 | 化学式 | 原子数 |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| 咖啡因 | C₈H₁₀N₄O₂ | 24 |
|
|
70
|
+
| 阿司匹林 | C₉H₈O₄ | 13 |
|
|
71
|
+
| 苯 | C₆H₆ | 12 |
|
|
72
|
+
| 乙醇 | C₂H₆O | 9 |
|
|
73
|
+
| 葡萄糖 | C₆H₁₂O₆ | 24 |
|
|
74
|
+
| 甲烷 | CH₄ | 5 |
|
|
75
|
+
| 水 | H₂O | 3 |
|
|
76
|
+
|
|
77
|
+
## 项目结构
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
MolForge/
|
|
81
|
+
├── molforge/ # 主代码包
|
|
82
|
+
│ ├── domain/ # 领域层
|
|
83
|
+
│ │ ├── document.py # MoleculeDocument
|
|
84
|
+
│ │ ├── topology.py # 分子拓扑
|
|
85
|
+
│ │ ├── coordinate_store.py # 坐标存储
|
|
86
|
+
│ │ ├── elements.py # 元素周期表(120 种)
|
|
87
|
+
│ │ ├── ids.py # 稳定 ID
|
|
88
|
+
│ │ ├── provenance.py # 科学溯源
|
|
89
|
+
│ │ └── biomolecule.py # 生物分子
|
|
90
|
+
│ ├── application/ # 应用层
|
|
91
|
+
│ │ ├── command_bus.py # 命令总线
|
|
92
|
+
│ │ ├── selection.py # 选择服务
|
|
93
|
+
│ │ ├── measurement.py # 测量三件套
|
|
94
|
+
│ │ ├── builtin_commands.py # 内置命令
|
|
95
|
+
│ │ ├── ai_proposals.py # AI 提案系统
|
|
96
|
+
│ │ ├── plugins.py # 插件 SDK
|
|
97
|
+
│ │ ├── invalidation.py # 失效机制
|
|
98
|
+
│ │ ├── jobs.py # 任务中心
|
|
99
|
+
│ │ ├── events.py # 事件系统
|
|
100
|
+
│ │ ├── reaction.py # 化学反应
|
|
101
|
+
│ │ ├── trajectory.py # 轨迹播放
|
|
102
|
+
│ │ ├── bio_selection.py # 生物分子选择
|
|
103
|
+
│ │ └── ports/ # 端口接口
|
|
104
|
+
│ ├── rendering/ # 渲染层
|
|
105
|
+
│ │ ├── vtk_backend.py # VTK 后端
|
|
106
|
+
│ │ ├── molstar_backend.py # Mol* 后端
|
|
107
|
+
│ │ ├── contracts.py # Renderer3D 接口
|
|
108
|
+
│ │ ├── materials.py # 材质预设
|
|
109
|
+
│ │ ├── orbitals.py # 分子轨道
|
|
110
|
+
│ │ ├── benchmark.py # 性能基准
|
|
111
|
+
│ │ ├── ketcher_bridge.py # Ketcher 桥接
|
|
112
|
+
│ │ └── ketcher_id_mapping.py # Ketcher ID 映射
|
|
113
|
+
│ ├── ui/ # UI 层
|
|
114
|
+
│ │ ├── window.py # 主窗口
|
|
115
|
+
│ │ ├── panels.py # 面板组件
|
|
116
|
+
│ │ ├── render3d_widget.py # 3D 渲染组件
|
|
117
|
+
│ │ ├── editor2d_widget.py # 2D 编辑器组件
|
|
118
|
+
│ │ ├── settings_panel.py # 设置面板
|
|
119
|
+
│ │ ├── element_picker.py # 元素选择器
|
|
120
|
+
│ │ ├── theme.py # 主题样式
|
|
121
|
+
│ │ ├── hotkeys.py # 快捷键
|
|
122
|
+
│ │ ├── i18n.py # 国际化
|
|
123
|
+
│ │ └── views.py # 视图
|
|
124
|
+
│ ├── io/ # 输入输出层
|
|
125
|
+
│ │ ├── rdkit_adapter.py # RDKit 适配器
|
|
126
|
+
│ │ ├── mforge_storage.py # .mforge 格式
|
|
127
|
+
│ │ ├── conformers.py # 构象生成
|
|
128
|
+
│ │ ├── cclib_adapter.py # cclib 适配
|
|
129
|
+
│ │ ├── calculators.py # 计算引擎
|
|
130
|
+
│ │ └── format_matrix.py # 格式保真矩阵
|
|
131
|
+
│ └── ai/ # AI 层
|
|
132
|
+
│ ├── observation.py # AI 观察
|
|
133
|
+
│ └── tools.py # Tool Registry
|
|
134
|
+
├── scripts/ # 运行脚本
|
|
135
|
+
├── docs/ # 文档
|
|
136
|
+
├── build/ # 构建脚本
|
|
137
|
+
└── release/ # 发布材料
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## 开发路线图
|
|
141
|
+
|
|
142
|
+
### P0(已完成基本框架)
|
|
143
|
+
- [x] 四层架构
|
|
144
|
+
- [x] MoleculeDocument
|
|
145
|
+
- [x] CommandBus
|
|
146
|
+
- [x] VTK 渲染
|
|
147
|
+
- [x] 2D/3D 联动
|
|
148
|
+
- [x] AI 工具闭环
|
|
149
|
+
|
|
150
|
+
### P1(进行中)
|
|
151
|
+
- [ ] 完整元素周期表 UI
|
|
152
|
+
- [ ] 构象搜索
|
|
153
|
+
- [ ] 分子轨道可视化
|
|
154
|
+
- [ ] 计算结果工作区
|
|
155
|
+
- [ ] 大分子基础支持
|
|
156
|
+
|
|
157
|
+
### P2(规划中)
|
|
158
|
+
- [ ] 百万原子交互
|
|
159
|
+
- [ ] 长轨迹播放
|
|
160
|
+
- [ ] 插件生态
|
|
161
|
+
- [ ] AI 科研自动化
|
|
162
|
+
|
|
163
|
+
## 许可证
|
|
164
|
+
|
|
165
|
+
内部研究使用,暂不对外分发。
|
|
166
|
+
|
|
167
|
+
## 致谢
|
|
168
|
+
|
|
169
|
+
- RDKit
|
|
170
|
+
- VTK
|
|
171
|
+
- PyVista
|
|
172
|
+
- PyQt6
|
|
173
|
+
- Ketcher
|
|
174
|
+
- Mol*
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""
|
|
2
|
+
MolForge v7.0 - AI-Native 分子工作台主入口
|
|
3
|
+
==========================================
|
|
4
|
+
直接运行 `python main.py`(支持 `--mode welcome|split|2d|3d|legacy`)或双击 `run_molforge.bat` 启动。
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import sys
|
|
9
|
+
from molforge.runtime import configure_runtime
|
|
10
|
+
configure_runtime()
|
|
11
|
+
from molforge import __version__
|
|
12
|
+
from PyQt6.QtCore import Qt
|
|
13
|
+
from PyQt6.QtWidgets import QApplication
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
QApplication.setHighDpiScaleFactorRoundingPolicy(
|
|
17
|
+
Qt.HighDpiScaleFactorRoundingPolicy.PassThrough
|
|
18
|
+
)
|
|
19
|
+
except Exception:
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
from molforge.ui.theme import STYLE, load_saved_typography, load_saved_theme, apply_global_typography
|
|
23
|
+
from molforge.ui.window import MolForgeWindow
|
|
24
|
+
from molforge.ui.welcome_window import AppController, WelcomeWindow
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def run_application(argv: list[str] | None = None, default_mode: str = "welcome") -> int:
|
|
28
|
+
args = list(sys.argv if argv is None else argv)
|
|
29
|
+
app = QApplication.instance() or QApplication(args)
|
|
30
|
+
app.setApplicationName("MolForge")
|
|
31
|
+
app.setApplicationVersion(__version__)
|
|
32
|
+
try:
|
|
33
|
+
family, size = load_saved_typography()
|
|
34
|
+
theme_name, accent = load_saved_theme()
|
|
35
|
+
apply_global_typography(family, size, theme_name=theme_name, accent=accent)
|
|
36
|
+
except Exception:
|
|
37
|
+
try:
|
|
38
|
+
from PyQt6.QtGui import QFont
|
|
39
|
+
app_font = QFont("Microsoft YaHei UI", 10)
|
|
40
|
+
app_font.setStyleStrategy(QFont.StyleStrategy.PreferAntialias)
|
|
41
|
+
app.setFont(app_font)
|
|
42
|
+
except Exception:
|
|
43
|
+
pass
|
|
44
|
+
app.setStyleSheet(STYLE)
|
|
45
|
+
|
|
46
|
+
mode = default_mode
|
|
47
|
+
for i, a in enumerate(args):
|
|
48
|
+
if a == "--mode" and i + 1 < len(args):
|
|
49
|
+
mode = args[i + 1].strip().lower()
|
|
50
|
+
elif a == "--welcome":
|
|
51
|
+
mode = "welcome"
|
|
52
|
+
|
|
53
|
+
ctrl = AppController.instance()
|
|
54
|
+
if mode == "welcome":
|
|
55
|
+
ctrl.show_welcome()
|
|
56
|
+
elif mode in ("2d", "3d", "split"):
|
|
57
|
+
ctrl.launch_system(mode) # type: ignore[arg-type]
|
|
58
|
+
else:
|
|
59
|
+
window = MolForgeWindow()
|
|
60
|
+
window.show()
|
|
61
|
+
ctrl.active_windows.append(window)
|
|
62
|
+
|
|
63
|
+
return app.exec()
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def main():
|
|
67
|
+
sys.exit(run_application(sys.argv, default_mode="welcome"))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
if __name__ == "__main__":
|
|
71
|
+
main()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
MolForge - 分子编辑器包
|
|
3
|
+
=====================
|
|
4
|
+
一个给计算化学研究生用的轻量分子编辑器,基于 PyQt6 + RDKit。
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys, os
|
|
8
|
+
|
|
9
|
+
# 保护 Windows Python 3.13 下 platform / numpy.testing 的 WMI COM 崩溃
|
|
10
|
+
if sys.platform == "win32":
|
|
11
|
+
try:
|
|
12
|
+
import platform
|
|
13
|
+
_wv = sys.getwindowsversion()
|
|
14
|
+
platform._wmi_query = lambda *a, **kw: (f"{_wv.major}.{_wv.minor}.{_wv.build}", 1, "Multiprocessor Free", 0, 0)
|
|
15
|
+
except Exception:
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
__version__ = "7.4.3"
|
|
19
|
+
__app_name__ = "MolForge"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ai/ - LLM 操作层
|
|
3
|
+
=================
|
|
4
|
+
AIContext 持有当前分子,通过工具操作它。
|
|
5
|
+
LLM 通过 function calling / MCP 调用 AIContext 的方法。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__all__ = ["AIContext"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def __getattr__(name: str):
|
|
12
|
+
if name == "AIContext":
|
|
13
|
+
from .tools import AIContext
|
|
14
|
+
return AIContext
|
|
15
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|