matvenus-cli 0.1.0

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 (47) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +201 -0
  3. package/README.md +408 -0
  4. package/bin/cli.js +3 -0
  5. package/dist/client.d.ts +13 -0
  6. package/dist/client.js +62 -0
  7. package/dist/commands/alphafold_protein_folding.d.ts +2 -0
  8. package/dist/commands/alphafold_protein_folding.js +262 -0
  9. package/dist/commands/cancel_tool_result.d.ts +2 -0
  10. package/dist/commands/cancel_tool_result.js +388 -0
  11. package/dist/commands/diffdock_protein_ligand_docking.d.ts +2 -0
  12. package/dist/commands/diffdock_protein_ligand_docking.js +252 -0
  13. package/dist/commands/esmfold_protein_folding.d.ts +2 -0
  14. package/dist/commands/esmfold_protein_folding.js +219 -0
  15. package/dist/commands/get_tool_result.d.ts +2 -0
  16. package/dist/commands/get_tool_result.js +388 -0
  17. package/dist/commands/gromacs_analysis.d.ts +2 -0
  18. package/dist/commands/gromacs_analysis.js +212 -0
  19. package/dist/commands/gromacs_md.d.ts +2 -0
  20. package/dist/commands/gromacs_md.js +236 -0
  21. package/dist/commands/index.d.ts +2 -0
  22. package/dist/commands/index.js +39 -0
  23. package/dist/commands/predict_functional_residue.d.ts +2 -0
  24. package/dist/commands/predict_functional_residue.js +234 -0
  25. package/dist/commands/predict_protein_properties.d.ts +2 -0
  26. package/dist/commands/predict_protein_properties.js +228 -0
  27. package/dist/commands/proteinmpnn_sequence_design.d.ts +2 -0
  28. package/dist/commands/proteinmpnn_sequence_design.js +271 -0
  29. package/dist/commands/rfdiffusion_protein_design.d.ts +2 -0
  30. package/dist/commands/rfdiffusion_protein_design.js +333 -0
  31. package/dist/commands/upload_file_base_64.d.ts +2 -0
  32. package/dist/commands/upload_file_base_64.js +212 -0
  33. package/dist/commands/venusg_protein_function_prediction.d.ts +2 -0
  34. package/dist/commands/venusg_protein_function_prediction.js +234 -0
  35. package/dist/commands/venusmine_protein_mining.d.ts +2 -0
  36. package/dist/commands/venusmine_protein_mining.js +212 -0
  37. package/dist/commands/venusprime_multipoint_prediction.d.ts +2 -0
  38. package/dist/commands/venusprime_multipoint_prediction.js +322 -0
  39. package/dist/commands/venusrem_mutation_prediction.d.ts +2 -0
  40. package/dist/commands/venusrem_mutation_prediction.js +260 -0
  41. package/dist/commands/venusx_functional_residue_prediction.d.ts +2 -0
  42. package/dist/commands/venusx_functional_residue_prediction.js +234 -0
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.js +125 -0
  45. package/dist/types.d.ts +12 -0
  46. package/dist/types.js +6 -0
  47. package/package.json +41 -0
@@ -0,0 +1,271 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.register = register;
4
+ const client_1 = require("../client");
5
+ function register(program, baseUrl) {
6
+ program
7
+ .command('proteinmpnn-sequence-design')
8
+ .description('Proteinmpnn Design')
9
+ .option('--body <json>', 'Request body as JSON string', (value) => value)
10
+ .option('--base-url <url>', 'Override base URL')
11
+ .option('--output <format>', 'Output format: json, table', 'json')
12
+ .option('--schema', 'Show API schema and exit')
13
+ .action(async (options) => {
14
+ if (options.schema) {
15
+ console.log(JSON.stringify({
16
+ "method": "post",
17
+ "operationId": "proteinmpnn_sequence_design",
18
+ "summary": "Proteinmpnn Design",
19
+ "tags": [
20
+ "tools-predict"
21
+ ],
22
+ "parameters": [],
23
+ "requestBody": {
24
+ "required": true,
25
+ "contentType": "application/json",
26
+ "schema": {
27
+ "properties": {
28
+ "pdb_path": {
29
+ "type": "string",
30
+ "title": "Pdb Path",
31
+ "description": "OSS URL to input PDB file"
32
+ },
33
+ "designed_chains": {
34
+ "anyOf": [
35
+ {
36
+ "items": {
37
+ "type": "string"
38
+ },
39
+ "type": "array"
40
+ },
41
+ {
42
+ "type": "null"
43
+ }
44
+ ],
45
+ "title": "Designed Chains",
46
+ "description": "Chain IDs to design (e.g., ['A', 'B']). If None, designs all chains"
47
+ },
48
+ "fixed_chains": {
49
+ "anyOf": [
50
+ {
51
+ "items": {
52
+ "type": "string"
53
+ },
54
+ "type": "array"
55
+ },
56
+ {
57
+ "type": "null"
58
+ }
59
+ ],
60
+ "title": "Fixed Chains",
61
+ "description": "Chain IDs to keep fixed (e.g., ['C', 'D'])"
62
+ },
63
+ "num_sequences": {
64
+ "type": "integer",
65
+ "title": "Num Sequences",
66
+ "description": "Number of sequences to generate (default: 4)",
67
+ "default": 4
68
+ },
69
+ "temperatures": {
70
+ "items": {
71
+ "type": "number"
72
+ },
73
+ "type": "array",
74
+ "title": "Temperatures",
75
+ "description": "Sampling temperatures for sequence generation (default: [0.1])",
76
+ "default": [
77
+ 0.1
78
+ ]
79
+ },
80
+ "omit_aas": {
81
+ "type": "string",
82
+ "title": "Omit Aas",
83
+ "description": "Amino acids to omit from design (default: 'X')",
84
+ "default": "X"
85
+ },
86
+ "homomer": {
87
+ "type": "boolean",
88
+ "title": "Homomer",
89
+ "description": "Enable homomer symmetric design for multi-chain proteins (default: False)",
90
+ "default": false
91
+ },
92
+ "ca_only": {
93
+ "type": "boolean",
94
+ "title": "Ca Only",
95
+ "description": "Use Cα-only mode for backbone representation (default: False)",
96
+ "default": false
97
+ }
98
+ },
99
+ "type": "object",
100
+ "required": [
101
+ "pdb_path"
102
+ ],
103
+ "title": "ProteinMPNNInput",
104
+ "description": "Input for ProteinMPNN sequence design"
105
+ },
106
+ "isBinary": false
107
+ },
108
+ "responses": [
109
+ {
110
+ "statusCode": "200",
111
+ "description": "Successful Response",
112
+ "contentType": "application/json",
113
+ "schema": {
114
+ "properties": {
115
+ "tool_call_id": {
116
+ "type": "string",
117
+ "title": "Tool Call Id",
118
+ "description": "系统生成的调用唯一ID"
119
+ },
120
+ "status": {
121
+ "description": "调用状态: running, success, error 等",
122
+ "type": "string",
123
+ "enum": [
124
+ "pending",
125
+ "running",
126
+ "success",
127
+ "error"
128
+ ],
129
+ "title": "ToolResultStatus"
130
+ },
131
+ "result": {
132
+ "anyOf": [
133
+ {},
134
+ {
135
+ "type": "null"
136
+ }
137
+ ],
138
+ "title": "Result",
139
+ "description": "如果即时成功,这里是工具的返回结果字典"
140
+ },
141
+ "error_message": {
142
+ "anyOf": [
143
+ {
144
+ "type": "string"
145
+ },
146
+ {
147
+ "type": "null"
148
+ }
149
+ ],
150
+ "title": "Error Message",
151
+ "description": "如果有错误,提供错误信息"
152
+ },
153
+ "credits_cost": {
154
+ "anyOf": [
155
+ {
156
+ "type": "number"
157
+ },
158
+ {
159
+ "type": "null"
160
+ }
161
+ ],
162
+ "title": "Credits Cost",
163
+ "description": "消费积分"
164
+ },
165
+ "tool_name": {
166
+ "type": "string",
167
+ "title": "Tool Name",
168
+ "description": "执行的工具名"
169
+ }
170
+ },
171
+ "type": "object",
172
+ "required": [
173
+ "tool_call_id",
174
+ "status",
175
+ "tool_name"
176
+ ],
177
+ "title": "ToolInvokeResponse"
178
+ },
179
+ "isBinary": false
180
+ },
181
+ {
182
+ "statusCode": "422",
183
+ "description": "Validation Error",
184
+ "contentType": "application/json",
185
+ "schema": {
186
+ "properties": {
187
+ "detail": {
188
+ "items": {
189
+ "properties": {
190
+ "loc": {
191
+ "items": {
192
+ "anyOf": [
193
+ {
194
+ "type": "string"
195
+ },
196
+ {
197
+ "type": "integer"
198
+ }
199
+ ]
200
+ },
201
+ "type": "array",
202
+ "title": "Location"
203
+ },
204
+ "msg": {
205
+ "type": "string",
206
+ "title": "Message"
207
+ },
208
+ "type": {
209
+ "type": "string",
210
+ "title": "Error Type"
211
+ }
212
+ },
213
+ "type": "object",
214
+ "required": [
215
+ "loc",
216
+ "msg",
217
+ "type"
218
+ ],
219
+ "title": "ValidationError"
220
+ },
221
+ "type": "array",
222
+ "title": "Detail"
223
+ }
224
+ },
225
+ "type": "object",
226
+ "title": "HTTPValidationError"
227
+ },
228
+ "isBinary": false
229
+ }
230
+ ],
231
+ "security": [
232
+ "HTTPBearer"
233
+ ]
234
+ }, null, 2));
235
+ return;
236
+ }
237
+ try {
238
+ const currentBaseUrl = options.baseUrl || baseUrl;
239
+ const config = { baseUrl: currentBaseUrl };
240
+ const path = '/api/tools/predict/proteinmpnn-design';
241
+ const url = path;
242
+ const body = options.body ? JSON.parse(options.body) : undefined;
243
+ const response = await (0, client_1.request)(config, {
244
+ method: 'post',
245
+ path: url,
246
+ headers: undefined,
247
+ body: body,
248
+ isBinary: false,
249
+ });
250
+ const data = response;
251
+ if (options.output === 'json') {
252
+ console.log(JSON.stringify(data, null, 2));
253
+ }
254
+ else {
255
+ console.log(data);
256
+ }
257
+ }
258
+ catch (error) {
259
+ if (error.status) {
260
+ console.error('API Error:', error.status, error.message);
261
+ if (error.data) {
262
+ console.error(JSON.stringify(error.data, null, 2));
263
+ }
264
+ }
265
+ else {
266
+ console.error('Error:', error.message);
267
+ }
268
+ process.exit(1);
269
+ }
270
+ });
271
+ }
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function register(program: Command, baseUrl: string): void;
@@ -0,0 +1,333 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.register = register;
4
+ const client_1 = require("../client");
5
+ function register(program, baseUrl) {
6
+ program
7
+ .command('rfdiffusion-protein-design')
8
+ .description('Rfdiffusion Design')
9
+ .option('--body <json>', 'Request body as JSON string', (value) => value)
10
+ .option('--base-url <url>', 'Override base URL')
11
+ .option('--output <format>', 'Output format: json, table', 'json')
12
+ .option('--schema', 'Show API schema and exit')
13
+ .action(async (options) => {
14
+ if (options.schema) {
15
+ console.log(JSON.stringify({
16
+ "method": "post",
17
+ "operationId": "rfdiffusion_protein_design",
18
+ "summary": "Rfdiffusion Design",
19
+ "tags": [
20
+ "tools-predict"
21
+ ],
22
+ "parameters": [],
23
+ "requestBody": {
24
+ "required": true,
25
+ "contentType": "application/json",
26
+ "schema": {
27
+ "properties": {
28
+ "input_pdb": {
29
+ "anyOf": [
30
+ {
31
+ "type": "string"
32
+ },
33
+ {
34
+ "type": "null"
35
+ }
36
+ ],
37
+ "title": "Input Pdb",
38
+ "description": "OSS URL to input PDB file (optional for unconditional generation)"
39
+ },
40
+ "contig": {
41
+ "anyOf": [
42
+ {
43
+ "type": "string"
44
+ },
45
+ {
46
+ "type": "null"
47
+ }
48
+ ],
49
+ "title": "Contig",
50
+ "description": "Contig specification string (e.g., 'A10-20,80' for motif scaffolding)"
51
+ },
52
+ "num_designs": {
53
+ "type": "integer",
54
+ "title": "Num Designs",
55
+ "description": "Number of designs to generate (default: 1)",
56
+ "default": 1
57
+ },
58
+ "length": {
59
+ "anyOf": [
60
+ {
61
+ "type": "string"
62
+ },
63
+ {
64
+ "type": "null"
65
+ }
66
+ ],
67
+ "title": "Length",
68
+ "description": "Total design length constraint (e.g., '100' or '80-120')"
69
+ },
70
+ "hotspots": {
71
+ "anyOf": [
72
+ {
73
+ "type": "string"
74
+ },
75
+ {
76
+ "type": "null"
77
+ }
78
+ ],
79
+ "title": "Hotspots",
80
+ "description": "Hotspot residues specification for binder design (e.g., 'A10,A15,A20')"
81
+ },
82
+ "partial_t": {
83
+ "anyOf": [
84
+ {
85
+ "type": "number"
86
+ },
87
+ {
88
+ "type": "null"
89
+ }
90
+ ],
91
+ "title": "Partial T",
92
+ "description": "Noise level for partial diffusion in Angstroms (e.g., 5.0-15.0)"
93
+ },
94
+ "T": {
95
+ "type": "integer",
96
+ "title": "T",
97
+ "description": "Number of diffusion steps (default: 50)",
98
+ "default": 50
99
+ },
100
+ "seed_offset": {
101
+ "type": "integer",
102
+ "title": "Seed Offset",
103
+ "description": "Random seed offset (default: 0)",
104
+ "default": 0
105
+ },
106
+ "recenter": {
107
+ "type": "boolean",
108
+ "title": "Recenter",
109
+ "description": "Recenter structure (default: True)",
110
+ "default": true
111
+ },
112
+ "radius": {
113
+ "type": "number",
114
+ "title": "Radius",
115
+ "description": "Radius for neighbor calculation (default: 10.0)",
116
+ "default": 10
117
+ },
118
+ "num_recycles": {
119
+ "type": "integer",
120
+ "title": "Num Recycles",
121
+ "description": "Number of recycles (default: 1)",
122
+ "default": 1
123
+ },
124
+ "softmax_T": {
125
+ "type": "number",
126
+ "title": "Softmax T",
127
+ "description": "Softmax temperature (default: 1e-5)",
128
+ "default": 0.00001
129
+ },
130
+ "write_trb": {
131
+ "type": "boolean",
132
+ "title": "Write Trb",
133
+ "description": "Write .trb files (default: True)",
134
+ "default": true
135
+ },
136
+ "cautious": {
137
+ "type": "boolean",
138
+ "title": "Cautious",
139
+ "description": "Use cautious mode (default: True)",
140
+ "default": true
141
+ },
142
+ "align_motif": {
143
+ "type": "boolean",
144
+ "title": "Align Motif",
145
+ "description": "Align motif (default: True)",
146
+ "default": true
147
+ },
148
+ "final_step": {
149
+ "type": "integer",
150
+ "title": "Final Step",
151
+ "description": "Final diffusion step (default: 1)",
152
+ "default": 1
153
+ },
154
+ "guide_scale": {
155
+ "type": "number",
156
+ "title": "Guide Scale",
157
+ "description": "Guidance scale (default: 10.0)",
158
+ "default": 10
159
+ }
160
+ },
161
+ "type": "object",
162
+ "required": [
163
+ "input_pdb"
164
+ ],
165
+ "title": "RFdiffusionInput",
166
+ "description": "Input for RFdiffusion protein design"
167
+ },
168
+ "isBinary": false
169
+ },
170
+ "responses": [
171
+ {
172
+ "statusCode": "200",
173
+ "description": "Successful Response",
174
+ "contentType": "application/json",
175
+ "schema": {
176
+ "properties": {
177
+ "tool_call_id": {
178
+ "type": "string",
179
+ "title": "Tool Call Id",
180
+ "description": "系统生成的调用唯一ID"
181
+ },
182
+ "status": {
183
+ "description": "调用状态: running, success, error 等",
184
+ "type": "string",
185
+ "enum": [
186
+ "pending",
187
+ "running",
188
+ "success",
189
+ "error"
190
+ ],
191
+ "title": "ToolResultStatus"
192
+ },
193
+ "result": {
194
+ "anyOf": [
195
+ {},
196
+ {
197
+ "type": "null"
198
+ }
199
+ ],
200
+ "title": "Result",
201
+ "description": "如果即时成功,这里是工具的返回结果字典"
202
+ },
203
+ "error_message": {
204
+ "anyOf": [
205
+ {
206
+ "type": "string"
207
+ },
208
+ {
209
+ "type": "null"
210
+ }
211
+ ],
212
+ "title": "Error Message",
213
+ "description": "如果有错误,提供错误信息"
214
+ },
215
+ "credits_cost": {
216
+ "anyOf": [
217
+ {
218
+ "type": "number"
219
+ },
220
+ {
221
+ "type": "null"
222
+ }
223
+ ],
224
+ "title": "Credits Cost",
225
+ "description": "消费积分"
226
+ },
227
+ "tool_name": {
228
+ "type": "string",
229
+ "title": "Tool Name",
230
+ "description": "执行的工具名"
231
+ }
232
+ },
233
+ "type": "object",
234
+ "required": [
235
+ "tool_call_id",
236
+ "status",
237
+ "tool_name"
238
+ ],
239
+ "title": "ToolInvokeResponse"
240
+ },
241
+ "isBinary": false
242
+ },
243
+ {
244
+ "statusCode": "422",
245
+ "description": "Validation Error",
246
+ "contentType": "application/json",
247
+ "schema": {
248
+ "properties": {
249
+ "detail": {
250
+ "items": {
251
+ "properties": {
252
+ "loc": {
253
+ "items": {
254
+ "anyOf": [
255
+ {
256
+ "type": "string"
257
+ },
258
+ {
259
+ "type": "integer"
260
+ }
261
+ ]
262
+ },
263
+ "type": "array",
264
+ "title": "Location"
265
+ },
266
+ "msg": {
267
+ "type": "string",
268
+ "title": "Message"
269
+ },
270
+ "type": {
271
+ "type": "string",
272
+ "title": "Error Type"
273
+ }
274
+ },
275
+ "type": "object",
276
+ "required": [
277
+ "loc",
278
+ "msg",
279
+ "type"
280
+ ],
281
+ "title": "ValidationError"
282
+ },
283
+ "type": "array",
284
+ "title": "Detail"
285
+ }
286
+ },
287
+ "type": "object",
288
+ "title": "HTTPValidationError"
289
+ },
290
+ "isBinary": false
291
+ }
292
+ ],
293
+ "security": [
294
+ "HTTPBearer"
295
+ ]
296
+ }, null, 2));
297
+ return;
298
+ }
299
+ try {
300
+ const currentBaseUrl = options.baseUrl || baseUrl;
301
+ const config = { baseUrl: currentBaseUrl };
302
+ const path = '/api/tools/predict/rfdiffusion-design';
303
+ const url = path;
304
+ const body = options.body ? JSON.parse(options.body) : undefined;
305
+ const response = await (0, client_1.request)(config, {
306
+ method: 'post',
307
+ path: url,
308
+ headers: undefined,
309
+ body: body,
310
+ isBinary: false,
311
+ });
312
+ const data = response;
313
+ if (options.output === 'json') {
314
+ console.log(JSON.stringify(data, null, 2));
315
+ }
316
+ else {
317
+ console.log(data);
318
+ }
319
+ }
320
+ catch (error) {
321
+ if (error.status) {
322
+ console.error('API Error:', error.status, error.message);
323
+ if (error.data) {
324
+ console.error(JSON.stringify(error.data, null, 2));
325
+ }
326
+ }
327
+ else {
328
+ console.error('Error:', error.message);
329
+ }
330
+ process.exit(1);
331
+ }
332
+ });
333
+ }
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function register(program: Command, baseUrl: string): void;