rowan-mcp 0.1.0__tar.gz → 1.0.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.

Potentially problematic release.


This version of rowan-mcp might be problematic. Click here for more details.

Files changed (44) hide show
  1. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/PKG-INFO +69 -58
  2. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/README.md +67 -56
  3. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/pyproject.toml +2 -2
  4. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/__init__.py +1 -1
  5. rowan_mcp-1.0.1/rowan_mcp/functions/conformers.py +80 -0
  6. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/electronic_properties.py +2 -60
  7. rowan_mcp-1.0.1/rowan_mcp/functions/fukui.py +219 -0
  8. rowan_mcp-1.0.1/rowan_mcp/functions/macropka.py +120 -0
  9. rowan_mcp-1.0.1/rowan_mcp/functions/molecule_lookup.py +57 -0
  10. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/uv.lock +1 -1
  11. rowan_mcp-0.1.0/rowan_mcp/functions/conformers.py +0 -135
  12. rowan_mcp-0.1.0/rowan_mcp/functions/fukui.py +0 -355
  13. rowan_mcp-0.1.0/rowan_mcp/functions/macropka.py +0 -195
  14. rowan_mcp-0.1.0/rowan_mcp/functions/molecule_cache.db +0 -0
  15. rowan_mcp-0.1.0/rowan_mcp/functions/molecule_lookup.py +0 -446
  16. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/.gitignore +0 -0
  17. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/MANIFEST.in +0 -0
  18. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/ROWAN_MCP_TEST_QUERIES.md +0 -0
  19. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/ROWAN_MCP_TOOLS.md +0 -0
  20. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan-dxt.dxt +0 -0
  21. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/__main__.py +0 -0
  22. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/admet.py +0 -0
  23. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/bde.py +0 -0
  24. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/calculation_retrieve.py +0 -0
  25. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/descriptors.py +0 -0
  26. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/docking.py +0 -0
  27. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/docking_enhanced.py +0 -0
  28. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/folder_management.py +0 -0
  29. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/hydrogen_bond_basicity.py +0 -0
  30. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/irc.py +0 -0
  31. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/molecular_converter.py +0 -0
  32. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/molecular_dynamics.py +0 -0
  33. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/multistage_opt.py +0 -0
  34. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/pdb_handler.py +0 -0
  35. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/pka.py +0 -0
  36. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/redox_potential.py +0 -0
  37. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/scan.py +0 -0
  38. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/scan_analyzer.py +0 -0
  39. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/solubility.py +0 -0
  40. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/spin_states.py +0 -0
  41. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/system_management.py +0 -0
  42. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/tautomers.py +0 -0
  43. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/functions/workflow_management.py +0 -0
  44. {rowan_mcp-0.1.0 → rowan_mcp-1.0.1}/rowan_mcp/server.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rowan-mcp
3
- Version: 0.1.0
3
+ Version: 1.0.1
4
4
  Summary: Model Context Protocol server for Rowan computational chemistry platform
5
5
  Project-URL: Homepage, https://github.com/k-yenko/rowan-mcp
6
- Author-email: Katherine Yenko <katherineyenko@example.com>
6
+ Author-email: Katherine Yenko <katherineayenko@gmail.com>
7
7
  License: MIT
8
8
  Classifier: Development Status :: 3 - Alpha
9
9
  Classifier: Intended Audience :: Science/Research
@@ -32,7 +32,7 @@ Description-Content-Type: text/markdown
32
32
 
33
33
  # Rowan MCP Server
34
34
 
35
- This project wraps an MCP (Model Context Protocol) around Rowan's tools, making it easy for users to submit complex quantum chemistry calculations in natural everyday language.
35
+ This project wraps an MCP (Model Context Protocol) around Rowan's tools, making it easy for users to design molecuels and run simulations in natural everyday language.
36
36
 
37
37
  ---
38
38
 
@@ -50,31 +50,34 @@ That's it - no command line setup needed!
50
50
 
51
51
  ---
52
52
 
53
- ## **Manual Installation**
53
+ ## **Package Installation**
54
54
 
55
- **For developers or users who prefer command-line setup:**
55
+ ### **Option 1: Auto-Install (No manual installation needed!)**
56
56
 
57
- ### **1. Clone and Setup**
58
- ```bash
59
- git clone https://github.com/k-yenko/rowan-mcp.git
60
- cd rowan-mcp
61
- uv sync
62
- ```
63
-
64
- ### **2. Get API Key**
65
- - Visit [labs.rowansci.com](https://labs.rowansci.com)
66
- - Create free account → Generate API key
57
+ Just add this to your MCP configuration and it will automatically install and run:
67
58
 
68
- ### **3. Configure Your MCP Client**
59
+ **Using uvx (simplest):**
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "rowan": {
64
+ "command": "uvx",
65
+ "args": ["--from", "rowan-mcp", "rowan-mcp"],
66
+ "env": {
67
+ "ROWAN_API_KEY": "your_api_key_here"
68
+ }
69
+ }
70
+ }
71
+ }
72
+ ```
69
73
 
70
- **Claude Desktop Example:**
74
+ **Using uv run (alternative):**
71
75
  ```json
72
76
  {
73
77
  "mcpServers": {
74
78
  "rowan": {
75
79
  "command": "uv",
76
- "args": ["run", "python", "-m", "rowan_mcp"],
77
- "cwd": "/path/to/rowan-mcp",
80
+ "args": ["run", "--with", "rowan-mcp", "-m", "rowan_mcp"],
78
81
  "env": {
79
82
  "ROWAN_API_KEY": "your_api_key_here"
80
83
  }
@@ -83,77 +86,68 @@ uv sync
83
86
  }
84
87
  ```
85
88
 
86
- *Replace `/path/to/rowan-mcp` with the actual path where you cloned the repository*
89
+ ### **Option 2: Manual Installation**
87
90
 
88
- **To find your path:**
91
+ If you prefer to install the package first:
92
+
93
+ **Using uv:**
89
94
  ```bash
90
- # After cloning, run this in the rowan-mcp directory:
91
- pwd
92
- # Copy the output and use it as your "cwd" value
95
+ uv add rowan-mcp
93
96
  ```
94
97
 
95
- ### **4. Start Using**
96
- Ask your AI: *"Calculate the pKa of aspirin"* or *"Optimize the geometry of caffeine"*
97
-
98
- ### **Alternative: Use .env file**
99
- Instead of putting your API key in the MCP config, create a `.env` file:
98
+ **Using pip:**
100
99
  ```bash
101
- # In the rowan-mcp directory:
102
- echo "ROWAN_API_KEY=your_actual_api_key_here" > .env
100
+ pip install rowan-mcp
103
101
  ```
104
102
 
105
- Then use this simpler config (no env section needed):
103
+ Then use this configuration:
106
104
  ```json
107
105
  {
108
106
  "mcpServers": {
109
107
  "rowan": {
110
- "command": "uv",
111
- "args": ["run", "python", "-m", "rowan_mcp"],
112
- "cwd": "/path/to/rowan-mcp"
108
+ "command": "rowan-mcp",
109
+ "env": {
110
+ "ROWAN_API_KEY": "your_api_key_here"
111
+ }
113
112
  }
114
113
  }
115
114
  }
116
115
  ```
117
116
 
117
+ ### **Get API Key**
118
+
119
+ Visit [labs.rowansci.com](https://labs.rowansci.com) → Create account → Generate API key
120
+
121
+ ### **Start Using**
122
+
123
+ Ask your AI: *"Calculate the pKa of aspirin"* or *"Optimize the geometry of caffeine"*
124
+
118
125
  ---
119
126
 
120
127
  ## **What You Can Do**
121
128
 
122
129
  Ask the LLM to:
123
130
  - **Calculate drug properties**: *"Predict drug-likeness of aspirin"*
124
- - **Optimize molecular structures**: *"Optimize the geometry of aspirin"*
131
+ - **Optimize molecular structures**: *"Optimize the geometry of aspirin"*
125
132
  - **Predict chemical behavior**: *"What's the pKa of acetic acid?"*
126
133
  - **Run calculations**: *"Calculate the HOMO and LUMO of benzene"*
127
134
 
128
135
  ## **System Requirements**
129
136
 
130
137
  - **Python 3.10+** (Python 3.11+ recommended)
131
- - **[uv](https://docs.astral.sh/uv/) package manager**
138
+ - **Package manager**: [uv](https://docs.astral.sh/uv/) (recommended) or pip
132
139
  - **Rowan API key** (free at [labs.rowansci.com](https://labs.rowansci.com))
133
- - **MCP-compatible client** (Claude Desktop, Continue, etc.)
134
-
135
- ## **Testing Your Setup**
140
+ - **MCP-compatible client** (Claude Desktop, etc.)
136
141
 
137
- You can test the server directly:
142
+ **Development commands** (if you cloned the repo):
138
143
  ```bash
139
- # In the rowan-mcp directory:
140
- uv run python -m rowan_mcp --help
141
- ```
142
-
143
- ## **Development**
144
-
145
- The installation above is the same for development! Additional commands:
146
- ```bash
147
- # Run server in HTTP/SSE mode
144
+ # Run from source
148
145
  uv run python -m rowan_mcp --http
149
-
150
- # Run server in STDIO mode (default)
151
- uv run python -m rowan_mcp
152
146
  ```
153
147
 
154
148
  ---
155
149
 
156
- ## Available Tools
150
+ ## **Available Tools**
157
151
 
158
152
  ### Chemistry Calculations
159
153
  - `rowan_basic_calculation` - Energy, optimization, frequencies
@@ -172,7 +166,6 @@ uv run python -m rowan_mcp
172
166
  ### Drug Discovery
173
167
  - `rowan_admet` - ADME-Tox properties
174
168
 
175
-
176
169
  ### Reactivity Analysis
177
170
  - `rowan_fukui` - Reactivity sites
178
171
  - `rowan_spin_states` - Spin multiplicities
@@ -181,13 +174,13 @@ uv run python -m rowan_mcp
181
174
  - `rowan_folder_create/list/update/delete` - Organize calculations
182
175
  - `rowan_workflow_create/list/status/stop` - Manage workflows
183
176
 
184
- ## Requirements
177
+ ## **Requirements**
185
178
 
186
179
  - Python 3.10+
187
180
  - Rowan API key
188
181
  - MCP-compatible AI assistant (Claude Desktop, etc.)
189
182
 
190
- ## Getting Help
183
+ ## **Getting Help**
191
184
 
192
185
  - **Documentation**: [docs.rowansci.com](https://docs.rowansci.com/)
193
186
  - or ping me!
@@ -207,10 +200,28 @@ uv run python -m rowan_mcp
207
200
  - [ ] Multistage optimization sometimes shows unexpected imaginary frequencies
208
201
  - [ ] Some calculations show as finished in logs but not in Rowan UI
209
202
 
210
- ## Citation
203
+ ## **Citation**
211
204
 
212
205
  If you use this MCP tool in your research, please cite the underlying Rowan platform:
213
206
 
214
207
  Rowan Scientific. https://www.rowansci.com (accessed 2025-07-01).
215
208
 
216
209
  For complete citation information including specific computational engines, methods, and workflows used in your calculations, please refer to [Rowan's citation guidelines](https://docs.rowansci.com/citations).
210
+
211
+ ---
212
+
213
+ ## **Publishing (Maintainer Notes)**
214
+
215
+ To publish a new version to PyPI:
216
+
217
+ ```bash
218
+ # Update version in pyproject.toml and rowan_mcp/__init__.py
219
+ # Build the package
220
+ uv build
221
+
222
+ # Publish to PyPI (requires API token)
223
+ uv publish
224
+
225
+ # Or publish to TestPyPI first
226
+ uv publish --index-url https://test.pypi.org/simple/
227
+ ```
@@ -1,6 +1,6 @@
1
1
  # Rowan MCP Server
2
2
 
3
- This project wraps an MCP (Model Context Protocol) around Rowan's tools, making it easy for users to submit complex quantum chemistry calculations in natural everyday language.
3
+ This project wraps an MCP (Model Context Protocol) around Rowan's tools, making it easy for users to design molecuels and run simulations in natural everyday language.
4
4
 
5
5
  ---
6
6
 
@@ -18,31 +18,34 @@ That's it - no command line setup needed!
18
18
 
19
19
  ---
20
20
 
21
- ## **Manual Installation**
21
+ ## **Package Installation**
22
22
 
23
- **For developers or users who prefer command-line setup:**
23
+ ### **Option 1: Auto-Install (No manual installation needed!)**
24
24
 
25
- ### **1. Clone and Setup**
26
- ```bash
27
- git clone https://github.com/k-yenko/rowan-mcp.git
28
- cd rowan-mcp
29
- uv sync
30
- ```
31
-
32
- ### **2. Get API Key**
33
- - Visit [labs.rowansci.com](https://labs.rowansci.com)
34
- - Create free account → Generate API key
25
+ Just add this to your MCP configuration and it will automatically install and run:
35
26
 
36
- ### **3. Configure Your MCP Client**
27
+ **Using uvx (simplest):**
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "rowan": {
32
+ "command": "uvx",
33
+ "args": ["--from", "rowan-mcp", "rowan-mcp"],
34
+ "env": {
35
+ "ROWAN_API_KEY": "your_api_key_here"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
37
41
 
38
- **Claude Desktop Example:**
42
+ **Using uv run (alternative):**
39
43
  ```json
40
44
  {
41
45
  "mcpServers": {
42
46
  "rowan": {
43
47
  "command": "uv",
44
- "args": ["run", "python", "-m", "rowan_mcp"],
45
- "cwd": "/path/to/rowan-mcp",
48
+ "args": ["run", "--with", "rowan-mcp", "-m", "rowan_mcp"],
46
49
  "env": {
47
50
  "ROWAN_API_KEY": "your_api_key_here"
48
51
  }
@@ -51,77 +54,68 @@ uv sync
51
54
  }
52
55
  ```
53
56
 
54
- *Replace `/path/to/rowan-mcp` with the actual path where you cloned the repository*
57
+ ### **Option 2: Manual Installation**
55
58
 
56
- **To find your path:**
59
+ If you prefer to install the package first:
60
+
61
+ **Using uv:**
57
62
  ```bash
58
- # After cloning, run this in the rowan-mcp directory:
59
- pwd
60
- # Copy the output and use it as your "cwd" value
63
+ uv add rowan-mcp
61
64
  ```
62
65
 
63
- ### **4. Start Using**
64
- Ask your AI: *"Calculate the pKa of aspirin"* or *"Optimize the geometry of caffeine"*
65
-
66
- ### **Alternative: Use .env file**
67
- Instead of putting your API key in the MCP config, create a `.env` file:
66
+ **Using pip:**
68
67
  ```bash
69
- # In the rowan-mcp directory:
70
- echo "ROWAN_API_KEY=your_actual_api_key_here" > .env
68
+ pip install rowan-mcp
71
69
  ```
72
70
 
73
- Then use this simpler config (no env section needed):
71
+ Then use this configuration:
74
72
  ```json
75
73
  {
76
74
  "mcpServers": {
77
75
  "rowan": {
78
- "command": "uv",
79
- "args": ["run", "python", "-m", "rowan_mcp"],
80
- "cwd": "/path/to/rowan-mcp"
76
+ "command": "rowan-mcp",
77
+ "env": {
78
+ "ROWAN_API_KEY": "your_api_key_here"
79
+ }
81
80
  }
82
81
  }
83
82
  }
84
83
  ```
85
84
 
85
+ ### **Get API Key**
86
+
87
+ Visit [labs.rowansci.com](https://labs.rowansci.com) → Create account → Generate API key
88
+
89
+ ### **Start Using**
90
+
91
+ Ask your AI: *"Calculate the pKa of aspirin"* or *"Optimize the geometry of caffeine"*
92
+
86
93
  ---
87
94
 
88
95
  ## **What You Can Do**
89
96
 
90
97
  Ask the LLM to:
91
98
  - **Calculate drug properties**: *"Predict drug-likeness of aspirin"*
92
- - **Optimize molecular structures**: *"Optimize the geometry of aspirin"*
99
+ - **Optimize molecular structures**: *"Optimize the geometry of aspirin"*
93
100
  - **Predict chemical behavior**: *"What's the pKa of acetic acid?"*
94
101
  - **Run calculations**: *"Calculate the HOMO and LUMO of benzene"*
95
102
 
96
103
  ## **System Requirements**
97
104
 
98
105
  - **Python 3.10+** (Python 3.11+ recommended)
99
- - **[uv](https://docs.astral.sh/uv/) package manager**
106
+ - **Package manager**: [uv](https://docs.astral.sh/uv/) (recommended) or pip
100
107
  - **Rowan API key** (free at [labs.rowansci.com](https://labs.rowansci.com))
101
- - **MCP-compatible client** (Claude Desktop, Continue, etc.)
102
-
103
- ## **Testing Your Setup**
108
+ - **MCP-compatible client** (Claude Desktop, etc.)
104
109
 
105
- You can test the server directly:
110
+ **Development commands** (if you cloned the repo):
106
111
  ```bash
107
- # In the rowan-mcp directory:
108
- uv run python -m rowan_mcp --help
109
- ```
110
-
111
- ## **Development**
112
-
113
- The installation above is the same for development! Additional commands:
114
- ```bash
115
- # Run server in HTTP/SSE mode
112
+ # Run from source
116
113
  uv run python -m rowan_mcp --http
117
-
118
- # Run server in STDIO mode (default)
119
- uv run python -m rowan_mcp
120
114
  ```
121
115
 
122
116
  ---
123
117
 
124
- ## Available Tools
118
+ ## **Available Tools**
125
119
 
126
120
  ### Chemistry Calculations
127
121
  - `rowan_basic_calculation` - Energy, optimization, frequencies
@@ -140,7 +134,6 @@ uv run python -m rowan_mcp
140
134
  ### Drug Discovery
141
135
  - `rowan_admet` - ADME-Tox properties
142
136
 
143
-
144
137
  ### Reactivity Analysis
145
138
  - `rowan_fukui` - Reactivity sites
146
139
  - `rowan_spin_states` - Spin multiplicities
@@ -149,13 +142,13 @@ uv run python -m rowan_mcp
149
142
  - `rowan_folder_create/list/update/delete` - Organize calculations
150
143
  - `rowan_workflow_create/list/status/stop` - Manage workflows
151
144
 
152
- ## Requirements
145
+ ## **Requirements**
153
146
 
154
147
  - Python 3.10+
155
148
  - Rowan API key
156
149
  - MCP-compatible AI assistant (Claude Desktop, etc.)
157
150
 
158
- ## Getting Help
151
+ ## **Getting Help**
159
152
 
160
153
  - **Documentation**: [docs.rowansci.com](https://docs.rowansci.com/)
161
154
  - or ping me!
@@ -175,10 +168,28 @@ uv run python -m rowan_mcp
175
168
  - [ ] Multistage optimization sometimes shows unexpected imaginary frequencies
176
169
  - [ ] Some calculations show as finished in logs but not in Rowan UI
177
170
 
178
- ## Citation
171
+ ## **Citation**
179
172
 
180
173
  If you use this MCP tool in your research, please cite the underlying Rowan platform:
181
174
 
182
175
  Rowan Scientific. https://www.rowansci.com (accessed 2025-07-01).
183
176
 
184
177
  For complete citation information including specific computational engines, methods, and workflows used in your calculations, please refer to [Rowan's citation guidelines](https://docs.rowansci.com/citations).
178
+
179
+ ---
180
+
181
+ ## **Publishing (Maintainer Notes)**
182
+
183
+ To publish a new version to PyPI:
184
+
185
+ ```bash
186
+ # Update version in pyproject.toml and rowan_mcp/__init__.py
187
+ # Build the package
188
+ uv build
189
+
190
+ # Publish to PyPI (requires API token)
191
+ uv publish
192
+
193
+ # Or publish to TestPyPI first
194
+ uv publish --index-url https://test.pypi.org/simple/
195
+ ```
@@ -4,10 +4,10 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "rowan-mcp"
7
- version = "0.1.0"
7
+ version = "1.0.1"
8
8
  description = "Model Context Protocol server for Rowan computational chemistry platform"
9
9
  authors = [
10
- {name = "Katherine Yenko", email = "katherineyenko@example.com"}
10
+ {name = "Katherine Yenko", email = "katherineayenko@gmail.com"}
11
11
  ]
12
12
  license = {text = "MIT"}
13
13
  readme = "README.md"
@@ -5,7 +5,7 @@ This package provides MCP (Model Context Protocol) server functionality
5
5
  for integrating with Rowan's computational chemistry platform.
6
6
  """
7
7
 
8
- __version__ = "0.1.0"
8
+ __version__ = "1.0.0"
9
9
  __author__ = "Rowan MCP Team"
10
10
  __description__ = "MCP server for Rowan computational chemistry platform"
11
11
 
@@ -0,0 +1,80 @@
1
+ """
2
+ Rowan conformers function for conformational analysis.
3
+ """
4
+
5
+ import os
6
+ import logging
7
+ import time
8
+ from typing import Optional
9
+
10
+ try:
11
+ import rowan
12
+ except ImportError:
13
+ rowan = None
14
+
15
+ # Setup logging
16
+ logger = logging.getLogger(__name__)
17
+
18
+ # Setup API key
19
+ api_key = os.getenv("ROWAN_API_KEY")
20
+ if rowan and api_key:
21
+ rowan.api_key = api_key
22
+
23
+ def log_rowan_api_call(workflow_type: str, **kwargs):
24
+ """Log Rowan API calls and let Rowan handle its own errors."""
25
+
26
+ # Simple logging for long-running calculations
27
+ if workflow_type in ["multistage_opt", "conformer_search"]:
28
+ blocking = kwargs.get('blocking', True)
29
+ if blocking:
30
+ logger.info(f" Starting {workflow_type.replace('_', ' ')}...")
31
+ else:
32
+ logger.info(f" Submitting {workflow_type.replace('_', ' ')} without waiting")
33
+
34
+ # Let Rowan handle everything - no custom error handling
35
+ return rowan.compute(workflow_type=workflow_type, **kwargs)
36
+
37
+ def rowan_conformers(
38
+ name: str,
39
+ molecule: str,
40
+ max_conformers: int = 50,
41
+ mode: str = "rapid",
42
+ folder_uuid: Optional[str] = None,
43
+ blocking: bool = True,
44
+ ping_interval: int = 5
45
+ ):
46
+ """Generate and optimize molecular conformers using Rowan's conformer_search workflow. Valid modes are "reckless", "rapid", "careful", and "meticulous", and default to using SMILES strings for the "molecule" parameter.
47
+
48
+ Args:
49
+ name: Name for the calculation
50
+ molecule: Molecule SMILES string or common name
51
+ max_conformers: Maximum number of conformers to generate (default: 50)
52
+ mode: Conformer search mode - "reckless", "rapid", "careful", "meticulous" (default: "rapid")
53
+ folder_uuid: UUID of folder to organize calculation in
54
+ blocking: Whether to wait for completion (default: True)
55
+ ping_interval: How often to check status in seconds (default: 5)
56
+
57
+ Returns:
58
+ Conformer search results (actual results if blocking=True)
59
+ """
60
+
61
+ # Validate mode parameter
62
+ valid_modes = ["reckless", "rapid", "careful", "meticulous"]
63
+ if mode not in valid_modes:
64
+ raise ValueError(
65
+ f"Invalid mode '{mode}'. Valid modes are: {', '.join(valid_modes)}"
66
+ )
67
+
68
+ return log_rowan_api_call(
69
+ workflow_type="conformer_search",
70
+ name=name,
71
+ molecule=molecule,
72
+ mode=mode,
73
+ max_conformers=max_conformers,
74
+ folder_uuid=folder_uuid,
75
+ blocking=blocking,
76
+ ping_interval=ping_interval
77
+ )
78
+
79
+ if __name__ == "__main__":
80
+ pass
@@ -186,68 +186,10 @@ def rowan_electronic_properties(
186
186
  **electronic_params
187
187
  )
188
188
 
189
- # Enhanced result formatting for electronic properties
190
- if blocking:
191
- status = result.get('status', result.get('object_status', 'Unknown'))
192
-
193
- if status == 2: # Completed successfully
194
- formatted = f"Electronic properties calculation for '{name}' completed successfully!\n\n"
195
- elif status == 3: # Failed
196
- formatted = f"Electronic properties calculation for '{name}' failed!\n\n"
197
- else:
198
- formatted = f"Electronic properties calculation for '{name}' submitted!\n\n"
199
-
200
- formatted += f"Molecule: {molecule}\n"
201
- formatted += f"Canonical SMILES: {canonical_smiles}\n"
202
- formatted += f"Job UUID: {result.get('uuid', 'N/A')}\n"
203
- formatted += f"Status: {status}\n\n"
204
-
205
- formatted += f"Molecule Lookup: Advanced PubChemPy + SQLite + RDKit system\n\n"
206
- formatted += f"Calculation Settings:\n"
207
- formatted += f"• Method: {method.upper()}\n"
208
- formatted += f"• Basis Set: {basis_set}\n"
209
- formatted += f"• Engine: {engine.upper()}\n"
210
- formatted += f"• Charge: {charge}, Multiplicity: {multiplicity}\n\n"
211
-
212
- formatted += f"Property Calculations:\n"
213
- formatted += f"• Density Cube: {'Enabled' if compute_density_cube else 'Disabled'}\n"
214
- formatted += f"• ESP Cube: {'Enabled' if compute_electrostatic_potential_cube else 'Disabled'}\n"
215
- formatted += f"• Occupied MOs: {compute_num_occupied_orbitals}\n"
216
- formatted += f"• Virtual MOs: {compute_num_virtual_orbitals}\n\n"
217
-
218
- if status == 2:
219
- formatted += f"Additional Analysis:\n"
220
- formatted += f"• Use rowan_calculation_retrieve('{result.get('uuid')}') for full calculation details\n"
221
- formatted += f"• Use rowan_workflow_management(action='retrieve', workflow_uuid='{result.get('uuid')}') for workflow metadata\n"
222
-
223
- elif status == 3:
224
- formatted += f"Troubleshooting:\n"
225
- formatted += f"• Try simpler method/basis: method='hf', basis_set='sto-3g'\n"
226
- formatted += f"• Check molecular charge and multiplicity\n"
227
- formatted += f"• Disable cube generation for faster calculations\n"
228
- formatted += f"• Use rowan_workflow_management(action='retrieve', workflow_uuid='{result.get('uuid')}') for error details\n"
229
- else:
230
- formatted += f"Next Steps:\n"
231
- formatted += f"• Monitor status with rowan_workflow_management(action='retrieve', workflow_uuid='{result.get('uuid')}')\n"
232
- formatted += f"• Electronic properties calculations may take several minutes\n"
233
-
234
- return formatted
235
- else:
236
- return str(result)
189
+ return result
237
190
 
238
191
  except Exception as e:
239
- error_msg = f"Electronic properties calculation failed: {str(e)}\n\n"
240
- error_msg += f"Molecule: {molecule}\n"
241
- error_msg += f"Canonical SMILES: {canonical_smiles}\n"
242
- error_msg += f"Settings: {method}/{basis_set}/{engine}\n\n"
243
- error_msg += f"Molecule Lookup: Advanced PubChemPy + SQLite + RDKit system\n\n"
244
- error_msg += f"Common Issues:\n"
245
- error_msg += f"• Invalid method/basis set combination\n"
246
- error_msg += f"• Incorrect charge/multiplicity for molecule\n"
247
- error_msg += f"• Engine compatibility issues\n"
248
- error_msg += f"• Molecule not found in PubChem database\n"
249
- error_msg += f"• Try with default parameters first\n"
250
- return error_msg
192
+ return f"Electronic properties calculation failed: {str(e)}"
251
193
 
252
194
  def test_electronic_properties():
253
195
  """Test the electronic properties function with advanced molecule lookup."""