moleditpy 0.3.0__tar.gz → 0.3.1__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.
- {moleditpy-0.3.0 → moleditpy-0.3.1}/PKG-INFO +1 -1
- {moleditpy-0.3.0 → moleditpy-0.3.1}/pyproject.toml +2 -2
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy/main.py +13 -7
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy.egg-info/PKG-INFO +1 -1
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy.egg-info/SOURCES.txt +1 -1
- {moleditpy-0.3.0 → moleditpy-0.3.1}/README.md +0 -0
- {moleditpy-0.3.0 → moleditpy-0.3.1}/setup.cfg +0 -0
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy/__init__.py +0 -0
- /moleditpy-0.3.0/src/moleditpy/assets/icon.png → /moleditpy-0.3.1/src/moleditpy/assets/icon.ico +0 -0
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy.egg-info/dependency_links.txt +0 -0
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy.egg-info/entry_points.txt +0 -0
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy.egg-info/requires.txt +0 -0
- {moleditpy-0.3.0 → moleditpy-0.3.1}/src/moleditpy.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moleditpy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A program to edit molecular structures using Python.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "moleditpy"
|
|
7
7
|
|
|
8
|
-
version = "0.3.
|
|
8
|
+
version = "0.3.1"
|
|
9
9
|
|
|
10
10
|
authors = [
|
|
11
11
|
{ name="HiroYokoyama", email="titech.yoko.hiro@gmail.com" },
|
|
@@ -45,4 +45,4 @@ Issues = "https://github.com/HiroYokoyama/python_molecular_editor/issues"
|
|
|
45
45
|
moleditpy = "moleditpy.main:main"
|
|
46
46
|
|
|
47
47
|
[tool.setuptools.package-data]
|
|
48
|
-
"moleditpy" = ["assets
|
|
48
|
+
"moleditpy" = ["assets/*"]
|
|
@@ -87,7 +87,8 @@ def main():
|
|
|
87
87
|
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
|
|
88
88
|
|
|
89
89
|
app = QApplication(sys.argv)
|
|
90
|
-
|
|
90
|
+
file_path = sys.argv[1] if len(sys.argv) > 1 else None
|
|
91
|
+
window = MainWindow(initial_file=file_path)
|
|
91
92
|
window.show()
|
|
92
93
|
sys.exit(app.exec())
|
|
93
94
|
|
|
@@ -1511,7 +1512,7 @@ class AnalysisWindow(QDialog):
|
|
|
1511
1512
|
class MainWindow(QMainWindow):
|
|
1512
1513
|
|
|
1513
1514
|
start_calculation = pyqtSignal(str)
|
|
1514
|
-
def __init__(self):
|
|
1515
|
+
def __init__(self, initial_file=None):
|
|
1515
1516
|
super().__init__()
|
|
1516
1517
|
self.setWindowTitle("moleditpy -- Python Molecular Editor by HY"); self.setGeometry(100, 100, 1400, 800)
|
|
1517
1518
|
self.data = MolecularData(); self.current_mol = None
|
|
@@ -1527,12 +1528,15 @@ class MainWindow(QMainWindow):
|
|
|
1527
1528
|
QApplication.clipboard().dataChanged.connect(self.update_edit_menu_actions)
|
|
1528
1529
|
self.update_edit_menu_actions()
|
|
1529
1530
|
|
|
1531
|
+
if initial_file:
|
|
1532
|
+
self.load_raw_data(file_path=initial_file)
|
|
1533
|
+
|
|
1530
1534
|
def init_ui(self):
|
|
1531
1535
|
# 1. 現在のスクリプトがあるディレクトリのパスを取得
|
|
1532
1536
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
1533
1537
|
|
|
1534
1538
|
# 2. 'assets'フォルダ内のアイコンファイルへのフルパスを構築
|
|
1535
|
-
icon_path = os.path.join(script_dir, 'assets', 'icon.
|
|
1539
|
+
icon_path = os.path.join(script_dir, 'assets', 'icon.ico')
|
|
1536
1540
|
|
|
1537
1541
|
# 3. ファイルパスから直接QIconオブジェクトを作成
|
|
1538
1542
|
if os.path.exists(icon_path): # ファイルが存在するか確認
|
|
@@ -2425,10 +2429,12 @@ class MainWindow(QMainWindow):
|
|
|
2425
2429
|
self.statusBar().showMessage(f"Project saved to {file_path}")
|
|
2426
2430
|
except Exception as e: self.statusBar().showMessage(f"Error saving project file: {e}")
|
|
2427
2431
|
|
|
2428
|
-
def load_raw_data(self):
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
+
def load_raw_data(self, file_path=None):
|
|
2433
|
+
if not file_path:
|
|
2434
|
+
options = QFileDialog.Option.DontUseNativeDialog
|
|
2435
|
+
file_path, _ = QFileDialog.getOpenFileName(self, "Open Project File", "", "Project Files (*.pmeraw);;All Files (*)", options=options)
|
|
2436
|
+
if not file_path: return
|
|
2437
|
+
|
|
2432
2438
|
try:
|
|
2433
2439
|
with open(file_path, 'rb') as f: loaded_data = pickle.load(f)
|
|
2434
2440
|
self.set_state_from_data(loaded_data)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: moleditpy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A program to edit molecular structures using Python.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/moleditpy-0.3.0/src/moleditpy/assets/icon.png → /moleditpy-0.3.1/src/moleditpy/assets/icon.ico
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|