MoleditPy-linux 2.4.3__py3-none-any.whl → 2.4.5__py3-none-any.whl
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.
- moleditpy_linux/modules/bond_item.py +14 -7
- moleditpy_linux/modules/constants.py +1 -1
- moleditpy_linux/modules/main_window_main_init.py +3 -4
- moleditpy_linux/modules/settings_dialog.py +39 -2
- {moleditpy_linux-2.4.3.dist-info → moleditpy_linux-2.4.5.dist-info}/METADATA +1 -1
- {moleditpy_linux-2.4.3.dist-info → moleditpy_linux-2.4.5.dist-info}/RECORD +10 -10
- {moleditpy_linux-2.4.3.dist-info → moleditpy_linux-2.4.5.dist-info}/WHEEL +0 -0
- {moleditpy_linux-2.4.3.dist-info → moleditpy_linux-2.4.5.dist-info}/entry_points.txt +0 -0
- {moleditpy_linux-2.4.3.dist-info → moleditpy_linux-2.4.5.dist-info}/licenses/LICENSE +0 -0
- {moleditpy_linux-2.4.3.dist-info → moleditpy_linux-2.4.5.dist-info}/top_level.txt +0 -0
|
@@ -217,12 +217,19 @@ class BondItem(QGraphicsItem):
|
|
|
217
217
|
pen.setCapStyle(cap_style)
|
|
218
218
|
painter.setPen(pen)
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
# Wedge/Dash Specific Settings
|
|
221
|
+
wedge_width_half = settings.get('bond_wedge_width_2d', 6.0)
|
|
222
|
+
num_dashes = int(settings.get('bond_dash_count_2d', 8))
|
|
223
|
+
|
|
224
|
+
# Use bond color for fill
|
|
225
|
+
painter.setBrush(QBrush(bond_color))
|
|
222
226
|
except Exception:
|
|
227
|
+
# Fallback
|
|
223
228
|
painter.setPen(self.pen)
|
|
224
|
-
|
|
225
|
-
|
|
229
|
+
painter.setBrush(QBrush(Qt.GlobalColor.black))
|
|
230
|
+
# Default fallback width for wedge
|
|
231
|
+
wedge_width_half = 6.0
|
|
232
|
+
num_dashes = 8
|
|
226
233
|
|
|
227
234
|
# --- 立体化学 (Wedge/Dash) の描画 ---
|
|
228
235
|
if self.order == 1 and self.stereo in [1, 2]:
|
|
@@ -232,7 +239,7 @@ class BondItem(QGraphicsItem):
|
|
|
232
239
|
p2 = line.p2() - vec.p2() * 5
|
|
233
240
|
|
|
234
241
|
if self.stereo == 1: # Wedge (くさび形)
|
|
235
|
-
offset = QPointF(normal.dx(), normal.dy()) *
|
|
242
|
+
offset = QPointF(normal.dx(), normal.dy()) * wedge_width_half
|
|
236
243
|
poly = QPolygonF([p1, p2 + offset, p2 - offset])
|
|
237
244
|
painter.drawPolygon(poly)
|
|
238
245
|
|
|
@@ -243,11 +250,11 @@ class BondItem(QGraphicsItem):
|
|
|
243
250
|
pen.setWidthF(2.5)
|
|
244
251
|
painter.setPen(pen)
|
|
245
252
|
|
|
246
|
-
|
|
253
|
+
# Use configured number of dashes (default 8)
|
|
247
254
|
for i in range(num_dashes + 1):
|
|
248
255
|
t = i / num_dashes
|
|
249
256
|
start_pt = p1 * (1 - t) + p2 * t
|
|
250
|
-
width =
|
|
257
|
+
width = (wedge_width_half * 2.0) * t
|
|
251
258
|
offset = QPointF(normal.dx(), normal.dy()) * width / 2.0
|
|
252
259
|
painter.drawLine(start_pt - offset, start_pt + offset)
|
|
253
260
|
painter.restore()
|
|
@@ -1253,8 +1253,6 @@ class MainWindowMainInit(object):
|
|
|
1253
1253
|
|
|
1254
1254
|
plugin_menu.addSeparator()
|
|
1255
1255
|
|
|
1256
|
-
# Initial population of plugins
|
|
1257
|
-
self.update_plugin_menu(plugin_menu)
|
|
1258
1256
|
|
|
1259
1257
|
settings_menu = menu_bar.addMenu("&Settings")
|
|
1260
1258
|
# 1) 3D View settings (existing)
|
|
@@ -1420,11 +1418,12 @@ class MainWindowMainInit(object):
|
|
|
1420
1418
|
)
|
|
1421
1419
|
help_menu.addAction(manual_action)
|
|
1422
1420
|
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
1421
|
# 3D関連機能の初期状態を統一的に設定
|
|
1426
1422
|
self._enable_3d_features(False)
|
|
1427
1423
|
|
|
1424
|
+
# Finally, populate plugins now that all menus are created
|
|
1425
|
+
self.update_plugin_menu(plugin_menu)
|
|
1426
|
+
|
|
1428
1427
|
|
|
1429
1428
|
|
|
1430
1429
|
def init_worker_thread(self):
|
|
@@ -27,7 +27,7 @@ class SettingsDialog(QDialog):
|
|
|
27
27
|
def __init__(self, current_settings, parent=None):
|
|
28
28
|
super().__init__(parent)
|
|
29
29
|
self.setWindowTitle("Settings")
|
|
30
|
-
self.setMinimumSize(
|
|
30
|
+
self.setMinimumSize(650, 750)
|
|
31
31
|
|
|
32
32
|
# 親ウィンドウの参照を保存(Apply機能のため)
|
|
33
33
|
self.parent_window = parent
|
|
@@ -99,6 +99,8 @@ class SettingsDialog(QDialog):
|
|
|
99
99
|
'bond_color_2d': '#222222', # Almost black
|
|
100
100
|
'atom_use_bond_color_2d': False,
|
|
101
101
|
'bond_cap_style_2d': 'Round',
|
|
102
|
+
'bond_wedge_width_2d': 6.0,
|
|
103
|
+
'bond_dash_count_2d': 8,
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
# --- 選択された色を管理する専用のインスタンス変数 ---
|
|
@@ -244,6 +246,26 @@ class SettingsDialog(QDialog):
|
|
|
244
246
|
self.bond_cap_style_2d_combo.addItems(['Round', 'Flat', 'Square'])
|
|
245
247
|
form_layout.addRow("Bond Cap Style:", self.bond_cap_style_2d_combo)
|
|
246
248
|
|
|
249
|
+
# Wedge Bond Width
|
|
250
|
+
self.bond_wedge_width_2d_slider = QSlider(Qt.Orientation.Horizontal)
|
|
251
|
+
self.bond_wedge_width_2d_slider.setRange(10, 300) # 1.0 - 30.0
|
|
252
|
+
self.bond_wedge_width_2d_label = QLabel("6.0")
|
|
253
|
+
self.bond_wedge_width_2d_slider.valueChanged.connect(lambda v: self.bond_wedge_width_2d_label.setText(f"{v/10:.1f}"))
|
|
254
|
+
bww_layout = QHBoxLayout()
|
|
255
|
+
bww_layout.addWidget(self.bond_wedge_width_2d_slider)
|
|
256
|
+
bww_layout.addWidget(self.bond_wedge_width_2d_label)
|
|
257
|
+
form_layout.addRow("Wedge Bond Width:", bww_layout)
|
|
258
|
+
|
|
259
|
+
# Dash Count
|
|
260
|
+
self.bond_dash_count_2d_slider = QSlider(Qt.Orientation.Horizontal)
|
|
261
|
+
self.bond_dash_count_2d_slider.setRange(3, 20)
|
|
262
|
+
self.bond_dash_count_2d_label = QLabel("8")
|
|
263
|
+
self.bond_dash_count_2d_slider.valueChanged.connect(lambda v: self.bond_dash_count_2d_label.setText(str(v)))
|
|
264
|
+
bdc_layout = QHBoxLayout()
|
|
265
|
+
bdc_layout.addWidget(self.bond_dash_count_2d_slider)
|
|
266
|
+
bdc_layout.addWidget(self.bond_dash_count_2d_label)
|
|
267
|
+
form_layout.addRow("Dash Count:", bdc_layout)
|
|
268
|
+
|
|
247
269
|
|
|
248
270
|
line2 = QFrame()
|
|
249
271
|
line2.setFrameShape(QFrame.Shape.HLine)
|
|
@@ -791,7 +813,10 @@ class SettingsDialog(QDialog):
|
|
|
791
813
|
'background_color_2d': self.default_settings['background_color_2d'],
|
|
792
814
|
'bond_color_2d': self.default_settings['bond_color_2d'],
|
|
793
815
|
'atom_use_bond_color_2d': self.default_settings['atom_use_bond_color_2d'],
|
|
794
|
-
'
|
|
816
|
+
'atom_use_bond_color_2d': self.default_settings['atom_use_bond_color_2d'],
|
|
817
|
+
'bond_cap_style_2d': self.default_settings['bond_cap_style_2d'],
|
|
818
|
+
'bond_wedge_width_2d': self.default_settings['bond_wedge_width_2d'],
|
|
819
|
+
'bond_dash_count_2d': self.default_settings['bond_dash_count_2d']
|
|
795
820
|
},
|
|
796
821
|
"3D Scene": {
|
|
797
822
|
'background_color': self.default_settings['background_color'],
|
|
@@ -1228,7 +1253,11 @@ class SettingsDialog(QDialog):
|
|
|
1228
1253
|
'background_color_2d': self.current_bg_color_2d,
|
|
1229
1254
|
'bond_color_2d': self.current_bond_color_2d,
|
|
1230
1255
|
'atom_use_bond_color_2d': self.atom_use_bond_color_2d_checkbox.isChecked(),
|
|
1256
|
+
'bond_color_2d': self.current_bond_color_2d,
|
|
1257
|
+
'atom_use_bond_color_2d': self.atom_use_bond_color_2d_checkbox.isChecked(),
|
|
1231
1258
|
'bond_cap_style_2d': self.bond_cap_style_2d_combo.currentText(),
|
|
1259
|
+
'bond_wedge_width_2d': self.bond_wedge_width_2d_slider.value() / 10.0,
|
|
1260
|
+
'bond_dash_count_2d': self.bond_dash_count_2d_slider.value(),
|
|
1232
1261
|
}
|
|
1233
1262
|
|
|
1234
1263
|
def pick_bs_bond_color(self):
|
|
@@ -1499,5 +1528,13 @@ class SettingsDialog(QDialog):
|
|
|
1499
1528
|
index = self.bond_cap_style_2d_combo.findText(cap_style)
|
|
1500
1529
|
if index >= 0:
|
|
1501
1530
|
self.bond_cap_style_2d_combo.setCurrentIndex(index)
|
|
1531
|
+
|
|
1532
|
+
bww_2d = settings_dict.get('bond_wedge_width_2d', self.default_settings['bond_wedge_width_2d'])
|
|
1533
|
+
self.bond_wedge_width_2d_slider.setValue(int(bww_2d * 10))
|
|
1534
|
+
self.bond_wedge_width_2d_label.setText(f"{bww_2d:.1f}")
|
|
1535
|
+
|
|
1536
|
+
self.bond_dash_count_2d_slider.setValue(settings_dict.get('bond_dash_count_2d', self.default_settings['bond_dash_count_2d']))
|
|
1537
|
+
self.bond_dash_count_2d_label.setText(str(self.bond_dash_count_2d_slider.value()))
|
|
1538
|
+
|
|
1502
1539
|
self.current_bond_color_2d = settings_dict.get('bond_color_2d', self.default_settings['bond_color_2d'])
|
|
1503
1540
|
self.update_2d_color_buttons()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy-linux
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.5
|
|
4
4
|
Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -8,11 +8,11 @@ moleditpy_linux/modules/alignment_dialog.py,sha256=CPubSJI52mNSXmWt7oKQ2un5lXnN8
|
|
|
8
8
|
moleditpy_linux/modules/analysis_window.py,sha256=zjP5ipSTpKw8oLr1eKdoxW8Bk1SslGlPqsVucD-x_5w,9403
|
|
9
9
|
moleditpy_linux/modules/angle_dialog.py,sha256=uc2WbvSfRe892xoEirqpZ78pf2Smwzkinkso6zLWr0Y,17751
|
|
10
10
|
moleditpy_linux/modules/atom_item.py,sha256=zPV6AO0Je4rKgZekyYCGehucleKP21ALDsjVhGV8n-M,17738
|
|
11
|
-
moleditpy_linux/modules/bond_item.py,sha256=
|
|
11
|
+
moleditpy_linux/modules/bond_item.py,sha256=JlfXCSd9wN13M52bcbly4hbI6W83IhYt5wpRzUAjMEg,22020
|
|
12
12
|
moleditpy_linux/modules/bond_length_dialog.py,sha256=6bFPGssnqlgINuqpxLv-OhjMH3_hspnaH8QtorAyu2M,14782
|
|
13
13
|
moleditpy_linux/modules/calculation_worker.py,sha256=KiGQY7i-QCQofEoE0r65KoQgpEGFcbhmxWv6egfkUdc,42324
|
|
14
14
|
moleditpy_linux/modules/color_settings_dialog.py,sha256=Ow44BhCOLo0AFb6klO001k6B4drOgKX9DeNBQhZLp5o,15474
|
|
15
|
-
moleditpy_linux/modules/constants.py,sha256=
|
|
15
|
+
moleditpy_linux/modules/constants.py,sha256=xHvWc66dgQ0Z1YICny3WRGTL8F9-BC33j7UgzGSuNzw,4702
|
|
16
16
|
moleditpy_linux/modules/constrained_optimization_dialog.py,sha256=REsk4ePsqNmAGPMTS_jckeM7jexrU3krwun8sKqKUCs,30062
|
|
17
17
|
moleditpy_linux/modules/custom_interactor_style.py,sha256=LDNODMJoNHGe1AUSrvqv6PdeJm-hpPmSpWINppnJLt0,38942
|
|
18
18
|
moleditpy_linux/modules/custom_qt_interactor.py,sha256=vCZsDfRO-FtphD5cTP7Ps-5rpHZMIGloaoe6EaKzrsw,4139
|
|
@@ -25,7 +25,7 @@ moleditpy_linux/modules/main_window_dialog_manager.py,sha256=QR96LqHAPSOShXbc9cK
|
|
|
25
25
|
moleditpy_linux/modules/main_window_edit_3d.py,sha256=CUArB5wcsgq1C7LygAEC6URlbnn4RhRYDa5n-Y-etWI,19731
|
|
26
26
|
moleditpy_linux/modules/main_window_edit_actions.py,sha256=drVXRFpSOhILYfApcSro9zssnDw-a8F7wNcfQ3xQukw,69412
|
|
27
27
|
moleditpy_linux/modules/main_window_export.py,sha256=_Vd7MeP_xaLWDYDm3-ZIZiPuAXhP-AvrQbi7Yx3Jy3c,43020
|
|
28
|
-
moleditpy_linux/modules/main_window_main_init.py,sha256=
|
|
28
|
+
moleditpy_linux/modules/main_window_main_init.py,sha256=SNgsnovYEbe_5lkpon3Wgh-v5SawI0xsb26DE5-W7ic,94882
|
|
29
29
|
moleditpy_linux/modules/main_window_molecular_parsers.py,sha256=KR6vzuqc3nutOcorpYr0QOyX3MFBcxTwDhZX96VgJ9Q,48291
|
|
30
30
|
moleditpy_linux/modules/main_window_project_io.py,sha256=TWwtuKDuvgcvPZ9IGmW8r1EJJOrgxrIJRnxe_f4C1oM,17149
|
|
31
31
|
moleditpy_linux/modules/main_window_string_importers.py,sha256=v47wOd4RtjKYcF-aLP-mogGGdYTpTEo3dDyAu79_5MM,10782
|
|
@@ -41,7 +41,7 @@ moleditpy_linux/modules/planarize_dialog.py,sha256=eaqI1MpF35e-VUMpJATt-EtGG5Fhc
|
|
|
41
41
|
moleditpy_linux/modules/plugin_interface.py,sha256=JfobFdAOLp5OnyJp3BNsWnpmZNJYypWQHNVNT0fP1N8,8171
|
|
42
42
|
moleditpy_linux/modules/plugin_manager.py,sha256=ZFQz8VlCy1_IHX7DnMro7iRbouB_rxZQowfrKuZ76G8,21133
|
|
43
43
|
moleditpy_linux/modules/plugin_manager_window.py,sha256=b4kEv0DaWHZG76ZaFTOxn6CVtA62_0MpPYYr10ehCtA,12544
|
|
44
|
-
moleditpy_linux/modules/settings_dialog.py,sha256=
|
|
44
|
+
moleditpy_linux/modules/settings_dialog.py,sha256=9hq2QDmlJsjdblW6f1gorItLg31XJub9tVsgcZ60Cbk,87756
|
|
45
45
|
moleditpy_linux/modules/template_preview_item.py,sha256=djdq3tz73d_fJGOvai3E-V9Hk9q9ZW7skx7BV59mooA,6556
|
|
46
46
|
moleditpy_linux/modules/template_preview_view.py,sha256=4OCHZDO51BvJpKdfrBWJ4_4WfLfFSKxsVIyf7I-Kj2E,3350
|
|
47
47
|
moleditpy_linux/modules/translation_dialog.py,sha256=x_GJsbVk-cj4aN2KgmYWDRUDInFlXezAoYoTvX-OT30,14553
|
|
@@ -51,9 +51,9 @@ moleditpy_linux/modules/assets/file_icon.ico,sha256=yyVj084A7HuMNbV073cE_Ag3Ne40
|
|
|
51
51
|
moleditpy_linux/modules/assets/icon.icns,sha256=wD5R6-Vw7K662tVKhu2E1ImN0oUuyAP4youesEQsn9c,139863
|
|
52
52
|
moleditpy_linux/modules/assets/icon.ico,sha256=RfgFcx7-dHY_2STdsOQCQziY5SNhDr3gPnjO6jzEDPI,147975
|
|
53
53
|
moleditpy_linux/modules/assets/icon.png,sha256=kCFN1WacYIdy0GN6SFEbNA00ef39pCczBnFdkkBI8Bs,147110
|
|
54
|
-
moleditpy_linux-2.4.
|
|
55
|
-
moleditpy_linux-2.4.
|
|
56
|
-
moleditpy_linux-2.4.
|
|
57
|
-
moleditpy_linux-2.4.
|
|
58
|
-
moleditpy_linux-2.4.
|
|
59
|
-
moleditpy_linux-2.4.
|
|
54
|
+
moleditpy_linux-2.4.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
55
|
+
moleditpy_linux-2.4.5.dist-info/METADATA,sha256=hRyUoLBN5zV3_M1aGNxUwlAGSHmVakf62lEBfBwISPM,60708
|
|
56
|
+
moleditpy_linux-2.4.5.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
57
|
+
moleditpy_linux-2.4.5.dist-info/entry_points.txt,sha256=-OzipSi__yVwlimNtu3eiRP5t5UMg55Cs0udyhXYiyw,60
|
|
58
|
+
moleditpy_linux-2.4.5.dist-info/top_level.txt,sha256=qyqe-hDYL6CXyin9E5Me5rVl3PG84VqiOjf9bQvfJLs,16
|
|
59
|
+
moleditpy_linux-2.4.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|