molbuilder 1.0.0__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.
- molbuilder/__init__.py +8 -0
- molbuilder/__main__.py +6 -0
- molbuilder/atomic/__init__.py +4 -0
- molbuilder/atomic/bohr.py +235 -0
- molbuilder/atomic/quantum_atom.py +334 -0
- molbuilder/atomic/quantum_numbers.py +196 -0
- molbuilder/atomic/wavefunctions.py +297 -0
- molbuilder/bonding/__init__.py +4 -0
- molbuilder/bonding/covalent.py +442 -0
- molbuilder/bonding/lewis.py +347 -0
- molbuilder/bonding/vsepr.py +433 -0
- molbuilder/cli/__init__.py +1 -0
- molbuilder/cli/demos.py +516 -0
- molbuilder/cli/menu.py +127 -0
- molbuilder/cli/wizard.py +831 -0
- molbuilder/core/__init__.py +6 -0
- molbuilder/core/bond_data.py +170 -0
- molbuilder/core/constants.py +51 -0
- molbuilder/core/element_properties.py +183 -0
- molbuilder/core/elements.py +181 -0
- molbuilder/core/geometry.py +232 -0
- molbuilder/gui/__init__.py +2 -0
- molbuilder/gui/app.py +286 -0
- molbuilder/gui/canvas3d.py +115 -0
- molbuilder/gui/dialogs.py +117 -0
- molbuilder/gui/event_handler.py +118 -0
- molbuilder/gui/sidebar.py +105 -0
- molbuilder/gui/toolbar.py +71 -0
- molbuilder/io/__init__.py +1 -0
- molbuilder/io/json_io.py +146 -0
- molbuilder/io/mol_sdf.py +169 -0
- molbuilder/io/pdb.py +184 -0
- molbuilder/io/smiles_io.py +47 -0
- molbuilder/io/xyz.py +103 -0
- molbuilder/molecule/__init__.py +2 -0
- molbuilder/molecule/amino_acids.py +919 -0
- molbuilder/molecule/builders.py +257 -0
- molbuilder/molecule/conformations.py +70 -0
- molbuilder/molecule/functional_groups.py +484 -0
- molbuilder/molecule/graph.py +712 -0
- molbuilder/molecule/peptides.py +13 -0
- molbuilder/molecule/stereochemistry.py +6 -0
- molbuilder/process/__init__.py +3 -0
- molbuilder/process/conditions.py +260 -0
- molbuilder/process/costing.py +316 -0
- molbuilder/process/purification.py +285 -0
- molbuilder/process/reactor.py +297 -0
- molbuilder/process/safety.py +476 -0
- molbuilder/process/scale_up.py +427 -0
- molbuilder/process/solvent_systems.py +204 -0
- molbuilder/reactions/__init__.py +3 -0
- molbuilder/reactions/functional_group_detect.py +728 -0
- molbuilder/reactions/knowledge_base.py +1716 -0
- molbuilder/reactions/reaction_types.py +102 -0
- molbuilder/reactions/reagent_data.py +1248 -0
- molbuilder/reactions/retrosynthesis.py +1430 -0
- molbuilder/reactions/synthesis_route.py +377 -0
- molbuilder/reports/__init__.py +158 -0
- molbuilder/reports/cost_report.py +206 -0
- molbuilder/reports/molecule_report.py +279 -0
- molbuilder/reports/safety_report.py +296 -0
- molbuilder/reports/synthesis_report.py +283 -0
- molbuilder/reports/text_formatter.py +170 -0
- molbuilder/smiles/__init__.py +4 -0
- molbuilder/smiles/parser.py +487 -0
- molbuilder/smiles/tokenizer.py +291 -0
- molbuilder/smiles/writer.py +375 -0
- molbuilder/visualization/__init__.py +1 -0
- molbuilder/visualization/bohr_viz.py +166 -0
- molbuilder/visualization/molecule_viz.py +368 -0
- molbuilder/visualization/quantum_viz.py +434 -0
- molbuilder/visualization/theme.py +12 -0
- molbuilder-1.0.0.dist-info/METADATA +360 -0
- molbuilder-1.0.0.dist-info/RECORD +78 -0
- molbuilder-1.0.0.dist-info/WHEEL +5 -0
- molbuilder-1.0.0.dist-info/entry_points.txt +2 -0
- molbuilder-1.0.0.dist-info/licenses/LICENSE +21 -0
- molbuilder-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: molbuilder
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Professional-grade molecular engineering toolkit: atoms to retrosynthesis to process engineering
|
|
5
|
+
Author: Taylor C. Powell
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/molbuilder/molbuilder
|
|
8
|
+
Project-URL: Documentation, https://molbuilder.io/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/molbuilder/molbuilder
|
|
10
|
+
Project-URL: Issues, https://github.com/molbuilder/molbuilder/issues
|
|
11
|
+
Keywords: chemistry,molecular-modeling,retrosynthesis,cheminformatics,SMILES,VSEPR,process-engineering,drug-discovery
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: numpy>=1.24
|
|
26
|
+
Requires-Dist: scipy>=1.10
|
|
27
|
+
Requires-Dist: matplotlib>=3.7
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
31
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# MolBuilder
|
|
35
|
+
|
|
36
|
+
A professional-grade molecular engineering toolkit built from scratch in pure Python. MolBuilder spans the full pipeline from atomic theory and molecular modeling through retrosynthetic analysis, process engineering, and industrial scale-up -- without depending on RDKit, OpenBabel, or any external chemistry library.
|
|
37
|
+
|
|
38
|
+
## What It Does
|
|
39
|
+
|
|
40
|
+
MolBuilder is a self-contained chemistry platform that covers seven layers of molecular science:
|
|
41
|
+
|
|
42
|
+
| Layer | Capabilities |
|
|
43
|
+
|-------|-------------|
|
|
44
|
+
| **Atomic Physics** | Bohr model, quantum numbers, electron configurations (with Aufbau exceptions), Slater's rules for effective nuclear charge, hydrogen-like wavefunctions, orbital probability densities |
|
|
45
|
+
| **Chemical Bonding** | Lewis structures with octet/expanded octet support, VSEPR geometry prediction (12+ molecular shapes), covalent bond analysis (polarity, dipole moments, BDE, sigma/pi orbitals) |
|
|
46
|
+
| **Molecular Modeling** | Full molecular graph with 3D coordinate generation, conformational analysis (eclipsed/staggered/gauche/anti), torsional energy profiles, Newman projections, cyclohexane chair/boat conformations, R/S and E/Z stereochemistry via CIP priority rules |
|
|
47
|
+
| **Biochemistry** | All 20 standard amino acids with L-chirality, peptide bond formation, phi/psi backbone angles, secondary structure templates (alpha helix, beta sheet) |
|
|
48
|
+
| **Cheminformatics** | SMILES parser and writer with chirality (`@`/`@@`), E/Z bond stereochemistry (`/`/`\`), bracket atoms (isotopes, charges, H counts), aromatic perception, Morgan canonical ordering |
|
|
49
|
+
| **Retrosynthesis** | Beam-search retrosynthetic engine with 91 curated reaction templates, 200+ purchasable starting materials database, scored disconnections, and forward route extraction |
|
|
50
|
+
| **Process Engineering** | Reactor selection (batch/CSTR/PFR/microreactor), condition optimization, purification strategy, GHS safety assessment (69 hazard codes, chemical incompatibility detection), cost estimation, and batch-vs-continuous scale-up analysis |
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
**Requirements:** Python >= 3.11, numpy, scipy, matplotlib
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# From the project directory
|
|
58
|
+
pip install -e .
|
|
59
|
+
|
|
60
|
+
# Or install dependencies manually
|
|
61
|
+
pip install numpy scipy matplotlib
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The GUI uses `tkinter`, which is included with most Python distributions. On some Linux systems you may need to install it separately (`sudo apt install python3-tk`).
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
### Interactive CLI
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
python -m molbuilder
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This launches an interactive menu with 11 options:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
[ 1] Bohr Atomic Model
|
|
78
|
+
[ 2] Quantum Mechanical Atom
|
|
79
|
+
[ 3] Element Data
|
|
80
|
+
[ 4] Lewis Structures
|
|
81
|
+
[ 5] VSEPR Molecular Geometry
|
|
82
|
+
[ 6] Covalent Bonds
|
|
83
|
+
[ 7] Molecular Conformations
|
|
84
|
+
[ 8] Amino Acids & Functional Groups
|
|
85
|
+
[ 9] 3D Molecule Visualization
|
|
86
|
+
[ 10] Quantum Orbital Visualization
|
|
87
|
+
[ 11] Molecule Builder Wizard
|
|
88
|
+
[ a] Run all text demos (1-8)
|
|
89
|
+
[ q] Quit
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Options 1-8 run educational demos covering atomic models through peptide chemistry. Option 9 renders interactive 3D ball-and-stick models. Option 10 visualizes quantum orbitals. Option 11 launches the interactive molecule builder wizard.
|
|
93
|
+
|
|
94
|
+
You can also run a specific demo directly: `python -m molbuilder 5` runs the VSEPR demo.
|
|
95
|
+
|
|
96
|
+
### Molecule Builder Wizard
|
|
97
|
+
|
|
98
|
+
The wizard (option 11) provides five ways to build molecules:
|
|
99
|
+
|
|
100
|
+
1. **SMILES input** -- Parse any SMILES string into a 3D molecule
|
|
101
|
+
2. **Molecular formula** -- Enter formulas like `H2O`, `SF6` for VSEPR-based geometry
|
|
102
|
+
3. **Atom-by-atom** -- Interactive loop to place and bond atoms manually
|
|
103
|
+
4. **Preset molecules** -- 10 built-in molecules (ethane, benzene, aspirin, caffeine, etc.)
|
|
104
|
+
5. **Peptide builder** -- Build peptides from amino acid sequences with secondary structure
|
|
105
|
+
|
|
106
|
+
After building, an analysis menu offers functional group detection, bond analysis, SMILES generation, file export, retrosynthesis, process engineering, and 3D visualization.
|
|
107
|
+
|
|
108
|
+
### SMILES-to-Synthesis Pipeline
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
python synthesize.py
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This standalone script takes a SMILES string and production scale, then runs the complete pipeline:
|
|
115
|
+
|
|
116
|
+
1. Parses SMILES into a 3D molecule
|
|
117
|
+
2. Detects functional groups
|
|
118
|
+
3. Checks purchasability against a database of ~200 common chemicals
|
|
119
|
+
4. Runs retrosynthetic analysis (beam search, max depth 5)
|
|
120
|
+
5. Extracts the best forward synthesis route
|
|
121
|
+
6. For each step: selects a reactor, optimizes conditions, plans purification
|
|
122
|
+
7. Assesses safety (GHS hazards, PPE, incompatibilities, emergency procedures)
|
|
123
|
+
8. Estimates costs (materials, labor, equipment, energy, waste, overhead)
|
|
124
|
+
9. Analyzes scale-up (batch sizing, cycle time, annual capacity, capital costs)
|
|
125
|
+
10. Generates full ASCII reports
|
|
126
|
+
|
|
127
|
+
### 3D GUI
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
python -c "from molbuilder.gui.app import launch; launch()"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
A tkinter-based graphical editor with:
|
|
134
|
+
|
|
135
|
+
- **Element palette** -- Click to select H, C, N, O, F, P, S, Cl, Br, I, or enter a custom element
|
|
136
|
+
- **Bond tools** -- Single, double, and triple bond modes
|
|
137
|
+
- **3D viewport** -- Embedded matplotlib canvas with CPK-colored atoms, rotatable view
|
|
138
|
+
- **Sidebar** -- Molecule info, analysis buttons (functional groups, stereochemistry, retrosynthesis, process engineering), file export (XYZ, MOL/SDF, PDB, JSON, SMILES)
|
|
139
|
+
- **File menu** -- Open and save molecules in any supported format
|
|
140
|
+
- **Build menu** -- Load from SMILES, formula, or preset molecules
|
|
141
|
+
|
|
142
|
+
## Python API
|
|
143
|
+
|
|
144
|
+
### Parse and Write SMILES
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
from molbuilder.smiles import parse, to_smiles
|
|
148
|
+
|
|
149
|
+
mol = parse("CC(=O)Oc1ccccc1C(=O)O") # aspirin
|
|
150
|
+
print(f"{len(mol.atoms)} atoms, {len(mol.bonds)} bonds")
|
|
151
|
+
|
|
152
|
+
canonical = to_smiles(mol) # canonical SMILES output
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Detect Functional Groups
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
from molbuilder.smiles import parse
|
|
159
|
+
from molbuilder.reactions.functional_group_detect import detect_functional_groups
|
|
160
|
+
|
|
161
|
+
mol = parse("CC(=O)O") # acetic acid
|
|
162
|
+
for fg in detect_functional_groups(mol):
|
|
163
|
+
print(f" {fg.name} at atoms {fg.atoms}")
|
|
164
|
+
# Output: carboxylic_acid at atoms [1, 2, 3]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
21 functional group detectors: alcohol, aldehyde, ketone, carboxylic acid, ester, amide, amine (primary/secondary/tertiary), alkyl halide, alkene, alkyne, ether, thiol, nitrile, nitro, aromatic ring, epoxide, acid chloride, anhydride, sulfoxide, sulfone, imine.
|
|
168
|
+
|
|
169
|
+
### Retrosynthetic Analysis
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
from molbuilder.smiles import parse
|
|
173
|
+
from molbuilder.reactions.retrosynthesis import retrosynthesis, format_tree
|
|
174
|
+
from molbuilder.reactions.synthesis_route import extract_best_route, format_route
|
|
175
|
+
|
|
176
|
+
mol = parse("CC(=O)OCC") # ethyl acetate
|
|
177
|
+
tree = retrosynthesis(mol, max_depth=5, beam_width=5)
|
|
178
|
+
print(format_tree(tree))
|
|
179
|
+
|
|
180
|
+
route = extract_best_route(tree)
|
|
181
|
+
print(format_route(route))
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The engine uses beam search to work backwards from the target, matching functional groups against 91 reaction templates. Each disconnection is scored (0-100) based on yield, precursor availability, complexity reduction, and strategic bond preference.
|
|
185
|
+
|
|
186
|
+
### Process Engineering
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
from molbuilder.process.reactor import select_reactor
|
|
190
|
+
from molbuilder.process.conditions import optimize_conditions
|
|
191
|
+
from molbuilder.process.safety import assess_safety
|
|
192
|
+
from molbuilder.process.costing import estimate_cost
|
|
193
|
+
from molbuilder.process.scale_up import analyze_scale_up
|
|
194
|
+
|
|
195
|
+
# After obtaining a synthesis route:
|
|
196
|
+
for step in route.steps:
|
|
197
|
+
reactor = select_reactor(step.template, scale_kg=100.0)
|
|
198
|
+
conditions = optimize_conditions(step.template, scale_kg=100.0)
|
|
199
|
+
|
|
200
|
+
safety = assess_safety(route.steps)
|
|
201
|
+
cost = estimate_cost(route.steps, scale_kg=100.0)
|
|
202
|
+
scaleup = analyze_scale_up(route.steps, target_annual_kg=10000.0)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### VSEPR Geometry
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
from molbuilder.bonding.vsepr import VSEPRMolecule
|
|
209
|
+
|
|
210
|
+
water = VSEPRMolecule("H2O")
|
|
211
|
+
print(water.summary())
|
|
212
|
+
# Shows: AXE class, electron geometry, molecular geometry, bond angles, 3D coords
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Lewis Structures
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
from molbuilder.bonding.lewis import LewisStructure
|
|
219
|
+
|
|
220
|
+
lewis = LewisStructure("CO2")
|
|
221
|
+
print(lewis.summary())
|
|
222
|
+
# Shows: valence electrons, bonds, lone pairs, formal charges
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Quantum Atom
|
|
226
|
+
|
|
227
|
+
```python
|
|
228
|
+
from molbuilder.atomic.quantum_atom import QuantumAtom
|
|
229
|
+
|
|
230
|
+
fe = QuantumAtom(26) # iron
|
|
231
|
+
print(fe.electron_configuration_string()) # 1s2 2s2 2p6 3s2 3p6 3d6 4s2
|
|
232
|
+
print(fe.noble_gas_notation()) # [Ar] 3d6 4s2
|
|
233
|
+
print(fe.effective_nuclear_charge(4, 0)) # Z_eff for 4s: ~3.75
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Build Peptides
|
|
237
|
+
|
|
238
|
+
```python
|
|
239
|
+
from molbuilder.molecule.amino_acids import build_peptide, AminoAcidType
|
|
240
|
+
|
|
241
|
+
tripeptide = build_peptide(
|
|
242
|
+
[AminoAcidType.ALA, AminoAcidType.GLY, AminoAcidType.PHE],
|
|
243
|
+
phi=-57, psi=-47 # alpha helix
|
|
244
|
+
)
|
|
245
|
+
print(f"{len(tripeptide.atoms)} atoms")
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### File I/O
|
|
249
|
+
|
|
250
|
+
```python
|
|
251
|
+
from molbuilder.smiles import parse
|
|
252
|
+
from molbuilder.io.xyz import write_xyz, read_xyz
|
|
253
|
+
from molbuilder.io.mol_sdf import write_mol, read_mol
|
|
254
|
+
from molbuilder.io.pdb import write_pdb, read_pdb
|
|
255
|
+
from molbuilder.io.json_io import write_json, read_json
|
|
256
|
+
|
|
257
|
+
mol = parse("CCO")
|
|
258
|
+
|
|
259
|
+
write_xyz(mol, "ethanol.xyz")
|
|
260
|
+
write_mol(mol, "ethanol.mol")
|
|
261
|
+
write_pdb(mol, "ethanol.pdb")
|
|
262
|
+
write_json(mol, "ethanol.json")
|
|
263
|
+
|
|
264
|
+
mol2 = read_xyz("ethanol.xyz")
|
|
265
|
+
mol3 = read_mol("ethanol.mol")
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Supported formats: XYZ, MOL/SDF (V2000), PDB, JSON, SMILES.
|
|
269
|
+
|
|
270
|
+
### Report Generation
|
|
271
|
+
|
|
272
|
+
```python
|
|
273
|
+
from molbuilder.reports import (
|
|
274
|
+
generate_molecule_report,
|
|
275
|
+
generate_synthesis_report,
|
|
276
|
+
generate_safety_report,
|
|
277
|
+
generate_cost_report,
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
print(generate_molecule_report(mol))
|
|
281
|
+
print(generate_synthesis_report(route))
|
|
282
|
+
print(generate_safety_report(safety_assessments))
|
|
283
|
+
print(generate_cost_report(cost_estimate))
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Reports are formatted as clean ASCII tables suitable for terminal display or text file output.
|
|
287
|
+
|
|
288
|
+
## Reaction Knowledge Base
|
|
289
|
+
|
|
290
|
+
91 curated reaction templates across 14 categories:
|
|
291
|
+
|
|
292
|
+
| Category | Examples | Count |
|
|
293
|
+
|----------|---------|-------|
|
|
294
|
+
| Substitution | SN2 (hydroxide, cyanide, azide), SN1, Williamson ether, Mitsunobu | ~10 |
|
|
295
|
+
| Elimination | E2, E1 dehydration, Hofmann, Cope | ~6 |
|
|
296
|
+
| Addition | HBr, hydroboration-oxidation, epoxidation, dihydroxylation, ozonolysis | ~10 |
|
|
297
|
+
| Oxidation | PCC, Jones, Swern, Dess-Martin, KMnO4, Baeyer-Villiger, Sharpless | ~8 |
|
|
298
|
+
| Reduction | NaBH4, LiAlH4, DIBAL-H, Birch, Wolff-Kishner, asymmetric hydrogenation | ~10 |
|
|
299
|
+
| Coupling | Grignard, Suzuki, Heck, Sonogashira, Wittig, aldol, C-H activation | ~12 |
|
|
300
|
+
| Carbonyl | Fischer esterification, Diels-Alder, Claisen, Michael, Robinson annulation | ~10 |
|
|
301
|
+
| Protection | Boc, Fmoc, TBS, benzyl, acetonide (install and remove) | ~12 |
|
|
302
|
+
| Rearrangement | Cope, pinacol, Curtius, Beckmann | ~4 |
|
|
303
|
+
| Polymerization | ROMP | ~2 |
|
|
304
|
+
| Miscellaneous | Appel, Staudinger, olefin metathesis | ~5 |
|
|
305
|
+
|
|
306
|
+
Each template includes reagents, solvents, catalysts, temperature range, yield range, mechanism description, safety notes, and retrosynthetic transform logic.
|
|
307
|
+
|
|
308
|
+
## Data Coverage
|
|
309
|
+
|
|
310
|
+
| Data Set | Entries | Source |
|
|
311
|
+
|----------|---------|--------|
|
|
312
|
+
| Elements | 118 | IUPAC 2021 |
|
|
313
|
+
| Covalent radii | 118 | Cordero et al. 2008, Pyykko & Atsumi 2009 |
|
|
314
|
+
| Electronegativity | 103 (Pauling) | CRC Handbook |
|
|
315
|
+
| Bond dissociation energies | 49 | CRC Handbook, Luo 2007 |
|
|
316
|
+
| Torsion barriers | 16 types | OPLS-AA (Jorgensen et al. 1996) |
|
|
317
|
+
| Standard bond lengths | 44 | Experimental averages |
|
|
318
|
+
| CPK colors | 56 | Corey-Pauling-Koltun convention |
|
|
319
|
+
| GHS hazard statements | 69 | GHS Revision 10 (2023) |
|
|
320
|
+
| Purchasable materials | ~200 | Common laboratory chemicals with pricing |
|
|
321
|
+
| Reagent database | ~100 reagents, ~30 solvents | CAS numbers, MW, hazards, costs |
|
|
322
|
+
| Aufbau exceptions | 22 | Known d-block and f-block anomalies |
|
|
323
|
+
| Amino acids | 20 | Standard L-amino acids with full sidechain geometry |
|
|
324
|
+
|
|
325
|
+
## Architecture
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
molbuilder/
|
|
329
|
+
core/ Constants, elements, geometry, bond data
|
|
330
|
+
atomic/ Bohr model, quantum numbers, wavefunctions
|
|
331
|
+
bonding/ Lewis structures, VSEPR, covalent bond analysis
|
|
332
|
+
molecule/ Molecular graph, conformations, stereochemistry,
|
|
333
|
+
builders, functional groups, amino acids, peptides
|
|
334
|
+
smiles/ SMILES tokenizer, parser, writer
|
|
335
|
+
io/ File I/O (XYZ, MOL/SDF, PDB, JSON, SMILES)
|
|
336
|
+
reactions/ Reaction templates, reagent database, FG detection,
|
|
337
|
+
retrosynthesis engine, synthesis route planning
|
|
338
|
+
process/ Reactor selection, conditions, purification, safety,
|
|
339
|
+
costing, scale-up analysis
|
|
340
|
+
reports/ ASCII report generators (molecule, synthesis, safety, cost)
|
|
341
|
+
visualization/ 3D molecule rendering, quantum orbital plots
|
|
342
|
+
gui/ Tkinter-based 3D molecule editor
|
|
343
|
+
cli/ Interactive menu, demos, molecule builder wizard
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
~19,900 lines of source code across 81 Python files in 12 subpackages. No external chemistry dependencies -- only numpy, scipy, and matplotlib.
|
|
347
|
+
|
|
348
|
+
## Testing
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
python -m pytest tests/ -q
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
517 tests covering core chemistry data, atomic models, bonding theory, molecular operations, SMILES round-trips, file I/O, reaction knowledge base, process engineering, and edge cases with scientific validation against known experimental values.
|
|
355
|
+
|
|
356
|
+
## License
|
|
357
|
+
|
|
358
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
359
|
+
|
|
360
|
+
Copyright (c) 2025 Taylor C. Powell.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
molbuilder/__init__.py,sha256=0Nb0iCNk1ApK_Vx6m4oHxzhT_RiX97YYnVI_eTdAgbw,205
|
|
2
|
+
molbuilder/__main__.py,sha256=F64UnMCnwJXEF59k6jtSoLga7al9rRvGxAOK2FCpA9U,123
|
|
3
|
+
molbuilder/atomic/__init__.py,sha256=dUtMg4Wr76cszBJ061BmTZN3akN9gK2AnjpRIvaExyM,217
|
|
4
|
+
molbuilder/atomic/bohr.py,sha256=IPZjQqW4BSl_f96JZ45gbQVykIh17gn5eYhZtlJDfWo,8941
|
|
5
|
+
molbuilder/atomic/quantum_atom.py,sha256=m6qqzbCdbaTAe6iK1G4N0aQnpvJ6odNBoJT6HqYj6ys,12019
|
|
6
|
+
molbuilder/atomic/quantum_numbers.py,sha256=fBd2AaHXjJqgY5v8DN_WzLwihVL5KEkZudU6xSjHbrI,8433
|
|
7
|
+
molbuilder/atomic/wavefunctions.py,sha256=sbGDazqfbX6j0BK5PqwhgLXVN5WwnqnlmOBFk7cx-iQ,9618
|
|
8
|
+
molbuilder/bonding/__init__.py,sha256=pDVta0Lmzj-06vR0zqB93mAGBkg3n03Pu2uB0bJrSV4,296
|
|
9
|
+
molbuilder/bonding/covalent.py,sha256=ewvRvYzbsmuRaVLiXnRyUCU8F_CdDz4Reo5o7b2qbmY,15278
|
|
10
|
+
molbuilder/bonding/lewis.py,sha256=q4uXjvGKn3NO-TaZzFn8P7WaRgz1QarKF_JbznnCrLU,11967
|
|
11
|
+
molbuilder/bonding/vsepr.py,sha256=YU8h4dOdSfCwDSIfqwkFeAkHr1LS7_Kws6DFeseMB6g,14946
|
|
12
|
+
molbuilder/cli/__init__.py,sha256=eo7LYBWtUUUf3HLI564gX1qFQpQczPclSVurANG-b_I,64
|
|
13
|
+
molbuilder/cli/demos.py,sha256=EV3y6e7u6_b_1sht6mJUB9R75HPd1VVXOElDM9MfR8k,17681
|
|
14
|
+
molbuilder/cli/menu.py,sha256=bRFbx4gSlBlTc4Usiq7C53UNZGYitEBHU2tpVc2oQ8Y,3469
|
|
15
|
+
molbuilder/cli/wizard.py,sha256=NVQ9mGLsdP_FmXX5ubpdfZImmPR4f04tNReL-bKRvHc,27335
|
|
16
|
+
molbuilder/core/__init__.py,sha256=QtbG7DjHWuvu88AP3uRukb_Ax1tMKKSTFfbNoP5PjYA,428
|
|
17
|
+
molbuilder/core/bond_data.py,sha256=S5TcK6nWVG5--cIkG3Rw6-_trHVkP7quVmwglS7LSSE,5675
|
|
18
|
+
molbuilder/core/constants.py,sha256=Asehj4DftFKXNteveljh9bTFQaYugGY-ErIHdXRxMuA,2140
|
|
19
|
+
molbuilder/core/element_properties.py,sha256=jiiE527bRgFLQcDepOfZWIK-hsTCMDMFEQIoUg2RdwU,7575
|
|
20
|
+
molbuilder/core/elements.py,sha256=vTx0A6j53E0fl-8uOYvJXirBW-xQKc8PTp4JhO9us44,6870
|
|
21
|
+
molbuilder/core/geometry.py,sha256=ktvmZHhnm1dmhHpW-9iY-ugVPJlLml8n2TvcptmFjiI,7440
|
|
22
|
+
molbuilder/gui/__init__.py,sha256=KqjMkDsQ5qIbSrK4C_YP45vHaomggTutwDg-dxmEmW4,99
|
|
23
|
+
molbuilder/gui/app.py,sha256=O57Ksx9ajphXXlMbK5l-4zn0Nj2Ol1qvUhJv8uCXPkc,11507
|
|
24
|
+
molbuilder/gui/canvas3d.py,sha256=LHVbgGbNhmyN24oCQ8z8XhwWhP9ehapTcbaP7at_ivY,4735
|
|
25
|
+
molbuilder/gui/dialogs.py,sha256=ULUX3YiUHSjqWi7fCnMsi-e0pbYxWINJmYcKX8eiKhU,4037
|
|
26
|
+
molbuilder/gui/event_handler.py,sha256=p9FF75csq7pf5u2we3uVfebri-tFWbJtRPVW5jtQX3o,4341
|
|
27
|
+
molbuilder/gui/sidebar.py,sha256=HukBwqTtnqPS4DvDQgRLaW9VITn6Q1Xjs5yjfaWxRIo,3875
|
|
28
|
+
molbuilder/gui/toolbar.py,sha256=EFo0uh29H8I-Co3c80F0dLD1p5dN936lQc7rvffWg0s,2559
|
|
29
|
+
molbuilder/io/__init__.py,sha256=GOARoMyyHMfN2iujxdPdmwa49vsh9SAug59_3LU6Cxg,49
|
|
30
|
+
molbuilder/io/json_io.py,sha256=IJB5HzNWIgKm5qeNy_-Hfbs7lTM5HPOO6d_j3zqJ8Pw,4417
|
|
31
|
+
molbuilder/io/mol_sdf.py,sha256=i4kU_O7v7t_yMRZ0VCt9WkOjy4vAzrNKM_ANcUQJaS8,4965
|
|
32
|
+
molbuilder/io/pdb.py,sha256=wyZ-urkSLLWK4wLFAOs9ebdzJQI9Q2zmM-AYWgT1qXo,6238
|
|
33
|
+
molbuilder/io/smiles_io.py,sha256=kLb_7SwzMBe_YS34Q2blYCZyZgnBPgj5jcqw4Z_fa0k,1400
|
|
34
|
+
molbuilder/io/xyz.py,sha256=eN-VSEW68h5TGm2Hpq3SSCTYEsVJnSG7LubeLKJnHik,3459
|
|
35
|
+
molbuilder/molecule/__init__.py,sha256=kGKRBg1lddcl5nx-R_7M48hsr_WcQnvicHNBPt44_rI,125
|
|
36
|
+
molbuilder/molecule/amino_acids.py,sha256=Vc5tpQ0-UDlgBhOZYZvsJBpgWkNa9KrBCbsD-J9QD6E,29985
|
|
37
|
+
molbuilder/molecule/builders.py,sha256=2Fg49iPsiFaWo5Hx1GGyI_dTZ1ncZt78T1IKI6AcOBI,9078
|
|
38
|
+
molbuilder/molecule/conformations.py,sha256=rjDiGpqeuIOzqxyaZlulWXitXpYKafp-2g78AyaGdtE,2119
|
|
39
|
+
molbuilder/molecule/functional_groups.py,sha256=Ndn1-g6ZLpZJt9wkb04rw0BkKkWx0kIZ-6Y9YPdYh1U,18130
|
|
40
|
+
molbuilder/molecule/graph.py,sha256=4gLmAbiecTKnnIODbnoZ8tA92PW9uvCfY10HdYLZe90,25053
|
|
41
|
+
molbuilder/molecule/peptides.py,sha256=ndZLvWc3BxX4Nr3x53frkBRCfsLJfo0xo3c4Mh50Z9I,351
|
|
42
|
+
molbuilder/molecule/stereochemistry.py,sha256=XS_T5S23CklXj0bdzLY_gcFBpYhuK260bKemC--tpBI,218
|
|
43
|
+
molbuilder/process/__init__.py,sha256=jrxiDv4szwHeD8fGZ1eaYtUrTOzKab_piLyQdrrDlv4,141
|
|
44
|
+
molbuilder/process/conditions.py,sha256=8vCUlPu0zFM24TjncCpYBFVx1Us3l143CmAecDzzEME,9920
|
|
45
|
+
molbuilder/process/costing.py,sha256=akBCCpMfzlKhdQNBPAHX9WioNOzu79CiXvx9pwPnN8k,10962
|
|
46
|
+
molbuilder/process/purification.py,sha256=hSDGL1bAeo2iJDdhmYJnhlsH39SJLbrQrtB4ZEz8Rz4,9817
|
|
47
|
+
molbuilder/process/reactor.py,sha256=S5-rWuSR29niznWS6zOGZbfaJCLIDpRcXo_ZJjC9OGc,10236
|
|
48
|
+
molbuilder/process/safety.py,sha256=fPH2EenG0N_tmSxwAnjqEAJ4JQPZQBS8fpMHIUaTFb8,20170
|
|
49
|
+
molbuilder/process/scale_up.py,sha256=iM2XsFuTIFOak1Y7j8bdLOMIVOmgd6_u-KfcCqirkZc,14456
|
|
50
|
+
molbuilder/process/solvent_systems.py,sha256=llqaSm6BSPge5w_9EfjaBFQ_2yj0xtUT8FSBzeRVYyY,7257
|
|
51
|
+
molbuilder/reactions/__init__.py,sha256=Kq1O0Fc1kDEnBwtxqeHGw_RiJ7TdJtH1RHmu6eICSUI,231
|
|
52
|
+
molbuilder/reactions/functional_group_detect.py,sha256=hfKDTeb886gywbsUAAN8mtwcKpdxIs2P7uKom5DkbkE,26726
|
|
53
|
+
molbuilder/reactions/knowledge_base.py,sha256=3tGvgPcuR7_O8zHI5icnIaDyOmdjiUqUYBTBQ3SHxX4,72321
|
|
54
|
+
molbuilder/reactions/reaction_types.py,sha256=I4nC-6zlPq37QNmTXENF74wWs8-BLo36Xpm8gNqvuqY,3786
|
|
55
|
+
molbuilder/reactions/reagent_data.py,sha256=jBsZ6TblPAblsQngmc48g-ALL4odAgDy56ha7SVkQSk,53744
|
|
56
|
+
molbuilder/reactions/retrosynthesis.py,sha256=cGH_Ru7G74UoANT_W8P4n2NJ4NDFn1lGn-O9NOPUB_w,49758
|
|
57
|
+
molbuilder/reactions/synthesis_route.py,sha256=ybARbNg1VQ8aOSqwPBpoFxcSP1iEKbPKA6Tv8BWuNjY,12212
|
|
58
|
+
molbuilder/reports/__init__.py,sha256=1x6rRrdic27X21dkfOYN8TI-mJc7TVhICDmyJ8KTJLw,4284
|
|
59
|
+
molbuilder/reports/cost_report.py,sha256=JPJBh_b2IjifCIqLhsYRJWF_dvBDBXdAwcatWh7j1A8,6790
|
|
60
|
+
molbuilder/reports/molecule_report.py,sha256=33RS1QpziWbcD9bzjqGUOXsqHd2U3dKtQ5EOnKUgDXE,8513
|
|
61
|
+
molbuilder/reports/safety_report.py,sha256=_2N_6SoQFel7_z9iSSXkweRWQiBXuCL7ixjq_2soMyI,10233
|
|
62
|
+
molbuilder/reports/synthesis_report.py,sha256=o5PUDOnva7SlWAMmZms7fo2Zoi4qut1XTDKaJY1jZBY,10096
|
|
63
|
+
molbuilder/reports/text_formatter.py,sha256=g1NA0FJdDfWEzPzngXWYBesokyj4CFAhL5JUYYwQiiM,5522
|
|
64
|
+
molbuilder/smiles/__init__.py,sha256=KX9neiR2temLI71KaZS_apcbrWZpPAAgRt4Q5FIJ9G8,173
|
|
65
|
+
molbuilder/smiles/parser.py,sha256=rFoUlXH2t2skbXQyP9Xwn4JRjvWg0JcRsmq7gpCOAyw,15963
|
|
66
|
+
molbuilder/smiles/tokenizer.py,sha256=HAaA8Nok0dIRB2jXfNzAO2Yuv7KgAlL0zMyFXWIos2w,8709
|
|
67
|
+
molbuilder/smiles/writer.py,sha256=x7s-Y6HsF5yEhijvtQIPRBTkxTFccFtzsL-pKKcTHAQ,12025
|
|
68
|
+
molbuilder/visualization/__init__.py,sha256=LMqqek4hZqYHMeDRAFiFuQIPJCWBKc5KlfnOtWjnZGM,70
|
|
69
|
+
molbuilder/visualization/bohr_viz.py,sha256=6lWZUOy4R1M6DdxJxHfBSY2DeW1KPDvbYKt5tXRx2t0,5624
|
|
70
|
+
molbuilder/visualization/molecule_viz.py,sha256=SvDIFvGviCGs9g0W7wQQj9frGdPydoBc4v5EsacNkgM,14002
|
|
71
|
+
molbuilder/visualization/quantum_viz.py,sha256=7vvr1KaUa_WZ4FIb2r8ih6nKjUjP4piJeJosUBtsdrQ,15187
|
|
72
|
+
molbuilder/visualization/theme.py,sha256=BzR8NfqCZ2Lq1y3cdgRkN5Qg8GnRqZGdEc_gq_JAdjY,321
|
|
73
|
+
molbuilder-1.0.0.dist-info/licenses/LICENSE,sha256=WEWbPnVFDQwVEHeX_mpHol-ByLsQWgQZDMjSNjdFq8w,1094
|
|
74
|
+
molbuilder-1.0.0.dist-info/METADATA,sha256=JYT7g6C1x8oXbQsyod9LhWhIt6Ag_0WXEKcYdBP3UBo,14828
|
|
75
|
+
molbuilder-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
76
|
+
molbuilder-1.0.0.dist-info/entry_points.txt,sha256=WkIjoyvOBBe_0KeT6ixldelD_7Hfj0mPADjamMmVgck,56
|
|
77
|
+
molbuilder-1.0.0.dist-info/top_level.txt,sha256=zqS1kyhgo71hB_QcsI2eq5lO4w7VGiMaXH1f2Hn-kaA,11
|
|
78
|
+
molbuilder-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Taylor C. Powell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
molbuilder
|