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,212 @@
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('gromacs-analysis')
8
+ .description('Gromacs Analysis')
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": "gromacs_analysis",
18
+ "summary": "Gromacs Analysis",
19
+ "tags": [
20
+ "tools-predict"
21
+ ],
22
+ "parameters": [],
23
+ "requestBody": {
24
+ "required": true,
25
+ "contentType": "application/json",
26
+ "schema": {
27
+ "properties": {
28
+ "tpr_file": {
29
+ "type": "string",
30
+ "title": "Tpr File",
31
+ "description": "OSS URL to .tpr file (from gromacs_md output)"
32
+ },
33
+ "xtc_file": {
34
+ "type": "string",
35
+ "title": "Xtc File",
36
+ "description": "OSS URL to .xtc file (from gromacs_md output)"
37
+ }
38
+ },
39
+ "type": "object",
40
+ "required": [
41
+ "tpr_file",
42
+ "xtc_file"
43
+ ],
44
+ "title": "GromacsAnalysisInput",
45
+ "description": "Input for GROMACS trajectory analysis"
46
+ },
47
+ "isBinary": false
48
+ },
49
+ "responses": [
50
+ {
51
+ "statusCode": "200",
52
+ "description": "Successful Response",
53
+ "contentType": "application/json",
54
+ "schema": {
55
+ "properties": {
56
+ "tool_call_id": {
57
+ "type": "string",
58
+ "title": "Tool Call Id",
59
+ "description": "系统生成的调用唯一ID"
60
+ },
61
+ "status": {
62
+ "description": "调用状态: running, success, error 等",
63
+ "type": "string",
64
+ "enum": [
65
+ "pending",
66
+ "running",
67
+ "success",
68
+ "error"
69
+ ],
70
+ "title": "ToolResultStatus"
71
+ },
72
+ "result": {
73
+ "anyOf": [
74
+ {},
75
+ {
76
+ "type": "null"
77
+ }
78
+ ],
79
+ "title": "Result",
80
+ "description": "如果即时成功,这里是工具的返回结果字典"
81
+ },
82
+ "error_message": {
83
+ "anyOf": [
84
+ {
85
+ "type": "string"
86
+ },
87
+ {
88
+ "type": "null"
89
+ }
90
+ ],
91
+ "title": "Error Message",
92
+ "description": "如果有错误,提供错误信息"
93
+ },
94
+ "credits_cost": {
95
+ "anyOf": [
96
+ {
97
+ "type": "number"
98
+ },
99
+ {
100
+ "type": "null"
101
+ }
102
+ ],
103
+ "title": "Credits Cost",
104
+ "description": "消费积分"
105
+ },
106
+ "tool_name": {
107
+ "type": "string",
108
+ "title": "Tool Name",
109
+ "description": "执行的工具名"
110
+ }
111
+ },
112
+ "type": "object",
113
+ "required": [
114
+ "tool_call_id",
115
+ "status",
116
+ "tool_name"
117
+ ],
118
+ "title": "ToolInvokeResponse"
119
+ },
120
+ "isBinary": false
121
+ },
122
+ {
123
+ "statusCode": "422",
124
+ "description": "Validation Error",
125
+ "contentType": "application/json",
126
+ "schema": {
127
+ "properties": {
128
+ "detail": {
129
+ "items": {
130
+ "properties": {
131
+ "loc": {
132
+ "items": {
133
+ "anyOf": [
134
+ {
135
+ "type": "string"
136
+ },
137
+ {
138
+ "type": "integer"
139
+ }
140
+ ]
141
+ },
142
+ "type": "array",
143
+ "title": "Location"
144
+ },
145
+ "msg": {
146
+ "type": "string",
147
+ "title": "Message"
148
+ },
149
+ "type": {
150
+ "type": "string",
151
+ "title": "Error Type"
152
+ }
153
+ },
154
+ "type": "object",
155
+ "required": [
156
+ "loc",
157
+ "msg",
158
+ "type"
159
+ ],
160
+ "title": "ValidationError"
161
+ },
162
+ "type": "array",
163
+ "title": "Detail"
164
+ }
165
+ },
166
+ "type": "object",
167
+ "title": "HTTPValidationError"
168
+ },
169
+ "isBinary": false
170
+ }
171
+ ],
172
+ "security": [
173
+ "HTTPBearer"
174
+ ]
175
+ }, null, 2));
176
+ return;
177
+ }
178
+ try {
179
+ const currentBaseUrl = options.baseUrl || baseUrl;
180
+ const config = { baseUrl: currentBaseUrl };
181
+ const path = '/api/tools/predict/gromacs-analysis';
182
+ const url = path;
183
+ const body = options.body ? JSON.parse(options.body) : undefined;
184
+ const response = await (0, client_1.request)(config, {
185
+ method: 'post',
186
+ path: url,
187
+ headers: undefined,
188
+ body: body,
189
+ isBinary: false,
190
+ });
191
+ const data = response;
192
+ if (options.output === 'json') {
193
+ console.log(JSON.stringify(data, null, 2));
194
+ }
195
+ else {
196
+ console.log(data);
197
+ }
198
+ }
199
+ catch (error) {
200
+ if (error.status) {
201
+ console.error('API Error:', error.status, error.message);
202
+ if (error.data) {
203
+ console.error(JSON.stringify(error.data, null, 2));
204
+ }
205
+ }
206
+ else {
207
+ console.error('Error:', error.message);
208
+ }
209
+ process.exit(1);
210
+ }
211
+ });
212
+ }
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function register(program: Command, baseUrl: string): void;
@@ -0,0 +1,236 @@
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('gromacs-md')
8
+ .description('Gromacs Md')
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": "gromacs_md",
18
+ "summary": "Gromacs Md",
19
+ "tags": [
20
+ "tools-predict"
21
+ ],
22
+ "parameters": [],
23
+ "requestBody": {
24
+ "required": true,
25
+ "contentType": "application/json",
26
+ "schema": {
27
+ "properties": {
28
+ "pdb_file": {
29
+ "type": "string",
30
+ "title": "Pdb File",
31
+ "description": "OSS URL to input PDB file"
32
+ },
33
+ "force_field": {
34
+ "type": "string",
35
+ "title": "Force Field",
36
+ "description": "Force field name (default: amber99sb-ildn)",
37
+ "default": "amber99sb-ildn"
38
+ },
39
+ "water_model": {
40
+ "type": "string",
41
+ "title": "Water Model",
42
+ "description": "Water model (default: tip3p)",
43
+ "default": "tip3p"
44
+ },
45
+ "temp": {
46
+ "type": "string",
47
+ "title": "Temp",
48
+ "description": "Temperature in K (default: 300)",
49
+ "default": "300"
50
+ },
51
+ "pressure": {
52
+ "type": "string",
53
+ "title": "Pressure",
54
+ "description": "Pressure in bar (default: 1.0)",
55
+ "default": "1.0"
56
+ },
57
+ "md_steps": {
58
+ "type": "string",
59
+ "title": "Md Steps",
60
+ "description": "Production MD steps (default: 50000, ~100ns at dt=2fs)",
61
+ "default": "50000"
62
+ }
63
+ },
64
+ "type": "object",
65
+ "required": [
66
+ "pdb_file"
67
+ ],
68
+ "title": "GromacsMdInput",
69
+ "description": "Input for GROMACS MD (build system + production simulation)"
70
+ },
71
+ "isBinary": false
72
+ },
73
+ "responses": [
74
+ {
75
+ "statusCode": "200",
76
+ "description": "Successful Response",
77
+ "contentType": "application/json",
78
+ "schema": {
79
+ "properties": {
80
+ "tool_call_id": {
81
+ "type": "string",
82
+ "title": "Tool Call Id",
83
+ "description": "系统生成的调用唯一ID"
84
+ },
85
+ "status": {
86
+ "description": "调用状态: running, success, error 等",
87
+ "type": "string",
88
+ "enum": [
89
+ "pending",
90
+ "running",
91
+ "success",
92
+ "error"
93
+ ],
94
+ "title": "ToolResultStatus"
95
+ },
96
+ "result": {
97
+ "anyOf": [
98
+ {},
99
+ {
100
+ "type": "null"
101
+ }
102
+ ],
103
+ "title": "Result",
104
+ "description": "如果即时成功,这里是工具的返回结果字典"
105
+ },
106
+ "error_message": {
107
+ "anyOf": [
108
+ {
109
+ "type": "string"
110
+ },
111
+ {
112
+ "type": "null"
113
+ }
114
+ ],
115
+ "title": "Error Message",
116
+ "description": "如果有错误,提供错误信息"
117
+ },
118
+ "credits_cost": {
119
+ "anyOf": [
120
+ {
121
+ "type": "number"
122
+ },
123
+ {
124
+ "type": "null"
125
+ }
126
+ ],
127
+ "title": "Credits Cost",
128
+ "description": "消费积分"
129
+ },
130
+ "tool_name": {
131
+ "type": "string",
132
+ "title": "Tool Name",
133
+ "description": "执行的工具名"
134
+ }
135
+ },
136
+ "type": "object",
137
+ "required": [
138
+ "tool_call_id",
139
+ "status",
140
+ "tool_name"
141
+ ],
142
+ "title": "ToolInvokeResponse"
143
+ },
144
+ "isBinary": false
145
+ },
146
+ {
147
+ "statusCode": "422",
148
+ "description": "Validation Error",
149
+ "contentType": "application/json",
150
+ "schema": {
151
+ "properties": {
152
+ "detail": {
153
+ "items": {
154
+ "properties": {
155
+ "loc": {
156
+ "items": {
157
+ "anyOf": [
158
+ {
159
+ "type": "string"
160
+ },
161
+ {
162
+ "type": "integer"
163
+ }
164
+ ]
165
+ },
166
+ "type": "array",
167
+ "title": "Location"
168
+ },
169
+ "msg": {
170
+ "type": "string",
171
+ "title": "Message"
172
+ },
173
+ "type": {
174
+ "type": "string",
175
+ "title": "Error Type"
176
+ }
177
+ },
178
+ "type": "object",
179
+ "required": [
180
+ "loc",
181
+ "msg",
182
+ "type"
183
+ ],
184
+ "title": "ValidationError"
185
+ },
186
+ "type": "array",
187
+ "title": "Detail"
188
+ }
189
+ },
190
+ "type": "object",
191
+ "title": "HTTPValidationError"
192
+ },
193
+ "isBinary": false
194
+ }
195
+ ],
196
+ "security": [
197
+ "HTTPBearer"
198
+ ]
199
+ }, null, 2));
200
+ return;
201
+ }
202
+ try {
203
+ const currentBaseUrl = options.baseUrl || baseUrl;
204
+ const config = { baseUrl: currentBaseUrl };
205
+ const path = '/api/tools/predict/gromacs-md';
206
+ const url = path;
207
+ const body = options.body ? JSON.parse(options.body) : undefined;
208
+ const response = await (0, client_1.request)(config, {
209
+ method: 'post',
210
+ path: url,
211
+ headers: undefined,
212
+ body: body,
213
+ isBinary: false,
214
+ });
215
+ const data = response;
216
+ if (options.output === 'json') {
217
+ console.log(JSON.stringify(data, null, 2));
218
+ }
219
+ else {
220
+ console.log(data);
221
+ }
222
+ }
223
+ catch (error) {
224
+ if (error.status) {
225
+ console.error('API Error:', error.status, error.message);
226
+ if (error.data) {
227
+ console.error(JSON.stringify(error.data, null, 2));
228
+ }
229
+ }
230
+ else {
231
+ console.error('Error:', error.message);
232
+ }
233
+ process.exit(1);
234
+ }
235
+ });
236
+ }
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerCommands(program: Command, baseUrl: string): void;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerCommands = registerCommands;
4
+ const predict_functional_residue_1 = require("./predict_functional_residue");
5
+ const venusx_functional_residue_prediction_1 = require("./venusx_functional_residue_prediction");
6
+ const venusg_protein_function_prediction_1 = require("./venusg_protein_function_prediction");
7
+ const predict_protein_properties_1 = require("./predict_protein_properties");
8
+ const esmfold_protein_folding_1 = require("./esmfold_protein_folding");
9
+ const alphafold_protein_folding_1 = require("./alphafold_protein_folding");
10
+ const diffdock_protein_ligand_docking_1 = require("./diffdock_protein_ligand_docking");
11
+ const venusrem_mutation_prediction_1 = require("./venusrem_mutation_prediction");
12
+ const venusprime_multipoint_prediction_1 = require("./venusprime_multipoint_prediction");
13
+ const gromacs_md_1 = require("./gromacs_md");
14
+ const gromacs_analysis_1 = require("./gromacs_analysis");
15
+ const venusmine_protein_mining_1 = require("./venusmine_protein_mining");
16
+ const proteinmpnn_sequence_design_1 = require("./proteinmpnn_sequence_design");
17
+ const rfdiffusion_protein_design_1 = require("./rfdiffusion_protein_design");
18
+ const get_tool_result_1 = require("./get_tool_result");
19
+ const cancel_tool_result_1 = require("./cancel_tool_result");
20
+ const upload_file_base_64_1 = require("./upload_file_base_64");
21
+ function registerCommands(program, baseUrl) {
22
+ (0, predict_functional_residue_1.register)(program, baseUrl);
23
+ (0, venusx_functional_residue_prediction_1.register)(program, baseUrl);
24
+ (0, venusg_protein_function_prediction_1.register)(program, baseUrl);
25
+ (0, predict_protein_properties_1.register)(program, baseUrl);
26
+ (0, esmfold_protein_folding_1.register)(program, baseUrl);
27
+ (0, alphafold_protein_folding_1.register)(program, baseUrl);
28
+ (0, diffdock_protein_ligand_docking_1.register)(program, baseUrl);
29
+ (0, venusrem_mutation_prediction_1.register)(program, baseUrl);
30
+ (0, venusprime_multipoint_prediction_1.register)(program, baseUrl);
31
+ (0, gromacs_md_1.register)(program, baseUrl);
32
+ (0, gromacs_analysis_1.register)(program, baseUrl);
33
+ (0, venusmine_protein_mining_1.register)(program, baseUrl);
34
+ (0, proteinmpnn_sequence_design_1.register)(program, baseUrl);
35
+ (0, rfdiffusion_protein_design_1.register)(program, baseUrl);
36
+ (0, get_tool_result_1.register)(program, baseUrl);
37
+ (0, cancel_tool_result_1.register)(program, baseUrl);
38
+ (0, upload_file_base_64_1.register)(program, baseUrl);
39
+ }
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function register(program: Command, baseUrl: string): void;