pythonQEPest 2.0.0a2__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.
Files changed (64) hide show
  1. pythonQEPest/.env.example +4 -0
  2. pythonQEPest/__init__.py +11 -0
  3. pythonQEPest/cli/__init__.py +7 -0
  4. pythonQEPest/cli/cli.py +101 -0
  5. pythonQEPest/config/__init__.py +11 -0
  6. pythonQEPest/config/config_provider.py +9 -0
  7. pythonQEPest/config/normalise.py +12 -0
  8. pythonQEPest/config/qepest_config.py +31 -0
  9. pythonQEPest/config/qepest_default.py +26 -0
  10. pythonQEPest/core/__init__.py +7 -0
  11. pythonQEPest/core/qepest.py +98 -0
  12. pythonQEPest/core/qepest_meta.py +28 -0
  13. pythonQEPest/data.txt +2 -0
  14. pythonQEPest/data.txt.out +2 -0
  15. pythonQEPest/dto/QEPestData.py +21 -0
  16. pythonQEPest/dto/QEPestFile.py +34 -0
  17. pythonQEPest/dto/QEPestInput.py +60 -0
  18. pythonQEPest/dto/QEPestOutput.py +13 -0
  19. pythonQEPest/dto/__init__.py +27 -0
  20. pythonQEPest/dto/coefficients/QEPestCoefficient.py +57 -0
  21. pythonQEPest/dto/coefficients/QEPestCoefficientList.py +29 -0
  22. pythonQEPest/dto/coefficients/QEPestCoefficientNumerics.py +44 -0
  23. pythonQEPest/dto/coefficients/__init__.py +7 -0
  24. pythonQEPest/dto/normalisation/Normaliser.py +16 -0
  25. pythonQEPest/dto/normalisation/__init__.py +3 -0
  26. pythonQEPest/dto/pest_type/PestTypeCoefficient.py +30 -0
  27. pythonQEPest/dto/pest_type/PestTypeConfig.py +9 -0
  28. pythonQEPest/dto/pest_type/__init__.py +4 -0
  29. pythonQEPest/gui/__init__.py +7 -0
  30. pythonQEPest/gui/actions/__init__.py +9 -0
  31. pythonQEPest/gui/actions/action_clicks.py +42 -0
  32. pythonQEPest/gui/actions/actions_crud.py +131 -0
  33. pythonQEPest/gui/actions/actions_other.py +126 -0
  34. pythonQEPest/gui/elements/ButtonsFrame.py +50 -0
  35. pythonQEPest/gui/elements/DataTree.py +23 -0
  36. pythonQEPest/gui/elements/EditWindow.py +63 -0
  37. pythonQEPest/gui/elements/Menu.py +12 -0
  38. pythonQEPest/gui/elements/ResultTree.py +22 -0
  39. pythonQEPest/gui/elements/SaveButton.py +10 -0
  40. pythonQEPest/gui/elements/__init__.py +17 -0
  41. pythonQEPest/gui/gui.py +87 -0
  42. pythonQEPest/gui/gui_meta.py +17 -0
  43. pythonQEPest/gui/utility/DataManager.py +76 -0
  44. pythonQEPest/gui/utility/DataManagerMeta.py +8 -0
  45. pythonQEPest/gui/utility/__init__.py +6 -0
  46. pythonQEPest/helpers/__init__.py +17 -0
  47. pythonQEPest/helpers/check_nan.py +8 -0
  48. pythonQEPest/helpers/compute_df.py +5 -0
  49. pythonQEPest/helpers/get_num_of_cols.py +2 -0
  50. pythonQEPest/helpers/get_values_from_line.py +5 -0
  51. pythonQEPest/helpers/norm.py +33 -0
  52. pythonQEPest/helpers/round_to_4digs.py +2 -0
  53. pythonQEPest/logger.py +58 -0
  54. pythonQEPest/main.py +4 -0
  55. pythonQEPest/providers/__init__.py +6 -0
  56. pythonQEPest/providers/default_provider.py +23 -0
  57. pythonQEPest/providers/json_provider.py +30 -0
  58. pythonQEPest/providers/txt_provider.py +46 -0
  59. pythonQEPest/services/QEPestFileService.py +125 -0
  60. pythonQEPest/services/__init__.py +3 -0
  61. pythonqepest-2.0.0a2.dist-info/METADATA +217 -0
  62. pythonqepest-2.0.0a2.dist-info/RECORD +64 -0
  63. pythonqepest-2.0.0a2.dist-info/WHEEL +4 -0
  64. pythonqepest-2.0.0a2.dist-info/entry_points.txt +6 -0
@@ -0,0 +1,217 @@
1
+ Metadata-Version: 2.4
2
+ Name: pythonQEPest
3
+ Version: 2.0.0a2
4
+ Summary: Java QEPest but written in Python
5
+ Author: Lina
6
+ Author-email: knocker767@gmail.com
7
+ Requires-Python: >=3.12,<3.15
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Provides-Extra: gui
13
+ Provides-Extra: rdkit
14
+ Requires-Dist: pydantic (==2.12.5)
15
+ Requires-Dist: pyperclip (>=1.11.0,<2.0.0) ; extra == "gui"
16
+ Requires-Dist: python-dotenv (>=1.2.1,<2.0.0)
17
+ Requires-Dist: rdkit (>=2024.3.1,<2026.0.0) ; extra == "rdkit"
18
+ Description-Content-Type: text/markdown
19
+
20
+ # pythonQEPest
21
+
22
+ [![pythonQEPest](https://github.com/PonyLianna/pythonQEPest/actions/workflows/python-package.yml/badge.svg)](https://github.com/PonyLianna/pythonQEPest/actions/workflows/python-package.yml)
23
+
24
+
25
+ Python implementation of QEPest (Quantitative Estimation of Pesticide), a program for scoring molecules as herbicides (QEH), insecticides (QEI), and fungicides (QEF).
26
+
27
+ Originally published in: [J Cheminform - QEPest](https://jcheminf.biomedcentral.com/articles/10.1186/s13321-014-0042-6)
28
+ Original Program Link is [here](https://static-content.springer.com/esm/art%3A10.1186%2Fs13321-014-0042-6/MediaObjects/13321_2014_42_MOESM2_ESM.zip)
29
+
30
+ ## Features
31
+
32
+ - Calculate pesticide scores for herbicidal, insecticidal, and fungicidal activity
33
+ - Command-line interface (CLI)
34
+ - Graphical User Interface (GUI)
35
+ - Support for JSON and TXT output formats
36
+
37
+ ### Pre-built binaries
38
+
39
+ Download ready-to-use executables from [Releases](https://github.com/PonyLianna/pythonQEPest/releases):
40
+
41
+ | Platform | Download |
42
+ |----------|----------|
43
+ | Windows CLI | [main.exe](https://github.com/PonyLianna/pythonQEPest/releases/download/v2.0.0-alpha/main.exe) |
44
+ | Windows GUI | [gui.exe](https://github.com/PonyLianna/pythonQEPest/releases/download/v2.0.0-alpha/gui.exe) |
45
+
46
+
47
+ ## Installation
48
+
49
+ ```bash
50
+ pip install pythonQEPest
51
+ ```
52
+
53
+ Or from source:
54
+
55
+ ```bash
56
+ git clone https://github.com/PonyLianna/pythonQEPest.git
57
+ cd pythonQEPest
58
+ poetry install
59
+ ```
60
+
61
+ ### With GUI support
62
+
63
+ ```bash
64
+ pip install pythonQEPest[gui]
65
+ # or
66
+ poetry install --extras ui
67
+ ```
68
+
69
+
70
+ ## Quick Start
71
+
72
+ ### CLI
73
+
74
+ ```bash
75
+ pythonqepest -i data.txt -o result.txt
76
+ pythonqepest --input data.txt --format json
77
+ pythonqepest -v # show version
78
+ ```
79
+
80
+ ### GUI
81
+
82
+ ```bash
83
+ pythonqepest-gui
84
+ # or
85
+ python -m pythonQEPest.gui.gui
86
+ ```
87
+
88
+ ### Python API
89
+
90
+ ```python
91
+ from pythonQEPest import QEPest, QEPestInput
92
+
93
+ # Create input data
94
+ qepest = QEPest()
95
+ qepest.initialize_coefficients()
96
+ qepest.initialize_normalisers()
97
+
98
+ # From individual values
99
+ inp = QEPestInput(
100
+ name="mol1",
101
+ mol_weight=240.2127,
102
+ log_p=3.2392,
103
+ hbond_acceptors=5,
104
+ hbond_donors=1,
105
+ rotatable_bonds=4,
106
+ aromatic_rings=1
107
+ )
108
+
109
+ result = qepest.compute_params(inp)
110
+
111
+ print(result.name) # mol1
112
+ print(result.data.qe_herb) # 0.8511
113
+ print(result.data.qe_insect) # 0.5339
114
+ print(result.data.qe_fung) # 0.6224
115
+
116
+ # Convert to array
117
+ print(result.to_array()) # ["mol1", 0.6224, 0.8511, 0.5339]
118
+ ```
119
+
120
+ ## Input Format
121
+
122
+ The input file should be a tab-separated text file with the following columns:
123
+
124
+ | Column | Description |
125
+ |--------|-------------|
126
+ | Name | Molecule name |
127
+ | MW | Molecular weight (g/mol) |
128
+ | LogP | Hydrophobicity (octanol-water partition coefficient) |
129
+ | HBA | Number of hydrogen bond acceptors |
130
+ | HBD | Number of hydrogen bond donors |
131
+ | RB | Number of rotatable bonds |
132
+ | arR | Number of aromatic rings |
133
+
134
+ Example `data.txt`:
135
+
136
+ ```
137
+ Name MW LogP HBA HBD RB arR
138
+ mol1 240.2127 3.2392 5 1 4 1
139
+ mol2 249.091 3.0273 3 1 5 1
140
+ mol3 308.354 2.1086 1 0 7 1
141
+ ```
142
+
143
+ ## Output Format
144
+
145
+ ### TXT (default output for CLI)
146
+
147
+ ```
148
+ Name QEF QEH QEI
149
+ mol1 0.6224 0.8511 0.5339
150
+ mol2 0.7310 0.9750 0.6913
151
+ ```
152
+
153
+ ### JSON
154
+
155
+ ```json
156
+ [
157
+ {"name": "mol1", "qe_fung": 0.6224, "qe_herb": 0.8511, "qe_insect": 0.5339},
158
+ {"name": "mol2", "qe_fung": 0.731, "qe_herb": 0.975, "qe_insect": 0.6913}
159
+ ]
160
+ ```
161
+
162
+ ## Configuration
163
+
164
+ ### Custom Coefficients
165
+
166
+ ```python
167
+ from pythonQEPest import QEPest
168
+
169
+ custom_coefficients = {
170
+ "herb": [
171
+ (70.77, 283.0, 84.97, -1.185),
172
+ (93.81, 3.077, 1.434, 0.6164),
173
+ # ... 6 tuples total
174
+ ],
175
+ "insect": [...],
176
+ "fung": [...]
177
+ }
178
+
179
+ qepest = QEPest(coefficients=custom_coefficients)
180
+ ```
181
+
182
+ ### Custom Normalisers
183
+
184
+ ```python
185
+ from pythonQEPest import QEPest
186
+ from pythonQEPest.dto.normalisation.Normaliser import Normaliser
187
+
188
+ qepest = QEPest(normalisers={"herb": Normaliser(...), ...})
189
+ ```
190
+
191
+ ## CLI Options
192
+
193
+ | Option | Description | Default |
194
+ |--------|-------------|---------|
195
+ | `-i`, `--input` | Input file path | data.txt |
196
+ | `-o`, `--output` | Output file path | data.out.txt |
197
+ | `-f`, `--format` | Output format (json, txt) | txt |
198
+ | `-v`, `--version` | Show version | - |
199
+
200
+ ## Development
201
+
202
+ ### Run tests
203
+
204
+ ```bash
205
+ poetry run pytest
206
+ ```
207
+
208
+ ### Build
209
+
210
+ ```bash
211
+ # CLI executable
212
+ poetry run poe build-simple
213
+
214
+ # GUI executable
215
+ poetry run poe build-gui
216
+ ```
217
+
@@ -0,0 +1,64 @@
1
+ pythonQEPest/.env.example,sha256=IcLe9bnjtpNt93Oya0EgT7eA8xcs-dcAoRTjIHM59VY,78
2
+ pythonQEPest/__init__.py,sha256=0qF_px_7p9pEscfzLUPcMyGugfbuljk0Tn2O0E4V2fE,257
3
+ pythonQEPest/cli/__init__.py,sha256=Wl6kWx7Ynz_pozr1nulHd7qgBzkANqs2eYsaNy8Fd3s,111
4
+ pythonQEPest/cli/cli.py,sha256=BuYV961JveCpKwFIagwn2IEAakXGx58gXyayRXjSFCY,2672
5
+ pythonQEPest/config/__init__.py,sha256=-bs9zD5yY8t1VSrLKRd6aG80o7R3maeWfa7wKwhDXLs,359
6
+ pythonQEPest/config/config_provider.py,sha256=f2IW8Ac_g6tva7WszUkfUN5CCE3YoF2HYITcGtllR1U,203
7
+ pythonQEPest/config/normalise.py,sha256=npAskjgbn08BbfIsPGkBJH1KlR-fOXRxjgmAIiT27Ow,357
8
+ pythonQEPest/config/qepest_config.py,sha256=Ta3OEzfUyNjKkbE8IZTFyTd3C1E5_zMwTW16PIT2SKE,960
9
+ pythonQEPest/config/qepest_default.py,sha256=vWejzOQ6mJGSJPQLuLX84QybvSMHf7Hi762N4UrXxa8,935
10
+ pythonQEPest/core/__init__.py,sha256=IpfTUkfcWGndLe5pcRLzGa0HwQwGub8zBGyTym4OM7g,117
11
+ pythonQEPest/core/qepest.py,sha256=Q8j8Y1uB-SVpp-ztVuKi9-To_QQS_C-GSJJWSntDPRI,3409
12
+ pythonQEPest/core/qepest_meta.py,sha256=63SS7MsTbvHXk49c2s_slMJWmECgZTocoV1b_dnKwtY,673
13
+ pythonQEPest/data.txt,sha256=Ov_zJGv9vfPm39Rg8aibbS0OuplXwtERDkGUvDAMLJ0,99
14
+ pythonQEPest/data.txt.out,sha256=6v53XFN0bHXb128HbVxlH8Dj1WkLFucS17TtvziWSOo,76
15
+ pythonQEPest/dto/__init__.py,sha256=C85ri7bK_HyohNwTHztK5q0J-1D6xnGqwYEP88_mgBM,912
16
+ pythonQEPest/dto/coefficients/__init__.py,sha256=vjYSHprCjJTuBlO0ayWeXJKUguG1qoqfTYrGJW5xB2U,361
17
+ pythonQEPest/dto/coefficients/QEPestCoefficient.py,sha256=sfnCgJK6gYOyUeVMGcrCbJXUs_Po1iaGv2i2qzCVwz4,2004
18
+ pythonQEPest/dto/coefficients/QEPestCoefficientList.py,sha256=taVN8JFqSzuwhB0oU3WEAH_Gjm8wPLGQ2yzJk7aEp_s,1009
19
+ pythonQEPest/dto/coefficients/QEPestCoefficientNumerics.py,sha256=wSr98jRv4UUqb7owPgLjXbZbxwUxXVFQtSCB5kiQOis,1460
20
+ pythonQEPest/dto/normalisation/__init__.py,sha256=ZI_4wyqp3wWjo10NUZMEPugWO5ezVy6k0HloSUOOcNg,91
21
+ pythonQEPest/dto/normalisation/Normaliser.py,sha256=OXfvb4MhNBUbShftLVazlFUACGPidGUg4EDU01UXT4E,508
22
+ pythonQEPest/dto/pest_type/__init__.py,sha256=x4C6YKQb_OhUaAc3TVj8QsRse4gxz2Bom2lnQxZBSFY,205
23
+ pythonQEPest/dto/pest_type/PestTypeCoefficient.py,sha256=0cO1sPZorB9qw_cN0nxcDUPTbNsp0CoLvpRqIFMDGdI,1009
24
+ pythonQEPest/dto/pest_type/PestTypeConfig.py,sha256=k0ei0BUUr7KPS9vqHQW9v_Q2rs35-DBmzQNgfDuDQcY,271
25
+ pythonQEPest/dto/QEPestData.py,sha256=CRd9ghTFXNXMzndpj2TCzfvAuq_Su6crxH2lRT9B0po,601
26
+ pythonQEPest/dto/QEPestFile.py,sha256=AZ197pl4t6CtAWnRxAgHcylH3NQKv4MVSJCewXmKOBo,949
27
+ pythonQEPest/dto/QEPestInput.py,sha256=hAJo4JQK4E9BbuUJbzx8o-wNKw8PKfdu2dCI9HgSzW4,1788
28
+ pythonQEPest/dto/QEPestOutput.py,sha256=NTsMr-MY9o1b1p1AYTn5auqQ1Aow86wenMJJTBT67S8,323
29
+ pythonQEPest/gui/__init__.py,sha256=JrvoPElajI_VCXESuLLx-sjsAxOOYBaE5Zt3pTT8VpU,111
30
+ pythonQEPest/gui/actions/__init__.py,sha256=cR_kQp1xDru-pNWEbvHVhRGOh8lgBzAKnu5CwR8vmXs,293
31
+ pythonQEPest/gui/actions/action_clicks.py,sha256=3YZlcTalF6_QlS1oYj7WQ3WyQeYny9UfoJ3HIWuGpe0,1305
32
+ pythonQEPest/gui/actions/actions_crud.py,sha256=N5th3RfvkryUL-Ss7BnsQuMI36yQMwY6QFO0TpYEl3M,4732
33
+ pythonQEPest/gui/actions/actions_other.py,sha256=ufzTvCiiPZShQP06qL57DXmbJ0ddoeSAHjCuuJW_-dQ,4526
34
+ pythonQEPest/gui/elements/__init__.py,sha256=zSE69JdsyCRyyK2367iN9Apk--wIuN8hazAO-7mtE4M,266
35
+ pythonQEPest/gui/elements/ButtonsFrame.py,sha256=TQ-8qBlJgWmMuuqHtycKueTz8hyUKgGGMJ3lzojX-Bo,2137
36
+ pythonQEPest/gui/elements/DataTree.py,sha256=GH58-D9G76eXxO7MKognjxwJrkHipVMzOqAXdqxEt3o,847
37
+ pythonQEPest/gui/elements/EditWindow.py,sha256=nptRZz003RM0GxLigZmQ3l5IsNwt15e6pTRvJMNwduM,2161
38
+ pythonQEPest/gui/elements/Menu.py,sha256=CgQmPlPInwou4CzcI9WOuM-VRljS7QNaKqgWbVE-7-4,522
39
+ pythonQEPest/gui/elements/ResultTree.py,sha256=rmSKsuE87FvvuAyHb0nux7NGkF4gRz9cqlb_J99iAvk,827
40
+ pythonQEPest/gui/elements/SaveButton.py,sha256=kSsOMc7e1Kes6VpOqmyc889FDGX3pe7cuQsAbWmh_FM,347
41
+ pythonQEPest/gui/gui.py,sha256=HAR-I7Jh9D_60sa1Mlz6YVWbt_IHlC6AtGfuANxqlMk,2907
42
+ pythonQEPest/gui/gui_meta.py,sha256=t3b6N6aJwXJzYP0bnOVEyEH81sU_AQIitehi_wGudpg,335
43
+ pythonQEPest/gui/utility/__init__.py,sha256=hLCcSL6D1L8P4pkCdpHfUg1OPebvutaV4uD6iPvokcI,129
44
+ pythonQEPest/gui/utility/DataManager.py,sha256=rvWZ5UhvFxvjsIvJR-sU1xPQuLHk6zkjFay0gAiwrv0,2242
45
+ pythonQEPest/gui/utility/DataManagerMeta.py,sha256=s36Cyec1oNZV0duXNQdfPBhuvz_IjpCKV5Mc1Q89S54,271
46
+ pythonQEPest/helpers/__init__.py,sha256=B4bHR4hgPiGI6UiLX_OLS_6aRK5vDyA4qe_fumke79E,554
47
+ pythonQEPest/helpers/check_nan.py,sha256=PozdVK0Y3T0YU2gBYWHxd6e7sK-MnROPLvxQzgxBqJM,148
48
+ pythonQEPest/helpers/compute_df.py,sha256=FPnpNRyaqhXnUYvNiEMr0gVox4HTc3UQ1fn2_pctMxc,146
49
+ pythonQEPest/helpers/get_num_of_cols.py,sha256=-T15yUlKsi50u5259tsdltyblwXfXR6mQJK1Wrr-a-A,68
50
+ pythonQEPest/helpers/get_values_from_line.py,sha256=dSnO_FtAT-z5bYdj7z42jwcl4FHsT6iyhT4FzEtU3QA,142
51
+ pythonQEPest/helpers/norm.py,sha256=GTc4sfJkMnRZdOTGBvIpN42sDwKbD77wyH6tf2hfYnY,841
52
+ pythonQEPest/helpers/round_to_4digs.py,sha256=-5_ltvMRq0nbO8db8v4lfscewaBwFITG1VVTCdL3PSA,71
53
+ pythonQEPest/logger.py,sha256=lCcenLbq1Rwz79XXGcSXfxelQuplvkifDrLRvsHW3M4,1647
54
+ pythonQEPest/main.py,sha256=Qnx7B12qg5bpOijF6F7EV1jjqi3PWrwlQxCboX2pdNQ,99
55
+ pythonQEPest/providers/__init__.py,sha256=gP6-oyz8sNImveVpiQAa--b4ttfUTkGWaAdoRN4AEo8,150
56
+ pythonQEPest/providers/default_provider.py,sha256=S9m77r8F2TOKIbO9zT2kzPPbADdfPxDIwfepCkp_Z60,890
57
+ pythonQEPest/providers/json_provider.py,sha256=138zV_15bQ3AYdm_7EAad6_MPBuJP1FVo8XUHmkHKwA,970
58
+ pythonQEPest/providers/txt_provider.py,sha256=NKZQYtSOnzrr4hJPXGxiGk0D3YfGyAAW4nbbGPr1nM4,1793
59
+ pythonQEPest/services/__init__.py,sha256=wlxF_SZSIY8igTmrzuMOMKE9Y6t5ne-iwwgQNSMa5Js,106
60
+ pythonQEPest/services/QEPestFileService.py,sha256=t2CkiI_mTPYrpME58qraaIVoZmtNUHxVtXsLXOGxRwg,4892
61
+ pythonqepest-2.0.0a2.dist-info/entry_points.txt,sha256=i9kkDdHEsC_JbdZrAI9QtGled425GyfvRkskotSnwl0,116
62
+ pythonqepest-2.0.0a2.dist-info/METADATA,sha256=E417Q2s886uR5jZE4QVZXN62x2hinGXQMzpDW9SklE4,4954
63
+ pythonqepest-2.0.0a2.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
64
+ pythonqepest-2.0.0a2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.3.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,6 @@
1
+ [console_scripts]
2
+ pythonqepest=pythonQEPest.cli.cli:main
3
+
4
+ [gui_scripts]
5
+ pythonqepest-gui=pythonQEPest.gui.gui:main
6
+